some bugfixes related to empty database

This commit is contained in:
Cornelius Weiß 2005-02-12 17:32:38 +00:00
parent 3460c4f058
commit 9034ef788c
2 changed files with 2 additions and 3 deletions

View File

@ -47,7 +47,7 @@ class so_resources
{ {
$wherecats .= ($wherecats ? " OR " : " AND ( " ) .'cat_id' . "='".$cat_id."'"; $wherecats .= ($wherecats ? " OR " : " AND ( " ) .'cat_id' . "='".$cat_id."'";
} }
$wherecats .= " ) "; $wherecats .= $wherecats ? " ) " : "";
$this->db->query( 'SELECT '.$select." FROM ".$this->rs_table." WHERE ".$where.$wherecats. $this->db->query( 'SELECT '.$select." FROM ".$this->rs_table." WHERE ".$where.$wherecats.
($order_by != '' ? " ORDER BY $order_by" : ''),__LINE__,__FILE__); ($order_by != '' ? " ORDER BY $order_by" : ''),__LINE__,__FILE__);

View File

@ -70,8 +70,7 @@ class ui_resources
$content['nm']['no_filter'] = False; $content['nm']['no_filter'] = False;
$content['nm']['filter_label'] = lang('Category'); $content['nm']['filter_label'] = lang('Category');
$content['nm']['filter_help'] = lang('Select a category'); // is this used??? $content['nm']['filter_help'] = lang('Select a category'); // is this used???
$content['nm']['options-filter']= array('0' => lang('all categories')); $content['nm']['options-filter']= array('0'=>lang('all categories'))+(array)$this->bo->acl->get_cats(PHPGW_ACL_READ);
$content['nm']['options-filter']+= $this->bo->acl->get_cats(PHPGW_ACL_READ);
$content['nm']['no_filter2'] = True; $content['nm']['no_filter2'] = True;
$content['nm']['no_cat'] = True; $content['nm']['no_cat'] = True;