Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -1108,6 +1108,7 @@ |
1109 | 1109 | array( 'rc_this_oldid' => $rev->getID() ), |
1110 | 1110 | __METHOD__ ); |
1111 | 1111 | } |
| 1112 | + return true; |
1112 | 1113 | } |
1113 | 1114 | |
1114 | 1115 | /** |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage_body.php |
— | — | @@ -971,23 +971,22 @@ |
972 | 972 | |
973 | 973 | function submit() { |
974 | 974 | global $wgOut, $wgFlaggedRevs, $wgUser, $wgParser; |
975 | | - # Get current config |
976 | | - $config = $wgFlaggedRevs->getVisibilitySettings( $this->page, true ); |
977 | 975 | |
978 | | - $comment = $this->comment; |
979 | | - |
980 | 976 | $dbw = wfGetDB( DB_MASTER ); |
| 977 | + # Get current config |
| 978 | + $row = $dbw->selectRow( 'flaggedpages', |
| 979 | + array( 'fp_select', 'fp_override' ), |
| 980 | + array( 'fp_page_id' => $this->page->getArticleID() ), |
| 981 | + __METHOD__ ); |
| 982 | + # Fire away! |
981 | 983 | $success = $dbw->replace( 'flaggedpages', |
982 | 984 | array( 'fp_page_id' ), |
983 | 985 | array( 'fp_page_id' => $this->page->getArticleID(), |
984 | 986 | 'fp_select' => $this->select, |
985 | 987 | 'fp_override' => $this->override ), |
986 | 988 | __METHOD__ ); |
987 | | - |
988 | | - $wgOut->addHTML( wfMsgExt('stabilization-success',array('parse'), |
989 | | - $this->page->getPrefixedText() ) ); |
990 | | - # Log if changed |
991 | | - if( $config['select'] != $this->select || $config['override'] != $this->override ) { |
| 989 | + # Log if changed |
| 990 | + if( !$row || $row->fp_select != $this->select || $row->fp_override != $this->override ) { |
992 | 991 | $log = new LogPage( 'review' ); |
993 | 992 | // ID, accuracy, depth, style |
994 | 993 | $set = array(); |
— | — | @@ -999,7 +998,7 @@ |
1000 | 999 | $settings = ' [' . implode(', ',$set). ']'; |
1001 | 1000 | // Append comment with action |
1002 | 1001 | // FIXME: do this better |
1003 | | - $comment = ($comment) ? "$comment$settings" : "$settings"; |
| 1002 | + $comment = ($this->comment) ? "{$this->comment}$settings" : "$settings"; |
1004 | 1003 | |
1005 | 1004 | $log->addEntry( 'config', $this->page, $comment ); |
1006 | 1005 | } |
— | — | @@ -1016,5 +1015,9 @@ |
1017 | 1016 | } |
1018 | 1017 | $u = new LinksUpdate( $article->mTitle, $poutput ); |
1019 | 1018 | $u->doUpdate(); // this will trigger our hook to add stable links too... |
| 1019 | + |
| 1020 | + # Success message |
| 1021 | + $wgOut->addHTML( wfMsgExt('stabilization-success',array('parse'), |
| 1022 | + $this->page->getPrefixedText() ) ); |
1020 | 1023 | } |
1021 | 1024 | } |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.i18n.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | for content pages.', |
69 | 69 | 'review-logentry-app' => 'reviewed $1', |
70 | 70 | 'review-logentry-dis' => 'depreciated a version of $1', |
71 | | - 'review-logentry-conf' => 'set stable version settings for $1', |
| 71 | + 'review-logentry-conf' => 'configured stable versioning for $1', |
72 | 72 | 'review-logaction' => 'revision ID $1', |
73 | 73 | |
74 | 74 | 'revisionreview' => 'Review revisions', |