more nav_set_selected apps

This commit is contained in:
git-marijus 2017-07-21 22:36:47 +02:00
parent 1bdcfe5219
commit 27678a523c
6 changed files with 9 additions and 6 deletions

View File

@ -30,6 +30,8 @@ class Connections extends \Zotlabs\Web\Controller {
return login(); return login();
} }
nav_set_selected(t('Connections'));
$blocked = false; $blocked = false;
$hidden = false; $hidden = false;
$ignored = false; $ignored = false;
@ -71,7 +73,6 @@ class Connections extends \Zotlabs\Web\Controller {
$search_flags = " and abook_pending = 1 "; $search_flags = " and abook_pending = 1 ";
$head = t('New'); $head = t('New');
$pending = true; $pending = true;
nav_set_selected('intros');
break; break;
case 'ifpending': case 'ifpending':
$r = q("SELECT COUNT(abook.abook_id) AS total FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and abook_pending = 1 and abook_self = 0 and abook_ignored = 0 and xchan_deleted = 0 and xchan_orphan = 0 ", $r = q("SELECT COUNT(abook.abook_id) AS total FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and abook_pending = 1 and abook_self = 0 and abook_ignored = 0 and xchan_deleted = 0 and xchan_orphan = 0 ",
@ -81,7 +82,6 @@ class Connections extends \Zotlabs\Web\Controller {
$search_flags = " and abook_pending = 1 "; $search_flags = " and abook_pending = 1 ";
$head = t('New'); $head = t('New');
$pending = true; $pending = true;
nav_set_selected('intros');
\App::$argv[1] = 'pending'; \App::$argv[1] = 'pending';
} }
else { else {
@ -91,7 +91,6 @@ class Connections extends \Zotlabs\Web\Controller {
\App::$argc = 1; \App::$argc = 1;
unset(\App::$argv[1]); unset(\App::$argv[1]);
} }
nav_set_selected('intros');
break; break;
// case 'unconnected': // case 'unconnected':
// $search_flags = " and abook_unconnected = 1 "; // $search_flags = " and abook_unconnected = 1 ";

View File

@ -77,7 +77,7 @@ class Directory extends \Zotlabs\Web\Controller {
$pubforums = get_directory_setting($observer, 'pubforums'); $pubforums = get_directory_setting($observer, 'pubforums');
$o = ''; $o = '';
nav_set_selected('directory'); nav_set_selected(t('Directory'));
if(x($_POST,'search')) if(x($_POST,'search'))
$search = notags(trim($_POST['search'])); $search = notags(trim($_POST['search']));

View File

@ -272,7 +272,7 @@ class Events extends \Zotlabs\Web\Controller {
return; return;
} }
nav_set_selected('all_events'); nav_set_selected(t('Events'));
if((argc() > 2) && (argv(1) === 'ignore') && intval(argv(2))) { if((argc() > 2) && (argv(1) === 'ignore') && intval(argv(2))) {
$r = q("update event set dismissed = 1 where id = %d and uid = %d", $r = q("update event set dismissed = 1 where id = %d and uid = %d",

View File

@ -15,7 +15,7 @@ require_once('include/help.php');
class Help extends \Zotlabs\Web\Controller { class Help extends \Zotlabs\Web\Controller {
function get() { function get() {
nav_set_selected('help'); nav_set_selected(t('Help'));
if($_REQUEST['search']) { if($_REQUEST['search']) {
$o .= '<div id="help-content" class="generic-content-wrapper">'; $o .= '<div id="help-content" class="generic-content-wrapper">';

View File

@ -555,6 +555,8 @@ class Photos extends \Zotlabs\Web\Controller {
$sql_extra = permissions_sql($owner_uid,get_observer_hash(),'photo'); $sql_extra = permissions_sql($owner_uid,get_observer_hash(),'photo');
$sql_attach = permissions_sql($owner_uid,get_observer_hash(),'attach'); $sql_attach = permissions_sql($owner_uid,get_observer_hash(),'attach');
nav_set_selected(t('Photos'));
$o = ""; $o = "";
$o .= "<script> var profile_uid = " . \App::$profile['profile_uid'] $o .= "<script> var profile_uid = " . \App::$profile['profile_uid']

View File

@ -244,6 +244,8 @@ class Browser extends DAV\Browser\Plugin {
$a = false; $a = false;
nav_set_selected(t('Files'));
\App::$page['content'] = $html; \App::$page['content'] = $html;
load_pdl(); load_pdl();