Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -1440,18 +1440,18 @@ |
1441 | 1441 | */ |
1442 | 1442 | public function addQuickReview( &$data, $top = false, $hide = false ) { |
1443 | 1443 | global $wgOut, $wgUser, $wgRequest; |
1444 | | - # Revision being displayed |
| 1444 | + # Get the revision being displayed |
1445 | 1445 | $id = $wgOut->getRevisionId(); |
1446 | 1446 | if( !$id ) { |
1447 | 1447 | if( !$this->isDiffFromStable ) { |
1448 | 1448 | return false; // only safe to assume current if diff-to-stable |
| 1449 | + } else { |
| 1450 | + $rev = Revision::newFromTitle( $this->parent->getTitle() ); |
| 1451 | + $id = $rev->getId(); |
1449 | 1452 | } |
1450 | | - $rev = Revision::newFromTitle( $this->parent->getTitle() ); |
1451 | | - $id = $rev->getId(); |
1452 | 1453 | } else { |
1453 | 1454 | $rev = Revision::newFromTitle( $this->parent->getTitle(), $id ); |
1454 | 1455 | } |
1455 | | - |
1456 | 1456 | # Load required messages |
1457 | 1457 | wfLoadExtensionMessages( 'FlaggedRevs' ); |
1458 | 1458 | # Must be a valid non-printable output and revision must be public |
— | — | @@ -1587,15 +1587,15 @@ |
1588 | 1588 | Xml::closeElement('textarea') . "\n"; |
1589 | 1589 | $form .= "</div>\n"; |
1590 | 1590 | } |
1591 | | - |
| 1591 | + # Get versions of templates/files used |
1592 | 1592 | $imageParams = $templateParams = $fileVersion = ''; |
1593 | 1593 | if( $useCurrent ) { |
1594 | | - global $wgUser, $wgParser, $wgEnableParserCache; |
1595 | 1594 | # Get parsed current version |
1596 | 1595 | $parserCache = ParserCache::singleton(); |
1597 | 1596 | $article = $this->parent; |
1598 | 1597 | $currentOutput = $parserCache->get( $article, $wgUser ); |
1599 | | - if( $currentOutput==false ) { |
| 1598 | + if( $currentOutput == false ) { |
| 1599 | + global $wgParser, $wgEnableParserCache; |
1600 | 1600 | $text = $article->getContent(); |
1601 | 1601 | $title = $article->getTitle(); |
1602 | 1602 | $options = FlaggedRevs::makeParserOptions(); |
Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php |
— | — | @@ -809,7 +809,7 @@ |
810 | 810 | if( !self::userCan($qal,$level,$config) ) { |
811 | 811 | return false; // user cannot set proposed flag |
812 | 812 | } elseif( isset($oldflags[$qal]) && !self::userCan($qal,$oldflags[$qal]) ) { |
813 | | - return false; // user cannot change old flag |
| 813 | + return false; // user cannot change old flag ($config is ignored here) |
814 | 814 | } elseif( $level < 0 || $level > $highest ) { |
815 | 815 | return false; // flag range is invalid |
816 | 816 | } |