[dev] [commits] Horde branch master updated. e64f4407ca0953fb66ff839d6fdca4b38f6c68f6

Jan Schneider jan at horde.org
Thu Jun 16 13:11:05 UTC 2011


Zitat von Ralf Lang <lang at b1-systems.de>:

> Am Donnerstag, 16. Juni 2011, 14:25:59 schrieb Jan Schneider:
>> Zitat von Ralf Lang <lang at b1-systems.de>:
>> > Am Mittwoch, 15. Juni 2011, 18:25:19 schrieb Jan Schneider:
>> >> Zitat von Ralf Lang <lang at b1-systems.de>:
>> >> > The branch "master" has been updated.
>> >> > The following is a summary of the commits.
>> >> >
>> >> > from: 37df1c58900d008df4daa0577aa551d07364e5ed
>> >> >
>> >> > e64f440 [#10205] Now sorts users in ajax perms view and reuses the
>> >> > sort result
>> >> >
>> >> > ----------------------------------------------------------------------
>> >> > -
>> >> >
>> >> > commit e64f4407ca0953fb66ff839d6fdca4b38f6c68f6
>> >> > Author: Ralf Lang <lang at b1-systems.de>
>> >> > Date:   Thu Jun 9 17:04:22 2011 +0000
>> >> >
>> >> >     [#10205] Now sorts users in ajax perms view and reuses the sort
>> >> >     result
>> >> >
>> >> >  kronolith/templates/chunks/permissions.inc |    6 ++++--
>> >> >  1 files changed, 4 insertions(+), 2 deletions(-)
>> >> >
>> >> > http://git.horde.org/horde-git/-/commit/e64f4407ca0953fb66ff839d6fdca4
>> >> > b38 f6c68f6
>> >>
>> >> How about adding an (optional, to not break BC) parameter to
>> >> listUsers() to enable sorting? This way sorting only has to be
>> >> implemented in one place. And Horde_Auth drivers can use a sorting
>> >> that might be provided by the backend.
>> >>
>> >> Jan.
>> >
>> > Yeah, I like this and would do so. This will touch all auth backends
>> > which sport listUsers(), right?
>>
>> Yes. A default sorting method should be implemented in Horde_Auth_Base
>> though.
>>
>> Jan.
>
> 3ca351188b86348bb37d7b844bd83fbe6f336c9c
>
> some drivers already did sorting in code or in backend

Those should be changed then. Subclasses must not have a different  
default value for optional arguments either.

> adds backend sorting to sql driver

Customsql should have that too.

> adds simple sort() if option is given to most drivers
>
> The fallback php solution is a one-liner.
> Do you want the separate method for design reasons?

It might make sense if at some point we want to sort with a different  
method, so you only have to change a single place. And you could move  
the if-check there too.

The Composite driver should simply pass the parameter to the sub-class.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list