Index: trunk/phase3/includes/specials/SpecialProtectedpages.php |
— | — | @@ -16,12 +16,12 @@ |
17 | 17 | public function showList( $msg = '' ) { |
18 | 18 | global $wgOut, $wgRequest; |
19 | 19 | |
20 | | - if ( "" != $msg ) { |
| 20 | + if( "" != $msg ) { |
21 | 21 | $wgOut->setSubtitle( $msg ); |
22 | 22 | } |
23 | 23 | |
24 | 24 | // Purge expired entries on one in every 10 queries |
25 | | - if ( !mt_rand( 0, 10 ) ) { |
| 25 | + if( !mt_rand( 0, 10 ) ) { |
26 | 26 | Title::purgeExpiredRestrictions(); |
27 | 27 | } |
28 | 28 | |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | |
39 | 39 | $wgOut->addHTML( $this->showOptions( $NS, $type, $level, $sizetype, $size, $indefOnly, $cascadeOnly ) ); |
40 | 40 | |
41 | | - if ( $pager->getNumRows() ) { |
| 41 | + if( $pager->getNumRows() ) { |
42 | 42 | $s = $pager->getNavigationBar(); |
43 | 43 | $s .= "<ul>" . |
44 | 44 | $pager->getBody() . |
— | — | @@ -73,31 +73,34 @@ |
74 | 74 | |
75 | 75 | $description_items[] = $protType; |
76 | 76 | |
77 | | - if ( $row->pr_cascade ) { |
| 77 | + if( $row->pr_cascade ) { |
78 | 78 | $description_items[] = wfMsg( 'protect-summary-cascade' ); |
79 | 79 | } |
80 | 80 | |
81 | 81 | $expiry_description = ''; |
82 | 82 | $stxt = ''; |
83 | 83 | |
84 | | - if ( $row->pr_expiry != 'infinity' && strlen($row->pr_expiry) ) { |
| 84 | + if( $row->pr_expiry != 'infinity' && strlen($row->pr_expiry) ) { |
85 | 85 | $expiry = Block::decodeExpiry( $row->pr_expiry ); |
86 | 86 | |
87 | | - $expiry_description = wfMsg( 'protect-expiring' , $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) ); |
| 87 | + $expiry_description = wfMsg( 'protect-expiring' , $wgLang->timeanddate( $expiry ) , |
| 88 | + $wgLang->date( $expiry ) , $wgLang->time( $expiry ) ); |
88 | 89 | |
89 | 90 | $description_items[] = $expiry_description; |
90 | 91 | } |
91 | 92 | |
92 | | - if (!is_null($size = $row->page_len)) { |
| 93 | + if(!is_null($size = $row->page_len)) { |
93 | 94 | $stxt = $wgContLang->getDirMark() . ' ' . $skin->formatRevisionSize( $size ); |
94 | 95 | } |
95 | 96 | |
96 | 97 | # Show a link to the change protection form for allowed users otherwise a link to the protection log |
97 | 98 | if( $wgUser->isAllowed( 'protect' ) ) { |
98 | | - $changeProtection = ' (' . $skin->makeKnownLinkObj( $title, wfMsgHtml( 'protect_change' ), 'action=unprotect' ) . ')'; |
| 99 | + $changeProtection = ' (' . $skin->makeKnownLinkObj( $title, wfMsgHtml( 'protect_change' ), |
| 100 | + 'action=unprotect' ) . ')'; |
99 | 101 | } else { |
100 | 102 | $ltitle = SpecialPage::getTitleFor( 'Log' ); |
101 | | - $changeProtection = ' (' . $skin->makeKnownLinkObj( $ltitle, wfMsgHtml( 'protectlogpage' ), 'type=protect&page=' . $title->getPrefixedUrl() ) . ')'; |
| 103 | + $changeProtection = ' (' . $skin->makeKnownLinkObj( $ltitle, wfMsgHtml( 'protectlogpage' ), |
| 104 | + 'type=protect&page=' . $title->getPrefixedUrl() ) . ')'; |
102 | 105 | } |
103 | 106 | |
104 | 107 | wfProfileOut( __METHOD__ ); |
— | — | @@ -220,7 +223,7 @@ |
221 | 224 | |
222 | 225 | // First pass to load the log names |
223 | 226 | foreach( $wgRestrictionLevels as $type ) { |
224 | | - if ( $type !='' && $type !='*') { |
| 227 | + if( $type !='' && $type !='*') { |
225 | 228 | $text = wfMsg("restriction-level-$type"); |
226 | 229 | $m[$text] = $type; |
227 | 230 | } |
— | — | @@ -248,8 +251,9 @@ |
249 | 252 | public $mForm, $mConds; |
250 | 253 | private $type, $level, $namespace, $sizetype, $size, $indefonly; |
251 | 254 | |
252 | | - function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', |
253 | | - $size=0, $indefonly = false, $cascadeonly = false ) { |
| 255 | + function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', $size=0, |
| 256 | + $indefonly = false, $cascadeonly = false ) |
| 257 | + { |
254 | 258 | $this->mForm = $form; |
255 | 259 | $this->mConds = $conds; |
256 | 260 | $this->type = ( $type ) ? $type : 'edit'; |
— | — | @@ -263,15 +267,12 @@ |
264 | 268 | } |
265 | 269 | |
266 | 270 | function getStartBody() { |
267 | | - wfProfileIn( __METHOD__ ); |
268 | 271 | # Do a link batch query |
269 | 272 | $lb = new LinkBatch; |
270 | 273 | while( $row = $this->mResult->fetchObject() ) { |
271 | 274 | $lb->add( $row->page_namespace, $row->page_title ); |
272 | 275 | } |
273 | 276 | $lb->execute(); |
274 | | - |
275 | | - wfProfileOut( __METHOD__ ); |
276 | 277 | return ''; |
277 | 278 | } |
278 | 279 | |
— | — | @@ -284,7 +285,7 @@ |
285 | 286 | $conds[] = 'pr_expiry>' . $this->mDb->addQuotes( $this->mDb->timestamp() ); |
286 | 287 | $conds[] = 'page_id=pr_page'; |
287 | 288 | $conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type ); |
288 | | - |
| 289 | + |
289 | 290 | if( $this->sizetype=='min' ) { |
290 | 291 | $conds[] = 'page_len>=' . $this->size; |
291 | 292 | } else if( $this->sizetype=='max' ) { |
— | — | @@ -294,7 +295,7 @@ |
295 | 296 | if( $this->indefonly ) { |
296 | 297 | $conds[] = "pr_expiry = 'infinity' OR pr_expiry IS NULL"; |
297 | 298 | } |
298 | | - if ( $this->cascadeonly ) { |
| 299 | + if( $this->cascadeonly ) { |
299 | 300 | $conds[] = "pr_cascade = '1'"; |
300 | 301 | } |
301 | 302 | |
— | — | @@ -318,8 +319,6 @@ |
319 | 320 | * Constructor |
320 | 321 | */ |
321 | 322 | function wfSpecialProtectedpages() { |
322 | | - |
323 | 323 | $ppForm = new ProtectedPagesForm(); |
324 | | - |
325 | 324 | $ppForm->showList(); |
326 | 325 | } |