Index: trunk/extensions/FlaggedRevs/language/StablePages.i18n.php |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | Edits made by other users are not displayed to readers by default until an authorized user reviews them.', |
16 | 16 | 'stablepages-none' => 'There are no pages in this list.', |
17 | 17 | 'stablepages-config' => 'Configuration', |
| 18 | + 'stablepages-indef' => 'Indefinite expiry only', |
18 | 19 | ); |
19 | 20 | |
20 | 21 | /** Message documentation (Message documentation) |
Index: trunk/extensions/FlaggedRevs/specialpages/StablePages_body.php |
— | — | @@ -19,6 +19,7 @@ |
20 | 20 | |
21 | 21 | $this->namespace = $wgRequest->getIntOrNull( 'namespace' ); |
22 | 22 | $this->autoreview = $wgRequest->getVal( 'restriction', '' ); |
| 23 | + $this->indef = $wgRequest->getBool( 'indef', false ); |
23 | 24 | |
24 | 25 | $this->showForm(); |
25 | 26 | $this->showPageList(); |
— | — | @@ -36,6 +37,8 @@ |
37 | 38 | if( FlaggedRevs::getRestrictionLevels() ) { |
38 | 39 | $fields[] = FlaggedRevsXML::getRestrictionFilterMenu( $this->autoreview ); |
39 | 40 | } |
| 41 | + $fields[] = Xml::checkLabel( wfMsg( 'stablepages-indef' ), 'indef', |
| 42 | + 'stablepages-indef', $this->indef ); |
40 | 43 | if ( count( $fields ) ) { |
41 | 44 | $form = Xml::openElement( 'form', |
42 | 45 | array( 'name' => 'stablepages', 'action' => $wgScript, 'method' => 'get' ) ); |
— | — | @@ -51,7 +54,7 @@ |
52 | 55 | |
53 | 56 | protected function showPageList() { |
54 | 57 | global $wgOut; |
55 | | - $pager = new StablePagesPager( $this, array(), $this->namespace, $this->autoreview ); |
| 58 | + $pager = new StablePagesPager( $this, array(), $this->namespace, $this->autoreview, $this->indef ); |
56 | 59 | if ( $pager->getNumRows() ) { |
57 | 60 | $wgOut->addHTML( $pager->getNavigationBar() ); |
58 | 61 | $wgOut->addHTML( $pager->getBody() ); |
— | — | @@ -109,9 +112,10 @@ |
110 | 113 | |
111 | 114 | // @param int $namespace (null for "all") |
112 | 115 | // @param string $autoreview ('' for "all", 'none' for no restriction) |
113 | | - function __construct( $form, $conds = array(), $namespace, $autoreview ) { |
| 116 | + function __construct( $form, $conds = array(), $namespace, $autoreview, $indef ) { |
114 | 117 | $this->mForm = $form; |
115 | 118 | $this->mConds = $conds; |
| 119 | + $this->indef = $indef; |
116 | 120 | # Must be content pages... |
117 | 121 | $validNS = FlaggedRevs::getReviewNamespaces(); |
118 | 122 | if ( is_integer( $namespace ) ) { |
— | — | @@ -144,8 +148,12 @@ |
145 | 149 | } |
146 | 150 | $conds['page_namespace'] = $this->namespace; |
147 | 151 | # Be sure not to include expired items |
148 | | - $encCutoff = $this->mDb->addQuotes( $this->mDb->timestamp() ); |
149 | | - $conds[] = "fpc_expiry > {$encCutoff}"; |
| 152 | + if( $this->indef ) { |
| 153 | + $conds['fpc_expiry'] = Block::infinity(); |
| 154 | + } else { |
| 155 | + $encCutoff = $this->mDb->addQuotes( $this->mDb->timestamp() ); |
| 156 | + $conds[] = "fpc_expiry > {$encCutoff}"; |
| 157 | + } |
150 | 158 | return array( |
151 | 159 | 'tables' => array( 'flaggedpage_config', 'page' ), |
152 | 160 | 'fields' => array( 'page_namespace', 'page_title', 'fpc_override', |