From eef868d17d53ca8b6c34882074a2ff4d5dc0e99d Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 20 Sep 2006 21:00:45 +0000 Subject: [PATCH] major whitespace cleanup - fixed trailng whitespace in new files and admin area --- admin/auth.php | 18 +- admin/backup.php | 8 +- admin/block.php | 6 +- admin/blocks.php | 6 +- admin/delete.php | 2 +- admin/enrol.php | 4 +- admin/enrol_config.php | 10 +- admin/filter.php | 4 +- admin/health.php | 14 +- admin/index.php | 42 +- admin/module.php | 4 +- admin/modules.php | 20 +- admin/questiontypes.php | 16 +- admin/report/courseoverview/index.php | 16 +- admin/report/courseoverview/reportsgraph.php | 10 +- admin/report/log/index.php | 2 +- admin/report/simpletest/ex_reporter.php | 28 +- admin/report/simpletest/ex_simple_test.php | 2 +- admin/report/simpletest/index.php | 12 +- admin/report/stats/index.php | 16 +- admin/roles/allowassign.php | 32 +- admin/roles/allowoverride.php | 30 +- admin/roles/assign.html | 8 +- admin/roles/assign.php | 24 +- admin/roles/manage.html | 12 +- admin/roles/manage.php | 32 +- admin/roles/managetabs.php | 6 +- admin/roles/override.html | 40 +- admin/roles/override.php | 60 +-- admin/roles/tabs.php | 36 +- admin/settings.php | 10 +- admin/settings/appearance.php | 6 +- admin/settings/security.php | 6 +- admin/settings/server.php | 56 +-- admin/settings/users.php | 10 +- admin/upgradesettings.php | 16 +- admin/xmldb/README.txt | 14 +- admin/xmldb/actions/XMLDBAction.class.php | 22 +- .../create_xml_file/create_xml_file.class.php | 6 +- .../delete_field/delete_field.class.php | 6 +- .../delete_index/delete_index.class.php | 6 +- .../actions/delete_key/delete_key.class.php | 6 +- .../delete_sentence/delete_sentence.class.php | 6 +- .../delete_statement.class.php | 4 +- .../delete_table/delete_table.class.php | 4 +- .../delete_xml_file/delete_xml_file.class.php | 4 +- .../actions/edit_field/edit_field.class.php | 4 +- admin/xmldb/actions/edit_field/edit_field.js | 2 +- .../edit_field_save/edit_field_save.class.php | 40 +- .../actions/edit_index/edit_index.class.php | 4 +- .../edit_index_save/edit_index_save.class.php | 14 +- .../xmldb/actions/edit_key/edit_key.class.php | 4 +- admin/xmldb/actions/edit_key/edit_key.js | 2 +- .../edit_key_save/edit_key_save.class.php | 18 +- .../edit_sentence/edit_sentence.class.php | 8 +- .../edit_sentence_save.class.php | 12 +- .../edit_statement/edit_statement.class.php | 8 +- .../edit_statement_save.class.php | 6 +- .../actions/edit_table/edit_table.class.php | 18 +- .../edit_table_save/edit_table_save.class.php | 6 +- .../edit_xml_file/edit_xml_file.class.php | 10 +- .../edit_xml_file_save.class.php | 4 +- .../get_db_directories.class.php | 12 +- .../load_xml_file/load_xml_file.class.php | 2 +- .../load_xml_files/load_xml_files.class.php | 2 +- .../actions/main_view/main_view.class.php | 2 +- .../move_updown_field.class.php | 6 +- .../move_updown_index.class.php | 6 +- .../move_updown_key/move_updown_key.class.php | 6 +- .../move_updown_statement.class.php | 6 +- .../move_updown_table.class.php | 6 +- .../actions/new_field/new_field.class.php | 4 +- .../actions/new_index/new_index.class.php | 4 +- admin/xmldb/actions/new_key/new_key.class.php | 4 +- .../new_sentence/new_sentence.class.php | 4 +- .../new_statement/new_statement.class.php | 6 +- .../actions/new_table/new_table.class.php | 4 +- .../new_table_from_mysql.class.php | 8 +- .../revert_changes/revert_changes.class.php | 4 +- .../save_xml_file/save_xml_file.class.php | 6 +- .../xmldb/actions/template/template.class.php | 6 +- admin/xmldb/actions/test/test.class.php | 4 +- .../unload_xml_file/unload_xml_file.class.php | 4 +- .../view_field_xml/view_field_xml.class.php | 2 +- .../view_index_xml/view_index_xml.class.php | 2 +- .../view_key_xml/view_key_xml.class.php | 2 +- .../view_reserved_words.class.php | 6 +- .../view_statement_xml.class.php | 2 +- .../view_structure_php.class.php | 20 +- .../view_structure_sql.class.php | 4 +- .../view_structure_xml.class.php | 2 +- .../view_table_php/view_table_php.class.php | 20 +- .../actions/view_table_php/view_table_php.js | 16 +- .../view_table_sql/view_table_sql.class.php | 4 +- .../view_table_xml/view_table_xml.class.php | 2 +- .../xmldb/actions/view_xml/view_xml.class.php | 4 +- admin/xmldb/index.php | 12 +- blocks/rss_client/db/access.php | 18 +- lib/accesslib.php | 406 ++++++++--------- lib/adminlib.php | 422 +++++++++--------- lib/db/access.php | 234 +++++----- lib/ddllib.php | 16 +- lib/dmllib.php | 98 ++-- lib/xmldb/classes/XMLDBConstants.php | 12 +- lib/xmldb/classes/XMLDBField.class.php | 18 +- lib/xmldb/classes/XMLDBFile.class.php | 2 +- lib/xmldb/classes/XMLDBIndex.class.php | 10 +- lib/xmldb/classes/XMLDBKey.class.php | 26 +- lib/xmldb/classes/XMLDBObject.class.php | 16 +- lib/xmldb/classes/XMLDBStatement.class.php | 20 +- lib/xmldb/classes/XMLDBStructure.class.php | 36 +- lib/xmldb/classes/XMLDBTable.class.php | 22 +- .../generators/XMLDBGenerator.class.php | 22 +- .../classes/generators/mssql/mssql.class.php | 64 +-- .../classes/generators/mysql/mysql.class.php | 4 +- .../generators/oci8po/oci8po.class.php | 16 +- .../generators/postgres7/postgres7.class.php | 34 +- lib/xmldb/xmldb.xsd | 4 +- mod/assignment/db/access.php | 12 +- mod/chat/db/access.php | 14 +- mod/choice/db/access.php | 16 +- mod/data/db/access.php | 38 +- mod/exercise/db/access.php | 6 +- mod/forum/db/access.php | 72 +-- mod/glossary/db/access.php | 46 +- mod/hotpot/db/access.php | 18 +- mod/lams/db/access.php | 2 +- mod/lesson/db/access.php | 8 +- mod/quiz/db/access.php | 16 +- mod/resource/db/access.php | 6 +- mod/scorm/db/access.php | 18 +- mod/survey/db/access.php | 14 +- mod/wiki/db/access.php | 2 +- mod/workshop/db/access.php | 8 +- search/README.txt | 2 +- search/add.php | 64 +-- search/cron.php | 10 +- search/db/postgres7.sql | 10 +- search/delete.php | 56 +-- search/documents/document.php | 18 +- search/documents/forum_document.php | 76 ++-- search/documents/glossary_document.php | 64 +-- search/documents/resource_document.php | 60 +-- search/documents/wiki_document.php | 98 ++-- search/index.php | 4 +- search/indexer.php | 98 ++-- search/indexersplash.php | 16 +- search/indexlib.php | 114 ++--- search/lib.php | 44 +- search/query.php | 154 +++---- search/querylib.php | 178 ++++---- search/stats.php | 56 +-- search/tests/index.php | 40 +- search/update.php | 80 ++-- 154 files changed, 2052 insertions(+), 2052 deletions(-) diff --git a/admin/auth.php b/admin/auth.php index 42a757323b..9f5ab727c2 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -26,7 +26,7 @@ // extract and sanitize the auth key explicitly $modules = get_list_of_plugins("auth"); if (in_array($config['auth'], $modules)) { - $auth = $config['auth']; + $auth = $config['auth']; } else { notify("Error defining the authentication method"); } @@ -44,10 +44,10 @@ if (preg_match('/^pluginconfig_(.+?)$/', $name, $matches)) { $plugin = "auth/$auth"; $name = $matches[1]; - if (! set_config($name, $value, $plugin)) { + if (! set_config($name, $value, $plugin)) { notify("Problem saving config $name as $value for plugin $plugin"); } - } else { // normal handling for + } else { // normal handling for if (! set_config($name, $value)) { notify("Problem saving config $name as $value"); } @@ -128,7 +128,7 @@ echo "
framename}\" name=\"authmenu\" method=\"post\" action=\"auth.php\">"; echo "sesskey."\" />"; print_string("chooseauthmethod","auth"); - + echo '  '; choose_from_menu ($options, "auth", $auth, "","document.location='auth.php?sesskey=$USER->sesskey&auth='+document.authmenu.auth.options[document.authmenu.auth.selectedIndex].value", ""); @@ -150,7 +150,7 @@ require_once("$CFG->dirroot/auth/$auth/config.html"); $CFG->pagepath = 'auth/' . $auth; - + echo ''; print_heading(get_string('auth_common_settings', 'auth')); echo ''; @@ -241,7 +241,7 @@ // Good enough for most auth plugins // but some may want a custom one if they are offering // other options -// Note: pluginconfig_ fields have special handling. +// Note: pluginconfig_ fields have special handling. function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, $updateopts) { echo ''; @@ -259,9 +259,9 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, 'onlogin' => get_string('update_onlogin', 'auth')); $updateextoptions = array('0' => get_string('update_never', 'auth'), '1' => get_string('update_onupdate', 'auth')); - + $pluginconfig = get_config("auth/$auth"); - + // helptext is on a field with rowspan if (empty($helptext)) { $helptext = ' '; @@ -275,7 +275,7 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts, } if(empty($pluginconfig->{"field_updatelocal_$field"})) { $pluginconfig->{"field_updatelocal_$field"} = ''; - } + } if (empty($pluginconfig->{"field_updateremote_$field"})) { $pluginconfig->{"field_updateremote_$field"} = ''; } diff --git a/admin/backup.php b/admin/backup.php index defb1c194b..8be76bc139 100644 --- a/admin/backup.php +++ b/admin/backup.php @@ -23,7 +23,7 @@ //First of all we check that everything is correct //Check for trailing slash and backslash in backup_sche_destination - if (!empty($backup_sche_destination) and + if (!empty($backup_sche_destination) and (substr($backup_sche_destination,-1) == "/" or substr($backup_sche_destination,-1) == "\\")) { $error = true; $sche_destination_error = get_string("pathslasherror"); @@ -43,7 +43,7 @@ if (isset($a_config[$tocheck])) { $temp .= "1"; } else { - $temp .= "0"; + $temp .= "0"; } unset($a_config[$tocheck]); $i++; @@ -76,7 +76,7 @@ foreach ($courses as $course) { //We check if the course exists in backup_course $backup_course = get_record("backup_courses","courseid",$course->id); - //If it doesn't exist, create + //If it doesn't exist, create if (!$backup_course) { $temp_backup_course->courseid = $course->id; $newid = insert_record("backup_courses",$temp_backup_course); @@ -120,7 +120,7 @@ //Check for required functions... if (!function_exists('utf8_encode')) { notify("You need to add XML support to your PHP installation"); - } + } include ("$CFG->dirroot/backup/config.html"); print_simple_box_end(); diff --git a/admin/block.php b/admin/block.php index 7833178240..2cfe566a8f 100644 --- a/admin/block.php +++ b/admin/block.php @@ -9,7 +9,7 @@ require_once($CFG->libdir.'/blocklib.php'); $blockid = required_param('block', PARAM_INT); - + if(($blockrecord = blocks_get_record($blockid)) === false) { error('This block does not exist'); } @@ -51,11 +51,11 @@ $strconfiguration = get_string('configuration'); $strmanageblocks = get_string('manageblocks'); $strblockname = $block->get_title(); - + // $CFG->pagepath is used to generate the body and id attributes for the body tag // of the page. It is also used to generate the link to the Moodle Docs for this view. $CFG->pagepath = 'block/' . $block->name() . '/config'; - + admin_externalpage_print_header($adminroot); diff --git a/admin/blocks.php b/admin/blocks.php index 15991b343b..6d37464809 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -216,15 +216,15 @@ print_heading(get_string('incompatibleblocks', 'admin')); $table = new flexible_table('admin-blocks-incompatible'); - + $table->define_columns(array('block', 'delete')); $table->define_headers(array($strname, $strdelete)); $table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php'); - + $table->set_attribute('cellspacing', '0'); $table->set_attribute('id', 'incompatible'); $table->set_attribute('class', 'generaltable generalbox'); - + $table->setup(); foreach ($incompatible as $block) { diff --git a/admin/delete.php b/admin/delete.php index ea524fd085..b16f3ecb7f 100644 --- a/admin/delete.php +++ b/admin/delete.php @@ -64,5 +64,5 @@ function delete_subdirectories($rootdir) { } closedir($dir); } - + ?> diff --git a/admin/enrol.php b/admin/enrol.php index 9e1da25dca..387aaffd56 100644 --- a/admin/enrol.php +++ b/admin/enrol.php @@ -7,7 +7,7 @@ $enrol = optional_param('enrol', $CFG->enrol, PARAM_SAFEDIR); $CFG->pagepath = 'enrol'; - + $adminroot = admin_get_root(); admin_externalpage_setup('enrolment', $adminroot); @@ -20,7 +20,7 @@ if ($frm = data_submitted()) { if (!confirm_sesskey()) { error(get_string('confirmsesskeybad', 'error')); - } + } if (empty($frm->enable)) { $frm->enable = array(); } diff --git a/admin/enrol_config.php b/admin/enrol_config.php index aafd31a66d..6d131527b5 100644 --- a/admin/enrol_config.php +++ b/admin/enrol_config.php @@ -4,7 +4,7 @@ require_once("../config.php"); require_once($CFG->libdir.'/adminlib.php'); - + $adminroot = admin_get_root(); admin_externalpage_setup('enrolment', $adminroot); @@ -21,7 +21,7 @@ if ($frm = data_submitted()) { if (!confirm_sesskey()) { error(get_string('confirmsesskeybad', 'error')); - } + } if ($enrolment->process_config($frm)) { redirect("enrol.php?sesskey=$USER->sesskey", get_string("changessaved"), 1); } @@ -55,8 +55,8 @@ "document.location='enrol_config.php?enrol='+document.enrolmenu.enrol.options[document.enrolmenu.enrol.selectedIndex].value", ""); echo "

