add function in ChangesList to getTimestamp without inserting it
authoraude <aude.wiki@gmail.com>
Wed, 28 Nov 2012 20:18:39 +0000 (20:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 20 Dec 2012 15:39:41 +0000 (15:39 +0000)
Change-Id: Iae28a6a36f3ab1de3c74cd9eba88793c85faa322

includes/ChangesList.php

index f8dbf3b..0bd16f7 100644 (file)
@@ -383,13 +383,20 @@ class ChangesList extends ContextSource {
                $s .= " $articlelink";
        }
 
+       /**
+        * @param $rc RecentChange
+        */
+       public function getTimestamp( $rc ) {
+               return $this->message['semicolon-separator'] . '<span class="mw-changeslist-date">' .
+                       $this->getLanguage()->userTime( $rc->mAttribs['rc_timestamp'], $this->getUser() ) . '</span> <span class="mw-changeslist-separator">. .</span> ';
+       }
+
        /**
         * @param $s
         * @param $rc RecentChange
         */
        public function insertTimestamp( &$s, $rc ) {
-               $s .= $this->message['semicolon-separator'] . '<span class="mw-changeslist-date">' .
-                       $this->getLanguage()->userTime( $rc->mAttribs['rc_timestamp'], $this->getUser() ) . '</span> <span class="mw-changeslist-separator">. .</span> ';
+               $s .= $this->getTimestamp( $rc );
        }
 
        /**