Trailing whitespace in messages is not supported
[lhc/web/wiklou.git] / includes / RecentChange.php
index 38c6b74..803420f 100644 (file)
@@ -2,6 +2,7 @@
 
 /**
  * Utility class for creating new RC entries
+ *
  * mAttribs:
  *  rc_id           id of the row in the recentchanges table
  *  rc_timestamp    time the entry was made
@@ -73,7 +74,6 @@ class RecentChange {
                $res = $dbr->select( 'recentchanges', '*', array( 'rc_id' => $rcid ), __METHOD__ );
                if( $res && $dbr->numRows( $res ) > 0 ) {
                        $row = $dbr->fetchObject( $res );
-                       $dbr->freeResult( $res );
                        return self::newFromRow( $row );
                } else {
                        return null;
@@ -115,6 +115,10 @@ class RecentChange {
                $this->mExtra = $extra;
        }
 
+       /**
+        *
+        * @return Title
+        */
        public function &getTitle() {
                if( $this->mTitle === false ) {
                        $this->mTitle = Title::makeTitle( $this->mAttribs['rc_namespace'], $this->mAttribs['rc_title'] );
@@ -252,7 +256,7 @@ class RecentChange {
         *
         * @param $change Mixed: RecentChange or corresponding rc_id
         * @param $auto Boolean: for automatic patrol
-        * @return See doMarkPatrolled(), or null if $change is not an existing rc_id
+        * @return Array See doMarkPatrolled(), or null if $change is not an existing rc_id
         */
        public static function markPatrolled( $change, $auto = false ) {
                $change = $change instanceof RecentChange
@@ -579,7 +583,7 @@ class RecentChange {
        /**
         * Get an attribute value
         *
-        * @param $name Attribute name
+        * @param $name String Attribute name
         * @return mixed
         */
        public function getAttribute( $name ) {
@@ -670,7 +674,7 @@ class RecentChange {
                        $flag .= ($rc_new ? "N" : "") . ($rc_minor ? "M" : "") . ($rc_bot ? "B" : "");
                }
 
-               if ( $wgRC2UDPInterwikiPrefix === true ) {
+               if ( $wgRC2UDPInterwikiPrefix === true && $wgLocalInterwiki !== false ) {
                        $prefix = $wgLocalInterwiki;
                } elseif ( $wgRC2UDPInterwikiPrefix ) {
                        $prefix = $wgRC2UDPInterwikiPrefix;