From: skodak Date: Wed, 20 Sep 2006 21:00:45 +0000 (+0000) Subject: major whitespace cleanup - fixed trailng whitespace in new files and admin area X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=eef868d17d53ca8b6c34882074a2ff4d5dc0e99d;p=moodle.git major whitespace cleanup - fixed trailng whitespace in new files and admin area --- 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: