diff --git a/backup/cc/cc_lib/gral_lib/cssparser.php b/backup/cc/cc_lib/gral_lib/cssparser.php index 209226879d0..fc2e3049947 100644 --- a/backup/cc/cc_lib/gral_lib/cssparser.php +++ b/backup/cc/cc_lib/gral_lib/cssparser.php @@ -25,6 +25,16 @@ class cssparser { $this->Clear(); } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function cssparser($html = true) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($html); + } + function finalize() { unset($this->css); } diff --git a/filter/tex/latex.php b/filter/tex/latex.php index c2dc1e2b867..7eb522e5d68 100644 --- a/filter/tex/latex.php +++ b/filter/tex/latex.php @@ -23,6 +23,16 @@ make_temp_directory('latex'); } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function latex() { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct(); + } + /** * Accessor function for support_platform field. * @return boolean value of supported_platform diff --git a/grade/export/lib.php b/grade/export/lib.php index b00866601c5..bf7b981819a 100644 --- a/grade/export/lib.php +++ b/grade/export/lib.php @@ -630,6 +630,16 @@ class grade_export_update_buffer { $this->export_time = time(); } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function grade_export_update_buffer() { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct(); + } + public function flush($buffersize) { global $CFG, $DB; diff --git a/grade/lib.php b/grade/lib.php index 095d7512b36..2696dcaaa1c 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -1102,6 +1102,16 @@ class grade_plugin_return { } } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function grade_plugin_return($params = null) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($params); + } + /** * Returns return parameters as options array suitable for buttons. * @return array options @@ -2049,6 +2059,16 @@ class grade_seq extends grade_structure { } } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function grade_seq($courseid, $category_grade_last=false, $nooutcomes=false) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($courseid, $category_grade_last, $nooutcomes); + } + /** * Static recursive helper - makes the grade_item for category the last children * @@ -2229,6 +2249,17 @@ class grade_tree extends grade_structure { } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function grade_tree($courseid, $fillers=true, $category_grade_last=false, + $collapsed=null, $nooutcomes=false) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($courseid, $fillers, $category_grade_last, $collapsed, $nooutcomes); + } + /** * Static recursive helper - removes items from collapsed categories * diff --git a/lib/adminlib.php b/lib/adminlib.php index 5e98cdd5a66..81c95d0205f 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -4941,6 +4941,16 @@ class admin_setting_special_gradelimiting extends admin_setting_configcheckbox { get_string('unlimitedgrades_help', 'grades'), '0', '1', '0'); } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function admin_setting_special_gradelimiting() { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct(); + } + /** * Force site regrading */ diff --git a/lib/componentlib.class.php b/lib/componentlib.class.php index d01e7c82d88..0d07797c368 100644 --- a/lib/componentlib.class.php +++ b/lib/componentlib.class.php @@ -206,6 +206,16 @@ class component_installer { $this->check_requisites(); } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function component_installer($sourcebase, $zippath, $zipfilename, $md5filename='', $destpath='') { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($sourcebase, $zippath, $zipfilename, $md5filename, $destpath); + } + /** * This function will check if everything is properly set to begin * one installation. Also, it will check for required settings diff --git a/lib/editor/tinymce/plugins/spellchecker/classes/SpellChecker.php b/lib/editor/tinymce/plugins/spellchecker/classes/SpellChecker.php index 0c2d84ba0d8..142e51035c9 100644 --- a/lib/editor/tinymce/plugins/spellchecker/classes/SpellChecker.php +++ b/lib/editor/tinymce/plugins/spellchecker/classes/SpellChecker.php @@ -17,6 +17,16 @@ class SpellChecker { $this->_config = $config; } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function SpellChecker(&$config) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($config); + } + /** * Simple loopback function everything that gets in will be send back. * diff --git a/lib/editor/tinymce/plugins/spellchecker/classes/utils/JSON.php b/lib/editor/tinymce/plugins/spellchecker/classes/utils/JSON.php index 28f0d2306b9..a2ceb813d20 100644 --- a/lib/editor/tinymce/plugins/spellchecker/classes/utils/JSON.php +++ b/lib/editor/tinymce/plugins/spellchecker/classes/utils/JSON.php @@ -38,6 +38,16 @@ class Moxiecode_JSONReader { $this->_needProp = false; } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function Moxiecode_JSONReader($data) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($data); + } + function getToken() { return $this->_token; } @@ -363,6 +373,16 @@ class Moxiecode_JSON { public function __construct() { } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function Moxiecode_JSON() { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct(); + } + function decode($input) { $reader = new Moxiecode_JSONReader($input); diff --git a/lib/editor/tinymce/plugins/spellchecker/classes/utils/Logger.php b/lib/editor/tinymce/plugins/spellchecker/classes/utils/Logger.php index c8bde2465d6..c48fb42dd77 100644 --- a/lib/editor/tinymce/plugins/spellchecker/classes/utils/Logger.php +++ b/lib/editor/tinymce/plugins/spellchecker/classes/utils/Logger.php @@ -40,6 +40,16 @@ class Moxiecode_Logger { $this->_format = "[{time}] [{level}] {message}"; } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function Moxiecode_Logger() { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct(); + } + /** * Sets the current log level, use the MC_LOGGER constants. * diff --git a/lib/environmentlib.php b/lib/environmentlib.php index efbcd1f6b11..13de804bebc 100644 --- a/lib/environmentlib.php +++ b/lib/environmentlib.php @@ -1273,6 +1273,16 @@ class environment_results { $this->restrict_str=''; } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function environment_results($part) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($part); + } + /** * Set the status * diff --git a/lib/evalmath/evalmath.class.php b/lib/evalmath/evalmath.class.php index bf27d615d85..af8a77d30a3 100644 --- a/lib/evalmath/evalmath.class.php +++ b/lib/evalmath/evalmath.class.php @@ -125,6 +125,16 @@ class EvalMath { $this->allowimplicitmultiplication = $allowimplicitmultiplication; } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function EvalMath($allowconstants = false, $allowimplicitmultiplication = false) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($allowconstants, $allowimplicitmultiplication); + } + function e($expr) { return $this->evaluate($expr); } diff --git a/lib/evalmath/readme_moodle.txt b/lib/evalmath/readme_moodle.txt index bb01ba72cdb..e9b1a80a4b8 100644 --- a/lib/evalmath/readme_moodle.txt +++ b/lib/evalmath/readme_moodle.txt @@ -11,9 +11,10 @@ Our changes: * made a function to test a string to see if it is a valid func or var name. * localized strings * added round, ceil and floor functions. -* EvalMath::EvalMath() changed to EvalMath::__construct() +* EvalMath::EvalMath() changed to EvalMath::__construct() and there is a new EvalMath::EvalMath + function to maintain backwards compatibility To see all changes diff against version 1.1, available from: http://www.phpclasses.org/browse/package/2695.html -skodak, Tim Hunt \ No newline at end of file +skodak, Tim Hunt diff --git a/lib/graphlib.php b/lib/graphlib.php index 555f1a67ce7..64db34af792 100644 --- a/lib/graphlib.php +++ b/lib/graphlib.php @@ -1190,6 +1190,16 @@ class graph { //ImageColorTransparent($this->image, $this->colour['white']); // colour for transparency } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function graph() { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct(); + } + /** * Prepare label's text for GD output. * diff --git a/lib/lexer.php b/lib/lexer.php index 341f54dbf5b..cca3b85967c 100644 --- a/lib/lexer.php +++ b/lib/lexer.php @@ -50,7 +50,17 @@ $this->_labels = array(); $this->_regex = null; } - + + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function ParallelRegex($case) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($case); + } + /** * Adds a pattern with an optional label. * @param string $pattern Perl style regex, but ( and ) @@ -140,7 +150,17 @@ public function __construct($start) { $this->_stack = array($start); } - + + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function StateStack($start) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($start); + } + /** * Accessor for current state. * @return string State as string. diff --git a/lib/mathslib.php b/lib/mathslib.php index 067f660cca7..aa2e8666280 100644 --- a/lib/mathslib.php +++ b/lib/mathslib.php @@ -70,6 +70,16 @@ class calc_formula { } } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function calc_formula($formula, $params=false) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($formula, $params); + } + /** * Raplace parameters used in existing formula, * parameter names must contain only lowercase [a-z] letters, no other characters are allowed! diff --git a/lib/searchlib.php b/lib/searchlib.php index bb17c45a3e8..1393cd4dd32 100644 --- a/lib/searchlib.php +++ b/lib/searchlib.php @@ -56,6 +56,16 @@ class search_token { } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function search_token($type, $value) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($type, $value); + } + // Try to clean up user input to avoid potential security issues. // Need to think about this some more. @@ -193,6 +203,17 @@ class search_lexer extends Lexer{ $this->addExitPattern("\s","plainstring"); } + + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function search_lexer(&$parser) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($parser); + } + } diff --git a/mod/wiki/diff/difflib.php b/mod/wiki/diff/difflib.php index bc6a59861fe..7e3e9659a04 100644 --- a/mod/wiki/diff/difflib.php +++ b/mod/wiki/diff/difflib.php @@ -319,7 +319,17 @@ class ouwiki_line { } } } - + + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function ouwiki_line($data, $linepos) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($data, $linepos); + } + /** * @return string Normalised string representation of this line object */ @@ -372,6 +382,16 @@ class ouwiki_word { $this->word=$word; $this->start=$start; } + + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function ouwiki_word($word, $start) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($word, $start); + } } /** @@ -511,6 +531,16 @@ class ouwiki_changes { } } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function ouwiki_changes($diff, $count2) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($diff, $count2); + } + /** * Find deleted lines. These are lines in file1 that * cannot be present even in modified form in file2 diff --git a/question/category_class.php b/question/category_class.php index c822a3fddb6..1cb06af971d 100644 --- a/question/category_class.php +++ b/question/category_class.php @@ -194,6 +194,16 @@ class question_category_object { $this->initialize($page, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts); } + /** + * Old syntax of class constructor. Deprecated in PHP7. + * + * @deprecated since Moodle 3.1 + */ + public function question_category_object($page, $pageurl, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts) { + debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER); + self::__construct($page, $pageurl, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts); + } + /** * Initializes this classes general category-related variables */