aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-04 22:33:53 -0700
committerzotlabs <mike@macgirvin.com>2017-09-04 22:33:53 -0700
commitca58ef80ae665ab2b9da125e17fdb33a1ea90a40 (patch)
treef5c53fc0a1ed04f986d4fb06ff45545081780335 /Zotlabs/Module
parent05654e498034329759351c4a64349734ce6b7204 (diff)
parentc8000fca1f2ee379b62b473a00838af9a48bc4b6 (diff)
downloadvolse-hubzilla-ca58ef80ae665ab2b9da125e17fdb33a1ea90a40.tar.gz
volse-hubzilla-ca58ef80ae665ab2b9da125e17fdb33a1ea90a40.tar.bz2
volse-hubzilla-ca58ef80ae665ab2b9da125e17fdb33a1ea90a40.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Display.php41
-rw-r--r--Zotlabs/Module/Settings/Channel.php2
2 files changed, 15 insertions, 28 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 2b2722421..68da3e247 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -17,20 +17,18 @@ class Display extends \Zotlabs\Web\Controller {
if($load)
$_SESSION['loadtime'] = datetime_convert();
-
if(observer_prohibited()) {
notice( t('Public access denied.') . EOL);
return;
}
-
if(argc() > 1 && argv(1) !== 'load')
$item_hash = argv(1);
if($_REQUEST['mid'])
$item_hash = $_REQUEST['mid'];
- if(! $item_hash) {
+ if(! $item_hash) {
\App::$error = 404;
notice( t('Item not found.') . EOL);
return;
@@ -38,21 +36,18 @@ class Display extends \Zotlabs\Web\Controller {
$observer_is_owner = false;
$updateable = false;
-
if(local_channel() && (! $update)) {
$channel = \App::get_channel();
-
-
+
$channel_acl = array(
'allow_cid' => $channel['channel_allow_cid'],
'allow_gid' => $channel['channel_allow_gid'],
'deny_cid' => $channel['channel_deny_cid'],
'deny_gid' => $channel['channel_deny_gid']
);
-
-
+
$x = array(
'is_owner' => true,
'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
@@ -136,7 +131,6 @@ class Display extends \Zotlabs\Web\Controller {
$simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
if((! $update) && (! $load)) {
-
$static = ((local_channel()) ? channel_manual_conv_update(local_channel()) : 1);
@@ -182,20 +176,20 @@ class Display extends \Zotlabs\Web\Controller {
]);
}
-
+
$observer_hash = get_observer_hash();
$item_normal = item_normal();
$item_normal_update = item_normal_update();
-
+
$sql_extra = public_permissions_sql($observer_hash);
if(($update && $load) || ($checkjs->disabled())) {
-
+
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']),intval(\App::$pager['start']));
-
+
if($load || ($checkjs->disabled())) {
$r = null;
-
+
require_once('include/channel.php');
$sys = get_sys_channel();
$sysid = $sys['channel_id'];
@@ -211,16 +205,14 @@ class Display extends \Zotlabs\Web\Controller {
);
if($r) {
$updateable = true;
-
}
-
}
if($r === null) {
-
+
// in case somebody turned off public access to sys channel content using permissions
// make that content unsearchable by ensuring the owner uid can't match
-
+
if(! perm_is_allowed($sysid,$observer_hash,'view_stream'))
$sysid = 0;
@@ -248,7 +240,6 @@ class Display extends \Zotlabs\Web\Controller {
$sysid = $sys['channel_id'];
if(local_channel()) {
-
$r = q("SELECT item.parent AS item_id from item
WHERE uid = %d
and parent_mid = '%s'
@@ -291,10 +282,8 @@ class Display extends \Zotlabs\Web\Controller {
}
if($r) {
-
$parents_str = ids_to_querystr($r,'item_id');
if($parents_str) {
-
$items = q("SELECT item.*, item.id AS item_id
FROM item
WHERE parent in ( %s ) $item_normal ",
@@ -305,7 +294,8 @@ class Display extends \Zotlabs\Web\Controller {
$items = fetch_post_tags($items,true);
$items = conv_sort($items,'created');
}
- } else {
+ }
+ else {
$items = array();
}
@@ -327,11 +317,9 @@ class Display extends \Zotlabs\Web\Controller {
$o .= '<div id="content-complete"></div>';
-
if((($update && $load) || $checkjs->disabled()) && (! $items)) {
- $r = q("SELECT id, item_flags FROM item WHERE id = '%s' OR mid = '%s' LIMIT 1",
- dbesc($item_hash),
+ $r = q("SELECT id, item_deleted FROM item WHERE mid = '%s' LIMIT 1",
dbesc($item_hash)
);
if($r) {
@@ -351,6 +339,5 @@ class Display extends \Zotlabs\Web\Controller {
return $o;
}
-
-
+
}
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index eb31841ed..e49c34666 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -509,7 +509,7 @@ class Channel {
'$expire' => array('expire',t('Expire other channel content after this many days'),$expire, t('0 or blank to use the website limit.') . ' ' . ((intval($sys_expire)) ? sprintf( t('This website expires after %d days.'),intval($sys_expire)) : t('This website does not expire imported content.')) . ' ' . t('The website limit takes precedence if lower than your limit.')),
'$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')),
- '$permissions' => t('Default Access Control List (ACL)'),
+ '$permissions' => t('Default Privacy Group'),
'$permdesc' => t("\x28click to open/close\x29"),
'$aclselect' => populate_acl($perm_defaults, false, \Zotlabs\Lib\PermissionDescription::fromDescription(t('Use my default audience setting for the type of object published'))),
'$allow_cid' => acl2json($perm_defaults['allow_cid']),