Forgot to change constructor name
[squirrelmail.git] / class / l10n / gettext.class.php
index d8a9b78ae4a2fdf307c56582cf13d7c8abeb5e03..0692a536c91bb4a1b28abeaa855ecd4fec2e6ff4 100644 (file)
@@ -19,7 +19,7 @@
  * along with PHP-gettext; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * @copyright 2004-2011 The SquirrelMail Project Team
+ * @copyright 2004-2021 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -68,11 +68,13 @@ class gettext_reader {
     }
 
     /**
+     * Constructor (PHP5 style, required in some future version of PHP)
      * constructor that requires StreamReader object
      * @param object $Reader
      * @return boolean false, if some error with stream
+TODO: Constructors should not return anything.
      */
-    function gettext_reader($Reader) {
+    function __construct($Reader) {
         $MAGIC1 = (int) ((222) | (18<<8) | (4<<16) | (149<<24));
         $MAGIC2 = (int) ((149) | (4<<8) | (18<<16) | (222<<24));
 
@@ -106,6 +108,17 @@ class gettext_reader {
         $this->_HASHED = array();
     }
 
+    /**
+     * Constructor (PHP4 style, kept for compatibility reasons)
+     * constructor that requires StreamReader object
+     * @param object $Reader
+     * @return boolean false, if some error with stream
+TODO: Constructors should not return anything.
+     */
+    function gettext_reader($Reader) {
+        return self::__construct($Reader);
+    }
+
     /**
      * @param boolean $translations do translation have to be loaded
      */