From: Roland Häder Date: Fri, 5 Nov 2010 01:18:28 +0000 (+0000) Subject: Rewritten handling of menu weightning and updating/deleting menu entries except admin... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0544b579eb35a23bf1844a632fa7afd699d3205d;p=mailer.git Rewritten handling of menu weightning and updating/deleting menu entries except admin menu --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 5db8e464b9..4e5d82b850 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -46,13 +46,13 @@ ./inc/functions.php:1593: // @TODO Are these convertions still required? ./inc/functions.php:1611:// @TODO Rewrite this function to use readFromFile() and writeToFile() ./inc/functions.php:181:// @TODO Rewrite this to an extension 'smtp' -./inc/functions.php:2277: // @TODO This is still very static, rewrite it somehow +./inc/functions.php:2271: // @TODO This is still very static, rewrite it somehow ./inc/gen_sql_patches.php:94:// @TODO Rewrite this to a filter ./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInFile(getCachePath() . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0); ./inc/language/de.php:1091:// @TODO Rewrite these two constants ./inc/language/de.php:1106:// @TODO Rewrite these three constants ./inc/language/de.php:286: // @TODO Following two are unused? -./inc/language/de.php:789:// @TODO Are these constants longer used? +./inc/language/de.php:790:// @TODO Are these constants longer used? ./inc/language-functions.php:243: // @TODO These are all valid languages, again hard-coded ./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function. ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no * diff --git a/inc/functions.php b/inc/functions.php index 8394f5f98c..4cd8715360 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2142,19 +2142,13 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad // Remove both for extension name $extName = substr($baseFile, strlen($prefix), -4); - // Is the extension valid and active? - if (isExtensionNameValid($extName)) { - // Then add this file - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extension entry ' . $baseFile . ' added.'); + // Add file with or without base path + if ($addBaseDir === true) { + // With base path $files[] = $fileName; } else { - // Add non-extension files as well - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Regular entry ' . $baseFile . ' added.'); - if ($addBaseDir === true) { - $files[] = $fileName; - } else { - $files[] = $baseFile; - } + // No base path + $files[] = $baseFile; } } else { // We found .php file but should not search for them, why? diff --git a/inc/language/de.php b/inc/language/de.php index e321cf5acf..7c60b04d45 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -646,7 +646,8 @@ addMessages(array( 'GUEST_STATS_YREGISTER' => "Gestrige Anmeldungen", 'GUEST_STATS_INACTIVE' => "Mitgliederstatistik deaktiviert", 'ADMIN_CHANGE_MENUS' => "Ändern", - 'ADMIN_CHANGE_MEMBER_MENU' => "Verdecken, anzeigen, deaktivieren, aktivieren des Mitgliedsmenüs", + 'ADMIN_CHANGE_MEMBER_MENU_TITLE' => "Verdecken, anzeigen, deaktivieren, aktivieren des Mitgliedsmenüs", + 'ADMIN_CHANGE_GUEST_MENU_TITLE' => "Verdecken, anzeigen, deaktivieren, aktivieren des Gastmenüs", 'ADMIN_CHANGE_MENU' => "Ändern von %s Menüeinträgen", 'ADMIN_IS_VISIBLE' => "Wird angezeigt", 'ADMIN_IS_ACTIVE' => "Aktiviert", @@ -856,7 +857,6 @@ addMessages(array( 'CLICK_NOW' => "Hier bestätigen", 'MAILID_LINK' => "Best.-Link", 'UNKNOWN_MAILID_CODE' => "Unbekannter Fehler-Code %s erkannt.", - 'ADMIN_CHANGE_GUEST_MENU_TITLE' => "Verdecken, anzeigen, deaktivieren, aktivieren des Gastmenüs", 'ADMIN_MENU_IS_LOCKED' => "Ist gesperrt", 'ADMIN_REMOVE_STATS_ENTRY' => "Hier klicken, um Mitgliederstatistik zu entfernen.", 'ADMIN_USER_STATS_REMOVED' => "Mitgliederstatistiken entfernt.", diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index cf76c3b12c..0f7b4897f7 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -587,7 +587,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement // Generate a selection box function adminAddMenuSelectionBox ($menu, $type, $name, $default = '') { // Open the requested menu directory - $menuArray = getArrayFromDirectory(sprintf("inc/modules/%s/", $menu), '', false, false); + $menuArray = getArrayFromDirectory(sprintf("inc/modules/%s/", $menu), $type . '-', false, false); // Init the selection box $OUT = '