Tune Skin::preloadExistence
[lhc/web/wiklou.git] / includes / WatchedItem.php
index 93d6c0b..ab136b8 100644 (file)
@@ -164,6 +164,7 @@ class WatchedItem {
        /**
         * Check permissions
         * @param string $what 'viewmywatchlist' or 'editmywatchlist'
+        * @return bool
         */
        private function isAllowed( $what ) {
                return !$this->mCheckRights || $this->mUser->isAllowed( $what );
@@ -273,7 +274,7 @@ class WatchedItem {
         * @param WatchedItem[] $items
         * @return bool
         */
-       static public function batchAddWatch( array $items ) {
+       public static function batchAddWatch( array $items ) {
                $section = new ProfileSection( __METHOD__ );
 
                if ( wfReadOnly() ) {
@@ -308,7 +309,7 @@ class WatchedItem {
                }
 
                $dbw = wfGetDB( DB_MASTER );
-               foreach( array_chunk( $rows, 100 ) as $toInsert ) {
+               foreach ( array_chunk( $rows, 100 ) as $toInsert ) {
                        // Use INSERT IGNORE to avoid overwriting the notification timestamp
                        // if there's already an entry for this page
                        $dbw->insert( 'watchlist', $toInsert, __METHOD__, 'IGNORE' );