aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-12-14 13:32:58 -0800
committerzotlabs <mike@macgirvin.com>2017-12-14 13:32:58 -0800
commit684b572aa8005479f3eb219fc526c812c801ca76 (patch)
treef8ee52081242cb28f681c2ca934f65fcf1a42387 /include
parent215d615fc3bb9e168e21a78a6319a7971c4d1e9e (diff)
parenta61c72b3b2076a5971eca47cda8aa067c03f9d6c (diff)
downloadvolse-hubzilla-684b572aa8005479f3eb219fc526c812c801ca76.tar.gz
volse-hubzilla-684b572aa8005479f3eb219fc526c812c801ca76.tar.bz2
volse-hubzilla-684b572aa8005479f3eb219fc526c812c801ca76.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include')
-rw-r--r--include/attach.php5
-rw-r--r--include/conversation.php4
-rw-r--r--include/nav.php10
3 files changed, 13 insertions, 6 deletions
diff --git a/include/attach.php b/include/attach.php
index 88b6fa8e7..e94454905 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -308,6 +308,11 @@ function attach_can_view_folder($uid,$ob_hash,$folder_hash) {
$hash = $folder_hash;
$result = false;
+ if(! $folder_hash) {
+ return perm_is_allowed($uid,$ob_hash,'view_storage');
+ }
+
+
do {
$r = q("select folder from attach where hash = '%s' and uid = %d $sql_extra",
dbesc($hash),
diff --git a/include/conversation.php b/include/conversation.php
index fc0942474..77694deb3 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -755,8 +755,8 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
'forged' => $forged,
'txt_cats' => t('Categories:'),
'txt_folders' => t('Filed under:'),
- 'has_cats' => ((count($body['categories'])) ? 'true' : ''),
- 'has_folders' => ((count($body['folders'])) ? 'true' : ''),
+ 'has_cats' => (($body['categories']) ? 'true' : ''),
+ 'has_folders' => (($body['folders']) ? 'true' : ''),
'text' => strip_tags($body['html']),
'ago' => relative_date($item['created']),
'app' => $item['app'],
diff --git a/include/nav.php b/include/nav.php
index 2366fe7f1..8566cc58c 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -176,13 +176,15 @@ EOT;
}
-
- $homelink = get_my_url();
- if(! $homelink) {
+ $my_url = get_my_url();
+ if(! $my_url) {
$observer = App::get_observer();
- $homelink = (($observer) ? $observer['xchan_url'] : '');
+ $my_url = (($observer) ? $observer['xchan_url'] : '');
}
+ $homelink_arr = parse_url($my_url);
+ $homelink = $homelink_arr['scheme'] . '://' . $homelink_arr['host'];
+
if(! $is_owner) {
$nav['rusermenu'] = array(
$homelink,