From: Aaron Schulz Date: Wed, 12 Dec 2007 19:47:05 +0000 (+0000) Subject: *Rename pt_by to pt_user to be a bit more consistent X-Git-Tag: 1.31.0-rc.0~50444 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=394cc2e32dd0c654590c453603ef3775f1052895;p=lhc%2Fweb%2Fwiklou.git *Rename pt_by to pt_user to be a bit more consistent *Remove pt_by index (no given or likely good use for it, re-add if there is one and say why) --- diff --git a/includes/Title.php b/includes/Title.php index eebe4f97bc..ea608c04df 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1206,7 +1206,7 @@ class Title { $pt_create_perm = 'protect'; if ($pt_create_perm == '' || !$user->isAllowed($pt_create_perm)) { - $errors[] = array ( 'titleprotected', User::whoIs($pt_by), $pt_reason ); + $errors[] = array ( 'titleprotected', User::whoIs($pt_user), $pt_reason ); } } } @@ -1295,7 +1295,7 @@ class Title { , 'pt_create_perm' => $create_perm , 'pt_timestamp' => Block::encodeExpiry(wfTimestampNow(), $dbw) , 'pt_expiry' => $encodedExpiry - , 'pt_by' => $wgUser->getId(), 'pt_reason' => $reason ), __METHOD__ ); + , 'pt_user' => $wgUser->getId(), 'pt_reason' => $reason ), __METHOD__ ); } else { $dbw->delete( 'protected_titles', array( 'pt_namespace' => $namespace, 'pt_title' => $title ), __METHOD__ ); diff --git a/maintenance/archives/patch-protected_titles.sql b/maintenance/archives/patch-protected_titles.sql index 887abd544d..627d438013 100644 --- a/maintenance/archives/patch-protected_titles.sql +++ b/maintenance/archives/patch-protected_titles.sql @@ -2,12 +2,12 @@ CREATE TABLE /*$wgDBprefix*/protected_titles ( pt_namespace int(11) NOT NULL, pt_title varchar(255) NOT NULL, - pt_by int(10) unsigned NOT NULL, + pt_user int(10) unsigned NOT NULL, pt_reason tinyblob, pt_timestamp binary(14) NOT NULL, pt_expiry varbinary(14) NOT NULL default '', pt_create_perm varbinary(60) NOT NULL, PRIMARY KEY (pt_namespace,pt_title), - KEY `pt_by` (pt_by), + KEY pt_timestamp (pt_timestamp) ) /*$wgDBTableOptions*/; \ No newline at end of file