From 394cc2e32dd0c654590c453603ef3775f1052895 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 12 Dec 2007 19:47:05 +0000 Subject: [PATCH] *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) --- includes/Title.php | 4 ++-- maintenance/archives/patch-protected_titles.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.20.1