*/
public $enableDebugComment = false;
- /** @var bool If true, line X is not displayed when X is 1, for example
+ /** @var bool If true, line X is not displayed when X is 1, for example
* to increase readability and conserve space with many small diffs.
*/
protected $mReducedLineNumbers = false;
// NOTE: only needed for B/C: custom rendering of JS/CSS via hook
if ( $this->mNewPage->isCssJsSubpage() || $this->mNewPage->isCssOrJsPage() ) {
- // Stolen from Article::view --AG 2007-10-11
+ // This needs to be synchronised with Article::showCssOrJsPage(), which sucks
// Give hooks a chance to customise the output
// @todo standardize this crap into one function
if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', array( $this->mNewContent, $this->mNewPage, $out ) ) ) {
// use the content object's own rendering
$cnt = $this->mNewRev->getContent();
$po = $cnt ? $cnt->getParserOutput( $this->mNewRev->getTitle(), $this->mNewRev->getId() ) : null;
- $txt = $po ? $po->getText() : '';
- $out->addHTML( $txt );
+ if ( $po ) {
+ $out->addParserOutputContent( $po );
+ }
}
} elseif ( !wfRunHooks( 'ArticleContentViewCustom', array( $this->mNewContent, $this->mNewPage, $out ) ) ) {
// Handled by extension
$newRev = $this->mNewRev;
}
- $nEdits = $this->mNewPage->countRevisionsBetween( $oldRev, $newRev );
- if ( $nEdits > 0 ) {
+ // Sanity: don't show the notice if too many rows must be scanned
+ // @TODO: show some special message for that case
+ $nEdits = $this->mNewPage->countRevisionsBetween( $oldRev, $newRev, 1000 );
+ if ( $nEdits > 0 && $nEdits <= 1000 ) {
$limit = 100; // use diff-multi-manyusers if too many users
$users = $this->mNewPage->getAuthorsBetween( $oldRev, $newRev, $limit );
$numUsers = count( $users );