MDL-51784 general: Adding missing php4 style constructors

Adding them to maintain backwards compatibility.
This commit is contained in:
David Monllao
2015-12-11 14:56:31 +08:00
parent 345f365555
commit 0a44e7d8cc
18 changed files with 176 additions and 5 deletions
+22 -1
View File
@@ -319,7 +319,14 @@ class ouwiki_line {
}
}
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function ouwiki_line($data, $linepos) {
self::__construct($data, $linepos);
}
/**
* @return string Normalised string representation of this line object
*/
@@ -372,6 +379,13 @@ class ouwiki_word {
$this->word=$word;
$this->start=$start;
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function ouwiki_word($word, $start) {
self::__construct($word, $start);
}
}
/**
@@ -511,6 +525,13 @@ class ouwiki_changes {
}
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*/
public function ouwiki_changes($diff, $count2) {
self::__construct($diff, $count2);
}
/**
* Find deleted lines. These are lines in file1 that
* cannot be present even in modified form in file2