X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWikiPage.php;h=a191983d421cc8795b02360ec33c880eedec76fd;hb=b51729f77074984d4db7ff12e6d864c358292ec3;hp=5fc5a3885ac1425fe8648c120f26702677569ecf;hpb=1f84a574e337ef7249d19e80f21543a0b672d797;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 5fc5a3885a..a191983d42 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -2923,27 +2923,6 @@ class WikiPage implements Page, IDBAccessObject { return array( array( 'notvisiblerev' ) ); } - $set = array(); - if ( $bot && $guser->isAllowed( 'markbotedits' ) ) { - // Mark all reverted edits as bot - $set['rc_bot'] = 1; - } - - if ( $wgUseRCPatrol ) { - // Mark all reverted edits as patrolled - $set['rc_patrolled'] = 1; - } - - if ( count( $set ) ) { - $dbw->update( 'recentchanges', $set, - array( /* WHERE */ - 'rc_cur_id' => $current->getPage(), - 'rc_user_text' => $current->getUserText(), - 'rc_timestamp > ' . $dbw->addQuotes( $s->rev_timestamp ), - ), __METHOD__ - ); - } - // Generate the edit summary if necessary $target = Revision::newFromId( $s->rev_id ); if ( empty( $summary ) ) { @@ -2990,6 +2969,27 @@ class WikiPage implements Page, IDBAccessObject { return $status->getErrorsArray(); } + $set = array(); + if ( $bot && $guser->isAllowed( 'markbotedits' ) ) { + // Mark all reverted edits as bot + $set['rc_bot'] = 1; + } + + if ( $wgUseRCPatrol ) { + // Mark all reverted edits as patrolled + $set['rc_patrolled'] = 1; + } + + if ( count( $set ) ) { + $dbw->update( 'recentchanges', $set, + array( /* WHERE */ + 'rc_cur_id' => $current->getPage(), + 'rc_user_text' => $current->getUserText(), + 'rc_timestamp > ' . $dbw->addQuotes( $s->rev_timestamp ), + ), __METHOD__ + ); + } + if ( !empty( $status->value['revision'] ) ) { $revId = $status->value['revision']->getId(); } else { @@ -3608,12 +3608,12 @@ class PoolWorkArticleView extends PoolCounterWork { $this->parserOutput = ParserCache::singleton()->getDirty( $this->page, $this->parserOptions ); if ( $this->parserOutput === false ) { - wfDebugLog( 'dirty', "dirty missing\n" ); + wfDebugLog( 'dirty', 'dirty missing' ); wfDebug( __METHOD__ . ": no dirty cache\n" ); return false; } else { wfDebug( __METHOD__ . ": sending dirty output\n" ); - wfDebugLog( 'dirty', "dirty output {$this->cacheKey}\n" ); + wfDebugLog( 'dirty', "dirty output {$this->cacheKey}" ); $this->isDirty = true; return true; }