aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-17 00:42:51 -0800
committerredmatrix <git@macgirvin.com>2016-02-17 00:42:51 -0800
commita83eb14ff6f760e0dfd74c61dad128a83c4234bf (patch)
tree4ee20a0c5b109ff4d945fa321d4508f9c5059436
parent41ec5403e184fa8526c4d3fd0176e70a5b2b67f1 (diff)
downloadvolse-hubzilla-a83eb14ff6f760e0dfd74c61dad128a83c4234bf.tar.gz
volse-hubzilla-a83eb14ff6f760e0dfd74c61dad128a83c4234bf.tar.bz2
volse-hubzilla-a83eb14ff6f760e0dfd74c61dad128a83c4234bf.zip
iconfig debugging
-rwxr-xr-xinclude/items.php4
-rw-r--r--mod/item.php10
2 files changed, 10 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index 2239510dc..527d55b71 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2840,7 +2840,7 @@ function item_store_update($arr,$allow_exec = false, $deliver = true) {
if($meta) {
foreach($meta as $m) {
- set_iconfig($current_post,$m['cat'],$m['k'],$m['v']);
+ set_iconfig($orig_post_id,$m['cat'],$m['k'],$m['v']);
}
$arr['iconfig'] = $meta;
}
@@ -4736,7 +4736,7 @@ function fetch_post_tags($items,$link = false) {
intval(TERM_OBJ_POST)
);
$imeta = q("select * from iconfig where iid in ( %s )",
- dbesc($tag_finger_str)
+ dbesc($tag_finder_str)
);
}
diff --git a/mod/item.php b/mod/item.php
index fdc768c67..d861967a9 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -233,6 +233,8 @@ function item_post(&$a) {
$post_id = $i[0]['iid'];
}
+ $iconfig = null;
+
if($post_id) {
$i = q("SELECT * FROM `item` WHERE `uid` = %d AND `id` = %d LIMIT 1",
intval($profile_uid),
@@ -241,6 +243,9 @@ function item_post(&$a) {
if(! count($i))
killme();
$orig_post = $i[0];
+ $iconfig = q("select * from iconfig where iid = %d",
+ intval($post_id)
+ );
}
@@ -792,6 +797,9 @@ function item_post(&$a) {
$datarray['plink'] = $plink;
$datarray['route'] = $route;
+ if($iconfig)
+ $datarray['iconfig'] = $iconfig;
+
// preview mode - prepare the body for display and send it via json
if($preview) {
@@ -808,8 +816,6 @@ function item_post(&$a) {
if($orig_post)
$datarray['edit'] = true;
-
-
if(feature_enabled($profile_uid,'suppress_duplicates') && (! $orig_post)) {
$z = q("select created from item where uid = %d and body = '%s'",