[dev] Share names in kronolith not displayed: share_object->get('name') vs share_object->getName()

Michael J Rubinsky mrubinsk at horde.org
Sat Mar 31 17:07:44 UTC 2012


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

> Am 31.03.2012 18:33, schrieb Michael J Rubinsky:
>>
>> Quoting Ralf Lang <lang at b1-systems.de>:
>>
>>> Hi,
>>>
>>> in develop I spotted that share names are not displayed in most
>>> places like kronolith.
>>>
>>> I found out a lot of templates use
>>> $some_share_object->get('name') while others use ->getName();
>>>
>>> 'name' is not supported by the get method, at least not for the
>>> sql driver.
>>>
>>> What's the proper fix? Converting all templates/views to use
>>> getName or to ass the get('name') case to the backend driver?
>>>
>>> If it's the former I will fix any occurence at sight.
>>
>>
>> It depends on what information you are trying to get;
>> $share_object->get('name') is the correct form to use when trying
>> to get the share's *display* name (in the sql driver, this would
>> map to the attribute_name field). If you are trying to get the
>> share's internal share_name then you want
>> $share_object->getName().
>
> OK, then it's the latter. Currently, get('name') returns nothing from
> the sql backend, probably because the set method saves it to the
> share_name and the getter reads it from attribute_name.

Ah. Yeah, that's a bug then. $share->set('name', $name) should set  
attribute_name.

-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6096 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/dev/attachments/20120331/692c0c3e/attachment-0001.bin>


More information about the dev mailing list