MDL-11113: Next moodle version requires PHP5: removing php4 compatibility code.
This commit is contained in:
@@ -72,11 +72,11 @@ class tinymce extends editorObject {
|
||||
var $printdialogs = false;
|
||||
|
||||
/**
|
||||
* PHP4 style class constructor.
|
||||
* PHP5 style class constructor.
|
||||
*
|
||||
* @param int $courseid
|
||||
*/
|
||||
function tinymce ($courseid) {
|
||||
function __construct($courseid) {
|
||||
parent::editorObject();
|
||||
$this->courseid = clean_param($courseid, PARAM_INT);
|
||||
|
||||
@@ -115,15 +115,6 @@ class tinymce extends editorObject {
|
||||
$this->printdialogs = has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $courseid)) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* PHP5 style class constructor.
|
||||
*
|
||||
* @param int $courseid
|
||||
*/
|
||||
function __construct($courseid) {
|
||||
$this->tinymce($courseid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks configuration key validity.
|
||||
* @param string $key Configuration key to check.
|
||||
@@ -155,7 +146,6 @@ class tinymce extends editorObject {
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -304,7 +294,6 @@ class tinymce extends editorObject {
|
||||
if ( !empty($this->cfg->editorsrc) ) {
|
||||
unset($this->cfg->editorsrc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-17
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Editor class for Moodle.
|
||||
*
|
||||
* This library is made to make easier to intergrate
|
||||
* This library is made to make easier to integrate
|
||||
* WYSIWYG editors into Moodle.
|
||||
*
|
||||
* @author Janne Mikkonen
|
||||
@@ -32,24 +32,14 @@ class editorObject {
|
||||
var $cfg;
|
||||
|
||||
/**
|
||||
* PHP4 style class constructor.
|
||||
*
|
||||
* @uses $CFG, $USER
|
||||
* Constructor
|
||||
*/
|
||||
function editorObject () {
|
||||
function __construct() {
|
||||
global $CFG, $USER;
|
||||
$this->cfg = &$CFG;
|
||||
$this->user = &$USER;
|
||||
$this->courseid = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* PHP5 style class constructor.
|
||||
*
|
||||
*/
|
||||
function __construct() {
|
||||
$this->editorObject();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to load necessary editor codes to
|
||||
@@ -106,9 +96,7 @@ class editorObject {
|
||||
return (new tinymce($courseid));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -123,6 +111,6 @@ class editorObject {
|
||||
echo '</div>';
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user