Partial revert of r36804:
authorDaniel Friesen <dantman@users.mediawiki.org>
Mon, 30 Jun 2008 09:22:00 +0000 (09:22 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Mon, 30 Jun 2008 09:22:00 +0000 (09:22 +0000)
Removing the wfSharedTable function.
The function uses a $wgExternalSharedDB which is not part of Core, and has not been defined in default settings. The variable itself has no apparent purpose and is likely to make the existing use of $wgSharedDB even more complex and prone to breakage.

The function wfSharedTable itself, appears more like a Wikia made function to support transition of 1.12 wiki in which $wgSharedTables did not exist over to 1.13 in which it does exist.
If this is the actual point of it, then it serves no point in being added to core. 1.13 already has $wgSharedTables and it serves better to append to that, than to use wfSharedTable. This is something that extensions should be defining themselves if they need it for transition from old 1.12 wiki to 1.13.

RELEASE-NOTES
includes/GlobalFunctions.php

index fecd299..717e4e4 100644 (file)
@@ -174,8 +174,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Allow extensions to modify the user creation form by calling addInputItem();
 * Add meta generator tag to HTML output
 * Two new hooks, ExtendJSGlobalVars and wfMessageCacheReplace added
-* New global function, wfSharedTable - used to get the name of a table in the
-  shared database ($wgSharedDB)
  
 === Bug fixes in 1.13 ===
 
index fe82f1e..074014a 100644 (file)
@@ -2674,25 +2674,4 @@ function wfGenerateToken( $salt = '' ) {
        $salt = serialize($salt);
 
        return md5( mt_rand( 0, 0x7fffffff ) . $salt );
-}
-
-/**
- * Create table name for shared database.
- *
- * @access public
- * @author eloy@wikia
- *
- * @param string $table: table name
- *
- * @return string: table name with additional shared database
- */
-function wfSharedTable( $table, $useExternal = true ) {
-       global $wgSharedDB, $wgExternalSharedDB;
-
-       if ($useExternal && !empty( $wgExternalSharedDB )) {
-               return "`$wgExternalSharedDB`.`$table`";
-       } elseif (!empty( $wgSharedDB )) {
-               return "`$wgSharedDB`.`$table`";
-       } else
-               return "`$table`";
 }
\ No newline at end of file