phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.42


From: nomail
Subject: [Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.42
Date: Sun, 16 May 2004 17:58:53 +0200

Update of /sync/inc
Modified Files:
        Branch: 
          class.so_sync.inc.php

date: 2004/05/16 15:58:53;  author: mleonhardt;  state: Exp;  lines: +5 -3

Log Message:
- Admin's full devicelist
=====================================================================
Index: sync/inc/class.so_sync.inc.php
diff -u sync/inc/class.so_sync.inc.php:1.41 sync/inc/class.so_sync.inc.php:1.42
--- sync/inc/class.so_sync.inc.php:1.41 Sun May 16 14:36:54 2004
+++ sync/inc/class.so_sync.inc.php      Sun May 16 15:58:53 2004
@@ -152,7 +152,8 @@
     * Get all devices of a given phpGW user
     *
     * @param string $accountid internal phpGW account id (same as 
$GLOBALS['phpgw_info']['user']['account_id'])
-    *        of the user who owns this device (table phpgw_syncdevices) 
+    *        of the user who owns this device (table phpgw_syncdevices)<br>
+    *        if $accountid == all all devices will be returned (Admin) 
     * @param array &$devicelist output var which holds the devicelist
     * @return boolean true if the user has devices
     */
@@ -160,7 +161,8 @@
     function GetDeviceList($accountid, &$devicelist)
     {
       $devicelist = array();
-      $result = $GLOBALS['phpgw']->db->query("SELECT deviceid, accountid, uri, 
description, username FROM phpgw_syncdevices WHERE 
accountid='".$accountid."'",__LINE__,__FILE__);
+      $oneuser = $accountid == 'all' ? '' : "WHERE accountid='".$accountid."'";
+      $result = $GLOBALS['phpgw']->db->query("SELECT deviceid, accountid, uri, 
description, username FROM phpgw_syncdevices $oneuser",__LINE__,__FILE__);
       while ($GLOBALS['phpgw']->db->next_record())
       {
         $deviceid = $GLOBALS['phpgw']->db->f('deviceid');




reply via email to

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