diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-08-22 10:47:40 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-08-22 10:47:40 +0200 |
commit | cc03e1ceefa335f4585f2e587b67481e10ba5c8e (patch) | |
tree | 2e63fbf34f884cbb1c56cece0ab65b255ad1158c | |
parent | e4d08fc5d7ec6e882246217263109dfc9b61bc91 (diff) | |
parent | b25192332ba3b17f1141ff643b3ce2dd4591c528 (diff) | |
download | volse-hubzilla-cc03e1ceefa335f4585f2e587b67481e10ba5c8e.tar.gz volse-hubzilla-cc03e1ceefa335f4585f2e587b67481e10ba5c8e.tar.bz2 volse-hubzilla-cc03e1ceefa335f4585f2e587b67481e10ba5c8e.zip |
Merge remote-tracking branch 'mike/master' into dev
-rw-r--r-- | Zotlabs/Module/Channel.php | 14 | ||||
-rw-r--r-- | Zotlabs/Module/Network.php | 22 | ||||
-rw-r--r-- | Zotlabs/Zot/Finger.php | 2 | ||||
-rw-r--r-- | include/api.php | 5 | ||||
-rw-r--r-- | include/security.php | 2 | ||||
-rwxr-xr-x | view/tpl/profile_advanced.tpl | 2 |
6 files changed, 27 insertions, 20 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index f1ae2f507..9d4c23e4c 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -2,21 +2,23 @@ namespace Zotlabs\Module; -use \App; -require_once('include/contact_widgets.php'); +use App; +use Zotlabs\Web\Controller; +use Zotlabs\Lib\PermissionDescription; + require_once('include/items.php'); -require_once("include/bbcode.php"); require_once('include/security.php'); require_once('include/conversation.php'); require_once('include/acl_selectors.php'); -require_once('include/permissions.php'); + /** * @brief Channel Controller * */ -class Channel extends \Zotlabs\Web\Controller { + +class Channel extends Controller { function init() { @@ -151,7 +153,7 @@ class Channel extends \Zotlabs\Web\Controller { 'default_location' => (($is_owner) ? App::$profile['channel_location'] : ''), 'nickname' => App::$profile['channel_address'], 'lockstate' => (((strlen(App::$profile['channel_allow_cid'])) || (strlen(App::$profile['channel_allow_gid'])) || (strlen(App::$profile['channel_deny_cid'])) || (strlen(App::$profile['channel_deny_gid']))) ? 'lock' : 'unlock'), - 'acl' => (($is_owner) ? populate_acl($channel_acl,true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post') : ''), + 'acl' => (($is_owner) ? populate_acl($channel_acl,true, PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post') : ''), 'permissions' => $channel_acl, 'showacl' => (($is_owner) ? 'yes' : ''), 'bang' => '', diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 77a08585b..ca0ec7844 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -1,6 +1,8 @@ <?php namespace Zotlabs\Module; +use App; + require_once('include/items.php'); require_once('include/group.php'); require_once('include/contact_widgets.php'); @@ -25,8 +27,8 @@ class Network extends \Zotlabs\Web\Controller { goaway('network' . '?f=&' . $network_options); } - $channel = \App::get_channel(); - \App::$profile_uid = local_channel(); + $channel = App::get_channel(); + App::$profile_uid = local_channel(); head_set_icon($channel['xchan_photo_s']); } @@ -34,7 +36,7 @@ class Network extends \Zotlabs\Web\Controller { function get($update = 0, $load = false) { if(! local_channel()) { - $_SESSION['return_url'] = \App::$query_string; + $_SESSION['return_url'] = App::$query_string; return login(false); } @@ -44,11 +46,11 @@ class Network extends \Zotlabs\Web\Controller { $_SESSION['loadtime'] = datetime_convert(); } - $arr = array('query' => \App::$query_string); + $arr = array('query' => App::$query_string); call_hooks('network_content_init', $arr); - $channel = \App::get_channel(); + $channel = App::get_channel(); $item_normal = item_normal(); $item_normal_update = item_normal_update(); @@ -326,10 +328,10 @@ class Network extends \Zotlabs\Web\Controller { $o .= '<div id="live-network"></div>' . "\r\n"; $o .= "<script> var profile_uid = " . local_channel() - . "; var profile_page = " . \App::$pager['page'] + . "; var profile_page = " . App::$pager['page'] . "; divmore_height = " . intval($maxheight) . "; </script>\r\n"; - \App::$page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array( + App::$page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array( '$baseurl' => z_root(), '$pgtype' => 'network', '$uid' => ((local_channel()) ? local_channel() : '0'), @@ -346,7 +348,7 @@ class Network extends \Zotlabs\Web\Controller { '$wall' => '0', '$static' => $static, '$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0), - '$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1), + '$page' => ((App::$pager['page'] != 1) ? App::$pager['page'] : 1), '$search' => (($search) ? $search : ''), '$xchan' => $xchan, '$order' => $order, @@ -417,8 +419,8 @@ class Network extends \Zotlabs\Web\Controller { } else { $itemspage = get_pconfig(local_channel(),'system','itemspage'); - \App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); - $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start'])); + App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); + $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start'])); } // cmin and cmax are both -1 when the affinity tool is disabled diff --git a/Zotlabs/Zot/Finger.php b/Zotlabs/Zot/Finger.php index 348171bdc..559f9657a 100644 --- a/Zotlabs/Zot/Finger.php +++ b/Zotlabs/Zot/Finger.php @@ -55,7 +55,7 @@ class Finger { $r = q("select xchan.*, hubloc.* from xchan left join hubloc on xchan_hash = hubloc_hash - where xchan_addr = '%s' and hubloc_primary = 1 limit 1", + where xchan_addr = '%s' and hubloc_primary = 1 and hubloc_deleted = 0 limit 1", dbesc($xchan_addr) ); diff --git a/include/api.php b/include/api.php index 6a05a40a5..ed5c0d29f 100644 --- a/include/api.php +++ b/include/api.php @@ -127,7 +127,10 @@ require_once('include/api_zot.php'); } } - + + + $x = [ 'path' => App::$query_string ]; + call_hooks('api_not_found',$x); header('HTTP/1.1 404 Not Found'); logger('API call not implemented: ' . App::$query_string . ' - ' . print_r($_REQUEST,true)); diff --git a/include/security.php b/include/security.php index 88988a7c0..ffdd1d7ea 100644 --- a/include/security.php +++ b/include/security.php @@ -370,7 +370,7 @@ function permissions_sql($owner_id, $remote_observer = null, $table = '') { } /** - * @brief Creates an addiontal SQL where statement to check permissions for an item. + * @brief Creates an additional SQL where statement to check permissions for an item. * * @param int $owner_id * @param bool $remote_observer (optional) use current observer if unset diff --git a/view/tpl/profile_advanced.tpl b/view/tpl/profile_advanced.tpl index c56062459..e6653c130 100755 --- a/view/tpl/profile_advanced.tpl +++ b/view/tpl/profile_advanced.tpl @@ -5,7 +5,7 @@ <div class="btn-group"> <button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="profile-like">{{$profile.like_count}} {{$profile.like_button_label}}</button> {{if $profile.likers}} - <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="profile-like">{{foreach $profile.likers as $liker}}<li role="presentation"><a href="{{$liker.url}}"><img class="dropdown-menu-img-xs" src="{{$liker.photo}}" alt="{{$liker.name}}" /> {{$liker.name}}</a></li>{{/foreach}}</ul> + <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="profile-like">{{foreach $profile.likers as $liker}}<li role="presentation"><a href="{{$liker.url}}"><img class="menu-img-1" src="{{$liker.photo}}" alt="{{$liker.name}}" /> {{$liker.name}}</a></li>{{/foreach}}</ul> {{/if}} </div> {{/if}} |