diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-03 19:18:35 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-03 19:18:35 -0700 |
commit | 1d903655afdd8e49942c6d6c9ca1a7feadeaaa82 (patch) | |
tree | 892c93a0a3e434b6e8ff8c04d3d7107cf1e12750 /Zotlabs | |
parent | 0403738981487b7edec20b11a85849254366a202 (diff) | |
parent | a899ce1c22386b9ff882048cba35d46f560ee654 (diff) | |
download | volse-hubzilla-1d903655afdd8e49942c6d6c9ca1a7feadeaaa82.tar.gz volse-hubzilla-1d903655afdd8e49942c6d6c9ca1a7feadeaaa82.tar.bz2 volse-hubzilla-1d903655afdd8e49942c6d6c9ca1a7feadeaaa82.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Daemon/Queue.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Cloud.php | 19 | ||||
-rw-r--r-- | Zotlabs/Module/Display.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Network.php | 3 | ||||
-rw-r--r-- | Zotlabs/Module/Ping.php | 14 | ||||
-rw-r--r-- | Zotlabs/Module/Pubstream.php | 42 |
6 files changed, 64 insertions, 17 deletions
diff --git a/Zotlabs/Daemon/Queue.php b/Zotlabs/Daemon/Queue.php index 11cbe4494..17d150250 100644 --- a/Zotlabs/Daemon/Queue.php +++ b/Zotlabs/Daemon/Queue.php @@ -12,6 +12,7 @@ class Queue { require_once('include/items.php'); require_once('include/bbcode.php'); + if(argc() > 1) $queue_id = argv(1); else diff --git a/Zotlabs/Module/Cloud.php b/Zotlabs/Module/Cloud.php index 75191a279..d2264092b 100644 --- a/Zotlabs/Module/Cloud.php +++ b/Zotlabs/Module/Cloud.php @@ -57,12 +57,21 @@ class Cloud extends \Zotlabs\Web\Controller { $auth->observer = $ob_hash; } + // if we arrived at this path with any query parameters in the url, build a clean url without + // them and redirect. + // @fixme if the filename has an ampersand in it AND there are query parameters, + // this may not do the right thing. + + if((strpos($_SERVER['QUERY_STRING'],'?') !== false) || (strpos($_SERVER['QUERY_STRING'],'&') !== false && strpos($_SERVER['QUERY_STRING'],'&') === false)) { + $path = z_root(); + if(argc()) { + foreach(\App::$argv as $a) { + $path .= '/' . $a; + } + } + goaway($path); + } - $_SERVER['QUERY_STRING'] = str_replace(array('?f=', '&f='), array('', ''), $_SERVER['QUERY_STRING']); - $_SERVER['QUERY_STRING'] = strip_zids($_SERVER['QUERY_STRING']); - - $_SERVER['REQUEST_URI'] = str_replace(array('?f=', '&f='), array('', ''), $_SERVER['REQUEST_URI']); - $_SERVER['REQUEST_URI'] = strip_zids($_SERVER['REQUEST_URI']); $rootDirectory = new \Zotlabs\Storage\Directory('/', $auth); diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php index 85f08fd08..266a5b6bf 100644 --- a/Zotlabs/Module/Display.php +++ b/Zotlabs/Module/Display.php @@ -12,6 +12,8 @@ class Display extends \Zotlabs\Web\Controller { function get($update = 0, $load = false) { + $module_format = 'html'; + if(argc() > 1) { $module_format = substr(argv(1),strrpos(argv(1),'.') + 1); if(! in_array($module_format,['atom','zot','json'])) diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 66032aada..4deb7c9e8 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -533,13 +533,12 @@ class Network extends \Zotlabs\Web\Controller { if($parents_str) { $update_unseen = " AND ( id IN ( " . dbesc($parents_str) . " )"; - $update_unseen .= " AND obj_type != '" . dbesc(ACTIVITY_OBJ_FILE) . "'"; $update_unseen .= " OR ( parent IN ( " . dbesc($parents_str) . " ) AND verb in ( '" . dbesc(ACTIVITY_LIKE) . "','" . dbesc(ACTIVITY_DISLIKE) . "' ))) "; } } else { if($parents_str) { - $update_unseen = " AND parent IN ( " . dbesc($parents_str) . " ) AND obj_type != '" . dbesc(ACTIVITY_OBJ_FILE) . "'"; + $update_unseen = " AND parent IN ( " . dbesc($parents_str) . " )"; } } } diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index c91659f2f..5e2d04c1f 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -169,15 +169,13 @@ class Ping extends \Zotlabs\Web\Controller { $r = q("SELECT * FROM item WHERE uid = %d AND author_xchan != '%s' - AND obj_type != '%s' AND item_unseen = 1 AND created > '" . datetime_convert('UTC','UTC',$_SESSION['static_loadtime']) . "' $item_normal ORDER BY created DESC LIMIT 300", intval($sys['channel_id']), - dbesc(get_observer_hash()), - dbesc(ACTIVITY_OBJ_FILE) + dbesc(get_observer_hash()) ); if($r) { @@ -313,11 +311,9 @@ class Ping extends \Zotlabs\Web\Controller { $r = q("SELECT * FROM item WHERE item_unseen = 1 and uid = %d $item_normal AND author_xchan != '%s' - AND obj_type != '%s' ORDER BY created DESC limit 300", intval(local_channel()), - dbesc($ob_hash), - dbesc(ACTIVITY_OBJ_FILE) + dbesc($ob_hash) ); if($r) { @@ -487,11 +483,9 @@ class Ping extends \Zotlabs\Web\Controller { $r = q("SELECT id, item_wall FROM item WHERE item_unseen = 1 and uid = %d $item_normal - AND author_xchan != '%s' - AND obj_type != '%s'", + AND author_xchan != '%s'", intval(local_channel()), - dbesc($ob_hash), - dbesc(ACTIVITY_OBJ_FILE) + dbesc($ob_hash) ); if($r) { diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php index e83de6bc0..4224fa3c8 100644 --- a/Zotlabs/Module/Pubstream.php +++ b/Zotlabs/Module/Pubstream.php @@ -2,6 +2,7 @@ namespace Zotlabs\Module; require_once('include/conversation.php'); +require_once('include/acl_selectors.php'); class Pubstream extends \Zotlabs\Web\Controller { @@ -33,6 +34,47 @@ class Pubstream extends \Zotlabs\Web\Controller { $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0); $net = ((array_key_exists('net',$_REQUEST)) ? escape_tags($_REQUEST['net']) : ''); + + 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' : ''), + 'default_location' => $channel['channel_location'], + 'nickname' => $channel['channel_address'], + 'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'), + + 'acl' => populate_acl($channel_acl), + 'permissions' => $channel_acl, + 'bang' => '', + 'visitor' => true, + 'profile_uid' => local_channel(), + 'return_path' => 'channel/' . $channel['channel_address'], + 'expanded' => true, + 'editor_autocomplete' => true, + 'bbco_autocomplete' => 'bbcode', + 'bbcode' => true, + 'jotnets' => true + ); + + $o = '<div id="jot-popup">'; + $o .= status_editor($a,$x); + $o .= '</div>'; + } + + + + + if(! $update && !$load) { |