[horde] Pretty sure I found Bug in Trean (Bookmarks)

Andy Dorman adorman at ironicdesign.com
Thu Oct 3 15:20:42 UTC 2013


On 10/03/2013 08:32 AM, Andy Dorman wrote:
> I have tested this fix as well and it works fine...
>
>>     public function listBookmarks($sortby = 'title', $sortdir = 0,
>> $from = 0, $count = 0)
>>     {
>>         $values = array($this->_userId);
>>         $sql = 'SELECT bookmark_id, user_id, bookmark_url,
>> bookmark_title, bookmark_description, bookmark_clicks,
>> bookmark_http_status, favicon_url, bookmark_dt
>>                 FROM trean_bookmarks
>>                 WHERE user_id = ?
>>                 ORDER BY bookmark_' . ($sortby ? $sortby : 'title') .
>> ($sortdir ? ' DESC' : '');
>>         $sql = $GLOBALS['trean_db']->addLimitOffset($sql,
>> array('limit' => $count, 'offset' => $from));
>
> It still seems silly to me that PHP apparently considers the empty
> string or whatever is being passed for $sortby to be a valid value and
> does not invoke the default for it.

I have created bug ticket #12733 at bugs.horde.org

-- 
Andy Dorman



More information about the horde mailing list