phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [phpGroupWare-developers] [code cleaning] Missing public function ge


From: Sigurd Nes
Subject: Re: [phpGroupWare-developers] [code cleaning] Missing public function get_subs in class.locations.inc.php
Date: Sun, 26 Oct 2008 15:52:42 +0100
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Maât wrote:
> Sigurd Nes a écrit :
>> Maât wrote:
>>   
>>> Hi all,
>>>
>>> I'm still fighting bugs to move microstep by microstep to see .18 out
>>> before i'm 120 years old :)
>>>
>>> litle bit of progress today : i have a nearly installing phpgroupware
>>> (well install does not die any more and it goes from the beginning to
>>> the end, i can log in but there are no app available at all : just
>>> about, home and logout)
>>>
>>> i'm splitting the changes i made into small patches to avoid the giant
>>> commit effect with many different things inside : each commit will
>>> address a specific issue :
>>>
>>> that will make patch review easier (and also make reverts easier in case
>>> i made a mistake)
>>>
>>> Among the issues, i found that get_subs() of class.locations.inc.php is
>>> called from class.acl.inc.php but does not exist... with an empty method
>>> i could prevent phpgw from crashing but i guess this method is supposed
>>> to do something
>>>
>>> Can someone help me either giving me the code of this method or
>>> explaining what it is supposed to do ?
>>>
>>> cheers,
>>> maat (micro bug chaser)
>>>
>>>
>>>     
>> Hi maat,
>>
>> it is supposed to get a list of sub-locations for a given location.
>>
>> have a look at the table phpgw_locations - the field 'name' contains 
>> information
>> on the sub-locations as they are organised as:
>>
>> name                 descr
>> .            Top
>> .sub1                First submodule
>> .sub2                Second submodule
>> .sub1.sub1   First sub-sub at first sub
>>
>> Regards
>>
>> Sigurd
>>   
> so if i understand well :
> 
> ( i put the sql definition of location table in footer to help )
> 
> the name field uses a dns approach to define locations and sub locations
> 
> then for a given app the sub locations for .location1 will be :
> 
> .location1.sublocation1
> .location1.sublocation2
> .location1.sublocation3
> 
> the remaining question is :
> 
> should this include sub-sub-locations ?
> 
> for example :
> 
> .location1.sublocation3.sussublocation1
> .location1.sublocation3.sussublocation2
> .location1.sublocation3.sussublocation3
> 
> iow :
> -- should i request all name fields beginning with ".location1." (which
> brings every sublocations)

Yes - that is the idea.
You give rights on all locations down the tree inherited from the level you are
operating on.

To add some extra control - you might want to add a flag for
"enable_inheritance" that you send along from the setting-form (a checkbox)

S

> -- or should i filter only the first level of child locations
> 
> ?
> 
> reagrds,
> Maât
> 
> CREATE TABLE  `phpgroupware_new`.`phpgw_locations` (
>   `location_id` int(11) NOT NULL auto_increment,
>   `app_id` int(11) NOT NULL,
>   `name` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `descr` varchar(100) collate utf8_unicode_ci NOT NULL,
>   `allow_grant` smallint(6) default NULL,
>   `allow_c_attrib` smallint(6) default NULL,
>   `c_attrib_table` varchar(25) collate utf8_unicode_ci default NULL,
>   PRIMARY KEY  (`location_id`),
>   KEY `app_id` (`app_id`),
>   KEY `name` (`name`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]