From 6abcbdd78d28ee514e05b353ba7e66e43a7b04b8 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 21 Oct 2017 03:04:29 +0100 Subject: [PATCH] lib/php/nb.php --- bin/dbq | 1 + lib/php/db/page.php | 9 ++++++--- lib/php/nb.php | 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/dbq b/bin/dbq index 895373e0..707673d1 100755 --- a/bin/dbq +++ b/bin/dbq @@ -112,6 +112,7 @@ if ($ENV{$UC_NAME.'_PARAMS'}) { my $url = ($ENV{$UC_NAME.'_URL'} ? $ENV{$UC_NAME.'_URL'} : ( -e $ROOT_DIR.'/lib/php/db/dbq.php' ? $ROOT_DIR.'/lib/php/db/dbq.php' : '' ) ); + if (!$Opt{ssh} and @ARGV and ($ARGV[0] =~ m|^\w+://| or -e $ARGV[0] )) { $url = shift @ARGV; @EXEC = grep {$_ ne $url} @EXEC; diff --git a/lib/php/db/page.php b/lib/php/db/page.php index 2f69c69e..16f771f8 100644 --- a/lib/php/db/page.php +++ b/lib/php/db/page.php @@ -16,10 +16,13 @@ $Page = new Page([ ], 'content_type' => Page::content_type_and_set_format(), 'nav' => [ - [ (!empty($Db) and !empty($Db->title)) ? $Db->title : 'Home', '/'], - ( (!empty($Table) and !empty($Table->name)) ? [Page::prettyText($Table->name),Page::path().'?table='.urlencode($Table->name)] : '' ), - ( Page::p('action') ? Page::prettyText(Page::p('action')) : '' ), + [ 'Home', '/' ] ], +# NB 21.10.17 '_nav' => [ +# NB 21.10.17 [ (!empty($Db) and !empty($Db->title)) ? $Db->title : 'Home', '/'], +# NB 21.10.17 ( (!empty($Table) and !empty($Table->name)) ? [Page::prettyText($Table->name),Page::path().'?table='.urlencode($Table->name)] : '' ), +# NB 21.10.17 ( Page::p('action') ? Page::prettyText(Page::p('action')) : '' ), +# NB 21.10.17 ], 'call' => array( 'begin', #['out', "Hello World !!!\n"], diff --git a/lib/php/nb.php b/lib/php/nb.php index c5982dd8..24cadcaf 100644 --- a/lib/php/nb.php +++ b/lib/php/nb.php @@ -4,8 +4,7 @@ if (!defined('NB_PROD') and defined('PRODUCTION')) define('NB_PROD',PRODUCTION); if (!defined('NB_EOL')) define('NB_EOL',(defined('NB_PROD') and NB_PROD) ? '' : "\n"); # use _GET instead of _REQUEST -# if (!defined('NB_P_GET')) -define('NB_P_GET',false); +if (!defined('NB_P_GET')) define('NB_P_GET',false); require_once(NB_ROOT.'/lib/php/functions.php'); -- 2.47.3