https://www.mediawiki.org/wiki/Special:Code/MediaWiki/115027

Revision: 115027
Author:   aaron
Date:     2012-04-24 20:00:59 +0000 (Tue, 24 Apr 2012)
Log Message:
-----------
Renamed some of the MWWikiversions functions for clarity (plus typo fix).

Modified Paths:
--------------
    trunk/tools/mwmultiversion/multiversion/MWWikiversions.php
    trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB
    trunk/tools/mwmultiversion/multiversion/switchAllMediaWikis

Modified: trunk/tools/mwmultiversion/multiversion/MWWikiversions.php
===================================================================
--- trunk/tools/mwmultiversion/multiversion/MWWikiversions.php  2012-04-24 
19:55:07 UTC (rev 115026)
+++ trunk/tools/mwmultiversion/multiversion/MWWikiversions.php  2012-04-24 
20:00:59 UTC (rev 115027)
@@ -9,7 +9,7 @@
         * @param $srcPath string Path to wikiversions.dat
         * @return Array List of wiki version rows
         */
-       public static function getWikiVerionRows( $srcPath ) {
+       public static function readWikiVersionsFile( $srcPath ) {
                $data = file_get_contents( $srcPath );
                if ( $data === false ) {
                        die( "Unable to read $srcPath.\n" );
@@ -84,7 +84,7 @@
         * @param $srcPath string
         * @return Array (DB name => position in list)
         */
-       public static function getDbList( $srcPath ) {
+       public static function readDbListFile( $srcPath ) {
                $data = file_get_contents( $srcPath );
                if ( $data === false ) {
                        die( "Unable to read $srcPath.\n" );

Modified: trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB
===================================================================
--- trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB      
2012-04-24 19:55:07 UTC (rev 115026)
+++ trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB      
2012-04-24 20:00:59 UTC (rev 115027)
@@ -14,7 +14,7 @@
        $finalDBPath = MULTIVER_CDB_DIR_HOME . '/wikiversions.cdb';
 
        // Get the array of sanitized wikiversion rows...
-       $rows = MWWikiversions::getWikiVerionRows( $srcPath );
+       $rows = MWWikiversions::readWikiVersionsFile( $srcPath );
 
        # Build the new database at the temp location...
        @unlink( $tmpDBPath ); // clear any old temp file for sanity

Modified: trunk/tools/mwmultiversion/multiversion/switchAllMediaWikis
===================================================================
--- trunk/tools/mwmultiversion/multiversion/switchAllMediaWikis 2012-04-24 
19:55:07 UTC (rev 115026)
+++ trunk/tools/mwmultiversion/multiversion/switchAllMediaWikis 2012-04-24 
20:00:59 UTC (rev 115027)
@@ -40,10 +40,10 @@
        }
 
        # Read in .dblist file into an array with dbnames as keys...
-       $dbList = MWWikiversions::getDbList( "$common/$dbListName" );
+       $dbList = MWWikiversions::readDbListFile( "$common/$dbListName" );
 
        # Get all the wikiversion rows in wikiversions.dat...
-       $versionRows = MWWikiversions::getWikiVerionRows( $datPath );
+       $versionRows = MWWikiversions::readWikiVersionsFile( $datPath );
 
        $count = 0;
        $newWikiVersionsData = "";


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to