From 4ca6cfbfd48974ecc0d4138b32089549f751ec84 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 1 Nov 2009 12:00:47 +0000 Subject: [PATCH] MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup --- .../block_activity_modules.php | 4 +- blocks/activity_modules/db/upgrade.php | 10 +-- blocks/admin/block_admin.php | 4 +- blocks/admin/db/upgrade.php | 10 +-- .../admin_bookmarks/block_admin_bookmarks.php | 4 +- blocks/admin_bookmarks/create.php | 3 +- blocks/admin_bookmarks/delete.php | 4 +- blocks/admin_tree/admintree.js | 2 +- blocks/admin_tree/block_admin_tree.php | 4 +- blocks/blog_tags/block_blog_tags.php | 10 +-- blocks/blog_tags/edit_form.php | 6 +- .../calendar_month/block_calendar_month.php | 14 ++-- blocks/calendar_month/db/upgrade.php | 10 +-- .../block_calendar_upcoming.php | 14 ++-- blocks/calendar_upcoming/db/upgrade.php | 10 +-- blocks/course_list/block_course_list.php | 20 +++--- blocks/course_list/db/upgrade.php | 10 +-- blocks/course_list/settings.php | 4 +- .../course_summary/block_course_summary.php | 4 +- blocks/course_summary/db/upgrade.php | 10 +-- blocks/edit_form.php | 6 +- .../block_global_navigation_tree.php | 6 +- .../glossary_random/block_glossary_random.php | 10 +-- blocks/glossary_random/edit_form.php | 6 +- blocks/html/block_html.php | 14 ++-- blocks/html/edit_form.php | 6 +- blocks/index.html | 2 +- blocks/loancalc/block_loancalc.php | 10 +-- blocks/login/block_login.php | 8 +-- blocks/mentees/block_mentees.php | 6 +- blocks/mentees/edit_form.php | 6 +- blocks/messages/block_messages.php | 12 ++-- blocks/mnet_hosts/block_mnet_hosts.php | 10 +-- blocks/moodleblock.class.php | 68 +++++++++---------- blocks/news_items/block_news_items.php | 6 +- blocks/news_items/db/upgrade.php | 10 +-- blocks/online_users/block_online_users.php | 6 +- blocks/online_users/db/access.php | 4 +- blocks/online_users/db/upgrade.php | 10 +-- blocks/online_users/settings.php | 4 +- blocks/participants/block_participants.php | 4 +- blocks/participants/db/upgrade.php | 10 +-- blocks/quiz_results/block_quiz_results.php | 4 +- blocks/quiz_results/edit_form.php | 6 +- blocks/quiz_results/styles.php | 2 +- .../recent_activity/block_recent_activity.php | 4 +- blocks/recent_activity/db/upgrade.php | 10 +-- blocks/rss_client/block_rss_client.php | 8 +-- blocks/rss_client/db/access.php | 2 +- blocks/rss_client/db/upgrade.php | 10 +-- blocks/rss_client/edit_form.php | 6 +- blocks/rss_client/editfeed.php | 8 +-- blocks/rss_client/settings.php | 2 +- blocks/rss_client/viewfeed.php | 6 +- blocks/search/config_global.html | 62 ++++++++--------- blocks/search/db/upgrade.php | 10 +-- blocks/search_forums/block_search_forums.php | 8 +-- blocks/search_forums/db/upgrade.php | 10 +-- blocks/section_links/block_section_links.php | 4 +- blocks/section_links/db/upgrade.php | 10 +-- .../block_settings_navigation_tree.php | 2 +- .../site_main_menu/block_site_main_menu.php | 4 +- .../block_social_activities.php | 4 +- blocks/social_activities/db/upgrade.php | 10 +-- blocks/tag_flickr/block_tag_flickr.php | 4 +- blocks/tag_flickr/edit_form.php | 6 +- blocks/tag_youtube/block_tag_youtube.php | 4 +- blocks/tag_youtube/edit_form.php | 6 +- blocks/tags/block_tags.php | 4 +- blocks/tags/edit_form.php | 6 +- blocks/tags/settings.php | 2 +- blocks/upgrade.txt | 2 +- blog/rsslib.php | 1 - blog/version.php | 4 +- group/assign.php | 3 - group/autogroup.php | 3 +- group/autogroup_form.php | 4 +- group/delete.php | 1 - group/externallib.php | 2 +- group/group.php | 1 - group/group_form.php | 4 +- group/grouping.php | 2 - group/grouping_form.php | 3 +- group/groupings.php | 2 - group/index.php | 2 - group/lib.php | 2 - group/members.php | 3 +- group/overview.php | 3 +- group/simpletest/ broken_testexternal.php | 1 - group/tabs.php | 3 +- 90 files changed, 313 insertions(+), 338 deletions(-) diff --git a/blocks/activity_modules/block_activity_modules.php b/blocks/activity_modules/block_activity_modules.php index 3126ea28558aa..b3010cbdaae34 100644 --- a/blocks/activity_modules/block_activity_modules.php +++ b/blocks/activity_modules/block_activity_modules.php @@ -1,4 +1,4 @@ - + diff --git a/blocks/activity_modules/db/upgrade.php b/blocks/activity_modules/db/upgrade.php index 502e7a0c1ba09..adc675af42b8a 100644 --- a/blocks/activity_modules/db/upgrade.php +++ b/blocks/activity_modules/db/upgrade.php @@ -1,6 +1,6 @@ -get_manager(); $result = true; -/// And upgrade begins here. For each one, you'll need one -/// block of code similar to the next one. Please, delete +/// And upgrade begins here. For each one, you'll need one +/// block of code similar to the next one. Please, delete /// this comment lines once this file start handling proper /// upgrade code. @@ -38,4 +38,4 @@ function xmldb_block_activity_modules_upgrade($oldversion) { return $result; } -?> + diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index bfe5f8c5d6d54..ec7b4a2775727 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -1,4 +1,4 @@ - + diff --git a/blocks/admin/db/upgrade.php b/blocks/admin/db/upgrade.php index bb2282e65e73a..fe6782ca3bafd 100644 --- a/blocks/admin/db/upgrade.php +++ b/blocks/admin/db/upgrade.php @@ -1,6 +1,6 @@ -get_manager(); $result = true; -/// And upgrade begins here. For each one, you'll need one -/// block of code similar to the next one. Please, delete +/// And upgrade begins here. For each one, you'll need one +/// block of code similar to the next one. Please, delete /// this comment lines once this file start handling proper /// upgrade code. @@ -38,4 +38,4 @@ function xmldb_block_admin_upgrade($oldversion) { return $result; } -?> + diff --git a/blocks/admin_bookmarks/block_admin_bookmarks.php b/blocks/admin_bookmarks/block_admin_bookmarks.php index 5ccb057ae25b3..cdeacb5feeeaf 100644 --- a/blocks/admin_bookmarks/block_admin_bookmarks.php +++ b/blocks/admin_bookmarks/block_admin_bookmarks.php @@ -1,4 +1,4 @@ - + diff --git a/blocks/admin_bookmarks/create.php b/blocks/admin_bookmarks/create.php index ef1c8286ace32..8ba99aed7735f 100644 --- a/blocks/admin_bookmarks/create.php +++ b/blocks/admin_bookmarks/create.php @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/blocks/admin_bookmarks/delete.php b/blocks/admin_bookmarks/delete.php index 835ee6c121953..bef0c4c9ed94d 100644 --- a/blocks/admin_bookmarks/delete.php +++ b/blocks/admin_bookmarks/delete.php @@ -1,4 +1,4 @@ - + diff --git a/blocks/admin_tree/admintree.js b/blocks/admin_tree/admintree.js index f2660967828ea..b73304e2a46ab 100644 --- a/blocks/admin_tree/admintree.js +++ b/blocks/admin_tree/admintree.js @@ -7,7 +7,7 @@ admin_tree = { openalt: null, init: function(numdivs, expandnodes, openimg, closedimg, openalt, closedalt) { - // Store the information we were passed in. + // Store the information we were passed in. admin_tree.openimg = openimg; admin_tree.closedimg = closedimg; admin_tree.openalt = openalt; diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php index 40bebb0f46fe1..be6f3fc211ff1 100644 --- a/blocks/admin_tree/block_admin_tree.php +++ b/blocks/admin_tree/block_admin_tree.php @@ -1,4 +1,4 @@ -is_hidden()) { $class .= ' hidden'; } diff --git a/blocks/blog_tags/block_blog_tags.php b/blocks/blog_tags/block_blog_tags.php index 635856ba70db0..e9da3a0b12a7e 100644 --- a/blocks/blog_tags/block_blog_tags.php +++ b/blocks/blog_tags/block_blog_tags.php @@ -1,4 +1,4 @@ -content->text = ''; $this->content->footer = ''; - /// Get a list of tags + /// Get a list of tags $timewithin = time() - $this->config->timewithin * 24 * 60 * 60; /// convert to seconds - + $blogheaders = blog_get_headers(); // admins should be able to read all tags @@ -149,7 +149,7 @@ function get_content() { } else if (!empty($blogheaders['filters']['course'])) { $blogurl->param('courseid', $blogheaders['filters']['course']); } - + break; } @@ -184,4 +184,4 @@ function blog_tags_sort($a, $b) { } } -?> + diff --git a/blocks/blog_tags/edit_form.php b/blocks/blog_tags/edit_form.php index e996e76abc198..2ea5b22365b98 100644 --- a/blocks/blog_tags/edit_form.php +++ b/blocks/blog_tags/edit_form.php @@ -1,7 +1,7 @@ . diff --git a/blocks/calendar_month/block_calendar_month.php b/blocks/calendar_month/block_calendar_month.php index 11ccacf9d67ad..01f8fed8f5293 100644 --- a/blocks/calendar_month/block_calendar_month.php +++ b/blocks/calendar_month/block_calendar_month.php @@ -1,4 +1,4 @@ -dirroot.'/calendar/lib.php'); - + if ($this->content !== NULL) { return $this->content; } // Reset the session variables calendar_session_vars($this->page->course); - + $this->content = new stdClass; $this->content->text = ''; $this->content->footer = ''; - // [pj] To me it looks like this if would never be needed, but Penny added it + // [pj] To me it looks like this if would never be needed, but Penny added it // when committing the /my/ stuff. Reminder to discuss and learn what it's about. // It definitely needs SOME comment here! $courseshown = $this->page->course->id; @@ -73,9 +73,9 @@ function get_content() { $this->content->text .= calendar_get_mini($courses, $group, $user, $cal_m, $cal_y); $this->content->text .= '

