[FileBackend] Added back ability to delete file HTTP headers.
[lhc/web/wiklou.git] / includes / Linker.php
index 0f45165..e5db232 100644 (file)
@@ -1113,8 +1113,11 @@ class Linker {
                        // check if the user has an edit
                        $attribs = array();
                        if ( $redContribsWhenNoEdits ) {
-                               $count = !is_null( $edits ) ? $edits : User::edits( $userId );
-                               if ( $count == 0 ) {
+                               if ( intval( $edits ) === 0 && $edits !== 0 ) {
+                                       $user = User::newFromId( $userId );
+                                       $edits = $user->getEditCount();
+                               }
+                               if ( $edits === 0 ) {
                                        $attribs['class'] = 'new';
                                }
                        }
@@ -1761,7 +1764,7 @@ class Linker {
         */
        public static function buildRollbackLink( $rev, IContextSource $context = null ) {
                global $wgShowRollbackEditCount, $wgMiserMode;
-               
+
                // To config which pages are effected by miser mode
                $disableRollbackEditCountSpecialPage = array( 'Recentchanges', 'Watchlist' );
 
@@ -1896,7 +1899,11 @@ class Linker {
                                                array( 'action' => 'edit' )
                                        );
                                }
-                               $outText .= '<li>' . self::link( $titleObj ) . ' (' . $editLink . ') ' . $protected . '</li>';
+                               $outText .= '<li>' . self::link( $titleObj )
+                                       . wfMessage( 'word-separator' )->escaped()
+                                       . wfMessage( 'parentheses' )->rawParams( $editLink )->escaped()
+                                       . wfMessage( 'word-separator' )->escaped()
+                                       . $protected . '</li>';
                        }
                        $outText .= '</ul>';
                }
@@ -2118,7 +2125,7 @@ class Linker {
         */
        static function makeBrokenLink( $title, $text = '', $query = '', $trail = '' ) {
                wfDeprecated( __METHOD__, '1.16' );
-               
+
                $nt = Title::newFromText( $title );
                if ( $nt instanceof Title ) {
                        return self::makeBrokenLinkObj( $nt, $text, $query, $trail );
@@ -2129,7 +2136,7 @@ class Linker {
        }
 
        /**
-        * @deprecated since 1.16 Use link()
+        * @deprecated since 1.16 Use link(); warnings since 1.21
         *
         * Make a link for a title which may or may not be in the database. If you need to
         * call this lots of times, pre-fill the link cache with a LinkBatch, otherwise each
@@ -2146,8 +2153,8 @@ class Linker {
         * @return string
         */
        static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
-               # wfDeprecated( __METHOD__, '1.16' ); // See r105985 and it's revert. Somewhere still used.
-               
+               wfDeprecated( __METHOD__, '1.21' );
+
                wfProfileIn( __METHOD__ );
                $query = wfCgiToArray( $query );
                list( $inside, $trail ) = self::splitTrail( $trail );
@@ -2162,7 +2169,7 @@ class Linker {
        }
 
        /**
-        * @deprecated since 1.16 Use link()
+        * @deprecated since 1.16 Use link(); warnings since 1.21
         *
         * Make a link for a title which definitely exists. This is faster than makeLinkObj because
         * it doesn't have to do a database query. It's also valid for interwiki titles and special
@@ -2180,8 +2187,8 @@ class Linker {
        static function makeKnownLinkObj(
                $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = ''
        ) {
-               # wfDeprecated( __METHOD__, '1.16' ); // See r105985 and it's revert. Somewhere still used.
-               
+               wfDeprecated( __METHOD__, '1.21' );
+
                wfProfileIn( __METHOD__ );
 
                if ( $text == '' ) {
@@ -2217,7 +2224,7 @@ class Linker {
         */
        static function makeBrokenLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' ) {
                wfDeprecated( __METHOD__, '1.16' );
-               
+
                wfProfileIn( __METHOD__ );
 
                list( $inside, $trail ) = self::splitTrail( $trail );
@@ -2249,7 +2256,7 @@ class Linker {
         */
        static function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) {
                wfDeprecated( __METHOD__, '1.16' );
-               
+
                if ( $colour != '' ) {
                        $style = self::getInternalLinkAttributesObj( $nt, $text, $colour );
                } else {