[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.52
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.52 |
Date: |
Fri, 26 Nov 2004 13:34:57 +0100 |
Update of /sync/inc
Modified Files:
Branch:
class.so_sync.inc.php
date: 2004/11/26 12:34:57; author: fipsfuchs; state: Exp; lines: +49 -10
Log Message:
new version from internal CVS moved to original project
=====================================================================
Index: sync/inc/class.so_sync.inc.php
diff -u sync/inc/class.so_sync.inc.php:1.51 sync/inc/class.so_sync.inc.php:1.52
--- sync/inc/class.so_sync.inc.php:1.51 Wed Jul 28 19:54:18 2004
+++ sync/inc/class.so_sync.inc.php Fri Nov 26 12:34:57 2004
@@ -711,16 +711,21 @@
// if its a newly generated LUID (_*) we return the new GUID
// like created in generateandsettempLUID
if ($LUID[0] == '_') return substr($LUID, 1);
-
- $GLOBALS['phpgw']->db->query('SELECT GUID FROM phpgw_syncmapping,
phpgw_syncchannels, phpgw_syncsources ' .
- "WHERE phpgw_syncchannels.deviceid='$deviceid' and
phpgw_syncsources.URI='$source' and LUID='$LUID' and
phpgw_syncchannels.sourceid = phpgw_syncsources.sourceid and
phpgw_mapping.channelid = phpgw_synchannels.channelid",
- __LINE__,__FILE__);
- $GLOBALS['phpgw']->db->next_record();
- $GUID = $GLOBALS['phpgw']->db->f('GUID');
- if (isset($GUID))
- return $GUID;
- else
+ $channelid = $this->GetChannelIDfromSourceAndDeviceID($deviceid,
$source);
+ if ($channelid != -1)
+ {
+ $GLOBALS['phpgw']->db->query('SELECT GUID FROM phpgw_syncmapping ' .
+ "WHERE phpgw_syncmapping.channelid='$channelid' and LUID='$LUID'",
+ __LINE__,__FILE__);
+ $GLOBALS['phpgw']->db->next_record();
+
+ $GUID = $GLOBALS['phpgw']->db->f('GUID');
+ if (isset($GUID))
+ return $GUID;
+ else
+ return -1;
+ } else
return -1;
}
@@ -1045,5 +1050,39 @@
return $result;
}
+ function addResolveEntry($deviceid, $reqsourceuri, $id, $fkluid,
$fksourceuri, $tag) {
+ $GLOBALS['phpgw']->db->query(
+ "INSERT INTO phpgw_syncresolve
(deviceid,reqsourceuri,resid,fkluid,fksourceuri,tag) "
+
."VALUES('$deviceid','$reqsourceuri','$id','$fkluid','$fksourceuri','$tag')",__LINE__,__FILE__
+ );
+ }
+
+ function deleteResolveEntry($resolveid) {
+ $GLOBALS['phpgw']->db->query(
+ "DELETE FROM phpgw_syncresolve WHERE
resolveid='$resolveid'",__LINE__,__FILE__
+ );
}
+
+ function getResolveEntry($deviceid, $fksourceuri, $fkluid) {
+ $GLOBALS['phpgw']->db->query(
+ "SELECT resolveid,resid,reqsourceuri,tag FROM
phpgw_syncresolve WHERE "
+ ."deviceid='$deviceid' AND
fksourceuri='$fksourceuri' AND fkluid='$fkluid'",__LINE__,__FILE__);
+ if ($GLOBALS['phpgw']->db->next_record()) {
+ $ret = array(
+ "resolveid" =>
$GLOBALS['phpgw']->db->f('resolveid'),
+ "deviceid" => $deviceid,
+ "reqsourceuri" =>
$GLOBALS['phpgw']->db->f('reqsourceuri'),
+ "id" => $GLOBALS['phpgw']->db->f('resid'),
+ "fkluid" => $fkluid,
+ "fksource" => $fksourceuri,
+ "tag" => $GLOBALS['phpgw']->db->f('tag')
+ );
+ return $ret;
+ }
+ else {
+ return false;
+ }
+ }
+
+}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.so_sync.inc.php, 1.52,
nomail <=