From 9a1c407c9f782330cd081037cea8e97302a60b2d Mon Sep 17 00:00:00 2001 From: mroy Date: Mon, 20 Dec 2010 14:42:42 -0600 Subject: [PATCH 1/9] Fixed a bug with populating the entity editor. The variable was used as the name of an element and later as a name of an entity, causing the former to be overwritten by the latter. --- plugins/ModsFormBuilder.inc | 54 ++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/plugins/ModsFormBuilder.inc b/plugins/ModsFormBuilder.inc index d3907d38..6eb36d1b 100644 --- a/plugins/ModsFormBuilder.inc +++ b/plugins/ModsFormBuilder.inc @@ -69,9 +69,9 @@ class ModsFormBuilder extends FormBuilder { ); $includeEl = true; - $name = explode('][', $element['name']); + $elname = explode('][', $element['name']); $elLocation = &$form['indicator2']; - while (isset($elLocation[$name[0]]) && ($partial = array_shift($name)) != NULL) { + while (isset($elLocation[$name[0]]) && ($partial = array_shift($elname)) != NULL) { $elLocation = &$elLocation[$partial]; } @@ -136,13 +136,13 @@ class ModsFormBuilder extends FormBuilder { $nameParts = $mname->getElementsByTagName('namePart'); foreach ($nameParts as $namePart) { - switch ($namePart->getAttribute('type')) { - case 'given': $given = $namePart->nodeValue; break; - case 'family': $family = $namePart->nodeValue; break; - case 'termsOfAddress': $title = $namePart->nodeValue; break; - case 'date': $date = $namePart->nodeValue; break; - default: $name = $namePart->nodeValue; break; - } + switch ($namePart->getAttribute('type')) { + case 'given': $given = $namePart->nodeValue; break; + case 'family': $family = $namePart->nodeValue; break; + case 'termsOfAddress': $title = $namePart->nodeValue; break; + case 'date': $date = $namePart->nodeValue; break; + default: $name = $namePart->nodeValue; break; + } } $person=array('role'=>$role); @@ -213,8 +213,8 @@ class ModsFormBuilder extends FormBuilder { $el['#options']= isset($element['authoritative_list'])?$element['authoritative_list']:array(); } - if ($includeEl) { - $elLocation[join('][', $name)] = $el; + if ($includeEl) { + $elLocation[join('][', $elname)] = $el; } } @@ -272,8 +272,8 @@ class ModsFormBuilder extends FormBuilder { } $this->createPolicy($collectionPid, &$dom, &$rootElement); -// header('Content-type: application/xml'); -// echo $dom->saveXML(); exit(); +// header('Content-type: application/xml'); +// echo $dom->saveXML(); exit(); try { $object = Fedora_Item::ingest_from_FOXML($dom); @@ -661,7 +661,7 @@ class ModsFormBuilder extends FormBuilder { if (isset($form_values['mods_people']) && isset($form_values['mods_people']['people']) && is_array($form_values['mods_people']['people']) ) { foreach ($form_values['mods_people']['people'] as $key => $val) { $name = $dom->createElement('mods:name'); - + $appendName=FALSE; if (isset($val['role'])) { $role = $dom->createElement('mods:role'); $roleTerm = $dom->createElement('mods:roleTerm', htmlspecialchars(trim($val['role']))); @@ -676,6 +676,7 @@ class ModsFormBuilder extends FormBuilder { if (trim($val['organization']) != '') { $namePart=$dom->createElement('mods:namePart', htmlspecialchars(trim($val['organization']))); $name->appendChild($namePart); + $appendName=TRUE; } } elseif (isset($val['conference'])) { @@ -683,6 +684,7 @@ class ModsFormBuilder extends FormBuilder { if (trim($val['conference']) != '') { $namePart=$dom->createElement('mods:namePart', htmlspecialchars(trim($val['conference']))); $name->appendChild($namePart); + $appendName=TRUE; } } else { @@ -690,22 +692,24 @@ class ModsFormBuilder extends FormBuilder { if (trim($val['name']) != '') { $namePart=$dom->createElement('mods:namePart', htmlspecialchars(trim($val['name']))); $name->appendChild($namePart); + $appendName=TRUE; } } - if (isset($val['date'])) { - $namePart=$dom->createElement('mods:namePart', htmlspecialchars(trim($val['date']))); - $namePart->setAttribute('type','date'); - $name->appendChild($namePart); - } - - if (isset($val['subject'])) { + if (isset($val['date'])) { + $namePart=$dom->createElement('mods:namePart', htmlspecialchars(trim($val['date']))); + $namePart->setAttribute('type','date'); + $name->appendChild($namePart); + } + + if ($appendName) { + if (isset($val['subject'])) { $subject->appendChild($name); - $hasSubject=TRUE; - } else - { + $hasSubject=TRUE; + } else { $mods->appendChild($name); - } + } + } } } From 6cfc4ce47dfabf2a9266e07c28f9e87a2ac3255b Mon Sep 17 00:00:00 2001 From: mroy Date: Mon, 20 Dec 2010 14:43:19 -0600 Subject: [PATCH 2/9] fixed some tab/spacing problems --- CollectionPolicy.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CollectionPolicy.inc b/CollectionPolicy.inc index be92f8b7..15a0392c 100644 --- a/CollectionPolicy.inc +++ b/CollectionPolicy.inc @@ -392,13 +392,13 @@ class CollectionPolicy extends XMLDatastream { $ret=array(); $content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model'); for ($i=0;$i<$content_models->length;$i++) { - $cm=ContentModel::loadFromModel($content_models->item($i)->getAttribute('pid'), + $cm=ContentModel::loadFromModel($content_models->item($i)->getAttribute('pid'), $content_models->item($i)->getAttribute('dsid'), $content_models->item($i)->getAttribute('namespace'), $content_models->item($i)->getAttribute('name')); - if ($cm !== FALSE) { - $ret[]=$cm; - } + if ($cm !== FALSE) { + $ret[]=$cm; + } } } From e84ad7c57b2d2333e9d19a0a73510f6cdf0b5051 Mon Sep 17 00:00:00 2001 From: =Mark Roy Date: Mon, 20 Dec 2010 16:53:25 -0600 Subject: [PATCH 3/9] Fixed some bugs related to the entity editor and IE7. --- form_elements/includes/people.inc | 13 ++++++------- form_elements/islandora_form_elements.module | 12 ++++++------ form_elements/js/people_ahah.js | 12 +++++++----- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/form_elements/includes/people.inc b/form_elements/includes/people.inc index f19bf9b8..43cf52ad 100644 --- a/form_elements/includes/people.inc +++ b/form_elements/includes/people.inc @@ -41,7 +41,6 @@ function _ife_find_people_element($form, &$keys = array()) { function ife_people_ahah() { - if (!isset($_POST['form_build_id'])) return; @@ -58,10 +57,9 @@ function ife_people_ahah() { $_POST = _dummy_post_info($form, $_POST); $form_state['post'] = $_POST; $form['#post'] = $_POST; - drupal_process_form($form_id, $form, $form_state); -// ob_start(); echo '
';   echo $_POST['form_build_id']."\n"; var_dump($form_state);   echo '
'; $dump = ob_get_contents(); ob_end_clean(); + //ob_start(); echo '
'; echo $_POST['form_build_id']."\n"; var_dump($form_state);   echo '
'; $dump = ob_get_contents(); ob_end_clean(); $form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id); $qt_form = _ife_find_people_element($form); @@ -109,7 +107,7 @@ function ife_remove_person_submit($form, &$form_state) { unset($form_state['submit_handlers']); form_execute_handlers('submit', $form, $form_state); $form_state['storage']['people'] = $people; - //$form_state['rebuild'] = TRUE; + $form_state['rebuild'] = TRUE; } @@ -136,14 +134,14 @@ function ife_add_person_submit($form, &$form_state) { } //only add new person if we are not adding from repository. - if (!isset($form_state['post']['add_from_repository']) || trim($form_state['post']['add_from_repository']) == '') { + $elName = isset($qt_form['entity0']['#parents'][0])?$qt_form['entity0']['#parents'][0]:null; + if ($elName == null || !isset($form_state['clicked_button']['#post'][$elName]['add_from_repository']) || trim($form_state['clicked_button']['#post'][$elName]['add_from_repository']) == '') { $people[] = array('name' => '', 'date'=>'', 'role' => '', 'subject' => ''); } - unset($form_state['submit_handlers']); form_execute_handlers('submit', $form, $form_state); $form_state['storage']['people'] = $people; - // $form_state['rebuild'] = TRUE; + $form_state['rebuild'] = TRUE; } @@ -200,6 +198,7 @@ function ife_add_conf_submit($form, &$form_state) { foreach ($peopleVals['people'] as $val) { $people[] = $val; } + $people[] = array('role' => '', 'conference' => '', 'subject' => ''); unset($form_state['submit_handlers']); diff --git a/form_elements/islandora_form_elements.module b/form_elements/islandora_form_elements.module index e174693b..094eff67 100644 --- a/form_elements/islandora_form_elements.module +++ b/form_elements/islandora_form_elements.module @@ -145,15 +145,16 @@ function ife_people_process($element,$edit,&$form_state) $people= array(); if (isset($form_state['storage']['people']) && !empty($form_state['storage']['people'])) { - foreach ($form_state['storage']['people'] as $ent) { - if ( trim($ent['name']) != '' || trim($ent['organization']) != '' || trim($ent['conference']) != '' || trim($ent['role']) != '' || trim($ent['date']) != '') { - $people[]=$ent; - } - } + foreach ($form_state['storage']['people'] as $ent) { + if ( trim($ent['name']) != '' || trim($ent['organization']) != '' || trim($ent['conference']) != '' || trim($ent['role']) != '' || trim($ent['date']) != '') { + $people[]=$ent; + } + } } $json = json_decode($form_state['post'][$element['#name']]['add_from_repository']); + $form_state['post'][$element['#name']]['add_from_repository'] = ''; // clear so that if the form is processed multiple times, it does not add twice. $person=array(); @@ -182,7 +183,6 @@ function ife_people_process($element,$edit,&$form_state) $form_state['storage']['people']=$people; - } else if (!isset($form_state['storage']['people']) || empty($form_state['storage']['people'])) { if ( (!isset($form_state['clicked_button']) || count($form_state['clicked_button']) == 0) && isset($element['#default_value']) && is_array($element['#default_value']) ) { diff --git a/form_elements/js/people_ahah.js b/form_elements/js/people_ahah.js index 9b89b0bb..0c545ba3 100755 --- a/form_elements/js/people_ahah.js +++ b/form_elements/js/people_ahah.js @@ -3,11 +3,13 @@ if (Drupal.jsEnabled) { $(document).ready(function() { - if (Drupal.ahah != undefined) { + $('#edit-mods-people-add-from-repository').blur(function () { + if ($('#edit-mods-people-add-from-repository').val() != '') { + $('#edit-mods-people-add-person').mousedown(); + } + }); - $('#edit-mods-people-add-from-repository').change(function () { - $('#edit-mods-people-add-person').mousedown(); - }); + if (Drupal.ahah != undefined) { /** * Override of Drupal.ahah.prototype.success. The only difference is that we @@ -87,4 +89,4 @@ Drupal.ahah.prototype.success = function (response, status) { }); } -})(jQuery); \ No newline at end of file +})(jQuery); From 79b665671133ddc48f82ab2ee34ec0355bb681ee Mon Sep 17 00:00:00 2001 From: =Mark Roy Date: Tue, 21 Dec 2010 14:10:47 -0600 Subject: [PATCH 4/9] Fixed some issues with solr queries that caused errors. Added trim and escaping to strings before building query. --- form_elements/includes/autocomplete.inc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/form_elements/includes/autocomplete.inc b/form_elements/includes/autocomplete.inc index d585b995..90ead4cc 100644 --- a/form_elements/includes/autocomplete.inc +++ b/form_elements/includes/autocomplete.inc @@ -3,17 +3,19 @@ // $Id$ function ife_autocomplete_person($string) { - $string=strtolower($string); + $string=trim(strtolower($string)); module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('php', 'islandora_solr_search', 'Solr/Service'); $host = variable_get('islandora_solr_search_block_host','localhost'); $port = variable_get('islandora_solr_search_block_port','8080'); $appName = variable_get('islandora_solr_search_block_app_name','solr'); - $requestHandler = variable_get("islandora_solr_search_block_request_handler",t("standard")); - - $query = 'name_personal_t:'.$string.'* OR name_organization_t:'.$string.'* OR name_conference_t:'.$string.'*'; + $requestHandler = variable_get("islandora_solr_search_block_request_handler",t("standard")); + $solr = new Apache_Solr_Service($host, $port, '/'.$appName.'/'); + + $string=$solr->escape($string); + $query = 'name_personal_t:'.$string.'* OR name_organization_t:'.$string.'* OR name_conference_t:'.$string.'*'; $additionalParams = array( 'facet' => 'false', @@ -129,7 +131,7 @@ function ife_autocomplete_gacs($collection, $string='') { $collection = FALSE; } - $string=ucwords($string); + $string=ucwords(trim($string)); $dom = DOMDocument::load ( $moduleRoot .'/xml/gacs.xml' ); $rootEl = $dom->getElementsByTagName('codelist'); @@ -159,7 +161,7 @@ function ife_autocomplete_language($collection, $string='') { $collection = FALSE; } - $string=ucwords($string); + $string=ucwords(trim($string)); $dom = DOMDocument::load ( $moduleRoot .'/xml/languages.xml' ); $rootEl = $dom->getElementsByTagName('codelist'); @@ -197,7 +199,7 @@ function ife_autocomplete($field, $collection, $string='') { 'fl' => $field ); - $query = $field .':'. $solr->escape(strtolower($string)) .'*'; + $query = $field .':'. $solr->escape(strtolower(trim($string))) .'*'; if ($collection != FALSE) { $query .= ' AND related_item_identifier_t:'. $solr->escape($collection); From 6589c7c970fe4952f7d625b0f34009cc0f6ddf64 Mon Sep 17 00:00:00 2001 From: =Mark Roy Date: Tue, 21 Dec 2010 14:11:31 -0600 Subject: [PATCH 5/9] Added orderby option to get_related* functions. Defaults to as before. --- api/fedora_collection.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/fedora_collection.inc b/api/fedora_collection.inc index c0dce02a..3db41018 100644 --- a/api/fedora_collection.inc +++ b/api/fedora_collection.inc @@ -65,7 +65,7 @@ function export_collection($collection_pid, $relationship = 'isMemberOfCollectio * @param $query * @param $query_format R */ -function get_related_items_as_xml($collection_pid, $relationship = array('isMemberOfCollection'), $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL) { +function get_related_items_as_xml($collection_pid, $relationship = array('isMemberOfCollection'), $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL, $orderby = '$title') { module_load_include('inc', 'fedora_repository', 'ObjectHelper'); $collection_item = new Fedora_Item($collection_pid); @@ -104,7 +104,7 @@ function get_related_items_as_xml($collection_pid, $relationship = array('isMemb $query_string .= ') minus $content - order by $title'; + order by '.$orderby; $query_string = htmlentities(urlencode($query_string)); @@ -117,8 +117,8 @@ function get_related_items_as_xml($collection_pid, $relationship = array('isMemb return $content; } -function get_related_items_as_array($collection_pid, $relationship = 'isMemberOfCollection', $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL) { - $content = get_related_items_as_xml($collection_pid, $relationship, $limit, $offset, $active_objects_only, $cmodel); +function get_related_items_as_array($collection_pid, $relationship = 'isMemberOfCollection', $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL, $orderby = '$title') { + $content = get_related_items_as_xml($collection_pid, $relationship, $limit, $offset, $active_objects_only, $cmodel, $orderby); if (empty($content)) { return array(); } From 3ae6862ff164aa477419fccbb68c949c4841ea75 Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Wed, 22 Dec 2010 14:02:31 -0400 Subject: [PATCH 6/9] Added availability checdk for fedora to system status. --- fedora_repository.module | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/fedora_repository.module b/fedora_repository.module index 8d96500d..cfa48bc3 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -1758,3 +1758,48 @@ function fedora_repository_display_schema($file) { } return; } + +/** + * Implementation of hook_requirements(). + * + * @return + * An array describing the status of the site regarding available updates. + * If there is no update data, only one record will be returned, indicating + * that the status of core can't be determined. If data is available, there + * will be two records: one for core, and another for all of contrib + * (assuming there are any contributed modules or themes enabled on the + * site). In addition to the fields expected by hook_requirements ('value', + * 'severity', and optionally 'description'), this array will contain a + * 'reason' attribute, which is an integer constant to indicate why the + * given status is being returned (UPDATE_NOT_SECURE, UPDATE_NOT_CURRENT, or + * UPDATE_UNKNOWN). This is used for generating the appropriate e-mail + * notification messages during update_cron(), and might be useful for other + * modules that invoke update_requirements() to find out if the site is up + * to date or not. + * + * @see _update_message_text() + * @see _update_cron_notify() + */ +function fedora_repository_requirements($phase) { + global $base_url; + if ($phase == 'runtime') { + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); + $requirement = array(); + $requirement['title'] = t("Fedora server"); + if (!fedora_available()) { + $requirement['value'] = ("Not available"); + $requirement['severity'] = REQUIREMENT_ERROR; + $requirement['description'] = t('Ensure that Fedora is running and that the collection settings are correct.', + array('@collection-settings' => $base_url.'/admin/settings/fedora_repository')); + } + else { + $requirement['value'] = ("Available"); + $requirement['severity'] = REQUIREMENT_OK; + } + + + } + $requirements = array(); + $requirements['fedora_available'] = $requirement; + return $requirements; +} \ No newline at end of file From 7c1f7891396e84034661f4f269397551789e88f3 Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Wed, 22 Dec 2010 16:47:10 -0400 Subject: [PATCH 7/9] Added check for iiv viewer. --- ilives/fedora_ilives.module | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/ilives/fedora_ilives.module b/ilives/fedora_ilives.module index 0f92d6b8..46022943 100644 --- a/ilives/fedora_ilives.module +++ b/ilives/fedora_ilives.module @@ -593,5 +593,52 @@ function install_book_content_model_objects() { if (!Fedora_Item::fedora_item_exists('ilives:CollectionModel')) { Fedora_Item::ingest_from_foxml_file(drupal_get_path('module', 'fedora_ilives') . '/xml/ilives_CollectionModel.xml'); } +} + +/** + * Implementation of hook_requirements(). + * + * @return + * An array describing the status of the site regarding available updates. + * If there is no update data, only one record will be returned, indicating + * that the status of core can't be determined. If data is available, there + * will be two records: one for core, and another for all of contrib + * (assuming there are any contributed modules or themes enabled on the + * site). In addition to the fields expected by hook_requirements ('value', + * 'severity', and optionally 'description'), this array will contain a + * 'reason' attribute, which is an integer constant to indicate why the + * given status is being returned (UPDATE_NOT_SECURE, UPDATE_NOT_CURRENT, or + * UPDATE_UNKNOWN). This is used for generating the appropriate e-mail + * notification messages during update_cron(), and might be useful for other + * modules that invoke update_requirements() to find out if the site is up + * to date or not. + * + * @see _update_message_text() + * @see _update_cron_notify() + */ +function fedora_ilives_requirements($phase) { + global $base_url; + if ($phase == 'runtime') { + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); + $requirements['iiv-war'] = array(); + $requirements['iiv-war']['title'] = t("Islandora OpenLayers image viewer web app"); + if (!_fedora_ilives_viewer_available()) { + $requirements['iiv-war']['value'] = ("Not available"); + $requirements['iiv-war']['severity'] = REQUIREMENT_ERROR; + $requirements['iiv-war']['description'] = t('Ensure that Fedora is running and that the IIV app is deployed.', + array('@iiv-home' => 'http://github.com/islandora/iiv')); + } + else { + $requirements['iiv-war']['value'] = ("Available"); + $requirements['iiv-war']['severity'] = REQUIREMENT_OK; + } + } + return $requirements; +} +function _fedora_ilives_viewer_available() { + $url = parse_url(variable_get('fedora_base_url', 'http://localhost:8080/fedora')); + $fedora_host = ("{$url['scheme']}://{$url['host']}" . (!empty($url['port']) ? ":{$url['port']}/" : '/')); + $response = drupal_http_request("$fedora_host/iiv/images/loading.gif"); + return empty($response->error); } \ No newline at end of file From 1dd31623217905feafa25412930811c7f32ca269 Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Wed, 22 Dec 2010 17:40:08 -0400 Subject: [PATCH 8/9] Added checks for ImageMagick and Kakadu to system requirements. --- fedora_repository.module | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/fedora_repository.module b/fedora_repository.module index cfa48bc3..c71b880f 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -1784,22 +1784,44 @@ function fedora_repository_requirements($phase) { global $base_url; if ($phase == 'runtime') { module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); - $requirement = array(); - $requirement['title'] = t("Fedora server"); + $requirements = array(); + $requirements['fedora-repository']['title'] = t("Fedora server"); if (!fedora_available()) { - $requirement['value'] = ("Not available"); - $requirement['severity'] = REQUIREMENT_ERROR; - $requirement['description'] = t('Ensure that Fedora is running and that the collection settings are correct.', + $requirements['fedora-repository']['value'] = t("Not available"); + $requirements['fedora-repository']['severity'] = REQUIREMENT_ERROR; + $requirements['fedora-repository']['description'] = t('Ensure that Fedora is running and that the collection settings are correct.', array('@collection-settings' => $base_url.'/admin/settings/fedora_repository')); } else { - $requirement['value'] = ("Available"); - $requirement['severity'] = REQUIREMENT_OK; + $requirements['fedora-repository']['value'] = t("Available"); + $requirements['fedora-repository']['severity'] = REQUIREMENT_OK; } + // Check for ImageMagick + $requirements['fedora-imagemagick']['title'] = t("ImageMagick convert in \$PATH"); + system('which convert', $res); + if ($res != 0) { + $requirements['fedora-imagemagick']['value'] = t('Not in $PATH'); + $requirements['fedora-imagemagick']['description'] = t('Ensure that ImageMagick is installed and the convert command is executable by the web server user.'); + $requirements['fedora-imagemagick']['severity'] = REQUIREMENT_WARNING; + } + else { + $requirements['fedora-imagemagick']['value'] = t("Available"); + $requirements['fedora-imagemagick']['severity'] = REQUIREMENT_OK; + } + $requirements['fedora-kakadu']['title'] = 'Kakadu kdu_compress in $PATH'; + system('which kdu_compress', $kdu_res); + if ($kdu_res != 0) { + $requirements['fedora-kakadu']['value'] = ('Not in $PATH'); + $requirements['fedora-kakadu']['description'] = t('Islandora cannot convert TIFF image files to JPEG2000 format. Ensure Kakadu is installed and the kdu_compress command is executable by the web server user.'); + $requirements['fedora-kakadu']['severity'] = REQUIREMENT_WARNING; + } + else { + $requirements['fedora-kakadu']['value'] = t("Available"); + $requirements['fedora-kakadu']['severity'] = REQUIREMENT_OK; + } } - $requirements = array(); - $requirements['fedora_available'] = $requirement; + return $requirements; } \ No newline at end of file From e8fa16b6d54463def106b5879176236d0a63edef Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Wed, 22 Dec 2010 17:44:11 -0400 Subject: [PATCH 9/9] Added more help text to check for ImageMagick availability. --- fedora_repository.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedora_repository.module b/fedora_repository.module index c71b880f..59b3d936 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -1802,7 +1802,7 @@ function fedora_repository_requirements($phase) { system('which convert', $res); if ($res != 0) { $requirements['fedora-imagemagick']['value'] = t('Not in $PATH'); - $requirements['fedora-imagemagick']['description'] = t('Ensure that ImageMagick is installed and the convert command is executable by the web server user.'); + $requirements['fedora-imagemagick']['description'] = t('Islandora will not be able to create thumbnails. Ensure that ImageMagick is installed and the convert command is executable by the web server user.'); $requirements['fedora-imagemagick']['severity'] = REQUIREMENT_WARNING; } else {