intval ( $id ) once in caller instead of in all the getTextXXX functions
authorAriel Glenn <ariel@users.mediawiki.org>
Thu, 15 Jul 2010 21:25:31 +0000 (21:25 +0000)
committerAriel Glenn <ariel@users.mediawiki.org>
Thu, 15 Jul 2010 21:25:31 +0000 (21:25 +0000)
maintenance/dumpTextPass.php

index 75fd9ab..4e198d1 100644 (file)
@@ -206,6 +206,7 @@ class TextPassDumper extends BackupDumper {
        
        private function doGetText( $id ) {
 
+               $id = intval( $id );
                $this->failures = 0;
                $ex = new MWException( "Graceful storage failure" );
                while (true) {
@@ -273,7 +274,6 @@ class TextPassDumper extends BackupDumper {
         */
        private function getTextDb( $id ) {
                global $wgContLang;
-               $id = intval( $id );
                $row = $this->db->selectRow( 'text',
                        array( 'old_text', 'old_flags' ),
                        array( 'old_id' => $id ),