From a7e190b0cb3d0e18d00f6d2204779362d5b430e8 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 31 Jan 2015 22:57:05 +0100 Subject: [PATCH 1/3] Bugfix: The portable contacts send data as html but was expected to be bbcode. Now the html is converted to bbcode. --- include/socgraph.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/socgraph.php b/include/socgraph.php index 07bbee32ac..2738f8a70f 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -20,6 +20,9 @@ require_once('include/datetime.php'); function poco_load($cid,$uid = 0,$zcid = 0,$url = null) { + + require_once("include/html2bbcode.php"); + $a = get_app(); if($cid) { @@ -107,7 +110,7 @@ function poco_load($cid,$uid = 0,$zcid = 0,$url = null) { $location = $entry->currentLocation; if(isset($entry->aboutMe)) - $about = $entry->aboutMe; + $about = html2bbcode($entry->aboutMe); if(isset($entry->gender)) $gender = $entry->gender; From 6eb4254d06a1c261b0a46283b1952a6e6182537b Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 31 Jan 2015 23:13:21 +0100 Subject: [PATCH 2/3] The query after an API post was improved to make it faster. --- include/api.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index 2d3c31af0c..c8a313ce19 100644 --- a/include/api.php +++ b/include/api.php @@ -848,7 +848,7 @@ // get last public wall message $lastwall = q("SELECT `item`.*, `i`.`contact-id` as `reply_uid`, `i`.`author-link` AS `item-author` FROM `item`, `item` as `i` - WHERE `item`.`contact-id` = %d + WHERE `item`.`contact-id` = %d AND `item`.`uid` = %d AND ((`item`.`author-link` IN ('%s', '%s')) OR (`item`.`owner-link` IN ('%s', '%s'))) AND `i`.`id` = `item`.`parent` AND `item`.`type`!='activity' @@ -856,6 +856,7 @@ ORDER BY `item`.`created` DESC LIMIT 1", intval($user_info['cid']), + intval(api_user()), dbesc($user_info['url']), dbesc(normalise_link($user_info['url'])), dbesc($user_info['url']), From 8d0030c9d50e37da14bdcb0dd1ea146a9f8ac8dc Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 2 Feb 2015 22:24:21 +0100 Subject: [PATCH 3/3] Revert some stuff from another pull request. I like git ... --- include/socgraph.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/socgraph.php b/include/socgraph.php index 2738f8a70f..07bbee32ac 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -20,9 +20,6 @@ require_once('include/datetime.php'); function poco_load($cid,$uid = 0,$zcid = 0,$url = null) { - - require_once("include/html2bbcode.php"); - $a = get_app(); if($cid) { @@ -110,7 +107,7 @@ function poco_load($cid,$uid = 0,$zcid = 0,$url = null) { $location = $entry->currentLocation; if(isset($entry->aboutMe)) - $about = html2bbcode($entry->aboutMe); + $about = $entry->aboutMe; if(isset($entry->gender)) $gender = $entry->gender;