}
}
+ /**
+ * @param $s string HTML to update
+ * @param $rc_timestamp mixed
+ */
public function insertDateHeader( &$s, $rc_timestamp ) {
# Make date header if necessary
$date = $this->getLanguage()->userDate( $rc_timestamp, $this->getUser() );
}
}
+ /**
+ * @param $s string HTML to update
+ * @param $title Title
+ * @param $logtype string
+ */
public function insertLog( &$s, $title, $logtype ) {
$page = new LogPage( $logtype );
$logname = $page->getName()->escaped();
}
/**
- * @param $s
+ * @param $s string HTML to update
* @param $rc RecentChange
* @param $unpatrolled
*/
}
/**
- * @param $s
+ * @param $s string HTML to update
* @param $rc RecentChange
* @param $unpatrolled
* @param $watched
}
/**
- * @param $s
+ * Get the timestamp from $rc formatted with current user's settings
+ * and a separator
+ *
* @param $rc RecentChange
+ * @return string HTML fragment
*/
- public function insertTimestamp( &$s, $rc ) {
- $s .= $this->message['semicolon-separator'] . '<span class="mw-changeslist-date">' .
+ 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> ';
}
+ /**
+ * Insert time timestamp string from $rc into $s
+ *
+ * @param $s string HTML to update
+ * @param $rc RecentChange
+ */
+ public function insertTimestamp( &$s, $rc ) {
+ $s .= $this->getTimestamp( $rc );
+ }
+
/**
* Insert links to user page, user talk page and eventually a blocking link
*
return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() );
}
}
+ return '';
}
/**
if ( $this->getUser()->isAllowed('rollback') && $rc->mAttribs['page_latest'] == $rc->mAttribs['rc_this_oldid'] )
{
$rev = new Revision( array(
+ 'title' => $page,
'id' => $rc->mAttribs['rc_this_oldid'],
'user' => $rc->mAttribs['rc_user'],
'user_text' => $rc->mAttribs['rc_user_text'],
'deleted' => $rc->mAttribs['rc_deleted']
) );
- $rev->setTitle( $page );
$s .= ' '.Linker::generateRollback( $rev, $this->getContext() );
}
}
# Other properties
$unpatrolled = false;
$isnew = false;
+ $allBots = true;
+ $allMinors = true;
$curId = $currentRevision = 0;
# Some catalyst variables...
$namehidden = true;
$currentRevision = $rcObj->mAttribs['rc_this_oldid'];
}
- $bot = $rcObj->mAttribs['rc_bot'];
+ if( !$rcObj->mAttribs['rc_bot'] ) {
+ $allBots = false;
+ }
+ if( !$rcObj->mAttribs['rc_minor'] ) {
+ $allMinors = false;
+ }
+
$userlinks[$u]++;
}
# Main line
$r .= '<td class="mw-enhanced-rc">' . $this->recentChangesFlags( array(
- 'newpage' => $isnew,
- 'minor' => false,
- 'unpatrolled' => $unpatrolled,
- 'bot' => $bot ,
+ 'newpage' => $isnew, # show, when one have this flag
+ 'minor' => $allMinors, # show only, when all have this flag
+ 'unpatrolled' => $unpatrolled, # show, when one have this flag
+ 'bot' => $allBots, # show only, when all have this flag
) );
# Timestamp