fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16127] check for node


From: sigurdne
Subject: [Fmsystem-commits] [16127] check for node
Date: Sun, 1 Jan 2017 18:04:24 +0000 (UTC)

Revision: 16127
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16127
Author:   sigurdne
Date:     2017-01-01 18:04:24 +0000 (Sun, 01 Jan 2017)
Log Message:
-----------
check for node

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.categories.inc.php

Modified: trunk/phpgwapi/inc/class.categories.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.categories.inc.php 2016-12-30 22:44:17 UTC (rev 
16126)
+++ trunk/phpgwapi/inc/class.categories.inc.php 2017-01-01 18:04:24 UTC (rev 
16127)
@@ -498,7 +498,7 @@
                        $cats = array();
                        if ($this->db->next_record())
                        {
-                               $cats[0] = array
+                               $cat = array
                                (
                                        'id'                    => 
$this->db->f('cat_id'),
                                        'owner'                 => 
$this->db->f('cat_owner'),
@@ -510,8 +510,16 @@
                                        'name'                  => 
$this->db->f('cat_name', true),
                                        'description'   => 
$this->db->f('cat_description', true),
                                        'data'                  => 
$this->db->f('cat_data'),
-                                       'active'                => 
(int)$this->db->f('active')
+                                       'active'                => 
(int)$this->db->f('active'),
+                                       'is_node'               => true
                                );
+                               $this->db->query("SELECT cat_id FROM 
phpgw_categories WHERE cat_parent = {$id}",__LINE__,__FILE__);
+
+                               if ($this->db->next_record())
+                               {
+                                       $cat['is_node'] = false;
+                               }
+                               $cats[] = $cat;
                        }
 
                        return $cats;




reply via email to

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