X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=8d64b2201a3864d6a6b26f8df9f52bef048ad7f7;hb=0cbb56bacbaeed5d2bfd04081c018bda9248071b;hp=48db0063ba2e835b4f1430f1cc3080cb469e0fd5;hpb=33558ce2d6ce99dda5116829ad176f04ebd0b785;p=mailer.git
diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php
index 48db0063ba..8d64b2201a 100644
--- a/inc/mysql-manager.php
+++ b/inc/mysql-manager.php
@@ -46,7 +46,13 @@ function getTitleFromMenu ($mode, $what, $column = 'what', $ADD='') {
// Fix empty 'what'
if (empty($what)) {
$what = getIndexHome();
- } // END - if
+ } elseif ((isGetRequestParameterSet('action')) && ($column == 'what')) {
+ // Get it from action
+ return getTitleFromMenu($mode, getAction(), 'action', $ADD);
+ } elseif ($what == 'overview') {
+ // Overview page
+ return '{--WHAT_IS_OVERVIEW--}';
+ }
// Default is not found
$data['title'] = '??? (' . $what . ')';
@@ -131,11 +137,12 @@ function addYouAreHereLink ($accessLevel, $FQFN, $return = false) {
$GLOBALS['nav_depth'] = '0';
// Run the pre-filter chain
- $ret = runFilterChain('pre_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ''));
+ $ret = runFilterChain('pre_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'search' => $search, 'prefix' => $prefix, 'link_add' => $LINK_ADD, 'content' => '', 'add' => $ADD));
// Add pre-content
$prefix = $ret['content'];
+ // Add default content
$prefix .= '
{--YOU_ARE_HERE--}
Home';
} elseif ($return === false) {
// Count depth
@@ -159,14 +166,16 @@ function addYouAreHereLink ($accessLevel, $FQFN, $return = false) {
if (($type == 'what') || (($type == 'action') && ((!isWhatSet()) || (getWhat() == 'overview')))) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'type=' . $type);
// Add closing div and br-tag
- $OUT .= '
';
$GLOBALS['nav_depth'] = '0';
// Run the post-filter chain
- $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ''));
+ $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'search' => $search, 'prefix' => $prefix, 'link_add' => $LINK_ADD, 'content' => $OUT, 'add' => $ADD));
+
+ // Get content from filter back
+ $OUT = $ret['content'];
- // Add additional content
- $OUT .= $ret['content'];
+ // Close div-tag, so not the filters have to do it
+ $OUT .= '';
} // END - if
} // END - if
@@ -184,7 +193,6 @@ function addYouAreHereLink ($accessLevel, $FQFN, $return = false) {
function addMenu ($mode, $action, $what) {
// Init some variables
$main_cnt = '0';
- $ADD = '';
// is the menu action valid?
if (!isMenuActionValid($mode, $action, $what, true)) {
@@ -192,13 +200,15 @@ function addMenu ($mode, $action, $what) {
} // END - if
// Non-admin shall not see all menus
- if (!isAdmin()) {
- $ADD = " AND `visible`='Y' AND `locked`='N'";
+ $ADD = " AND `visible`='Y' AND `locked`='N'";
+ if (isAdmin()) {
+ // Is admin, so make all visible
+ $ADD = '';
} // END - if
// Load SQL data and add the menu to the output stream...
$result_main = SQL_QUERY_ESC("SELECT
- `title`, `what`, `action`, `visible`, `locked`
+ `title`,`what`,`action`,`visible`,`locked`
FROM
`{?_MYSQL_PREFIX?}_%s_menu`
WHERE
@@ -259,8 +269,14 @@ ORDER BY
$OUT = '';
} // END - if
- // Navigation link
- $OUT .= '