aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-12 16:07:04 -0800
committerzotlabs <mike@macgirvin.com>2017-11-12 16:07:04 -0800
commit59caf141d1e271ee4a6e7ab8b66f4070835dde95 (patch)
tree44056bdac329f6356fa75ed3566c88568677d89f /Zotlabs
parent71a30cd9a5f5c749e3b76e961876afbd0afa87f9 (diff)
parent6ea7ef43e0a0a99f81986c8e1fe5955800bfa496 (diff)
downloadvolse-hubzilla-59caf141d1e271ee4a6e7ab8b66f4070835dde95.tar.gz
volse-hubzilla-59caf141d1e271ee4a6e7ab8b66f4070835dde95.tar.bz2
volse-hubzilla-59caf141d1e271ee4a6e7ab8b66f4070835dde95.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Enotify.php3
-rw-r--r--Zotlabs/Storage/File.php9
-rw-r--r--Zotlabs/Widget/Wiki_pages.php2
3 files changed, 9 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index d5798e671..697b57b6a 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -802,7 +802,8 @@ class Enotify {
'url' => $item['author']['xchan_url'],
'photo' => $item['author']['xchan_photo_s'],
'when' => relative_date($item['created']),
- 'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'),
+ 'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'),
+ 'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])),
'message' => strip_tags(bbcode($itemem_text))
);
diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php
index 332bf6896..947a9fde3 100644
--- a/Zotlabs/Storage/File.php
+++ b/Zotlabs/Storage/File.php
@@ -127,12 +127,15 @@ class File extends DAV\Node implements DAV\IFile {
$is_photo = false;
$album = '';
+ $os_path = '';
- $r = q("SELECT flags, folder, os_storage, filename, is_photo FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1",
+ $r = q("SELECT flags, folder, os_storage, os_path, filename, is_photo FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1",
dbesc($this->data['hash']),
intval($c[0]['channel_id'])
);
if ($r) {
+ $os_path = $r[0]['os_path'];
+
if (intval($r[0]['os_storage'])) {
$d = q("select folder, content from attach where hash = '%s' and uid = %d limit 1",
dbesc($this->data['hash']),
@@ -150,7 +153,7 @@ class File extends DAV\Node implements DAV\IFile {
}
}
$fname = dbunescbin($d[0]['content']);
- if(strpos($fname,'store') === false)
+ if(strpos($fname,'store/') === false)
$f = 'store/' . $this->auth->owner_nick . '/' . $fname ;
else
$f = $fname;
@@ -196,7 +199,7 @@ class File extends DAV\Node implements DAV\IFile {
if($is_photo) {
require_once('include/photos.php');
- $args = array( 'resource_id' => $this->data['hash'], 'album' => $album, 'os_path' => $f, 'filename' => $r[0]['filename'], 'getimagesize' => $gis, 'directory' => $direct );
+ $args = array( 'resource_id' => $this->data['hash'], 'album' => $album, 'os_syspath' => $f, 'os_path' => $os_path, 'filename' => $r[0]['filename'], 'getimagesize' => $gis, 'directory' => $direct );
$p = photo_upload($c[0],\App::get_observer(),$args);
}
diff --git a/Zotlabs/Widget/Wiki_pages.php b/Zotlabs/Widget/Wiki_pages.php
index ac44b8d88..39d4b1717 100644
--- a/Zotlabs/Widget/Wiki_pages.php
+++ b/Zotlabs/Widget/Wiki_pages.php
@@ -12,7 +12,7 @@ class Wiki_pages {
if(! $arr['resource_id']) {
$c = channelx_by_nick(argv(1));
- $w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],argv(2));
+ $w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],urldecode(argv(2)));
$arr = array(
'resource_id' => $w['resource_id'],
'channel_id' => $c['channel_id'],