Index: trunk/phase3/includes/Revision.php |
— | — | @@ -762,18 +762,8 @@ |
763 | 763 | |
764 | 764 | # Write to external storage if required |
765 | 765 | if ( $wgDefaultExternalStore ) { |
766 | | - if ( is_array( $wgDefaultExternalStore ) ) { |
767 | | - // Distribute storage across multiple clusters |
768 | | - $store = $wgDefaultExternalStore[mt_rand(0, count( $wgDefaultExternalStore ) - 1)]; |
769 | | - } else { |
770 | | - $store = $wgDefaultExternalStore; |
771 | | - } |
772 | 766 | // Store and get the URL |
773 | | - $data = ExternalStore::insert( $store, $data ); |
774 | | - if ( !$data ) { |
775 | | - # This should only happen in the case of a configuration error, where the external store is not valid |
776 | | - throw new MWException( "Unable to store text to external storage $store" ); |
777 | | - } |
| 767 | + $data = ExternalStore::insertToDefault( $data ); |
778 | 768 | if ( $flags ) { |
779 | 769 | $flags .= ','; |
780 | 770 | } |
Index: trunk/phase3/includes/ExternalStore.php |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | * @param string $data |
77 | 77 | * Returns the URL of the stored data item, or false on error |
78 | 78 | */ |
79 | | - public static function randomInsert( $data ) { |
| 79 | + public static function insertToDefault( $data ) { |
80 | 80 | global $wgDefaultExternalStore; |
81 | 81 | $tryStores = (array)$wgDefaultExternalStore; |
82 | 82 | $error = false; |