aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-12-02 09:44:42 +0100
committerMario Vavti <mario@mariovavti.com>2015-12-02 09:44:42 +0100
commit857e13e9b8ee4fe2c27cd9737f0396cb669cb8ad (patch)
tree2f5efa0bee35763b066919f0048208f5de4726c2 /include
parent593423434c0c0e8d1ebb43d97b2dda7e6b4d67bd (diff)
parent25caeee8547df73a7162dc6de30a030fa0bceea8 (diff)
downloadvolse-hubzilla-857e13e9b8ee4fe2c27cd9737f0396cb669cb8ad.tar.gz
volse-hubzilla-857e13e9b8ee4fe2c27cd9737f0396cb669cb8ad.tar.bz2
volse-hubzilla-857e13e9b8ee4fe2c27cd9737f0396cb669cb8ad.zip
Merge branch 'master' of https://github.com/redmatrix/hubzilla
Diffstat (limited to 'include')
-rw-r--r--include/api.php7
-rwxr-xr-xinclude/items.php2
2 files changed, 4 insertions, 5 deletions
diff --git a/include/api.php b/include/api.php
index f279b2aa3..e60583a01 100644
--- a/include/api.php
+++ b/include/api.php
@@ -382,7 +382,6 @@ require_once('include/api_auth.php');
function api_item_get_user(&$a, $item) {
- global $usercache;
// The author is our direct contact, in a conversation with us.
@@ -396,11 +395,11 @@ require_once('include/api_auth.php');
$name = $item['author']['xchan_name'];
// Generating a random ID
- if (is_null($usercache[$nick]) or !array_key_exists($nick, $usercache))
- $usercache[$nick] = mt_rand(2000000, 2100000);
+ if (! $nick)
+ $nick = mt_rand(2000000, 2100000);
$ret = array(
- 'id' => $usercache[$nick],
+ 'id' => $nick,
'name' => $name,
'screen_name' => $nick,
'location' => '', //$uinfo[0]['default-location'],
diff --git a/include/items.php b/include/items.php
index 46b396ad2..ef1867c14 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3474,7 +3474,7 @@ function post_is_importable($item,$abook) {
unobscure($item);
$text = prepare_text($item['body'],$item['mimetype']);
- $text = html2plain($text);
+ $text = html2plain(($item['title']) ? $item['title'] . ' ' . $text : $text);
$lang = null;