[dev] [cvs] commit: jonah/lib Jonah.php

Ben Klang ben at alkaloid.net
Mon Aug 11 19:44:30 UTC 2008


On Aug 11, 2008, at 3:40 PM, Ben Klang wrote:

> On Aug 6, 2008, at 6:07 AM, Jan Schneider wrote:
>
>> jan         2008-08-06 06:07:34 EDT
>>
>>   Modified files:
>>     lib                  Jonah.php
>>   Log:
>>   Fix return type.
>>
> This actually reverts the intent of my original commit.  The  
> problem is that there are calls within Jonah that treat the return  
> of Jonah::checkPermissions() as a boolean.  The particular case I  
> found was that the Jonah::getMenu() call looks for the user to be  
> an admin before presenting the Feed menu icons.  The problem is  
> that because $in is specified as an empty array (or rather, it's  
> unspecified and defaults to an empty array) the return type is an  
> empty array which appears as a boolean false, even though the user  
> is both a Horde administrator and a Jonah administrator  
> (jonah:admin permission).
>
> So which needs to change: the return type of Jonah::checkPermissions 
> () or the caller to Jonah::checkPermissions()?
>
Whoops, I now see that the email to which I replied actually came  
before my commit.  I guess the question still stands, though the  
change I committed today effectively reverted your commit on August  
6th.  Unless I hear otherwise I'll leave it as returning true, since  
it works and was the original behavior.

/BAK/


More information about the dev mailing list