Index: trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php |
— | — | @@ -351,7 +351,7 @@ |
352 | 352 | array( 'fpc_page_id' => $this->page->getArticleID() ), |
353 | 353 | __METHOD__ |
354 | 354 | ); |
355 | | - # If setting to site default values, erase the row if there is one... |
| 355 | + # If setting to site default values and there is a row...erase it |
356 | 356 | if( $row && $reset ) { |
357 | 357 | $dbw->delete( 'flaggedpage_config', |
358 | 358 | array( 'fpc_page_id' => $this->page->getArticleID() ), |
— | — | @@ -360,9 +360,12 @@ |
361 | 361 | # Otherwise, add a row unless we are just setting it as the site default, |
362 | 362 | # or it is the same the current one... |
363 | 363 | } elseif( !$reset ) { |
364 | | - if( !$row || $row->fpc_select != $this->select || $row->fpc_override != $this->override |
365 | | - || $row->fpc_level != $this->autoreview || $row->fpc_expiry != $expiry ) |
366 | | - { |
| 364 | + if( !$row // no previous config, or... |
| 365 | + || $row->fpc_select != $this->select // ...precedence changed, or... |
| 366 | + || $row->fpc_override != $this->override // ...override changed, or... |
| 367 | + || $row->fpc_level != $this->autoreview // ...autoreview level changed, or... |
| 368 | + || $row->fpc_expiry != $expiry // ...expiry changed |
| 369 | + ) { |
367 | 370 | $changed = true; |
368 | 371 | $dbw->replace( 'flaggedpage_config', |
369 | 372 | array( 'PRIMARY' ), |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -766,9 +766,10 @@ |
767 | 767 | # Get autoreview restriction settings... |
768 | 768 | $config = FlaggedRevs::getPageVisibilitySettings( $title, true ); |
769 | 769 | # Convert Sysop -> protect |
770 | | - $right = ($config['autoreview'] === 'sysop') ? 'protect' : $config['autoreview']; |
| 770 | + $right = ($config['autoreview'] === 'sysop') ? |
| 771 | + 'protect' : $config['autoreview']; |
771 | 772 | # Check if the user has the required right, if any |
772 | | - $isAllowed = !$right || $user->isAllowed($right); |
| 773 | + $isAllowed = ($right == '' || $user->isAllowed($right)); |
773 | 774 | } |
774 | 775 | # Auto-reviewing must be enabled and user must have the required permissions |
775 | 776 | if( !$isAllowed ) { |