]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blobdiff - includes/Cdb_PHP.php
MediaWiki 1.17.0
[autoinstalls/mediawiki.git] / includes / Cdb_PHP.php
index 49294f71ddf1a117559c424b0f421b9365812f4f..1485cc6698b3ccd0bcc3272acc364c52b1128c0f 100644 (file)
@@ -1,11 +1,12 @@
 <?php
-
 /**
  * This is a port of D.J. Bernstein's CDB to PHP. It's based on the copy that 
  * appears in PHP 5.3. Changes are:
  *    * Error returns replaced with exceptions
  *    * Exception thrown if sizes or offsets are between 2GB and 4GB
  *    * Some variables renamed
+ *
+ * @file
  */
 
 /**
@@ -96,7 +97,7 @@ class CdbReader_PHP extends CdbReader {
        function __construct( $fileName ) {
                $this->handle = fopen( $fileName, 'rb' );
                if ( !$this->handle ) {
-                       throw new MWException( 'Unable to open DB file "' . $fileName . '"' );
+                       throw new MWException( 'Unable to open CDB file "' . $fileName . '"' );
                }
                $this->findStart();
        }
@@ -137,7 +138,7 @@ class CdbReader_PHP extends CdbReader {
 
                $buf = fread( $this->handle, $length );
                if ( $buf === false || strlen( $buf ) !== $length ) {
-                       throw new MWException( __METHOD__.': read from cdb file failed, file may be corrupted' );
+                       throw new MWException( __METHOD__.': read from CDB file failed, file may be corrupted' );
                }
                return $buf;
        }
@@ -223,7 +224,7 @@ class CdbWriter_PHP extends CdbWriter {
                $this->tmpFileName = $fileName . '.tmp.' . mt_rand( 0, 0x7fffffff );
                $this->handle = fopen( $this->tmpFileName, 'wb' );
                if ( !$this->handle ) {
-                       throw new MWException( 'Unable to open DB file for write "' . $fileName . '"' );
+                       throw new MWException( 'Unable to open CDB file for write "' . $fileName . '"' );
                }
                $this->hplist = array();
                $this->numentries = 0;