[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.41
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.41 |
Date: |
Sun, 16 May 2004 16:36:54 +0200 |
Update of /sync/inc
Modified Files:
Branch:
class.so_sync.inc.php
date: 2004/05/16 14:36:54; author: mleonhardt; state: Exp; lines: +22 -3
Log Message:
- extending sync-ui: User can now change Device-Auth
- bugfix: save conflicthandling
=====================================================================
Index: sync/inc/class.so_sync.inc.php
diff -u sync/inc/class.so_sync.inc.php:1.40 sync/inc/class.so_sync.inc.php:1.41
--- sync/inc/class.so_sync.inc.php:1.40 Thu May 13 16:47:14 2004
+++ sync/inc/class.so_sync.inc.php Sun May 16 14:36:54 2004
@@ -125,7 +125,7 @@
function GetDeviceInfo($deviceid, $talkative = false)
{
if ($talkative)
- $talkativefields = ', description';
+ $talkativefields = ', description, password';
else
$talkativefields = '';
$GLOBALS['phpgw']->db->query("SELECT uri, username $talkativefields FROM
phpgw_syncdevices WHERE deviceid='" .$deviceid. "'",__LINE__,__FILE__);
@@ -138,7 +138,8 @@
if ($talkative)
{
return array('uri'=>$uri, 'username'=>$username,
- 'description'=>$GLOBALS['phpgw']->db->f('description'));
+ 'description'=>$GLOBALS['phpgw']->db->f('description'),
+ 'password'=>$GLOBALS['phpgw']->db->f('password'));
}
else
return array('uri'=>$uri, 'username'=>$username);
@@ -754,6 +755,24 @@
function setDeviceDescription($deviceid, $newdescription)
{
$GLOBALS['phpgw']->db->query("UPDATE phpgw_syncdevices SET
description='$newdescription' " .
+ " WHERE deviceid='$deviceid'",__LINE__,__FILE__);
+ if ($GLOBALS['phpgw']->db->Error)
+ return -1;
+ else
+ return 0;
+ }
+
+ /**
+ * set the device description of the device with $deviceid (has to exist in
the db yet)
+ *
+ * @param integer $deviceid unique device ID for internal devices database
+ * @param string $newdescription new description of the device
+ * @return integer >= 0 if successfull, < 0 in case of error
+ */
+
+ function setDeviceSettings($deviceid, $username, $password)
+ {
+ $GLOBALS['phpgw']->db->query("UPDATE phpgw_syncdevices SET
username='$username', password='$password' " .
" WHERE deviceid='$deviceid'",__LINE__,__FILE__);
if ($GLOBALS['phpgw']->db->Error)
return -1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.41,
nomail <=