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 f578af5 commit 20207b8
Show file tree
Hide file tree
Showing 41 changed files with 124 additions and 124 deletions.
2 changes: 1 addition & 1 deletion admin/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@

redirect ($returnurl);

?>

2 changes: 1 addition & 1 deletion admin/auth_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
$fieldname = get_string('webpage');
} else {
$fieldname = get_string($fieldname);
}
}
if ($retrieveopts) {
$varname = 'field_map_' . $field;

Expand Down
4 changes: 2 additions & 2 deletions admin/block.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?PHP // $Id$
<?php

// block.php - allows admin to edit all local configuration variables for a block

Expand Down Expand Up @@ -73,4 +73,4 @@
echo '</form>';
echo $OUTPUT->footer();

?>

4 changes: 2 additions & 2 deletions admin/blocks.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?PHP // $Id$
<?php

// Allows the admin to configure blocks (hide/show, delete and configure)

Expand Down Expand Up @@ -212,4 +212,4 @@

echo $OUTPUT->footer();

?>

2 changes: 1 addition & 1 deletion admin/bloglevelupgrade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php /// $Id$
<?php
/// Create "blog" forums in each course and copy blog entries from these courses' participants in these forums

require_once('../config.php');
Expand Down
60 changes: 30 additions & 30 deletions admin/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// version of PHP compiled for CGI.
///
/// eg wget -q -O /dev/null 'http://moodle.somewhere.edu/admin/cron.php'
/// or php /web/moodle/admin/cron.php
/// or php /web/moodle/admin/cron.php
set_time_limit(0);
$starttime = microtime();

Expand Down Expand Up @@ -41,7 +41,7 @@

/// check if execution allowed
if (isset($_SERVER['REMOTE_ADDR'])) { // if the script is accessed via the web.
if (!empty($CFG->cronclionly)) {
if (!empty($CFG->cronclionly)) {
// This script can only be run via the cli.
print_error('cronerrorclionly', 'admin');
exit;
Expand All @@ -51,7 +51,7 @@
$pass = optional_param('password', '', PARAM_RAW);
if($pass != $CFG->cronremotepassword) {
// wrong password.
print_error('cronerrorpassword', 'admin');
print_error('cronerrorpassword', 'admin');
exit;
}
}
Expand Down Expand Up @@ -132,7 +132,7 @@
if (file_exists($blockfile)) {
require_once($blockfile);
$classname = 'block_'.$block->name;
$blockobj = new $classname;
$blockobj = new $classname;
if (method_exists($blockobj,'cron')) {
mtrace("Processing cron function for ".$block->name.'....','');
if ($blockobj->cron()) {
Expand Down Expand Up @@ -177,7 +177,7 @@
}
}
mtrace("Finished quiz reports");

mtrace('Starting admin reports');
// Admin reports do not have a database table that lists them. Instead a
// report includes cron.php with function report_reportname_cron() if it wishes
Expand Down Expand Up @@ -254,7 +254,7 @@
}

/// Run all core cron jobs, but not every time since they aren't too important.
/// These don't have a timer to reduce load, so we'll use a random number
/// These don't have a timer to reduce load, so we'll use a random number
/// to randomly choose the percentage of times we should run these jobs.

srand ((double) microtime() * 10000000);
Expand Down Expand Up @@ -367,21 +367,21 @@
mtrace('Synchronised metacourses');

//
// generate new password emails for users
// generate new password emails for users
//
mtrace('checking for create_password');
if ($DB->count_records('user_preferences', array('name'=>'create_password', 'value'=>'1'))) {
mtrace('creating passwords for new users');
$newusers = $DB->get_records_sql("SELECT u.id as id, u.email, u.firstname,
$newusers = $DB->get_records_sql("SELECT u.id as id, u.email, u.firstname,
u.lastname, u.username,
p.id as prefid
FROM {user} u
p.id as prefid
FROM {user} u
JOIN {user_preferences} p ON u.id=p.userid
WHERE p.name='create_password' AND p.value='1' AND u.email !='' ");

foreach ($newusers as $newuserid => $newuser) {
$newuser->emailstop = 0; // send email regardless
// email user
// email user
if (setnew_password_and_mail($newuser)) {
// remove user pref
$DB->delete_records('user_preferences', array('id'=>$newuser->prefid));
Expand All @@ -390,20 +390,20 @@
}
}
}

if (!empty($CFG->usetags)) {
require_once($CFG->dirroot.'/tag/lib.php');
tag_cron();
mtrace ('Executed tag cron');
}

// Accesslib stuff
cleanup_contexts();
mtrace ('Cleaned up contexts');
gc_cache_flags();
mtrace ('Cleaned cache flags');
// If you suspect that the context paths are somehow corrupt
// replace the line below with: build_context_path(true);
// replace the line below with: build_context_path(true);
build_context_path();
mtrace ('Built context paths');

Expand All @@ -418,8 +418,8 @@
@set_time_limit(0);
@raise_memory_limit("192M");
if (function_exists('apache_child_terminate')) {
// if we are running from Apache, give httpd a hint that
// it can recycle the process after it's done. Apache's
// if we are running from Apache, give httpd a hint that
// it can recycle the process after it's done. Apache's
// memory management is truly awful but we can help it.
@apache_child_terminate();
}
Expand All @@ -431,7 +431,7 @@
include_once("$CFG->dirroot/backup/backuplib.php");
include_once("$CFG->dirroot/backup/lib.php");
mtrace("Running backups if required...");

if (! schedule_backup_cron()) {
mtrace("ERROR: Something went wrong while performing backup tasks!!!");
} else {
Expand Down Expand Up @@ -507,51 +507,51 @@

// run gradebook import/export/report cron
if ($gradeimports = get_plugin_list('gradeimport')) {
foreach ($gradeimports as $gradeimport => $plugindir) {
foreach ($gradeimports as $gradeimport => $plugindir) {
if (file_exists($plugindir.'/lib.php')) {
require_once($plugindir.'/lib.php');
$cron_function = 'grade_import_'.$gradeimport.'_cron';
$cron_function = 'grade_import_'.$gradeimport.'_cron';
if (function_exists($cron_function)) {
mtrace("Processing gradebook import function $cron_function ...", '');
$cron_function;
$cron_function;
}
}
}
}
}

if ($gradeexports = get_plugin_list('gradeexport')) {
foreach ($gradeexports as $gradeexport => $plugindir) {
foreach ($gradeexports as $gradeexport => $plugindir) {
if (file_exists($plugindir.'/lib.php')) {
require_once($plugindir.'/lib.php');
$cron_function = 'grade_export_'.$gradeexport.'_cron';
$cron_function = 'grade_export_'.$gradeexport.'_cron';
if (function_exists($cron_function)) {
mtrace("Processing gradebook export function $cron_function ...", '');
$cron_function;
$cron_function;
}
}
}
}

if ($gradereports = get_plugin_list('gradereport')) {
foreach ($gradereports as $gradereport => $plugindir) {
foreach ($gradereports as $gradereport => $plugindir) {
if (file_exists($plugindir.'/lib.php')) {
require_once($plugindir.'/lib.php');
$cron_function = 'grade_report_'.$gradereport.'_cron';
$cron_function = 'grade_report_'.$gradereport.'_cron';
if (function_exists($cron_function)) {
mtrace("Processing gradebook report function $cron_function ...", '');
$cron_function;
$cron_function;
}
}
}
}

// Run external blog cron if needed
if ($CFG->useexternalblogs) {
require_once($CFG->dirroot . '/blog/lib.php');
mtrace("Fetching external blog entries...", '');
$sql = "timefetched < ? - ? OR timefetched = 0";
$externalblogs = $DB->get_records_select('blog_external', $sql, array(mktime(), $CFG->externalblogcrontime));

foreach ($external_blogs as $eb) {
blog_sync_external_entries($eb);
}
Expand Down Expand Up @@ -584,7 +584,7 @@
mtrace("Cron script completed correctly");

$difftime = microtime_diff($starttime, microtime());
mtrace("Execution took ".$difftime." seconds");
mtrace("Execution took ".$difftime." seconds");

/// finish the IE hack
if (check_browser_version('MSIE')) {
Expand Down
2 changes: 1 addition & 1 deletion admin/dbtransfer/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
throw new dbtransfer_exception('notargetconectexception', null, "$CFG->wwwroot/$CFG->admin/dbtransfer/");
}
if ($targetdb->get_tables()) {
throw new dbtransfer_exception('targetdatabasenotempty', null, "$CFG->wwwroot/$CFG->admin/dbtransfer/");
throw new dbtransfer_exception('targetdatabasenotempty', null, "$CFG->wwwroot/$CFG->admin/dbtransfer/");
}

// Start output.
Expand Down
6 changes: 3 additions & 3 deletions admin/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

if (empty($sure)) {
$optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey());

$formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes'));
$formcancel = html_form::make_button('index.php', null, get_string('no'), 'get');
echo $OUTPUT->confirm('Are you completely sure you want to delete everything inside the directory '. $deletedir .' ?', $formcontinue, $formcancel);
Expand All @@ -34,8 +34,8 @@
$optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey(), 'reallysure'=>'yes');
$formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes'));
$formcancel = html_form::make_button('index.php', null, get_string('no'), 'get');
echo $OUTPUT->confirm('Are you REALLY REALLY completely sure you want to delete everything inside the directory '.
$deletedir .' (this includes all user images, and any other course files that have been created) ?',
echo $OUTPUT->confirm('Are you REALLY REALLY completely sure you want to delete everything inside the directory '.
$deletedir .' (this includes all user images, and any other course files that have been created) ?',
$formcontinue, $formcancel);
echo $OUTPUT->footer();
exit;
Expand Down
2 changes: 1 addition & 1 deletion admin/enrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
echo '<input type="hidden" name="savesettings" value="1" />';
echo '<fieldset>';
echo '<div class="form-item clearfix" id="admin-sendcoursewelcomemessage">';

echo '<div class="form-label"><label for = "menusendcoursewelcomemessage">' . get_string('sendcoursewelcomemessage', 'admin');
echo '<span class="form-shortname">sendcoursewelcomemessage</span>';
echo '</label></div>';
Expand Down
4 changes: 2 additions & 2 deletions admin/enrol_config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?PHP // $Id$
<?php
// enrol_config.php - allows admin to edit all enrollment variables
// Yes, enrol is correct English spelling.

Expand Down Expand Up @@ -67,4 +67,4 @@
echo $OUTPUT->footer();

exit;
?>

4 changes: 2 additions & 2 deletions admin/environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
/// Handle the 'updatecomponent' action
if ($action == 'updatecomponent' && confirm_sesskey()) {
/// Create component installer and execute it
if ($cd = new component_installer('http://download.moodle.org',
'environment',
if ($cd = new component_installer('http://download.moodle.org',
'environment',
'environment.zip')) {
$status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
switch ($status) {
Expand Down
2 changes: 1 addition & 1 deletion admin/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
$title = get_string('deletefilterareyousure', 'admin', $filtername);
admin_externalpage_print_header();
echo $OUTPUT->heading($title);

$linkcontinue = new moodle_url($returnurl, array('action' => 'delete', 'filterpath' => $filterpath, 'confirm' => 1));
$formcancel = html_form::make_button($returnurl, null, get_string('no'), 'get');
echo $OUTPUT->confirm(get_string('deletefilterareyousuremessage', 'admin', $filtername), $linkcontinue, $formcancel);
Expand Down
2 changes: 1 addition & 1 deletion admin/generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function __construct($settings = array(), $generate=false) {
global $CFG;

$this->starttime = time()+microtime();

$arguments = array(
array('short'=>'u', 'long'=>'username',
'help' => 'Your moodle username', 'type'=>'STRING', 'default' => ''),
Expand Down
2 changes: 1 addition & 1 deletion admin/handlevirus.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function notify_admins($user,$subject,$a) {
$eventdata->fullmessage = $body;
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = '';
$eventdata->smallmessage = '';
$eventdata->smallmessage = '';
events_trigger('message_send', $eventdata);
}
}
Expand Down
2 changes: 1 addition & 1 deletion admin/health.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ function title() {
}
function exists() {
global $DB;
$positionexpr = $DB->sql_position($DB->sql_concat("','", "q.id", "','"),
$positionexpr = $DB->sql_position($DB->sql_concat("','", "q.id", "','"),
$DB->sql_concat("','", "qma.sequence", "','"));
return $DB->record_exists_sql("
SELECT * FROM {question} q
Expand Down
2 changes: 1 addition & 1 deletion admin/innodb.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
echo $OUTPUT->footer();
}

?>

6 changes: 3 additions & 3 deletions admin/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@
if ($preview_url) {
$link = html_link::make($preview_url, get_string('preview'));
$link->add_action(new popup_action('click', $link->url));
echo $OUTPUT->link($link);
echo $OUTPUT->link($link);
}
echo '</fieldset>';
}
Expand All @@ -861,7 +861,7 @@
if ($preview_url) {
$link = html_link::make($preview_url, get_string('preview'));
$link->add_action(new popup_action('click', $link->url));
echo $OUTPUT->link($link);
echo $OUTPUT->link($link);
}
echo '</fieldset>';
}
Expand All @@ -885,7 +885,7 @@
if ($preview_url) {
$link = html_link::make($preview_url, get_string('preview'));
$link->add_action(new popup_action('click', $link->url));
echo $OUTPUT->link($link);
echo $OUTPUT->link($link);
}
echo '</fieldset>';
}
Expand Down
4 changes: 2 additions & 2 deletions admin/langimport.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //$Id$
<?php
///This file only manages the installation of 1.6 lang packs.
///in downloads.moodle.org, they are store in separate directory /lang16
///in local server, they are stored in $CFG->dataroot/lang
Expand Down Expand Up @@ -449,4 +449,4 @@ function get_remote_list_of_languages() {
return false;
}
}
?>

2 changes: 1 addition & 1 deletion admin/mailout-debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* - Run your admin/cron.php
*
* - Read /tmp/moodle-mailout.log
*
*
*
* This script will create logfiles in /tmp/ or in $TMPDIR if set.
* On windows, use php -r 'print sys_get_temp_dir()' to see where the file is saved.
Expand Down
Loading

0 comments on commit 20207b8

Please sign in to comment.