More variables renamed to , install/admin_WriteData() is now generic (with open TODO)
[mailer.git] / inc / mysql-manager.php
index fa65d85ae598da387404e4f4180840e797719d96..2304e13b9932506d4da3a9bc9ed77ea30fbefadb 100644 (file)
@@ -205,22 +205,23 @@ function CHECK_MODULE ($mod) {
 }
 
 // Add menu description pending on given file name (without path!)
-function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) {
+function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
        global $NAV_DEPTH;
 
-       // Use only filename of the file ;)
-       $file = basename($file);
+       // Use only filename of the FQFN...
+       $file = basename($FQFN);
 
        // Init variables
-       $LINK_ADD = ""; $OUT = ""; $AND = "";
+       $LINK_ADD = "";
+       $OUT = "";
+       $AND = "";
 
        // First we have to do some analysis...
        if (substr($file, 0, 7) == "action-") {
                // This is an action file!
                $type = "action";
                $search = substr($file, 7);
-               switch ($ACC_LVL)
-               {
+               switch ($ACC_LVL) {
                case "admin":
                        $modCheck = "admin";
                        break;
@@ -237,8 +238,7 @@ function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) {
                $type = "what";
                $search = substr($file, 5);
                $AND = "";
-               switch ($ACC_LVL)
-               {
+               switch ($ACC_LVL) {
                case "admin":
                        $modCheck = "admin";
                        break;
@@ -255,17 +255,19 @@ function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) {
                $AND .= " AND `action`='".GET_ACTION($ACC_LVL, $dummy)."'";
        } elseif (($ACC_LVL == "sponsor") || ($ACC_LVL == "engine")) {
                // Sponsor / engine menu
-               $type = "what";
-               $search = $file;
+               $type     = "what";
+               $search   = $file;
                $modCheck = $GLOBALS['module'];
-               $AND = "";
+               $AND      = "";
        } else {
                // Other
-               $type = "menu";
-               $search = $file;
+               $type     = "menu";
+               $search   = $file;
                $modCheck = $GLOBALS['module'];
-               $AND = "";
+               $AND      = "";
        }
+
+       // Begin the navigation line
        if ((!isset($NAV_DEPTH)) && (!$return)) {
                $NAV_DEPTH = 0;
                $prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--}&nbsp;<strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</a></strong>";