MDL-26726 fix whitespace and a few debug and comment typos

This commit is contained in:
Petr Skoda 2011-03-17 21:34:34 +01:00
parent 56babbcb76
commit 3e7069e70b

View file

@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@ -631,6 +630,7 @@ function is_dataroot_insecure($fetchtest=false) {
/// CLASS DEFINITIONS /////////////////////////////////////////////////////////
/**
* Interface for anything appearing in the admin tree
*
@ -702,6 +702,7 @@ interface part_of_admin_tree {
public function show_save();
}
/**
* Interface implemented by any part_of_admin_tree that has children.
*
@ -730,6 +731,7 @@ interface parentable_part_of_admin_tree extends part_of_admin_tree {
}
/**
* The object used to represent folders (a.k.a. categories) in the admin tree block.
*
@ -882,7 +884,7 @@ class admin_category implements parentable_part_of_admin_tree {
$parent->children[] = $something;
if (is_array($this->category_cache) and ($something instanceof admin_category)) {
if (isset($this->category_cache[$something->name])) {
debugging('Duplicate admin catefory name: '.$something->name);
debugging('Duplicate admin category name: '.$something->name);
} else {
$this->category_cache[$something->name] = $something;
$something->category_cache =& $this->category_cache;
@ -890,7 +892,7 @@ class admin_category implements parentable_part_of_admin_tree {
// just in case somebody already added subcategories
if ($child instanceof admin_category) {
if (isset($this->category_cache[$child->name])) {
debugging('Duplicate admin catefory name: '.$child->name);
debugging('Duplicate admin category name: '.$child->name);
} else {
$this->category_cache[$child->name] = $child;
$child->category_cache =& $this->category_cache;
@ -945,6 +947,7 @@ class admin_category implements parentable_part_of_admin_tree {
}
}
/**
* Root of admin settings tree, does not have any parent.
*
@ -1006,6 +1009,7 @@ class admin_root extends admin_category {
}
}
/**
* Links external PHP pages into the admin tree.
*
@ -1035,6 +1039,8 @@ class admin_externalpage implements part_of_admin_tree {
/** @var mixed either string or array of string */
public $path;
/** @var array list of visible names of page parents */
public $visiblepath;
/**
@ -1150,6 +1156,7 @@ class admin_externalpage implements part_of_admin_tree {
}
}
/**
* Used to group a number of admin_setting objects into a page and add them to the admin tree.
*
@ -1177,6 +1184,8 @@ class admin_settingpage implements part_of_admin_tree {
/** @var mixed string of paths or array of strings of paths */
public $path;
/** @var array list of visible names of page parents */
public $visiblepath;
/**
@ -1437,7 +1446,7 @@ abstract class admin_setting {
/**
* Returns the config if possible
*
* @return mixed returns config if successfull else null
* @return mixed returns config if successful else null
*/
public function config_read($name) {
global $CFG;
@ -1540,6 +1549,7 @@ abstract class admin_setting {
/**
* Function called if setting updated - cleanup, cache reset, etc.
* @param string $functionname Sets the function name
* @return void
*/
public function set_updatedcallback($functionname) {
$this->updatedcallback = $functionname;
@ -1581,12 +1591,14 @@ abstract class admin_setting {
}
}
/**
* No setting - just heading and text.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class admin_setting_heading extends admin_setting {
/**
* not a setting, just text
* @param string $name unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting' for ones in config_plugins.
@ -1640,6 +1652,7 @@ class admin_setting_heading extends admin_setting {
}
}
/**
* The most flexibly setting, user is typing text
*
@ -1734,6 +1747,7 @@ class admin_setting_configtext extends admin_setting {
}
}
/**
* General text area without html editor.
*
@ -1757,6 +1771,7 @@ class admin_setting_configtextarea extends admin_setting_configtext {
$this->cols = $cols;
parent::__construct($name, $visiblename, $description, $defaultsetting, $paramtype);
}
/**
* Returns an XHTML string for the editor
*
@ -1778,6 +1793,7 @@ class admin_setting_configtextarea extends admin_setting_configtext {
}
}
/**
* General text area with html editor.
*/
@ -1798,6 +1814,7 @@ class admin_setting_confightmleditor extends admin_setting_configtext {
parent::__construct($name, $visiblename, $description, $defaultsetting, $paramtype);
editors_head_setup();
}
/**
* Returns an XHTML string for the editor
*
@ -1822,6 +1839,7 @@ class admin_setting_confightmleditor extends admin_setting_configtext {
}
}
/**
* Password field, allows unmasking of password
*
@ -1887,6 +1905,7 @@ if (is_ie) {
}
}
/**
* Path to directory
*
@ -1933,6 +1952,7 @@ class admin_setting_configfile extends admin_setting_configtext {
}
}
/**
* Path to executable file
*
@ -1966,6 +1986,7 @@ class admin_setting_configexecutable extends admin_setting_configfile {
}
}
/**
* Path to directory
*
@ -1999,6 +2020,7 @@ class admin_setting_configdirectory extends admin_setting_configfile {
}
}
/**
* Checkbox
*
@ -2085,6 +2107,7 @@ class admin_setting_configcheckbox extends admin_setting {
}
}
/**
* Multiple checkboxes, each represents different value, stored in csv format
*
@ -2256,6 +2279,7 @@ class admin_setting_configmulticheckbox extends admin_setting {
}
}
/**
* Multiple checkboxes 2, value stored as string 00101011
*
@ -2313,6 +2337,7 @@ class admin_setting_configmulticheckbox2 extends admin_setting_configmulticheckb
}
}
/**
* Select one value from list
*
@ -2472,6 +2497,7 @@ class admin_setting_configselect extends admin_setting {
}
}
/**
* Select multiple items from list
*
@ -2512,7 +2538,6 @@ class admin_setting_configmultiselect extends admin_setting_configselect {
* Potential bug in the works should anyone call with this function
* using a vartype that is not an array
*
* @todo Add vartype handling to ensure $data is an array
* @param array $data
*/
public function write_setting($data) {
@ -2696,6 +2721,7 @@ class admin_setting_configtime extends admin_setting {
}
/**
* Used to validate a textarea used for ip addresses
*
@ -2738,6 +2764,7 @@ class admin_setting_configiplist extends admin_setting_configtextarea {
}
}
/**
* An admin setting for selecting one or more users who have a capability
* in the system context
@ -2855,6 +2882,7 @@ class admin_setting_users_with_capability extends admin_setting_configmultiselec
}
}
/**
* Special checkbox for calendar - resets SESSION vars.
*
@ -2919,6 +2947,7 @@ class admin_setting_special_selectsetup extends admin_setting_configselect {
}
}
/**
* Special select for frontpage - stores data in course table
*
@ -2935,6 +2964,7 @@ class admin_setting_sitesetselect extends admin_setting_configselect {
$site = get_site();
return $site->{$this->name};
}
/**
* Updates the database and save the setting
*
@ -2957,6 +2987,7 @@ class admin_setting_sitesetselect extends admin_setting_configselect {
}
}
/**
* Select for blog's bloglevel setting: if set to 0, will set blog_menu
* block to hidden.
@ -2981,6 +3012,7 @@ class admin_setting_bloglevel extends admin_setting_configselect {
}
}
/**
* Special select - lists on the frontpage - hacky
*
@ -3025,6 +3057,7 @@ class admin_setting_courselist_frontpage extends admin_setting {
}
return true;
}
/**
* Returns the selected settings
*
@ -3098,6 +3131,7 @@ class admin_setting_courselist_frontpage extends admin_setting {
}
}
/**
* Special checkbox for frontpage - stores data in course table
*
@ -3191,6 +3225,7 @@ class admin_setting_sitesettext extends admin_setting_configtext {
}
}
/**
* Special text editor for site description.
*
@ -3247,6 +3282,7 @@ class admin_setting_special_frontpagedesc extends admin_setting {
}
}
/**
* Administration interface for emoticon_manager settings.
*
@ -3465,6 +3501,7 @@ class admin_setting_emoticons extends admin_setting {
}
}
/**
* Special setting for limiting of the list of available languages.
*
@ -3491,6 +3528,7 @@ class admin_setting_langlist extends admin_setting_configtext {
}
}
/**
* Selection of one of the recognised countries using the list
* returned by {@link get_list_of_countries()}.
@ -3519,6 +3557,7 @@ class admin_settings_country_select extends admin_setting_configselect {
}
}
/**
* Course category selection
*
@ -3548,6 +3587,7 @@ class admin_settings_coursecat_select extends admin_setting_configselect {
}
}
/**
* Special control for selecting days to backup
*
@ -3561,6 +3601,7 @@ class admin_setting_special_backupdays extends admin_setting_configmulticheckbox
parent::__construct('backup_auto_weekdays', get_string('automatedbackupschedule','backup'), get_string('automatedbackupschedulehelp','backup'), array(), NULL);
$this->plugin = 'backup';
}
/**
* Load the available choices for the select box
*
@ -3579,6 +3620,7 @@ class admin_setting_special_backupdays extends admin_setting_configmulticheckbox
}
}
/**
* Special debug setting
*
@ -3610,6 +3652,7 @@ class admin_setting_special_debug extends admin_setting_configselect {
}
}
/**
* Special admin control
*
@ -3626,6 +3669,7 @@ class admin_setting_special_calendar_weekend extends admin_setting {
$default = array ('0', '6'); // Saturdays and Sundays
parent::__construct($name, $visiblename, $description, $default);
}
/**
* Gets the current settings as an array
*
@ -3737,6 +3781,7 @@ class admin_setting_pickroles extends admin_setting_configmulticheckbox {
return false;
}
}
/**
* Return the default setting for this control
*
@ -3760,6 +3805,7 @@ class admin_setting_pickroles extends admin_setting_configmulticheckbox {
}
}
/**
* Text field with an advanced checkbox, that controls a additional $name.'_adv' setting.
*
@ -3846,6 +3892,7 @@ class admin_setting_configtext_with_advanced extends admin_setting_configtext {
}
}
/**
* Checkbox with an advanced checkbox that controls an additional $name.'_adv' config setting.
*
@ -3950,6 +3997,7 @@ EOT;
}
}
/**
* Checkbox with an advanced checkbox that controls an additional $name.'_locked' config setting.
*
@ -4051,6 +4099,7 @@ class admin_setting_configcheckbox_with_lock extends admin_setting_configcheckbo
}
}
/**
* Dropdown menu with an advanced checkbox, that controls a additional $name.'_adv' setting.
*
@ -4136,6 +4185,7 @@ class admin_setting_configselect_with_advanced extends admin_setting_configselec
}
}
/**
* Graded roles in gradebook
*
@ -4152,6 +4202,7 @@ class admin_setting_special_gradebookroles extends admin_setting_pickroles {
}
}
/**
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@ -4179,6 +4230,7 @@ class admin_setting_regradingcheckbox extends admin_setting_configcheckbox {
}
}
/**
* Which roles to show on course description page
*
@ -4195,6 +4247,7 @@ class admin_setting_special_coursecontact extends admin_setting_pickroles {
}
}
/**
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@ -4240,6 +4293,7 @@ class admin_setting_special_gradelimiting extends admin_setting_configcheckbox {
}
/**
* Primary grade export plugin - has state tracking.
*
@ -4274,6 +4328,7 @@ class admin_setting_special_gradeexport extends admin_setting_configmulticheckbo
}
}
/**
* Grade category settings
*
@ -4447,6 +4502,7 @@ class admin_setting_grade_profilereport extends admin_setting_configselect {
}
}
/**
* Special class for register auth selection
*
@ -4504,6 +4560,7 @@ class admin_setting_special_registerauth extends admin_setting_configselect {
}
}
/**
* Module manage page
*
@ -4812,6 +4869,7 @@ class admin_page_manageblocks extends admin_externalpage {
}
}
/**
* Question type manage page
*
@ -4859,6 +4917,7 @@ class admin_page_manageqtypes extends admin_externalpage {
}
}
class admin_page_manageportfolios extends admin_externalpage {
/**
* Calls parent::__construct with specific arguments
@ -4910,6 +4969,7 @@ class admin_page_manageportfolios extends admin_externalpage {
}
}
class admin_page_managerepositories extends admin_externalpage {
/**
* Calls parent::__construct with specific arguments
@ -4961,6 +5021,7 @@ class admin_page_managerepositories extends admin_externalpage {
}
}
/**
* Special class for authentication administration.
*
@ -5163,6 +5224,7 @@ class admin_setting_manageauths extends admin_setting {
}
}
/**
* Special class for authentication administration.
*
@ -5329,6 +5391,7 @@ class admin_setting_manageeditors extends admin_setting {
}
}
/**
* Special class for license administration.
*
@ -5422,6 +5485,8 @@ class admin_setting_managelicenses extends admin_setting {
return highlight($query, $return);
}
}
/**
* Special class for filter administration.
*
@ -5474,6 +5539,7 @@ class admin_page_managefilters extends admin_externalpage {
}
}
/**
* Initialise admin page - this function does require login and permission
* checks specified in page definition.
@ -5487,7 +5553,7 @@ class admin_page_managefilters extends admin_externalpage {
* @param array $extraurlparams an array paramname => paramvalue, or parameters that need to be
* added to the turn blocks editing on/off form, so this page reloads correctly.
* @param string $actualurl if the actual page being viewed is not the normal one for this
* page (e.g. admin/roles/allowassin.php, instead of admin/roles/manage.php, you can pass the alternate URL here.
* page (e.g. admin/roles/allow.php, instead of admin/roles/manage.php, you can pass the alternate URL here.
* @param array $options Additional options that can be specified for page setup.
* pagelayout - This option can be used to set a specific pagelyaout, admin is default.
*/
@ -5583,7 +5649,7 @@ function admin_externalpage_setup($section, $extrabutton = '', array $extraurlpa
/**
* Returns the reference to admin tree root
*
* @return object admin_roow object
* @return object admin_root object
*/
function admin_get_root($reload=false, $requirefulltree=true) {
global $CFG, $DB, $OUTPUT;
@ -5958,7 +6024,6 @@ function any_new_admin_settings($node) {
return false;
}
/**
* Moved from admin/replace.php so that we can use this in cron
*
@ -6213,6 +6278,7 @@ function print_plugin_tables() {
echo $html;
}
/**
* Manage repository settings
*
@ -6463,6 +6529,7 @@ class admin_setting_managerepository extends admin_setting {
}
}
/**
* Special class for management of external services
*
@ -6645,6 +6712,8 @@ class admin_setting_manageexternalservices extends admin_setting {
return highlight($query, $return);
}
}
/**
* Special class for plagiarism administration.
*
@ -6732,6 +6801,7 @@ class admin_setting_manageplagiarism extends admin_setting {
}
}
/**
* Special class for overview of external services
*
@ -7003,6 +7073,7 @@ class admin_setting_webservicesoverview extends admin_setting {
}
/**
* Special class for web service protocol administration.
*
@ -7291,6 +7362,7 @@ class admin_setting_managewebservicetokens extends admin_setting {
}
}
/**
* Colour picker
*