Index: trunk/phase3/includes/db/CloneDatabase.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | * @param $newTablePrefix String Prefix to assign to the tables |
65 | 65 | * @param $oldTablePrefix String Prefix on current tables, if not $wgDBprefix |
66 | 66 | */ |
67 | | - public function __construct( DatabaseBase $db, Array $tablesToClone, |
| 67 | + public function __construct( DatabaseBase $db, array $tablesToClone, |
68 | 68 | $newTablePrefix = 'parsertest', $oldTablePrefix = '', $dropCurrentTables = true ) |
69 | 69 | { |
70 | 70 | $this->db = $db; |
— | — | @@ -119,6 +119,9 @@ |
120 | 120 | |
121 | 121 | /** |
122 | 122 | * Change the table prefix on all open DB connections/ |
| 123 | + * |
| 124 | + * @param $prefix |
| 125 | + * @return void |
123 | 126 | */ |
124 | 127 | protected function changePrefix( $prefix ) { |
125 | 128 | global $wgDBprefix; |
— | — | @@ -126,10 +129,20 @@ |
127 | 130 | $wgDBprefix = $prefix; |
128 | 131 | } |
129 | 132 | |
| 133 | + /** |
| 134 | + * @param $lb |
| 135 | + * @param $prefix |
| 136 | + * @return void |
| 137 | + */ |
130 | 138 | public function changeLBPrefix( $lb, $prefix ) { |
131 | 139 | $lb->forEachOpenConnection( array( $this, 'changeDBPrefix' ), array( $prefix ) ); |
132 | 140 | } |
133 | 141 | |
| 142 | + /** |
| 143 | + * @param $db DatabaseBase |
| 144 | + * @param $prefix |
| 145 | + * @return void |
| 146 | + */ |
134 | 147 | public function changeDBPrefix( $db, $prefix ) { |
135 | 148 | $db->tablePrefix( $prefix ); |
136 | 149 | } |