Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php |
— | — | @@ -562,11 +562,25 @@ |
563 | 563 | |
564 | 564 | $approvedId = ApprovedRevs::getApprovedRevID( $article->getTitle() ); |
565 | 565 | |
566 | | - if ( empty( $approvedId ) || ( $wgRequest->getCheck( 'oldid' ) && $wgRequest->getInt( 'oldid' ) != $approvedId ) ) { |
| 566 | + if ( $egApprovedRevsBlankIfUnapproved && |
| 567 | + ( empty( $approvedId ) || ( $wgRequest->getCheck( 'oldid' ) && $wgRequest->getInt( 'oldid' ) != $approvedId ) ) ) { |
567 | 568 | //var_dump($approvedId);var_dump($thisRevId);exit; |
568 | 569 | $wgOut->addHTML( '<span style="margin-left:10.75px">' ); |
569 | 570 | |
570 | | - if ( $egApprovedRevsBlankIfUnapproved && !$wgRequest->getCheck( 'oldid' ) ) { |
| 571 | + if ( $wgRequest->getCheck( 'oldid' ) ) { |
| 572 | + $wgOut->addHTML( Xml::tags( 'span', array( 'id' => 'contentSub2' ), |
| 573 | + Xml::element( 'a', |
| 574 | + array( 'href' => $article->getTitle()->getLocalUrl( |
| 575 | + array( |
| 576 | + 'action' => 'approve', |
| 577 | + 'oldid' => $wgRequest->getInt( 'oldid' ) |
| 578 | + ) |
| 579 | + ) ), |
| 580 | + wfMsg( 'approvedrevs-approvethisrev' ) |
| 581 | + ) ) ); |
| 582 | + |
| 583 | + } |
| 584 | + else { |
571 | 585 | $wgOut->addHTML( |
572 | 586 | htmlspecialchars( wfMsg( 'approvedrevs-noapprovedrevs' ) ) . ' ' . |
573 | 587 | Xml::element( 'a', |
— | — | @@ -579,18 +593,6 @@ |
580 | 594 | ) . '.' |
581 | 595 | ); |
582 | 596 | } |
583 | | - else { |
584 | | - $wgOut->addHTML( Xml::tags( 'span', array( 'id' => 'contentSub2' ), |
585 | | - Xml::element( 'a', |
586 | | - array( 'href' => $article->getTitle()->getLocalUrl( |
587 | | - array( |
588 | | - 'action' => 'approve', |
589 | | - 'oldid' => $wgRequest->getInt( 'oldid' ) |
590 | | - ) |
591 | | - ) ), |
592 | | - wfMsg( 'approvedrevs-approvethisrev' ) |
593 | | - ) ) ); |
594 | | - } |
595 | 597 | |
596 | 598 | $wgOut->addHTML( '</span>' ); |
597 | 599 | } |