Merge "Declare visibility on log class related properties"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 26 Dec 2013 18:40:53 +0000 (18:40 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 Dec 2013 18:40:53 +0000 (18:40 +0000)
1  2 
includes/logging/LogEntry.php
includes/logging/LogPage.php

@@@ -176,6 -176,11 +176,11 @@@ class DatabaseLogEntry extends LogEntry
        /** @var User */
        protected $performer;
  
+       /** @var bool Whether the parameters for this log entry are stored in new
+        *    or old format.
+        */
+       protected $legacy;
        protected function __construct( $row ) {
                $this->row = $row;
        }
@@@ -361,6 -366,9 +366,9 @@@ class ManualLogEntry extends LogEntryBa
        /** @var int Deletion state of the log entry */
        protected $deleted;
  
+       /** @var int ID of the log entry */
+       protected $id;
        /**
         * Constructor.
         *
        public function insert( IDatabase $dbw = null ) {
                global $wgContLang;
  
 -              $dbw = $dbw ? : wfGetDB( DB_MASTER );
 +              $dbw = $dbw ?: wfGetDB( DB_MASTER );
                $id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
  
                if ( $this->timestamp === null ) {
@@@ -40,31 -40,37 +40,37 @@@ class LogPage 
        const SUPPRESSED_ACTION = 9;
  
        /** @var bool */
-       var $updateRecentChanges;
+       public $updateRecentChanges;
  
        /** @var bool */
-       var $sendToUDP;
+       public $sendToUDP;
+       /** @var string Plaintext version of the message for IRC */
+       private $ircActionText;
+       /** @var string Plaintext version of the message */
+       private $actionText;
  
        /** @var string One of '', 'block', 'protect', 'rights', 'delete',
         *    'upload', 'move'
         */
-       var $type;
+       private $type;
  
        /** @var string One of '', 'block', 'protect', 'rights', 'delete',
         *   'upload', 'move', 'move_redir' */
-       var $action;
+       private $action;
  
        /** @var string Comment associated with action */
-       var $comment;
+       private $comment;
  
        /** @var string Blob made of a parameters array */
-       var $params;
+       private $params;
  
        /** @var User The user doing the action */
-       var $doer;
+       private $doer;
  
        /** @var Title */
-       var $target;
+       private $target;
  
        /**
         * Constructor
@@@ -89,6 -95,7 +95,7 @@@
                $dbw = wfGetDB( DB_MASTER );
                $log_id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
  
+               // @todo FIXME private/protected/public property?
                $this->timestamp = $now = wfTimestampNow();
                $data = array(
                        'log_id' => $log_id,
                                $this->type, $this->action, $this->target, $this->comment,
                                $this->params, $newId, $this->getRcCommentIRC()
                        );
 -                      $rc->notifyRC2UDP();
 +                      $rc->notifyRCFeeds();
                }
  
                return $newId;
        public static function logName( $type ) {
                global $wgLogNames;
  
 +              wfDeprecated( __METHOD__, '1.21' );
 +
                if ( isset( $wgLogNames[$type] ) ) {
                        return str_replace( '_', ' ', wfMessage( $wgLogNames[$type] )->text() );
                } else {
        public static function logHeader( $type ) {
                global $wgLogHeaders;
  
 +              wfDeprecated( __METHOD__, '1.21' );
 +
                return wfMessage( $wgLogHeaders[$type] )->parse();
        }