fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10344] api: get attributes based on location_id


From: Sigurd Nes
Subject: [Fmsystem-commits] [10344] api: get attributes based on location_id
Date: Wed, 24 Oct 2012 20:11:10 +0000

Revision: 10344
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10344
Author:   sigurdne
Date:     2012-10-24 20:11:10 +0000 (Wed, 24 Oct 2012)
Log Message:
-----------
api: get attributes based on location_id

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

Modified: trunk/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.custom_fields.inc.php      2012-10-24 14:11:40 UTC 
(rev 10343)
+++ trunk/phpgwapi/inc/class.custom_fields.inc.php      2012-10-24 20:11:10 UTC 
(rev 10344)
@@ -945,11 +945,32 @@
                                $order = 'attrib_sort', $allrows = false, 
$inc_choices = false, $filter = array())
                {
                        $location_id    = 
$GLOBALS['phpgw']->locations->get_id($appname, $location);
+                       return $this->find2($location_id, $start, $query, 
$sort, $order, $allrows, $inc_choices, $filter);
+               }
+
+               /**
+                * Get a list of attributes
+                *
+                * @param integer $location_id   the system location
+                * @param integer $start
+                * @param string query
+                * @param string $sort
+                * @param string $order
+                * @param bool   $allrows
+                * @param bool   $inc_choices
+                * @param array $filtermethod
+                *
+                * @return array attributes at location
+                */
+
+               public function find2($location_id, $start = 0, $query = '', 
$sort = 'ASC',
+                               $order = 'attrib_sort', $allrows = false, 
$inc_choices = false, $filter = array())
+               {
+                       $location_id    = (int) $location_id;
                        $start                  = (int) $start;
                        $query                  = 
$this->_db->db_addslashes($query);
                        $order                  = 
$this->_db->db_addslashes($order);
                        $allrows                = !!$allrows;
-
                        
                        $filtermethod   = '';
                        if ($filter && is_array($filter))




reply via email to

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