[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.31
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.31 |
Date: |
Sun, 23 May 2004 09:08:24 -0000 |
Update of /sync/inc
Modified Files:
Branch:
class.so_sync.inc.php
date: 2004/05/01 16:46:04; author: mkaemmerer; state: Exp; lines: +29 -14
Log Message:
- added more so functions for UI, not finished yet
=====================================================================
Index: sync/inc/class.so_sync.inc.php
diff -u sync/inc/class.so_sync.inc.php:1.30 sync/inc/class.so_sync.inc.php:1.31
--- sync/inc/class.so_sync.inc.php:1.30 Sat May 1 13:59:30 2004
+++ sync/inc/class.so_sync.inc.php Sat May 1 16:46:04 2004
@@ -90,6 +90,27 @@
}
/**
+ * Set AccountID for a device from device database
+ *
+ * writes to table phpgw_syncdevices
+ *
+ * @param $deviceid unique ID in internal devices database (table
phpgw_syncdevices)
+ * @param $accountid internal account_id of phpGW
+ * @return integer deviceid of changed record or -1 in case of error or
record not found
+ */
+
+ function SetAccountID($deviceid, $accountid)
+ {
+ $GLOBALS['phpgw']->db->query("UPDATE phpgw_syncdevices SET
accountid='$accountid'"
+ . " WHERE deviceid='$deviceid'",__LINE__,__FILE__);
+ $id = $GLOBALS['phpgw']->db->f('deviceid');
+ if (isset($id))
+ return $id;
+ else
+ return -1;
+ }
+
+ /**
* Get DeviceInfo of a device from phpgw syncdevice database
*
* reads from table phpgw_syncdevices
@@ -207,7 +228,7 @@
}
return -1;
}
-
+
/******************************************************************/
/** functions for phpgw_syncsources *******************************/
/******************************************************************/
@@ -274,7 +295,7 @@
while ($GLOBALS['phpgw']->db->next_record())
array_push($result, $GLOBALS['phpgw']->db->f('uri'));
- return $result;
+ return $result;
}
/**
@@ -462,16 +483,10 @@
} else
return -1;
}
-
- /**
- * Get all source names for one deviceid
- *
- * @param integer $deviceid unique device ID for internal devices database
- * @return array of string (source URIs, e.g. 'notes', './contact')
- *
- */
-
- function getSupportedSources($deviceid)
+
+ // ***** !!!
+
+ function getUsedSources($deviceid)
{
$GLOBALS['phpgw']->db->query("SELECT sourceid, uri FROM
phpgw_syncsources, phpgw_syncchannels where deviceid='$DeviceID' and and
phpgw_syncchannels.deviceid='".$deviceid."' and phpgw_syncchannels.sourceid =
phpgw_syncsources.sourceid",__LINE__,__FILE__);
@@ -481,7 +496,7 @@
return $result;
}
-
+
/******************************************************************/
/** functions for phpgw_syncmapping *******************************/
/******************************************************************/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.31,
nomail <=