aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-01-07 19:53:03 +0100
committerMario Vavti <mario@mariovavti.com>2018-01-07 19:53:03 +0100
commit214fa81ec62eeb8a735d2196373c37e89d02666a (patch)
treeb0dfd9d52d6824210b543ba871933f817504cb22 /include
parent98fd3118911313c3f365cc535e9357cd92268534 (diff)
parent0d415fb3c9db41ee97b7ce933ebc84eab38a1fa4 (diff)
downloadvolse-hubzilla-214fa81ec62eeb8a735d2196373c37e89d02666a.tar.gz
volse-hubzilla-214fa81ec62eeb8a735d2196373c37e89d02666a.tar.bz2
volse-hubzilla-214fa81ec62eeb8a735d2196373c37e89d02666a.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rw-r--r--include/feedutils.php9
-rwxr-xr-xinclude/items.php7
-rw-r--r--include/zid.php4
3 files changed, 13 insertions, 7 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 4638ef66a..5e48cb1ee 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -1801,12 +1801,17 @@ function compat_photos_list($s) {
if($found) {
foreach($matches as $match) {
- $ret[] = [
+ $entry = [
'href' => $match[2],
- 'length' => 0,
'type' => guess_image_type($match[2])
];
+ $sizer = new \Zotlabs\Lib\Img_filesize($match[2]);
+ $size = $sizer->getSize();
+ if(intval($size)) {
+ $entry['length'] = intval($size);
+ }
+ $ret[] = $entry;
}
}
diff --git a/include/items.php b/include/items.php
index 722757f87..d0b9cffc9 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4063,8 +4063,9 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$item_uids = ' true ';
$item_normal = item_normal();
-
- if ($arr['uid']) $uid= $arr['uid'];
+ if($arr['uid']) {
+ $uid = $arr['uid'];
+ }
if($channel) {
$uid = $channel['channel_id'];
@@ -4226,7 +4227,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$items = q("SELECT item.*, item.id AS item_id FROM item
WHERE $item_uids $item_restrict
$simple_update
- $sql_extra $sql_nets
+ $sql_extra $sql_nets $sql_extra3
ORDER BY item.received DESC $pager_sql"
);
diff --git a/include/zid.php b/include/zid.php
index d1a0fa88a..6ebc9a6ab 100644
--- a/include/zid.php
+++ b/include/zid.php
@@ -105,8 +105,8 @@ function strip_zats($s) {
-function clean_query_string() {
- $x = strip_zids(\App::$query_string);
+function clean_query_string($s = '') {
+ $x = strip_zids(($s) ? $s : \App::$query_string);
$x = strip_owt($x);
$x = strip_zats($x);