* pointing to the same global contact id.
*
*/
+function poco_load($cid, $uid = 0, $zcid = 0, $url = null) {
+ // Call the function "poco_load_worker" via the worker
+ proc_run(PRIORITY_LOW, "include/discover_poco.php", "poco_load", $cid, $uid, $zcid, base64_encode($url));
+}
-
-
-
-function poco_load($cid,$uid = 0,$zcid = 0,$url = null) {
-
+/**
+ * @brief Fetch POCO data from the worker
+ *
+ * @param integer $cid Contact ID
+ * @param integer $uid User ID
+ * @param integer $zcid Global Contact ID
+ * @param integer $url POCO address that should be polled
+ *
+ */
+function poco_load_worker($cid, $uid, $zcid, $url) {
$a = get_app();
- if($cid) {
- if((! $url) || (! $uid)) {
+ if ($cid) {
+ if ((! $url) || (! $uid)) {
$r = q("select `poco`, `uid` from `contact` where `id` = %d limit 1",
intval($cid)
);