"; - -/// Print current enrolment type description + +/// Print current enrolment type description print_simple_box_start("center", "80%"); print_heading($options[$enrol]); @@ -65,7 +65,7 @@ print_simple_box_end(); echo "
"; - + $enrolment->config_form($frm); echo "

\n"; diff --git a/admin/filter.php b/admin/filter.php index b132d7e9be..00778be6ad 100644 --- a/admin/filter.php +++ b/admin/filter.php @@ -21,7 +21,7 @@ // $CFG->pagepath is used to generate the body and id attributes for the body tag // of the page. It is also used to generate the link to the Moodle Docs for this view. $CFG->pagepath = 'filter/' . $filtername . '/config'; - + // get translated strings for use on page $txt = new Object; $txt->managefilters = get_string( 'managefilters' ); @@ -69,7 +69,7 @@ //============================== // Display logic //============================== - + $filtername = ucfirst($filtername); admin_externalpage_print_header($adminroot); print_heading( $filtername ); diff --git a/admin/health.php b/admin/health.php index 12843f9cfe..920410fe02 100644 --- a/admin/health.php +++ b/admin/health.php @@ -419,7 +419,7 @@ class problem_000010 extends problem_base { } function exists() { if (!$this->is_enabled()) { - return true; + return true; } if ($this->status() < 1) { return true; @@ -429,7 +429,7 @@ class problem_000010 extends problem_base { function severity() { if ($this->is_enabled() and $this->status() == 0) { return SEVERITY_SIGNIFICANT; - } else { + } else { return SEVERITY_ANNOYANCE; } } @@ -437,9 +437,9 @@ class problem_000010 extends problem_base { global $CFG; $desc = 'Slasharguments are needed for relative linking in uploaded resources: