summaryrefslogtreecommitdiff
path: root/maintenance/oracle/alterSharedConstraints.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /maintenance/oracle/alterSharedConstraints.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'maintenance/oracle/alterSharedConstraints.php')
-rw-r--r--maintenance/oracle/alterSharedConstraints.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/maintenance/oracle/alterSharedConstraints.php b/maintenance/oracle/alterSharedConstraints.php
index a46c5e1f..435625d5 100644
--- a/maintenance/oracle/alterSharedConstraints.php
+++ b/maintenance/oracle/alterSharedConstraints.php
@@ -27,7 +27,7 @@
* i.e.: GRANT REFERENCES (user_id) ON mwuser TO hubclient;
*/
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
class AlterSharedConstraints extends Maintenance {
public function __construct() {
@@ -49,11 +49,11 @@ class AlterSharedConstraints extends Maintenance {
$dbw = wfGetDB( DB_MASTER );
foreach ( $wgSharedTables as $table ) {
- $stable = $dbw->tableNameInternal($table);
+ $stable = $dbw->tableNameInternal( $table );
if ( $wgSharedPrefix != null ) {
$ltable = preg_replace( "/^$wgSharedPrefix(.*)/i", "$wgDBprefix\\1", $stable );
} else {
- $ltable = "{$wgDBprefix}{$stable}" ;
+ $ltable = "{$wgDBprefix}{$stable}";
}
$result = $dbw->query( "SELECT uc.constraint_name, uc.table_name, ucc.column_name, uccpk.table_name pk_table_name, uccpk.column_name pk_column_name, uc.delete_rule, uc.deferrable, uc.deferred
@@ -62,14 +62,14 @@ class AlterSharedConstraints extends Maintenance {
AND ucc.constraint_name = uc.constraint_name
AND uccpk.constraint_name = uc.r_constraint_name
AND uccpk.table_name = '$ltable'" );
- while (($row = $result->fetchRow()) !== false) {
+ while ( ( $row = $result->fetchRow() ) !== false ) {
- $this->output( "Altering {$row['constraint_name']} ...");
+ $this->output( "Altering {$row['constraint_name']} ..." );
try {
$dbw->query( "ALTER TABLE {$row['table_name']} DROP CONSTRAINT {$wgDBprefix}{$row['constraint_name']}" );
- } catch (DBQueryError $exdb) {
- if ($exdb->errno != 2443) {
+ } catch ( DBQueryError $exdb ) {
+ if ( $exdb->errno != 2443 ) {
throw $exdb;
}
}
@@ -88,4 +88,4 @@ class AlterSharedConstraints extends Maintenance {
}
$maintClass = "AlterSharedConstraints";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;