aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <redmatrix@redmatrix.me>2015-04-06 19:00:13 -0700
committerfriendica <redmatrix@redmatrix.me>2015-04-06 19:00:13 -0700
commit3a3563a4b1673cdd86fdba01985ccfea98ab8b0e (patch)
tree159aba494d46e7c334b2b0fb5a3b2ad8a3b4db09 /include
parent04c993ff2a17274edd8e0f4422f71edad52d8f56 (diff)
downloadvolse-hubzilla-3a3563a4b1673cdd86fdba01985ccfea98ab8b0e.tar.gz
volse-hubzilla-3a3563a4b1673cdd86fdba01985ccfea98ab8b0e.tar.bz2
volse-hubzilla-3a3563a4b1673cdd86fdba01985ccfea98ab8b0e.zip
commit 59828593c broke some important poco stuff, looks like the cat might have climbed over the keyboard and deleted something that wasn't intended to be deleted.
Diffstat (limited to 'include')
-rw-r--r--include/socgraph.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/socgraph.php b/include/socgraph.php
index 7f03f8696..acebec419 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -180,6 +180,26 @@ function poco_load($xchan = '', $url = null) {
}
$total ++;
+
+
+ $r = q("select * from xlink where xlink_xchan = '%s' and xlink_link = '%s' and xlink_static = 0 limit 1",
+ dbesc($xchan),
+ dbesc($hash)
+ );
+
+ if(! $r) {
+ q("insert into xlink ( xlink_xchan, xlink_link, xlink_updated, xlink_static ) values ( '%s', '%s', '%s', 0 ) ",
+ dbesc($xchan),
+ dbesc($hash),
+ dbesc(datetime_convert())
+ );
+ }
+ else {
+ q("update xlink set xlink_updated = '%s' where xlink_id = %d",
+ dbesc(datetime_convert()),
+ intval($r[0]['xlink_id'])
+ );
+ }
}
logger("poco_load: loaded $total entries",LOGGER_DEBUG);