From 6bfe7aac8bce6167cdfab5b6a182e2e5e8908428 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 1 Nov 2009 12:34:33 +0000 Subject: [PATCH] MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup --- sso/hive/expired.php | 1 - sso/hive/lib.php | 4 +--- sso/hive/login.php | 4 +--- tag/coursetags_add.php | 2 -- tag/coursetags_edit.php | 1 - tag/coursetags_more.php | 1 - tag/coursetagslib.php | 4 +--- tag/edit.php | 14 ++++++-------- tag/edit_form.php | 6 ++---- tag/index.php | 3 +-- tag/lib.php | 4 +--- tag/locallib.php | 5 +---- tag/manage.php | 8 +++----- tag/search.php | 2 -- tag/tag_autocomplete.php | 2 -- tag/user.php | 16 +++++++--------- userpix/index.php | 2 -- userpix/upgrade.php | 2 -- 18 files changed, 24 insertions(+), 57 deletions(-) diff --git a/sso/hive/expired.php b/sso/hive/expired.php index d19cd02b3f56c..689cadf9da429 100644 --- a/sso/hive/expired.php +++ b/sso/hive/expired.php @@ -45,4 +45,3 @@
close_window_button(); -?> diff --git a/sso/hive/lib.php b/sso/hive/lib.php index 758d603d844ce..468b3d870ea8b 100755 --- a/sso/hive/lib.php +++ b/sso/hive/lib.php @@ -1,4 +1,4 @@ - diff --git a/sso/hive/login.php b/sso/hive/login.php index 1afa9206561be..c1e105494e27b 100644 --- a/sso/hive/login.php +++ b/sso/hive/login.php @@ -1,4 +1,4 @@ -wwwroot.'/sso/hive/expired.php'); } - -?> diff --git a/tag/coursetags_add.php b/tag/coursetags_add.php index acdaf1d1bfb7b..b61bba1e99d1d 100644 --- a/tag/coursetags_add.php +++ b/tag/coursetags_add.php @@ -39,5 +39,3 @@ } redirect($myurl); - -?> diff --git a/tag/coursetags_edit.php b/tag/coursetags_edit.php index dadf4a79a4547..2ada5abfd3abb 100644 --- a/tag/coursetags_edit.php +++ b/tag/coursetags_edit.php @@ -188,4 +188,3 @@ } echo $OUTPUT->footer(); -?> diff --git a/tag/coursetags_more.php b/tag/coursetags_more.php index a49eccb217a2e..094b1ab10ce34 100644 --- a/tag/coursetags_more.php +++ b/tag/coursetags_more.php @@ -198,4 +198,3 @@ echo $outstr; echo $OUTPUT->footer(); -?> diff --git a/tag/coursetagslib.php b/tag/coursetagslib.php index 959e342edb5f7..a243e310971e3 100644 --- a/tag/coursetagslib.php +++ b/tag/coursetagslib.php @@ -266,7 +266,7 @@ function coursetag_get_jscript($coursetagdivs = '') { */ function coursetag_get_jscript_links($coursetagslinks) { global $PAGE; - + if (!empty($coursetagslinks)) { foreach ($coursetagslinks as $a) { $PAGE->requires->js_function_call('add_tag_footer_link', array('coursetagslinks', $a['title'], $a['onclick'], $a['text']))->on_dom_ready(); @@ -656,5 +656,3 @@ function coursetag_get_official_keywords($courseid, $asarray=false) { return $returnstr; } */ - -?> diff --git a/tag/edit.php b/tag/edit.php index 94fee1c7d985b..742e352009958 100644 --- a/tag/edit.php +++ b/tag/edit.php @@ -1,4 +1,4 @@ -name) && ($tag->name != $tagnew->name)){ add_to_log($COURSE->id, 'tag', 'update', 'index.php?id='. $tag->id, $tag->name . '->'. $tagnew->name); - } elseif ($tag->description != $tagnew->description) { + } elseif ($tag->description != $tagnew->description) { add_to_log($COURSE->id, 'tag', 'update', 'index.php?id='. $tag->id, $tag->name); } - + //updated related tags tag_set('tag', $tagnew->id, explode(',', trim($tagnew->relatedtags))); //print_object($tagnew); die(); - + redirect($CFG->wwwroot.'/tag/index.php?tag='.rawurlencode($tag->name)); // must use $tag here, as the name isn't in the edit form } } @@ -135,5 +135,3 @@ $PAGE->requires->js_function_call('init_tag_autocomplete')->on_dom_ready(); } echo $OUTPUT->footer(); - -?> diff --git a/tag/edit_form.php b/tag/edit_form.php index 8e781a580d09c..67396f6071225 100644 --- a/tag/edit_form.php +++ b/tag/edit_form.php @@ -16,7 +16,7 @@ function definition () { $systemcontext = get_context_instance(CONTEXT_SYSTEM); if (has_capability('moodle/tag:manage', $systemcontext)) { - $mform->addElement('text', 'rawname', get_string('name', 'tag'), + $mform->addElement('text', 'rawname', get_string('name', 'tag'), 'maxlength="'.TAG_MAX_LENGTH.'" size="'.TAG_MAX_LENGTH.'"'); } @@ -25,7 +25,7 @@ function definition () { $mform->addElement('format', 'descriptionformat', get_string('format')); if (has_capability('moodle/tag:manage', $systemcontext)) { - $mform->addElement('checkbox', 'tagtype', get_string('officialtag', 'tag')); + $mform->addElement('checkbox', 'tagtype', get_string('officialtag', 'tag')); } $mform->addElement('html', '
'); @@ -39,5 +39,3 @@ function definition () { } } - -?> diff --git a/tag/index.php b/tag/index.php index 9cf65f84c0f6f..020428c43c09e 100644 --- a/tag/index.php +++ b/tag/index.php @@ -1,4 +1,4 @@ -footer(); -?> diff --git a/tag/lib.php b/tag/lib.php index 9e9b2fffed8cf..b2e7003e4af7d 100644 --- a/tag/lib.php +++ b/tag/lib.php @@ -1,4 +1,4 @@ -execute("UPDATE {tag} SET flag = 0, timemodified = ? WHERE id IN ($tagids)", array($timemodified)); } - -?> diff --git a/tag/locallib.php b/tag/locallib.php index f7892c741bcde..9107731a20807 100644 --- a/tag/locallib.php +++ b/tag/locallib.php @@ -1,4 +1,4 @@ - diff --git a/tag/manage.php b/tag/manage.php index d909966f4560f..1c2cf71f99c1d 100644 --- a/tag/manage.php +++ b/tag/manage.php @@ -1,4 +1,4 @@ -libdir.'/tablelib.php'); @@ -53,7 +53,7 @@ if (!data_submitted() or !confirm_sesskey()) { break; } - + $str_tagschecked = implode(', ', tag_get_name($tagschecked)); tag_delete($tagschecked); $notice = $str_tagschecked.' -- '.get_string('deleted','tag'); @@ -96,7 +96,7 @@ if (!data_submitted() or !confirm_sesskey()) { break; } - + $tags_names_changed = array(); foreach ($tagschecked as $tag_id) { if ($newnames[$tag_id] != '') { @@ -276,5 +276,3 @@ echo '
'; echo $OUTPUT->footer(); - -?> diff --git a/tag/search.php b/tag/search.php index 047e980cc68e9..3d883cd6c0dd3 100644 --- a/tag/search.php +++ b/tag/search.php @@ -53,5 +53,3 @@ echo $OUTPUT->box_end(); echo $OUTPUT->footer(); - -?> diff --git a/tag/tag_autocomplete.php b/tag/tag_autocomplete.php index f3f24d1cab0d1..ef87e09d0e1ff 100644 --- a/tag/tag_autocomplete.php +++ b/tag/tag_autocomplete.php @@ -16,5 +16,3 @@ echo $tag->name . "\t" . tag_display_name($tag) . "\n"; } } - -?> diff --git a/tag/user.php b/tag/user.php index df1722f48092c..20d21b20e3885 100644 --- a/tag/user.php +++ b/tag/user.php @@ -1,4 +1,4 @@ -usetags)) { @@ -26,8 +26,8 @@ case 'addinterest': if (empty($tag) && $id) { // for backward-compatibility (people saving bookmarks, mostly..) $tag = tag_get_name($id); - } - + } + tag_set_add('user', $USER->id, $tag); redirect($CFG->wwwroot.'/tag/index.php?tag='. rawurlencode($tag)); @@ -36,7 +36,7 @@ case 'removeinterest': if (empty($tag) && $id) { // for backward-compatibility (people saving bookmarks, mostly..) $tag = tag_get_name($id); - } + } tag_set_delete('user', $USER->id, $tag); @@ -44,9 +44,9 @@ break; case 'flaginappropriate': - + tag_set_flag(tag_get_id($tag)); - + redirect($CFG->wwwroot.'/tag/index.php?tag='. rawurlencode($tag), get_string('responsiblewillbenotified', 'tag')); break; @@ -54,5 +54,3 @@ print_error('unknowaction'); break; } - -?> diff --git a/userpix/index.php b/userpix/index.php index 50ac819ed1126..a842afba9843e 100644 --- a/userpix/index.php +++ b/userpix/index.php @@ -38,5 +38,3 @@ } echo $OUTPUT->footer(); - -?> diff --git a/userpix/upgrade.php b/userpix/upgrade.php index b0ba57b8a41fb..2e53f8eec4ab2 100644 --- a/userpix/upgrade.php +++ b/userpix/upgrade.php @@ -35,5 +35,3 @@ } echo $OUTPUT->footer(); - -?>