diff --git a/inc/lib/gettext/.gettext.php.swp b/inc/lib/gettext/.gettext.php.swp new file mode 100644 index 00000000..5d951f49 Binary files /dev/null and b/inc/lib/gettext/.gettext.php.swp differ diff --git a/inc/lib/gettext/gettext.php b/inc/lib/gettext/gettext.php index 5064047c..f93532b5 100755 --- a/inc/lib/gettext/gettext.php +++ b/inc/lib/gettext/gettext.php @@ -98,7 +98,7 @@ class gettext_reader { * @param object Reader the StreamReader object * @param boolean enable_cache Enable or disable caching of strings (default on) */ - function gettext_reader($Reader, $enable_cache = true) { + function __construct($Reader, $enable_cache = true) { // If there isn't a StreamReader, turn on short circuit mode. if (! $Reader || isset($Reader->error) ) { $this->short_circuit = true; @@ -129,6 +129,9 @@ class gettext_reader { $this->originals = $this->readint(); $this->translations = $this->readint(); } + function gettext_reader($Reader, $enable_cache = true) { + self::__construct($Reader, $enable_cache); + } /** * Loads the translation tables from the MO file into the cache diff --git a/inc/lib/gettext/streams.php b/inc/lib/gettext/streams.php index 3cdc1584..4b68f743 100644 --- a/inc/lib/gettext/streams.php +++ b/inc/lib/gettext/streams.php @@ -49,11 +49,15 @@ class StringReader { var $_pos; var $_str; - function StringReader($str='') { + function __construct($str='') { $this->_str = $str; $this->_pos = 0; } + function StringReader($str='') { + self::__construct($str); + } + function read($bytes) { $data = substr($this->_str, $this->_pos, $bytes); $this->_pos += $bytes; @@ -86,7 +90,7 @@ class FileReader { var $_fd; var $_length; - function FileReader($filename) { + function __construct($filename) { if (file_exists($filename)) { $this->_length=filesize($filename); @@ -102,6 +106,10 @@ class FileReader { } } + function FileReader($filename) { + self::__construct($filename); + } + function read($bytes) { if ($bytes) { fseek($this->_fd, $this->_pos); @@ -143,7 +151,7 @@ class FileReader { // Preloads entire file in memory first, then creates a StringReader // over it (it assumes knowledge of StringReader internals) class CachedFileReader extends StringReader { - function CachedFileReader($filename) { + function __construct($filename) { if (file_exists($filename)) { $length=filesize($filename); @@ -161,6 +169,10 @@ class CachedFileReader extends StringReader { return false; } } + + function CachedFileReader($filename) { + self::__construct($filename); + } };