]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11113: Next moodle version requires PHP5: removing php4 compatibility code.
authorscyrma <scyrma>
Fri, 27 Jun 2008 03:00:29 +0000 (03:00 +0000)
committerscyrma <scyrma>
Fri, 27 Jun 2008 03:00:29 +0000 (03:00 +0000)
lib/editor/tinymce/tinymce.class.php
lib/editorlib.php

index e710c365149a78efad64ff6addb7266ad1b0a729..bf56dc6df5ea924240d5e60f2508113bb2e2a181 100644 (file)
@@ -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);
         }
-
     }
 
     /**
index e5ad3f570daabd549f9ec0c4948d8ed166dee895..6ca03e0a0b657c472d0bf45f10efea7171a3a71c 100644 (file)
@@ -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;
     }
-
 }
+
 ?>