'.get_string('eventskey', 'calendar').'

'; $this->content->text .= '
'.calendar_filter_controls('course', '', $this->page->course).'
'; - + } - + // MDL-9059, unset this so that it doesn't stay in session if (!empty($courseset)) { unset($SESSION->cal_courses_shown[$this->page->course->id]); @@ -85,4 +85,4 @@ function get_content() { } } -?> + diff --git a/blocks/calendar_month/db/upgrade.php b/blocks/calendar_month/db/upgrade.php index 88eb8c1803838..e727494cc8ed3 100644 --- a/blocks/calendar_month/db/upgrade.php +++ b/blocks/calendar_month/db/upgrade.php @@ -1,6 +1,6 @@ -get_manager(); $result = true; -/// And upgrade begins here. For each one, you'll need one -/// block of code similar to the next one. Please, delete +/// And upgrade begins here. For each one, you'll need one +/// block of code similar to the next one. Please, delete /// this comment lines once this file start handling proper /// upgrade code. @@ -38,4 +38,4 @@ function xmldb_block_calendar_month_upgrade($oldversion) { return $result; } -?> + diff --git a/blocks/calendar_upcoming/block_calendar_upcoming.php b/blocks/calendar_upcoming/block_calendar_upcoming.php index 32d748ed71db2..4cbc14400871e 100644 --- a/blocks/calendar_upcoming/block_calendar_upcoming.php +++ b/blocks/calendar_upcoming/block_calendar_upcoming.php @@ -1,4 +1,4 @@ -content->footer .= '
'. get_string('newevent', 'calendar').'...'; - } + } if ($courseshown == SITEID) { // Being displayed at site level. This will cause the filter to fall back to auto-detecting // the list of courses it will be grabbing events from. @@ -59,12 +59,12 @@ function get_content() { // Correct formatting is [courseid] => 1 to be concise with moodlelib.php functions. calendar_set_filters($courses, $group, $user, $filtercourse, $groupeventsfrom, false); - $events = calendar_get_upcoming($courses, $group, $user, - get_user_preferences('calendar_lookahead', CALENDAR_UPCOMING_DAYS), + $events = calendar_get_upcoming($courses, $group, $user, + get_user_preferences('calendar_lookahead', CALENDAR_UPCOMING_DAYS), get_user_preferences('calendar_maxevents', CALENDAR_UPCOMING_MAXEVENTS)); - if (!empty($this->instance)) { - $this->content->text = calendar_get_sideblock_upcoming($events, + if (!empty($this->instance)) { + $this->content->text = calendar_get_sideblock_upcoming($events, 'view.php?view=day&course='.$courseshown.'&'); } @@ -77,4 +77,4 @@ function get_content() { } } -?> + diff --git a/blocks/calendar_upcoming/db/upgrade.php b/blocks/calendar_upcoming/db/upgrade.php index c55e79114fd75..604b08c8f4702 100644 --- a/blocks/calendar_upcoming/db/upgrade.php +++ b/blocks/calendar_upcoming/db/upgrade.php @@ -1,6 +1,6 @@ -get_manager(); $result = true; -/// And upgrade begins here. For each one, you'll need one -/// block of code similar to the next one. Please, delete +/// And upgrade begins here. For each one, you'll need one +/// block of code similar to the next one. Please, delete /// this comment lines once this file start handling proper /// upgrade code. @@ -38,4 +38,4 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion) { return $result; } -?> + diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index 940199dce736a..f2363f47dd96e 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -1,4 +1,4 @@ -dirroot . '/course/lib.php'); @@ -7,7 +7,7 @@ function init() { $this->title = get_string('courses'); $this->version = 2007101509; } - + function has_config() { return true; } @@ -26,7 +26,7 @@ function get_content() { $icon = "old_icon_url('i/course') . "\"". " class=\"icon\" alt=\"".get_string("coursecategory")."\" />"; - + $adminseesall = true; if (isset($CFG->block_course_list_adminview)) { if ( $CFG->block_course_list_adminview == 'own'){ @@ -34,8 +34,8 @@ function get_content() { } } - if (empty($CFG->disablemycourses) and - !empty($USER->id) and + if (empty($CFG->disablemycourses) and + !empty($USER->id) and !(has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM)) and $adminseesall) and !isguestuser()) { // Just print My Courses if ($courses = get_my_courses($USER->id, 'visible DESC, fullname ASC')) { @@ -83,7 +83,7 @@ function get_content() { $this->content->items[]="shortname)."\" ". - "href=\"$CFG->wwwroot/course/view.php?id=$course->id\">" + "href=\"$CFG->wwwroot/course/view.php?id=$course->id\">" . format_string($course->fullname) . ""; $this->content->icons[]=$icon; } @@ -93,7 +93,7 @@ function get_content() { } $this->get_remote_courses(); } else { - + $this->content->icons[] = ''; $this->content->items[] = get_string('nocoursesyet'); if (has_capability('moodle/course:create', get_context_instance(CONTEXT_COURSECAT, $category->id))) { @@ -128,7 +128,7 @@ function get_remote_courses() { $this->content->icons[] = ''; foreach ($courses as $course) { $this->content->items[]="shortname) . "\" ". - "href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&wantsurl=/course/view.php?id={$course->remoteid}\">" + "href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&wantsurl=/course/view.php?id={$course->remoteid}\">" . format_string($course->fullname) . ""; $this->content->icons[]=$icon; } @@ -137,7 +137,7 @@ function get_remote_courses() { } if ($hosts = get_my_remotehosts()) { - $this->content->items[] = get_string('remotemoodles','mnet'); + $this->content->items[] = get_string('remotemoodles','mnet'); $this->content->icons[] = ''; foreach($USER->mnet_foreign_host_array as $somehost) { $this->content->items[] = $somehost['count'].get_string('courseson','mnet').''.$somehost['name'].''; @@ -152,4 +152,4 @@ function get_remote_courses() { } -?> + diff --git a/blocks/course_list/db/upgrade.php b/blocks/course_list/db/upgrade.php index b25621016e859..bc4255c063776 100644 --- a/blocks/course_list/db/upgrade.php +++ b/blocks/course_list/db/upgrade.php @@ -1,6 +1,6 @@ -get_manager(); $result = true; -/// And upgrade begins here. For each one, you'll need one -/// block of code similar to the next one. Please, delete +/// And upgrade begins here. For each one, you'll need one +/// block of code similar to the next one. Please, delete /// this comment lines once this file start handling proper /// upgrade code. @@ -38,4 +38,4 @@ function xmldb_block_course_list_upgrade($oldversion) { return $result; } -?> + diff --git a/blocks/course_list/settings.php b/blocks/course_list/settings.php index 899af4a80443b..a76b50b67926e 100644 --- a/blocks/course_list/settings.php +++ b/blocks/course_list/settings.php @@ -1,4 +1,4 @@ -get_string('allcourses', 'block_course_list'), 'own'=>get_string('owncourses', 'block_course_list')); @@ -10,4 +10,4 @@ get_string('confighideallcourseslink', 'block_course_list'), 0)); -?> + diff --git a/blocks/course_summary/block_course_summary.php b/blocks/course_summary/block_course_summary.php index 18bcf6943c05d..e99914215f57b 100644 --- a/blocks/course_summary/block_course_summary.php +++ b/blocks/course_summary/block_course_summary.php @@ -1,4 +1,4 @@ - + diff --git a/blocks/course_summary/db/upgrade.php b/blocks/course_summary/db/upgrade.php index 674d56391cbed..144d2335c197e 100644 --- a/blocks/course_summary/db/upgrade.php +++ b/blocks/course_summary/db/upgrade.php @@ -1,6 +1,6 @@ -get_manager(); $result = true; -/// And upgrade begins here. For each one, you'll need one -/// block of code similar to the next one. Please, delete +/// And upgrade begins here. For each one, you'll need one +/// block of code similar to the next one. Please, delete /// this comment lines once this file start handling proper /// upgrade code. @@ -38,4 +38,4 @@ function xmldb_block_course_summary_upgrade($oldversion) { return $result; } -?> + diff --git a/blocks/edit_form.php b/blocks/edit_form.php index 74d3d3b8820dc..7cd811da29666 100644 --- a/blocks/edit_form.php +++ b/blocks/edit_form.php @@ -1,7 +1,7 @@ . diff --git a/blocks/global_navigation_tree/block_global_navigation_tree.php b/blocks/global_navigation_tree/block_global_navigation_tree.php index 1b79ae66cae38..dc0d6de6c53f4 100644 --- a/blocks/global_navigation_tree/block_global_navigation_tree.php +++ b/blocks/global_navigation_tree/block_global_navigation_tree.php @@ -152,7 +152,7 @@ function get_content() { $this->page->requires->js_function_call('setup_new_navtree', array($this->id))->on_dom_ready(); // Grab the items to display $this->content->items = array($this->page->navigation); - + $reloadicon = new moodle_action_icon(); $reloadicon->link->url = $this->page->url; $reloadicon->link->url->param('regenerate','navigation'); @@ -161,10 +161,10 @@ function get_content() { $reloadicon->alt = get_string('reload'); $reloadicon->title = get_string('reload'); $this->content->footer .= $OUTPUT->action_icon($reloadicon); - + if (empty($this->config->enablesidebarpopout) || $this->config->enablesidebarpopout == 'yes') { user_preference_allow_ajax_update('nav_in_tab_panel_globalnav'.block_global_navigation_tree::$navcount, PARAM_INT); - + $moveicon = new moodle_action_icon(); $moveicon->link->add_classes('moveto customcommand requiresjs'); $moveicon->link->url = $this->page->url; diff --git a/blocks/glossary_random/block_glossary_random.php b/blocks/glossary_random/block_glossary_random.php index b1f6ea68ae559..343aaf3fe1bd9 100644 --- a/blocks/glossary_random/block_glossary_random.php +++ b/blocks/glossary_random/block_glossary_random.php @@ -1,4 +1,4 @@ -".format_string($entry->concept,true).""; - } + } $options = new object; $options->trusted = $entry->definitiontrust; @@ -157,8 +157,8 @@ function get_content() { .'" title="'.$this->config->addentry.'">'.$this->config->addentry.'
'; } else { $this->content->footer = ''; - } - + } + $this->content->footer .= ''.$this->config->viewglossary.''; @@ -190,4 +190,4 @@ function after_restore($restore) { } } -?> + diff --git a/blocks/glossary_random/edit_form.php b/blocks/glossary_random/edit_form.php index 974049e79ade7..5e2f0b45f62a1 100644 --- a/blocks/glossary_random/edit_form.php +++ b/blocks/glossary_random/edit_form.php @@ -1,7 +1,7 @@ . diff --git a/blocks/html/block_html.php b/blocks/html/block_html.php index 16be06b64dc1f..7bc83b5a0d0a6 100755 --- a/blocks/html/block_html.php +++ b/blocks/html/block_html.php @@ -1,4 +1,4 @@ -get_records_sql($sql)) { foreach ($instances as $instance) { @@ -96,4 +96,4 @@ function decode_content_links_caller($restore) { return true; } } -?> + diff --git a/blocks/html/edit_form.php b/blocks/html/edit_form.php index 2b96b001432b9..efc0af221b97f 100644 --- a/blocks/html/edit_form.php +++ b/blocks/html/edit_form.php @@ -1,7 +1,7 @@ . diff --git a/blocks/index.html b/blocks/index.html index 8d1c8b69c3fce..8b137891791fe 100644 --- a/blocks/index.html +++ b/blocks/index.html @@ -1 +1 @@ - + diff --git a/blocks/loancalc/block_loancalc.php b/blocks/loancalc/block_loancalc.php index ac745a651d4d3..7ba24018407b0 100644 --- a/blocks/loancalc/block_loancalc.php +++ b/blocks/loancalc/block_loancalc.php @@ -1,4 +1,4 @@ -old_icon_url('i/calc'); - + $this->content->text = '