MDL-51784 general: Adding missing php4 style constructors
Adding them to warn people calling the php4 constructor.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user