X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=8ddbea29c9404486280f61d5c47c56b11b3f0e92;hb=f33497b304b5b1ab26e9b18b141f755bd97fc9c1;hp=10b170f64110536234d35705385dbd168e1d78b9;hpb=efe6057fdb1c02a518172e985298e66accef90d0;p=mailer.git
diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php
index 10b170f641..8ddbea29c9 100644
--- a/inc/mysql-manager.php
+++ b/inc/mysql-manager.php
@@ -132,13 +132,13 @@ function CHECK_MODULE($mod) {
// Check returned values against current access permissions
//
// Admin access ----- Guest access ----- --- Guest or member? ---
- if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_LOGGED_IN())))) {
+ if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_MEMBER())))) {
// If you are admin you are welcome for everything!
$ret = "done";
} elseif ($locked == "Y") {
// Module is locked
$ret = "locked";
- } elseif (($mem == "Y") && (!IS_LOGGED_IN())) {
+ } elseif (($mem == "Y") && (!IS_MEMBER())) {
// You have to login first!
$ret = "mem_only";
} elseif (($admin == "Y") && (!IS_ADMIN())) {
@@ -148,8 +148,8 @@ function CHECK_MODULE($mod) {
// Still no luck or not found?
if (($ret == "major") || ($ret == "cache_miss") || (!$found)) {
- // ----- Legacy module ----- ---- Module in base folder ---- --- Module with extension's name ---
- if ((file_exists(PATH."inc/modules/".$mod.".php")) || (file_exists(PATH.$mod.".php")) || (file_exists(PATH.$extension."/".$mod.".php"))) {
+ // ----- Legacy module ----- ---- Module in base folder ---- --- Module with extension's name ---
+ if ((FILE_READABLE(sprintf("%sinc/modules/%s.php", PATH, $mod))) || (FILE_READABLE(sprintf("%s%s.php", PATH, $mod))) || (FILE_READABLE(sprintf("%s%s/%s.php", PATH, $extension, $mod)))) {
// Data is missing so we add it
if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {
// Since 0.3.6 we have a has_menu column, this took me a half hour
@@ -168,13 +168,13 @@ function CHECK_MODULE($mod) {
if (SQL_AFFECTEDROWS() == 0) {
// Something bad happend!
return "major";
- }
+ } // END - if
// Destroy cache here
if (GET_EXT_VERSION("cache") >= "0.1.2") {
if ($cacheInstance->cache_file("mod_reg", true)) $cacheInstance->cache_destroy();
unset($cacheArray['modules']);
- }
+ } // END - if
// And reload data
$ret = CHECK_MODULE($mod_chk);
@@ -182,7 +182,7 @@ function CHECK_MODULE($mod) {
// Module not found we don't add it to the database
$ret = "404";
}
- }
+ } // END - if
// Return the value
return $ret;
@@ -330,7 +330,7 @@ function ADD_MENU($MODE, $act, $wht) {
// Full file name for checking menu
//* DEBUG: */ echo __LINE__.":!!!!".$sub_what."!!!
\n";
$test_inc = sprintf("%sinc/modules/%s/what-%s.php", PATH, $MODE, $sub_what);
- $test = (file_exists($test_inc) && is_readable($test_inc));
+ $test = (FILE_READABLE($test_inc));
if ($test) {
if ((!empty($wht)) && (($wht == $sub_what))) {
$content = "";
@@ -365,7 +365,7 @@ function ADD_MENU($MODE, $act, $wht) {
// This is a menu block... ;-)
$BLOCK_MODE = true;
$INC_BLOCK = sprintf("%sinc/modules/%s/action-%s.php", PATH, $MODE, $main_action);
- if ((file_exists($INC_BLOCK)) && (is_readable($INC_BLOCK))) {
+ if (FILE_READABLE($INC_BLOCK)) {
// Load include file
if ((!EXT_IS_ACTIVE($main_action)) || ($main_action == "online")) OUTPUT_HTML("