From: Petr Skoda Date: Sun, 1 Nov 2009 10:55:31 +0000 (+0000) Subject: MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trail... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0df0df23f4275079968d22eb0572934a00fac0c3;p=moodle.git MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup --- diff --git a/admin/handlevirus.php b/admin/handlevirus.php index 83b8def7c2..86b5f292c0 100644 --- a/admin/handlevirus.php +++ b/admin/handlevirus.php @@ -1,4 +1,4 @@ - 2>&1 | php -d error_log=/path/to/log thisfile.php * also it's important that the output of clamscan prints the FULL PATH to each infected file, so use absolute paths for area to scan @@ -141,4 +141,4 @@ function validate_line($line) { return $file; } -?> + diff --git a/admin/mnet/mnet_themes.html b/admin/mnet/mnet_themes.html index f7b5d9d34c..01859dd6b6 100644 --- a/admin/mnet/mnet_themes.html +++ b/admin/mnet/mnet_themes.html @@ -128,4 +128,4 @@ print_tabs(array($tabs), 'mnetthemes'); $THEME = $original_theme; echo $OUTPUT->footer(); -?> + diff --git a/admin/report/courseoverview/index.php b/admin/report/courseoverview/index.php index 3f92371e6d..af60b502d4 100644 --- a/admin/report/courseoverview/index.php +++ b/admin/report/courseoverview/index.php @@ -51,15 +51,15 @@ $table = new html_table(); $table->width = '*'; $table->align = array('left','left','left','left','left','left'); - + $select = html_select::make($reportoptions,'report',$report, false); $select->nothingvalue = ''; $reporttypemenu = $OUTPUT->select($select); - + $select = html_select::make($timeoptions,'time',$time, false); $select->nothingvalue = ''; $timeoptionsmenu = $OUTPUT->select($select); - + $table->data[] = array(get_string('statsreporttype'),$reporttypemenu, get_string('statstimeperiod'),$timeoptionsmenu, '', diff --git a/admin/roles/lib.php b/admin/roles/lib.php index 44a46e8808..226e08e517 100644 --- a/admin/roles/lib.php +++ b/admin/roles/lib.php @@ -87,7 +87,7 @@ abstract class capability_table_base { echo '' . get_string('capability','role') . ''; $this->add_header_cells(); echo "\n\n\n"; - + /// Loop over capabilities. $contextlevel = 0; $component = ''; @@ -137,7 +137,7 @@ abstract class capability_table_base { echo '' . get_component_string($capability->component, $capability->contextlevel) . ''; - + } /** For subclasses to override, output header cells, after the initial capability one. */ @@ -256,7 +256,7 @@ class explain_capability_table extends capability_table_base { $link = html_link::make($this->baseurl . $capability->name, $this->strexplanation); $link->add_action(new popup_action('click', $link->url, 'hascapabilityexplanation', array('height' => 600, 'width' => 600))); $link->title = get_string($tooltip, 'role', $a); - echo $OUTPUT->link($link); + echo $OUTPUT->link($link); echo ''; } @@ -415,18 +415,18 @@ abstract class capability_table_with_risks extends capability_table_base { /** * Print a risk icon, as a link to the Risks page on Moodle Docs. * - * @param string $type the type of risk, will be one of the keys from the + * @param string $type the type of risk, will be one of the keys from the * get_all_risks array. Must start with 'risk'. */ function get_risk_icon($type) { global $OUTPUT; if (!isset($this->riskicons[$type])) { $iconurl = $OUTPUT->old_icon_url('i/' . str_replace('risk', 'risk_', $type)); - + $link = html_link::make($this->risksurl, '' . get_string($type . 'short', 'admin') . ''); $link->add_action(new popup_action('click', $link->url, 'docspopup')); $link->title = get_string($type, 'admin'); - + $this->riskicons[$type] = $OUTPUT->link($link); } return $this->riskicons[$type]; @@ -611,7 +611,7 @@ class define_role_table_advanced extends capability_table_with_risks { assign_capability($cap, CAP_ALLOW, $this->role->id, $this->context->id); } else { unassign_capability($cap, $this->role->id); - } + } } } @@ -633,7 +633,7 @@ class define_role_table_advanced extends capability_table_with_risks { protected function get_shortname_field($id) { return ''; } - + protected function get_description_field($id) { return print_textarea(true, 10, 50, 50, 10, 'description', $this->role->description, 0, true); } @@ -819,7 +819,7 @@ class view_role_definition_table extends define_role_table_advanced { } echo '' . $this->strperms[$permname] . '' . $default . ''; - + } } @@ -976,7 +976,7 @@ abstract class role_assign_user_selector_base extends user_selector_base { * * In this case we replicate part of get_users_by_capability() get the users * with moodle/course:view (or moodle/site:doanything). We can't use - * get_users_by_capability() becuase + * get_users_by_capability() becuase * 1) get_users_by_capability() does not deal with searching by name * 2) exceptions array can be potentially large for large courses */ @@ -1080,7 +1080,7 @@ class potential_assignees_course_and_above extends role_assign_user_selector_bas $fields = 'SELECT ' . $this->required_fields_sql(''); $countfields = 'SELECT COUNT(1)'; - $sql = " FROM {user} + $sql = " FROM {user} WHERE $wherecondition AND id NOT IN ( SELECT u.id @@ -1341,7 +1341,7 @@ abstract class role_allow_role_page { /** * @return object a $table structure that can be passed to print_table, containing - * one cell for each checkbox. + * one cell for each checkbox. */ public function get_table() { $table = new html_table(); diff --git a/admin/roles/manage.php b/admin/roles/manage.php index 38f2a294f2..f321c45835 100755 --- a/admin/roles/manage.php +++ b/admin/roles/manage.php @@ -89,7 +89,7 @@ $a->name = $roles[$roleid]->name; $a->shortname = $roles[$roleid]->shortname; $a->count = $DB->count_records('role_assignments', array('roleid'=>$roleid)); - + $formcontinue = html_form::make_button($baseurl, array('confirm' => 1, 'msg' => $msg), get_string('yes')); $formcancel = html_form::make_button($baseurl, $optionsno, get_string('no'), 'get'); echo $OUTPUT->confirm(get_string('deleterolesure', 'role', $a), $formcontinue, $formcancel); @@ -255,7 +255,7 @@ if (isset($undeletableroles[$role->id])) { $row[3] .= get_spacer(); } else { - $row[3] .= get_action_icon($baseurl . '?action=delete&roleid=' . $role->id, + $row[3] .= get_action_icon($baseurl . '?action=delete&roleid=' . $role->id, 'delete', $strdelete, get_string('deletexrole', 'role', $role->localname)); } diff --git a/admin/roles/roles.js b/admin/roles/roles.js index 2f1810b6b2..7ef6268a0a 100644 --- a/admin/roles/roles.js +++ b/admin/roles/roles.js @@ -1,4 +1,4 @@ -/* This class filters the rows of a table like the one on the define or +/* This class filters the rows of a table like the one on the define or override roles pages. It adds a search box just above the table, and if content is typed into that box, it hides any rows in the table where the capability name does not contain that text. */ diff --git a/admin/roles/tabs.php b/admin/roles/tabs.php index c382234bc3..bec62cedd6 100755 --- a/admin/roles/tabs.php +++ b/admin/roles/tabs.php @@ -72,7 +72,7 @@ if ($currenttab != 'update') { if (empty($title)) { $title = "$SITE->shortname: $category->name"; } - + $PAGE->navbar->add($strcategories, new moodle_url($CFG->wwwroot.'/course/index.php'), navigation_node::TYPE_SETTING); $PAGE->navbar->add($category->name, new moodle_url($CFG->wwwroot.'/course/category.php', array('id'=>$category->id)), navigation_node::TYPE_SETTING); $PAGE->set_title($title); @@ -107,7 +107,7 @@ if ($currenttab != 'update') { require_login($course); $PAGE->navigation->add(get_string('roles')); - + if (empty($title)) { $title = get_string("editinga", "moodle", $fullmodulename); } diff --git a/admin/settings.php b/admin/settings.php index dc7cdf2b6c..d9b289a9a0 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -1,4 +1,4 @@ -libdir.'/adminlib.php'); @@ -133,4 +133,4 @@ if (empty($SITE->fullname)) { echo $OUTPUT->footer(); -?> + diff --git a/admin/timezone.php b/admin/timezone.php index e8b21c80a3..3c7bf1c6ab 100644 --- a/admin/timezone.php +++ b/admin/timezone.php @@ -52,4 +52,4 @@ echo $OUTPUT->footer(); -?> + diff --git a/admin/timezoneimport.php b/admin/timezoneimport.php index f2c10cfd00..264b6de334 100644 --- a/admin/timezoneimport.php +++ b/admin/timezoneimport.php @@ -1,4 +1,4 @@ -footer(); -?> + diff --git a/admin/uploadpicture.php b/admin/uploadpicture.php index 8f3e9ed72c..5dada3f550 100644 --- a/admin/uploadpicture.php +++ b/admin/uploadpicture.php @@ -258,4 +258,4 @@ function my_save_profile_image($id, $originalfile) { return process_profile_image($originalfile, $destination); } -?> + diff --git a/admin/uploadpicture_form.php b/admin/uploadpicture_form.php index 9ed7d1c6a6..cfba7b4b75 100644 --- a/admin/uploadpicture_form.php +++ b/admin/uploadpicture_form.php @@ -1,4 +1,4 @@ -libdir.'/formslib.php'; class admin_uploadpicture_form extends moodleform { @@ -25,4 +25,4 @@ $this->add_action_buttons(false, get_string('uploadpictures', 'admin')); } } -?> + diff --git a/admin/user.php b/admin/user.php index 5d4b68e0b0..eee2cf28d1 100644 --- a/admin/user.php +++ b/admin/user.php @@ -1,4 +1,4 @@ -libdir.'/adminlib.php'); @@ -308,4 +308,4 @@ echo $OUTPUT->footer(); -?> + diff --git a/admin/user/user_bulk_enrol.php b/admin/user/user_bulk_enrol.php index f5754f4189..859a715d3f 100644 --- a/admin/user/user_bulk_enrol.php +++ b/admin/user/user_bulk_enrol.php @@ -13,7 +13,7 @@ admin_externalpage_setup('userbulk'); require_capability('moodle/user:delete', get_context_instance(CONTEXT_SYSTEM)); $return = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php'; //If no users selected then return to user_bulk.php -if (empty($SESSION->bulk_users)) { +if (empty($SESSION->bulk_users)) { redirect($return); } $users = $SESSION->bulk_users; //Get users to display @@ -71,7 +71,7 @@ foreach ($columns as $column) { if(!empty($processed)) { //Process data form here $total = count($courses) * count($users); - + for ( $i = 0; $i < $total; $i++ ) { $param = "selected".$i; @@ -100,14 +100,14 @@ if(!empty($processed)) { redirect($return, get_string('changessaved')); } -//Form beginning +//Form beginning echo '
'; echo ''; $count = 0; -foreach($users as $user) +foreach($users as $user) { $temparray = array ( - ''.$user->fullname.'' + ''.$user->fullname.'' ); $mycourses = get_my_courses($user->id); foreach($courses as $acourse) diff --git a/admin/user/user_bulk_message.php b/admin/user/user_bulk_message.php index 1de582a1b3..bbfca19ebd 100755 --- a/admin/user/user_bulk_message.php +++ b/admin/user/user_bulk_message.php @@ -58,7 +58,7 @@ if ($msgform->is_cancelled()) { admin_externalpage_print_header(); echo $OUTPUT->heading(get_string('confirmation', 'admin')); echo $OUTPUT->box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview'); - + $formcontinue = html_form::make_button('user_bulk_message.php', array('confirm' => 1, 'msg' => $msg), get_string('yes')); $formcancel = html_form::make_button('user_bulk.php', $optionsno, get_string('no'), 'get'); echo $OUTPUT->confirm(get_string('confirmmessage', 'bulkusers', $usernames), $formcontinue, $formcancel); diff --git a/admin/webservice/lib.php b/admin/webservice/lib.php index bb267dfe89..0e6ed07dbd 100644 --- a/admin/webservice/lib.php +++ b/admin/webservice/lib.php @@ -58,7 +58,7 @@ class service_user_selector extends user_selector_base { global $DB; //by default wherecondition retrieves all users except the deleted, not //confirmed and guest - list($wherecondition, $params) = $this->search_sql($search, 'u'); + list($wherecondition, $params) = $this->search_sql($search, 'u'); $params[] = $this->serviceid; diff --git a/admin/webservice/service_users.php b/admin/webservice/service_users.php index 78ca79ee57..983f6862e9 100644 --- a/admin/webservice/service_users.php +++ b/admin/webservice/service_users.php @@ -63,7 +63,7 @@ $alloweduserselector = new service_user_selector('removeselect', array('servicei $userstoremove = $alloweduserselector->get_selected_users(); if (!empty($userstoremove)) { - foreach ($userstoremove as $removeuser) { + foreach ($userstoremove as $removeuser) { $DB->delete_records('external_services_users', array('externalserviceid' => $id, 'userid' => $removeuser->id)); add_to_log(1, 'core', 'assign', $CFG->admin.'/webservice/service_users.php?id='.$id, 'remove', '', $removeuser->id); } @@ -88,7 +88,7 @@ $alloweduserselector = new service_user_selector('removeselect', array('servicei
-
+
@@ -146,7 +146,7 @@ $sql = " SELECT u.id as id, esu.id as serviceuserid, u.email as email, u.firstna $allowedusers = $DB->get_records_sql($sql, array($id)); if (!empty($allowedusers)) { echo $OUTPUT->box_start('generalbox', 'alloweduserlist'); - + echo ""; echo "

"; //reduce font of the user settings foreach($allowedusers as $user) { @@ -199,7 +199,7 @@ if (!empty($allowedusers)) { //TO IMPLEMENT : assign the required capability (if needed) $contents .= "
"; $checkbox = new html_select_option(); - $checkbox->value = $user->id; + $checkbox->value = $user->id; $checkbox->selected = false; $checkbox->text = ' '; $checkbox->label->text = ' '; @@ -207,7 +207,7 @@ if (!empty($allowedusers)) { $contents .= $OUTPUT->checkbox($checkbox, 'addcap')."
"; $contents .= "
"; echo $OUTPUT->form($form, $contents); - + echo print_collapsible_region_end(true); diff --git a/admin/xmldb/actions/XMLDBAction.class.php b/admin/xmldb/actions/XMLDBAction.class.php index c0cb9031b1..b0f1ea3c35 100644 --- a/admin/xmldb/actions/XMLDBAction.class.php +++ b/admin/xmldb/actions/XMLDBAction.class.php @@ -247,4 +247,3 @@ class XMLDBAction { return $result; } } -?> diff --git a/admin/xmldb/actions/XMLDBCheckAction.class.php b/admin/xmldb/actions/XMLDBCheckAction.class.php index 255c8a7106..dcbe283ce5 100644 --- a/admin/xmldb/actions/XMLDBCheckAction.class.php +++ b/admin/xmldb/actions/XMLDBCheckAction.class.php @@ -197,7 +197,7 @@ abstract class XMLDBCheckAction extends XMLDBAction { * @return array an array with two elements: First, some additional progress output, * for example a list (