Skip to content

Commit

Permalink
MDL-20700 coding style cleanup - cvs keywords removed, closign php ta…
Browse files Browse the repository at this point in the history
…g removed, trailing whitespace cleanup
  • Loading branch information
skodak committed Nov 1, 2009
1 parent 5777f4e commit 6bfe7aa
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 57 deletions.
1 change: 0 additions & 1 deletion sso/hive/expired.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@
<br />
<?php
echo $OUTPUT->close_window_button();
?>
4 changes: 1 addition & 3 deletions sso/hive/lib.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
// Logs into Hive from HarvestRoad and stores session ID in Moodle session
// Martin Dougiamas, Moodle
//
Expand Down Expand Up @@ -75,5 +75,3 @@ function sso_user_login($username, $password) {

return false; // No cookie found
}

?>
4 changes: 1 addition & 3 deletions sso/hive/login.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php
// login.php - action of the login form put up by expired.php.

require('../../config.php');
Expand All @@ -18,5 +18,3 @@
} else {
redirect($CFG->wwwroot.'/sso/hive/expired.php');
}

?>
2 changes: 0 additions & 2 deletions tag/coursetags_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,3 @@
}

redirect($myurl);

?>
1 change: 0 additions & 1 deletion tag/coursetags_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,3 @@
}

echo $OUTPUT->footer();
?>
1 change: 0 additions & 1 deletion tag/coursetags_more.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,3 @@
echo $outstr;

echo $OUTPUT->footer();
?>
4 changes: 1 addition & 3 deletions tag/coursetagslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -656,5 +656,3 @@ function coursetag_get_official_keywords($courseid, $asarray=false) {
return $returnstr;
}
*/

?>
14 changes: 6 additions & 8 deletions tag/edit.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

require_once('../config.php');
require_once('lib.php');
Expand Down Expand Up @@ -99,21 +99,21 @@
print_error('errorupdatingrecord', 'tag');
}
}

//log tag changes activity
//if tag name exist from form, renaming is allow. record log action as rename
//otherwise, record log action as update
//otherwise, record log action as update
if (isset($tagnew->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
}
}
Expand All @@ -135,5 +135,3 @@
$PAGE->requires->js_function_call('init_tag_autocomplete')->on_dom_ready();
}
echo $OUTPUT->footer();

?>
6 changes: 2 additions & 4 deletions tag/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.'"');
}

Expand All @@ -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', '<br/><div id="relatedtags-autocomplete-container">');
Expand All @@ -39,5 +39,3 @@ function definition () {
}

}

?>
3 changes: 1 addition & 2 deletions tag/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

require_once('../config.php');
require_once('lib.php');
Expand Down Expand Up @@ -153,4 +153,3 @@
}

echo $OUTPUT->footer();
?>
4 changes: 1 addition & 3 deletions tag/lib.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

/**
* Moodle tag library
Expand Down Expand Up @@ -1032,5 +1032,3 @@ function tag_unset_flag($tagids) {
$timemodified = time();
return $DB->execute("UPDATE {tag} SET flag = 0, timemodified = ? WHERE id IN ($tagids)", array($timemodified));
}

?>
5 changes: 1 addition & 4 deletions tag/locallib.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

require_once('lib.php');

Expand Down Expand Up @@ -385,6 +385,3 @@ function tag_print_user_list($userlist, $return=false) {
echo $output;
}
}


?>
8 changes: 3 additions & 5 deletions tag/manage.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

require_once('../config.php');
require_once($CFG->libdir.'/tablelib.php');
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -96,7 +96,7 @@
if (!data_submitted() or !confirm_sesskey()) {
break;
}

$tags_names_changed = array();
foreach ($tagschecked as $tag_id) {
if ($newnames[$tag_id] != '') {
Expand Down Expand Up @@ -276,5 +276,3 @@
echo '<br/>';

echo $OUTPUT->footer();

?>
2 changes: 0 additions & 2 deletions tag/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,3 @@
echo $OUTPUT->box_end();

echo $OUTPUT->footer();

?>
2 changes: 0 additions & 2 deletions tag/tag_autocomplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@
echo $tag->name . "\t" . tag_display_name($tag) . "\n";
}
}

?>
16 changes: 7 additions & 9 deletions tag/user.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php // $Id$
<?php

require_once('../config.php');
require_once('lib.php');

$action = optional_param('action', '', PARAM_ALPHA);
$id = optional_param('id', 0, PARAM_INT);
$tag = optional_param('tag', '', PARAM_TAG);

require_login();

if (empty($CFG->usetags)) {
Expand All @@ -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));
Expand All @@ -36,23 +36,21 @@
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);

redirect($CFG->wwwroot.'/tag/index.php?tag='. rawurlencode($tag));
break;

case 'flaginappropriate':

tag_set_flag(tag_get_id($tag));

redirect($CFG->wwwroot.'/tag/index.php?tag='. rawurlencode($tag), get_string('responsiblewillbenotified', 'tag'));
break;

default:
print_error('unknowaction');
break;
}

?>
2 changes: 0 additions & 2 deletions userpix/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@
}

echo $OUTPUT->footer();

?>
2 changes: 0 additions & 2 deletions userpix/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@
}

echo $OUTPUT->footer();

?>

0 comments on commit 6bfe7aa

Please sign in to comment.