Browse Source

doing this the less stupid way

pull/549/head
qadan 10 years ago
parent
commit
e6eb5d93f2
  1. 10
      islandora.module

10
islandora.module

@ -1766,8 +1766,9 @@ function islandora_islandora_datastream_modified(AbstractObject $object, Abstrac
*/ */
function islandora_form_simpletest_test_form_alter(array &$form) { function islandora_form_simpletest_test_form_alter(array &$form) {
module_load_include('inc', 'simpletest', 'simpletest.pages'); module_load_include('inc', 'simpletest', 'simpletest.pages');
module_load_include('inc', 'islandora', 'tests/includes/test_utility_abstraction');
$filter_path = variable_get('islandora_simpletest_drupal_filter_path', '/usr/local/fedora/server/config/filter-drupal.xml'); $configuration = IslandoraTestUtilityClass::getTestConfiguration();
$filter_path = variable_get('islandora_simpletest_drupal_filter_path', $configuration['drupal_filter_file']);
$filter_status = is_writable($filter_path); $filter_status = is_writable($filter_path);
if ($filter_status) { if ($filter_status) {
$filter_status_message = theme_image(array('path' => 'misc/watchdog-ok.png', 'attributes' => array())) . " "; $filter_status_message = theme_image(array('path' => 'misc/watchdog-ok.png', 'attributes' => array())) . " ";
@ -1781,6 +1782,7 @@ function islandora_form_simpletest_test_form_alter(array &$form) {
'!filter_path' => $filter_path, '!filter_path' => $filter_path,
)); ));
} }
$form['tests'] = array( $form['tests'] = array(
'#type' => 'fieldset', '#type' => 'fieldset',
'#title' => t('Tests'), '#title' => t('Tests'),
@ -1833,6 +1835,8 @@ function islandora_form_simpletest_test_form_alter(array &$form) {
* Implements hook_form_alter(). * Implements hook_form_alter().
*/ */
function islandora_form_simpletest_settings_form_alter(&$form, &$form_state) { function islandora_form_simpletest_settings_form_alter(&$form, &$form_state) {
module_load_include('inc', 'islandora', 'tests/includes/test_utility_abstraction');
$configuration = IslandoraTestUtilityClass::getTestConfiguration();
$form['islandora_drupal_filter'] = array( $form['islandora_drupal_filter'] = array(
'#type' => 'fieldset', '#type' => 'fieldset',
'#title' => t('Islandora Drupal Filter Location'), '#title' => t('Islandora Drupal Filter Location'),
@ -1843,7 +1847,7 @@ function islandora_form_simpletest_settings_form_alter(&$form, &$form_state) {
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Path to the Drupal Filter'), '#title' => t('Path to the Drupal Filter'),
'#description' => t('The absolute path on the server to the Drupal filter XML file in the Fedora configuration. NOTE: This is simply used to populate the at-a-glance "is the Filter writeable" notice on the top of the list of tests, and DOES NOT actually have any bearing on its function within Islandora.'), '#description' => t('The absolute path on the server to the Drupal filter XML file in the Fedora configuration. NOTE: This is simply used to populate the at-a-glance "is the Filter writeable" notice on the top of the list of tests, and DOES NOT actually have any bearing on its function within Islandora.'),
'#default_value' => variable_get('islandora_simpletest_drupal_filter_path', '/usr/local/fedora/server/config/filter-drupal.xml'), '#default_value' => variable_get('islandora_simpletest_drupal_filter_path', $configuration['drupal_filter_file']),
); );
} }

Loading…
Cancel
Save