X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWikiPage.php;h=c148a5f14dbc8f612e837547d277f1b71ee13981;hb=8720241703a0ee05145bcbeed7b8f3384f5f4bc8;hp=9986a8dde74319d9590e54c9375b89d293eec6f4;hpb=7d4c391e2574ed3f64fd13d304aa6c38214551ed;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 9986a8dde7..c148a5f14d 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1447,7 +1447,7 @@ class WikiPage extends Page implements IDBAccessObject { /** * @param $section null|bool|int or a section number (0, 1, 2, T1, T2...) - * @param $content Content: new content of the section + * @param $sectionContent Content: new content of the section * @param $sectionTitle String: new section's subject, only if $section is 'new' * @param $edittime String: revision timestamp or null to use the current revision * @@ -2450,6 +2450,7 @@ class WikiPage extends Page implements IDBAccessObject { * @param $reason string delete reason for deletion log * @param $suppress boolean suppress all revisions and log the deletion in * the suppression log instead of the deletion log + * @param $id int article ID * @param $commit boolean defaults to true, triggers transaction end * @param &$error Array of errors to append to * @param $user User The deleting user @@ -3334,18 +3335,19 @@ class PoolWorkArticleView extends PoolCounterWork { } elseif ( $isCurrent ) { #XXX: why use RAW audience here, and PUBLIC (default) below? $content = $this->page->getContent( Revision::RAW ); - if ( $content === null ) { - return false; - } - } else { $rev = Revision::newFromTitle( $this->page->getTitle(), $this->revid ); + if ( $rev === null ) { - return false; + $content = null; + } else { + #XXX: why use PUBLIC audience here (default), and RAW above? + $content = $rev->getContent(); } + } - #XXX: why use PUBLIC audience here (default), and RAW above? - $content = $rev->getContent(); + if ( $content === null ) { + return false; } $time = - microtime( true );