*Rename pt_by to pt_user to be a bit more consistent
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 12 Dec 2007 19:47:05 +0000 (19:47 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 12 Dec 2007 19:47:05 +0000 (19:47 +0000)
*Remove pt_by index (no given or likely good use for it, re-add if there is one and say why)

includes/Title.php
maintenance/archives/patch-protected_titles.sql

index eebe4f9..ea608c0 100644 (file)
@@ -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__ );
index 887abd5..627d438 100644 (file)
@@ -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