Fix-up for I949fc289d: handle falsy cookie values correctly
[lhc/web/wiklou.git] / includes / logging / LogEventsList.php
index dfe3136..4c0bd8e 100644 (file)
@@ -35,6 +35,11 @@ class LogEventsList extends ContextSource {
         */
        protected $mDefaultQuery;
 
+       /**
+        * @var bool
+        */
+       protected $showTagEditUI;
+
        /**
         * Constructor.
         * The first two parameters used to be $skin and $out, but now only a context
@@ -55,6 +60,7 @@ class LogEventsList extends ContextSource {
                }
 
                $this->flags = $flags;
+               $this->showTagEditUI = ChangeTags::showTagEditingUI( $this->getUser() );
        }
 
        /**
@@ -348,7 +354,7 @@ class LogEventsList extends ContextSource {
                $user = $this->getUser();
 
                // If change tag editing is available to this user, return the checkbox
-               if ( $this->flags & self::USE_CHECKBOXES && ChangeTags::showTagEditingUI( $user ) ) {
+               if ( $this->flags & self::USE_CHECKBOXES && $this->showTagEditUI ) {
                        return Xml::check(
                                'showhiderevisions',
                                false,
@@ -640,7 +646,7 @@ class LogEventsList extends ContextSource {
        /**
         * SQL clause to skip forbidden log types for this user
         *
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         * @param string $audience Public/user
         * @param User $user User to check, or null to use $wgUser
         * @return string|bool String on success, false on failure.