Sbisson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/322956

Change subject: Stop logging that rows can't be formatted because of permission 
exception
......................................................................

Stop logging that rows can't be formatted because of permission exception

Change-Id: Iaa51c35ef19ee0789a24449ed05fa74ef29e65c0
---
M Hooks.php
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/56/322956/1

diff --git a/Hooks.php b/Hooks.php
index e115ab0..963595b 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -429,13 +429,18 @@
                        /** @var Flow\Formatter\ChangesListFormatter $formatter 
*/
                        $formatter = Container::get( 'formatter.changeslist' );
                        $line = $formatter->format( $row, $changesList, 
$topicOnly );
+               } catch ( PermissionException $pe ) {
+                       // It is expected that some rows won't be formatted 
because the current user
+                       // doesn't have permission to see some of the data they 
contain.
+                       return false;
                } catch ( Exception $e ) {
                        wfDebugLog( 'Flow', __METHOD__ . ': Exception 
formatting rc ' . $rc->getAttribute( 'rc_id' ) . ' ' . $e );
                        MWExceptionHandler::logException( $e );
-                       restore_error_handler();
                        return false;
                }
-               restore_error_handler();
+               finally {
+                       restore_error_handler();
+               }
 
                if ( $line === false ) {
                        return false;

-- 
To view, visit https://gerrit.wikimedia.org/r/322956
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa51c35ef19ee0789a24449ed05fa74ef29e65c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to