Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -1034,11 +1034,11 @@ |
1035 | 1035 | } |
1036 | 1036 | |
1037 | 1037 | function do_all_updates( $shared = false, $purge = true ) { |
1038 | | - global $wgNewTables, $wgNewFields, $wgRenamedTables, $wgSharedDB, $wgDatabase, $wgDBtype, $IP; |
| 1038 | + global $wgNewTables, $wgNewFields, $wgRenamedTables, $wgSharedDB, $wgSharedTables, $wgDatabase, $wgDBtype, $IP; |
1039 | 1039 | |
1040 | 1040 | wfRunHooks('LoadExtensionSchemaUpdates'); |
1041 | 1041 | |
1042 | | - $doUser = !$wgSharedDB || $shared; |
| 1042 | + $doUser = $shared ? $wgSharedDB && in_array('user', $wgSharedTables) : !$wgSharedDB || !in_array('user', $wgSharedTables); |
1043 | 1043 | |
1044 | 1044 | if ($wgDBtype === 'postgres') { |
1045 | 1045 | do_postgres_updates(); |
Index: trunk/phase3/includes/Setup.php |
— | — | @@ -204,10 +204,12 @@ |
205 | 205 | # Set default shared prefix |
206 | 206 | if( $wgSharedPrefix === false ) $wgSharedPrefix = $wgDBprefix; |
207 | 207 | |
208 | | -if ( $wgDBprefix ) { |
| 208 | +if ( in_array('user', $wgSharedTables) && $wgSharedDB && $wgSharedPrefix ) { |
| 209 | + $wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix; |
| 210 | +} elseif ( in_array('user', $wgSharedTables) && $wgSharedDB ) { |
| 211 | + $wgCookiePrefix = $wgSharedDB; |
| 212 | +} elseif ( $wgDBprefix ) { |
209 | 213 | $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix; |
210 | | -} elseif ( $wgSharedDB ) { |
211 | | - $wgCookiePrefix = $wgSharedDB; |
212 | 214 | } else { |
213 | 215 | $wgCookiePrefix = $wgDBname; |
214 | 216 | } |