From 73cfd46c6825ad5977a7953486d2abd18657a1f3 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Wed, 29 May 2013 13:07:21 -0300 Subject: [PATCH 1/4] Fix the deprecation message. --- includes/ingest.form.inc | 4 ++-- includes/utilities.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index 3ef3f847..b03e7aca 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -142,8 +142,8 @@ function islandora_ingest_form_get_last_step_id(array &$form_state) { function islandora_ingest_form_prepare_new_object(array $configuration) { module_load_include('inc', 'islandora', 'includes/utilities'); if (empty($configuration['object'])) { - $message = islandora_deprecated('Please use "objects" as the default ingest form configuration property.'); - trigger_error(check_plain($message), E_USER_DEPRECATED); + $message = islandora_deprecated('7.x-1.2', t('Please use "objects" as the default ingest form configuration property.')); + trigger_error(filter_xss($message), E_USER_DEPRECATED); // ID is more specific than namespace so it will take precedence. $id = isset($configuration['namespace']) ? $configuration['namespace'] : 'islandora'; $id = isset($configuration['id']) ? $configuration['id'] : $id; diff --git a/includes/utilities.inc b/includes/utilities.inc index 3cbe2a06..424e7d07 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -825,7 +825,7 @@ function islandora_content_model_select_table_form_element($drupal_variable, $de * * @code * $message = islandora_deprecated('7.x-1.1', t('Use more cowbell.')) - * trigger_error(check_plain($message), E_USER_DEPRECATED) + * trigger_error(filter_xss($message), E_USER_DEPRECATED) * @endcode * * @param string $release From 992c42b96f1faed5fc48eb1dd8680537b1f05831 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Wed, 29 May 2013 13:09:33 -0300 Subject: [PATCH 2/4] Add semi-colons, so the code's actual code... --- includes/utilities.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/utilities.inc b/includes/utilities.inc index 424e7d07..5184ca21 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -824,8 +824,8 @@ function islandora_content_model_select_table_form_element($drupal_variable, $de * To utilitize this function pass the results to trigger_error() like so: * * @code - * $message = islandora_deprecated('7.x-1.1', t('Use more cowbell.')) - * trigger_error(filter_xss($message), E_USER_DEPRECATED) + * $message = islandora_deprecated('7.x-1.1', t('Use more cowbell.')); + * trigger_error(filter_xss($message), E_USER_DEPRECATED); * @endcode * * @param string $release From 2ce695a9f033eb56b10f994fd2b6338bf6cdcd08 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Wed, 29 May 2013 13:10:10 -0300 Subject: [PATCH 3/4] Add deprecation message to the superfluous DS-COMPOSITE-MODEL parser. --- includes/utilities.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/utilities.inc b/includes/utilities.inc index 5184ca21..6a8fb584 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -636,6 +636,9 @@ function islandora_system_settings_form_default_value($name, $default_value, arr * is optional. */ function islandora_get_comp_ds_mappings($pid) { + $message = islandora_deprecated('7.x-1.2', t('Refactor to use the more flexible islandora_get_datastreams_requirements_from_content_model().')); + trigger_error(filter_xss($message), E_USER_DEPRECATED); + $cm_object = islandora_object_load($pid); if (!isset($cm_object) || !isset($cm_object['DS-COMPOSITE-MODEL'])) { return FALSE; From 80a187bab9e405c22c9c9bc8df7fccb0347b0285 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Wed, 29 May 2013 14:04:49 -0300 Subject: [PATCH 4/4] Revert "Add semi-colons, so the code's actual code..." This reverts commit 992c42b96f1faed5fc48eb1dd8680537b1f05831... ... Apparently, the "production" code review has a bit of a bug in it, where it doesn't parse @code/@endcode sections properly: http://drupal.org/node/1991382 --- includes/utilities.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/utilities.inc b/includes/utilities.inc index 6a8fb584..cdbf8daa 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -827,8 +827,8 @@ function islandora_content_model_select_table_form_element($drupal_variable, $de * To utilitize this function pass the results to trigger_error() like so: * * @code - * $message = islandora_deprecated('7.x-1.1', t('Use more cowbell.')); - * trigger_error(filter_xss($message), E_USER_DEPRECATED); + * $message = islandora_deprecated('7.x-1.1', t('Use more cowbell.')) + * trigger_error(filter_xss($message), E_USER_DEPRECATED) * @endcode * * @param string $release