cvs: pear /File_Gettext/Gettext MO.php PO.php

From: Date: Thu, 29 Apr 2004 19:14:31 +0000
Subject: cvs: pear /File_Gettext/Gettext MO.php PO.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-18969@lists.php.net to get a copy of this message
mike Thu Apr 29 15:14:31 2004 EDT Modified files: /pear/File_Gettext/Gettext MO.php PO.php Log: * call parent::raiseError() instead of PEARs http://cvs.php.net/diff.php/pear/File_Gettext/Gettext/MO.php?r1=1.1&r2=1.2&ty=u Index: pear/File_Gettext/Gettext/MO.php diff -u pear/File_Gettext/Gettext/MO.php:1.1 pear/File_Gettext/Gettext/MO.php:1.2 --- pear/File_Gettext/Gettext/MO.php:1.1 Tue Mar 30 12:03:14 2004 +++ pear/File_Gettext/Gettext/MO.php Thu Apr 29 15:14:31 2004 @@ -11,7 +11,7 @@ // | Copyright (c) 2004 Michael Wallner <mike@iworks.at> | // +----------------------------------------------------------------------+ // -// $Id: MO.php,v 1.1 2004/03/30 17:03:14 mike Exp $ +// $Id: MO.php,v 1.2 2004/04/29 19:14:31 mike Exp $ /** * File::Gettext::MO @@ -29,7 +29,7 @@ * GNU MO file reader and writer. * * @author Michael Wallner <mike@php.net> -* @version $Revision: 1.1 $ +* @version $Revision: 1.2 $ * @access public */ class File_Gettext_MO extends File_Gettext @@ -156,12 +156,12 @@ // open MO file if (!is_resource($this->_handle = @fopen($file, 'rb'))) { - return PEAR::raiseError($php_errormsg . ' ' . $file); + return parent::raiseError($php_errormsg . ' ' . $file); } // lock MO file shared if (!@flock($this->_handle, LOCK_SH)) { @fclose($this->_handle); - return PEAR::raiseError($php_errormsg . ' ' . $file); + return parent::raiseError($php_errormsg . ' ' . $file); } // read magic number from MO file header and define endianess @@ -171,12 +171,12 @@ } elseif ($magic == (int) 0xde120495) { $be = true; } else { - return PEAR::raiseError('No GNU mo file: ' . $file); + return parent::raiseError('No GNU mo file: ' . $file); } // check file format revision - we currently only support 0 if (0 !== ($_rev = $this->_readInt($be))) { - return PEAR::raiseError('Invalid file format revision: ' . $_rev); + return parent::raiseError('Invalid file format revision: ' . $_rev); } // count of strings in this file @@ -244,12 +244,12 @@ // open MO file if (!is_resource($this->_handle = @fopen($file, 'wb'))) { - return PEAR::raiseError($php_errormsg . ' ' . $file); + return parent::raiseError($php_errormsg . ' ' . $file); } // lock MO file exclusively if (!@flock($this->_handle, LOCK_EX)) { @fclose($this->_handle); - return PEAR::raiseError($php_errormsg . ' ' . $file); + return parent::raiseError($php_errormsg . ' ' . $file); } // write magic number http://cvs.php.net/diff.php/pear/File_Gettext/Gettext/PO.php?r1=1.1&r2=1.2&ty=u Index: pear/File_Gettext/Gettext/PO.php diff -u pear/File_Gettext/Gettext/PO.php:1.1 pear/File_Gettext/Gettext/PO.php:1.2 --- pear/File_Gettext/Gettext/PO.php:1.1 Tue Mar 30 12:03:14 2004 +++ pear/File_Gettext/Gettext/PO.php Thu Apr 29 15:14:31 2004 @@ -11,7 +11,7 @@ // | Copyright (c) 2004 Michael Wallner <mike@iworks.at> | // +----------------------------------------------------------------------+ // -// $Id: PO.php,v 1.1 2004/03/30 17:03:14 mike Exp $ +// $Id: PO.php,v 1.2 2004/04/29 19:14:31 mike Exp $ /** * File::Gettext::PO @@ -29,7 +29,7 @@ * GNU PO file reader and writer. * * @author Michael Wallner <mike@php.net> -* @version $Revision: 1.1 $ +* @version $Revision: 1.2 $ * @access public */ class File_Gettext_PO extends File_Gettext @@ -61,7 +61,7 @@ // load file if (!$contents = @file($file)) { - return PEAR::raiseError($php_errormsg . ' ' . $file); + return parent::raiseError($php_errormsg . ' ' . $file); } $contents = implode('', $contents); @@ -74,7 +74,7 @@ unset($contents); if (!$matched) { - return PEAR::raiseError('No msgid/msgstr entries found'); + return parent::raiseError('No msgid/msgstr entries found'); } // get all msgids and msgtrs @@ -110,12 +110,12 @@ // open PO file if (!is_resource($fh = @fopen($file, 'w'))) { - return PEAR::raiseError($php_errormsg . ' ' . $file); + return parent::raiseError($php_errormsg . ' ' . $file); } // lock PO file exclusively if (!@flock($fh, LOCK_EX)) { @fclose($fh); - return PEAR::raiseError($php_errmsg . ' ' . $file); + return parent::raiseError($php_errmsg . ' ' . $file); } // write meta info

« previous php.pear.cvs (#18969) next »