From: Roland Häder Date: Fri, 5 Dec 2008 18:54:03 +0000 (+0000) Subject: More fixes from profi-concept for extension loading, guest/member menu and smaller... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3c4fbc22e3c04348734182d4d29bfef7eb050aa6;p=mailer.git More fixes from profi-concept for extension loading, guest/member menu and smaller issues --- diff --git a/inc/databases.php b/inc/databases.php index ad12324fb3..1419c54ffb 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "598"); +define('CURR_SVN_REVISION', "599"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 221e75955f..7b6f3fc915 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -291,7 +291,7 @@ function SQL_ESCAPE($str, $secureString=true,$strip=true) { //* DEBUG: */ print __FUNCTION__."(".__LINE__."):str={$str}
\n"; return mysql_real_escape_string($str, $link); } elseif (function_exists('mysql_escape_string')) { - // The obsulete function + // The obsolete function return mysql_escape_string($str, $link); } else { // If nothing else works diff --git a/inc/load_extensions.php b/inc/load_extensions.php index 8d69d37d79..e7d7e0b900 100644 --- a/inc/load_extensions.php +++ b/inc/load_extensions.php @@ -36,7 +36,8 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } -// + +// Init variables global $EXT_CSS_FILES; $EXT_CSS_FILES = array(); $ADD = ""; @@ -69,12 +70,20 @@ if (EXT_IS_ACTIVE("cache")) { } // Do not recreate cache file when it's switched off! - if (($cacheMode == "init") && ($_CONFIG['cache_exts'] == "N")) $cacheMode = "skip"; + + // If we need to init the cache init it now + if ($cacheMode == "init") { + // Init cache file + $cacheInstance->cache_init("EXTENSIONS"); + + if ($_CONFIG['cache_exts'] == "N") $cacheMode = "skip"; + } // END - if } else { // Cache extension not active $cacheMode = "no"; } +// Load cache? if ($cacheMode == "load") { // Init include array $EXT_POOL = array(); @@ -166,8 +175,9 @@ if ($cacheMode == "load") { // Remove array unset($EXT_POOL); } else { - // If current user is not admin load only activated extensions - // The admin shall use every available extension for testing purposes + // If current user is not admin load only activated extensions. But load + // them all if we are going to init the cache files. The admin shall use + // every available extension for testing purposes. if ((!IS_ADMIN()) && ($cacheMode != "init")) $ADD = " WHERE ext_active='Y'"; if (GET_EXT_VERSION("sql_patches") >= "0.0.6") { @@ -176,7 +186,7 @@ if ($cacheMode == "load") { FROM "._MYSQL_PREFIX."_extensions".$ADD." ORDER BY ext_name", __FILE__, __LINE__); } else { - // Old obsulete query string + // Old obsolete query string $res_ext_crt = SQL_QUERY("SELECT id, ext_name, ext_lang_file, ext_name, ext_active, ext_version FROM "._MYSQL_PREFIX."_extensions".$ADD." ORDER BY ext_name", __FILE__, __LINE__); @@ -187,13 +197,10 @@ ORDER BY ext_name", __FILE__, __LINE__); $DEL = array(); // At least one found? -if ((SQL_NUMROWS($res_ext_crt) > 0) && (($cacheMode == "init") || ($cacheMode == "no")) && ($CSS != "1") && ($CSS != "-1")) { +if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($cacheMode == "init") && ($CSS != "1") && ($CSS != "-1")) || ($cacheMode == "no"))) { // Load theme management require_once(PATH."inc/theme-manager.php"); - // If we need to init the cache init it now - if ($cacheMode == "init") $cacheInstance->cache_init("EXTENSIONS"); - // Extensions are registered so we load them while (list($EXT_ID, $name, $lang, $css, $active, $version) = SQL_FETCHROW($res_ext_crt)) { // Get menu entry diff --git a/inc/modules/guest/action- b/inc/modules/guest/action- index c5c60dbc49..a31675b174 100644 --- a/inc/modules/guest/action- +++ b/inc/modules/guest/action- @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("")) { +} elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, ""); return; } elseif ($BLOCK_MODE) { diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index 07fbcec63b..c7acfbbab8 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("online")) { +} elseif ((!EXT_IS_ACTIVE("online")) && (!IS_ADMIN())) { // Just skip this extension return; } diff --git a/inc/modules/guest/action-sponsor.php b/inc/modules/guest/action-sponsor.php index 2cd8983eda..1b7b18db34 100644 --- a/inc/modules/guest/action-sponsor.php +++ b/inc/modules/guest/action-sponsor.php @@ -34,7 +34,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("sponsor")) { +} elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); return; } elseif ($BLOCK_MODE) { diff --git a/inc/modules/guest/action-themes.php b/inc/modules/guest/action-themes.php index 522158d0ab..e0b248c952 100644 --- a/inc/modules/guest/action-themes.php +++ b/inc/modules/guest/action-themes.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("theme")) { +} elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme"); return; } diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index cc5774b0e0..69a16d1de0 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("active")) { +} elseif ((!EXT_IS_ACTIVE("active")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "active"); return; } @@ -43,25 +43,24 @@ if (!defined('__SECURITY')) { // Add description as navigation point ADD_DESCR("guest", __FILE__); -// The day normally starts on 00:00:00, so let's subtract current hours/minutes/seconds from current time stamp! -$START = time() - date("H", time())*60*60 - date("m", time())*60 - date("s", time()); - -// Check for members who were active only this day +// Extra field to include is by default uid $ADD = "uid"; + +// If nickname is installed the extra field is the nickname of the user if (EXT_IS_ACTIVE("nickname")) $ADD = "nickname"; +// Check for members who were active only this day $result = SQL_QUERY_ESC("SELECT userid, ".$ADD.", last_online FROM "._MYSQL_PREFIX."_user_data WHERE last_online >= %s AND status='CONFIRMED' ORDER BY last_online DESC LIMIT %s", - array($START, $_CONFIG['active_limit']), __FILE__, __LINE__); + array(START_TDAY, $_CONFIG['active_limit']), __FILE__, __LINE__); -if (SQL_NUMROWS($result) > 0) -{ +// Entries found? +if (SQL_NUMROWS($result) > 0) { // At least one member was online so let's load them all $OUT = ""; $SW = 2; - while(list($uid, $nick, $last) = SQL_FETCHROW($result)) - { + while(list($uid, $nick, $last) = SQL_FETCHROW($result)) { $nick2 = "---"; if (($nick != $uid) && (!empty($nick))) $nick2 = $nick; @@ -80,9 +79,7 @@ if (SQL_NUMROWS($result) > 0) // Switch colors $SW = 3 - $SW; } -} - else -{ +} else { // No member was online today! :-( $OUT = LOAD_TEMPLATE("guest_active_none_row", true); } diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index bf86a824a3..4d627db775 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("beg")) { +} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); return; } diff --git a/inc/modules/guest/what-doubler.php b/inc/modules/guest/what-doubler.php index bb53c0656b..aea44a2132 100644 --- a/inc/modules/guest/what-doubler.php +++ b/inc/modules/guest/what-doubler.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("doubler")) { +} elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler"); return; } diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index 36a08cea70..987746d2a1 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("mediadata")) { +} elseif ((!EXT_IS_ACTIVE("mediadata")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "mediadata"); return; } diff --git a/inc/modules/guest/what-rallyes.php b/inc/modules/guest/what-rallyes.php index 680f16125d..4c8acf31c0 100644 --- a/inc/modules/guest/what-rallyes.php +++ b/inc/modules/guest/what-rallyes.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("rallye")) { +} elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye"); return; } diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index 8536854d67..f4e0c86e2f 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("top10")) { +} elseif ((!EXT_IS_ACTIVE("top10")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "top10"); return; } diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index 0cb400b6cb..c891089b7e 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("wernis")) { +} elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis"); return; } diff --git a/inc/modules/index.php b/inc/modules/index.php index 1ac4b99122..fb602ae722 100644 --- a/inc/modules/index.php +++ b/inc/modules/index.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("sql_patches", true)) { +} elseif ((!EXT_IS_ACTIVE("sql_patches", true)) && (!IS_ADMIN())) { // The extension "sql_patches" *MUST* be activated or you have lot's of problems! LOAD_URL("modules.php?module=admin"); } diff --git a/inc/modules/member/action- b/inc/modules/member/action- index 171ebea3ad..9f305f19f2 100644 --- a/inc/modules/member/action- +++ b/inc/modules/member/action- @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_LOGGED_IN()) { LOAD_URL(URL."/modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("")) { +} elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, ""); return; } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-bank.php b/inc/modules/member/action-bank.php index 459b46d176..d334432548 100644 --- a/inc/modules/member/action-bank.php +++ b/inc/modules/member/action-bank.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("bank")) { +} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-order.php b/inc/modules/member/action-order.php index 5b1492cab3..b546a774da 100644 --- a/inc/modules/member/action-order.php +++ b/inc/modules/member/action-order.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("order")) { +} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); return; } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-surfbar.php b/inc/modules/member/action-surfbar.php index f1f864698d..a32c590700 100644 --- a/inc/modules/member/action-surfbar.php +++ b/inc/modules/member/action-surfbar.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL(URL."/modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("surfbar")) { +} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index 493833f320..3b395570bb 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("theme")) { +} elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme"); return; } diff --git a/inc/modules/member/what-bank_create.php b/inc/modules/member/what-bank_create.php index 5d50ac7dda..fc9288fe53 100644 --- a/inc/modules/member/what-bank_create.php +++ b/inc/modules/member/what-bank_create.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("bank")) { +} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } elseif (!IS_MEMBER()) { diff --git a/inc/modules/member/what-bank_deposit.php b/inc/modules/member/what-bank_deposit.php index 9316759fe2..7012c64f82 100644 --- a/inc/modules/member/what-bank_deposit.php +++ b/inc/modules/member/what-bank_deposit.php @@ -4,7 +4,7 @@ * ================ Last change: 01/07/2004 * * * * -------------------------------------------------------------------- * - * File : what- * + * File : what-bank_deposit.php * * -------------------------------------------------------------------- * * Short description : * * -------------------------------------------------------------------- * @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("bank")) { +} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } diff --git a/inc/modules/member/what-bank_infos.php b/inc/modules/member/what-bank_infos.php index 9316759fe2..c622b560df 100644 --- a/inc/modules/member/what-bank_infos.php +++ b/inc/modules/member/what-bank_infos.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("bank")) { +} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } diff --git a/inc/modules/member/what-bank_output.php b/inc/modules/member/what-bank_output.php index 9316759fe2..c622b560df 100644 --- a/inc/modules/member/what-bank_output.php +++ b/inc/modules/member/what-bank_output.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("bank")) { +} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } diff --git a/inc/modules/member/what-bank_withdraw.php b/inc/modules/member/what-bank_withdraw.php index 9316759fe2..c622b560df 100644 --- a/inc/modules/member/what-bank_withdraw.php +++ b/inc/modules/member/what-bank_withdraw.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("bank")) { +} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index 70af3d4e2c..8cd19555c8 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("beg")) { +} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); return; } diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index 1c9ecfdc69..d3ce12bbc0 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); -} elseif (!EXT_IS_ACTIVE("beg")) { +} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); return; } diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index 9d340d18e7..324fbda0e5 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); -} elseif (!EXT_IS_ACTIVE("bonus")) { +} elseif ((!EXT_IS_ACTIVE("bonus")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus"); return; } diff --git a/inc/modules/member/what-doubler.php b/inc/modules/member/what-doubler.php index e746259a2d..cdb130df20 100644 --- a/inc/modules/member/what-doubler.php +++ b/inc/modules/member/what-doubler.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); -} elseif (!EXT_IS_ACTIVE("doubler")) { +} elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler"); return; } diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index 4cbbc22cad..0a840a1882 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("holiday")) { +} elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "holiday"); return; } diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 545aa1d375..6944df8968 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("html_mail")) { +} elseif ((!EXT_IS_ACTIVE("html_mail")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "html_mail"); return; } diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 8213cb1644..b8e685fb5d 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("mydata")) { +} elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "mydata"); return; } diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index e6d343d55d..efe6475d10 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("newsletter")) { +} elseif ((!EXT_IS_ACTIVE("newsletter")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "newsletter"); return; } diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index 038010f054..251fe238da 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("nickname")) { +} elseif ((!EXT_IS_ACTIVE("nickname")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "nickname"); return; } diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 5a45378a5b..ea88b93e1b 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("order")) { +} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); return; } diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 1c81b69455..2ad39b14f0 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { // Not logged in LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("payout")) { +} elseif ((!EXT_IS_ACTIVE("payout")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "payout"); return; } diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index 746f59e376..86a8b09d3e 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { // User is not logged in LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("primera")) { +} elseif ((!EXT_IS_ACTIVE("primera")) && (!IS_ADMIN())) { // Extension "primera" is not activated ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "primera"); return; diff --git a/inc/modules/member/what-rallyes.php b/inc/modules/member/what-rallyes.php index 375699d181..0f8fcc58fe 100644 --- a/inc/modules/member/what-rallyes.php +++ b/inc/modules/member/what-rallyes.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("rallye")) { +} elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye"); return; } diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index a3e61a45a1..eac8db386d 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { // User is not logged in LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("refback")) { +} elseif ((!EXT_IS_ACTIVE("refback")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "refback"); return; } diff --git a/inc/modules/member/what-sponsor.php b/inc/modules/member/what-sponsor.php index 059429d87f..6a39e181a6 100644 --- a/inc/modules/member/what-sponsor.php +++ b/inc/modules/member/what-sponsor.php @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL(URL."/modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("sponsor")) { +} elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); return; } diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index bf9dda5e2f..1e8980809e 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()){ LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("support")) { +} elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "support"); return; } diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index b81c7d785c..c10c6cdd8f 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { // Redirect LOAD_URL(URL."/modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("surfbar")) { +} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php index 243d4800b5..b9b9df87dd 100644 --- a/inc/modules/member/what-surfbar_list.php +++ b/inc/modules/member/what-surfbar_list.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL(URL."/modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("surfbar")) { +} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } diff --git a/inc/modules/member/what-surfbar_start.php b/inc/modules/member/what-surfbar_start.php index 7e2f7036bb..9fb9095794 100644 --- a/inc/modules/member/what-surfbar_start.php +++ b/inc/modules/member/what-surfbar_start.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { // Not logged in LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("surfbar")) { +} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } diff --git a/inc/modules/member/what-surfbar_stats.php b/inc/modules/member/what-surfbar_stats.php index 38ae863068..a1d6f979e3 100644 --- a/inc/modules/member/what-surfbar_stats.php +++ b/inc/modules/member/what-surfbar_stats.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL(URL."/modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("surfbar")) { +} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index ecce7b10fc..5e6a5fcfc7 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("theme")) { +} elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme"); return; } diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 6698a42def..aa9062a243 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("transfer")) { +} elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "transfer"); return; } diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index 91725bf67d..f381e43224 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("mailid")) { +} elseif ((!EXT_IS_ACTIVE("mailid")) && (!IS_ADMIN())) { LOAD_URL("modules.php?module=login"); } diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 227d5031a0..b74c42a53b 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { // User is not logged in LOAD_URL("modules.php?module=index"); -} elseif (!EXT_IS_ACTIVE("wernis")) { +} elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis"); return; } diff --git a/inc/modules/order.php b/inc/modules/order.php index a880995003..6e52c0745d 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -36,7 +36,7 @@ $URL = ""; if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("order")) { +} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); return; } elseif (!IS_MEMBER()) { diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 2aa4d8b771..ef0072bff8 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -972,7 +972,8 @@ function GET_ACTION ($MODE, &$wht) // Return action value return $ret; } -// + +// Get category name back function GET_CATEGORY ($cid) { // Default is not found $ret = _CATEGORY_404; @@ -997,7 +998,8 @@ function GET_CATEGORY ($cid) { // Return result return $ret; } -// + +// Get a string of "mail title" and price back function GET_PAYMENT ($pid, $full=false) { // Default is not found $ret = _PAYMENT_404; @@ -1023,7 +1025,8 @@ function GET_PAYMENT ($pid, $full=false) { // Return result return $ret; } -// + +// Get (basicly) the price of given payment id function GET_PAY_POINTS($pid, $lookFor="price") { $ret = "-1"; @@ -1037,8 +1040,9 @@ function GET_PAY_POINTS($pid, $lookFor="price") } return $ret; } + // Remove a receiver's ID from $ARRAY and add a link for him to confirm -function REMOVE_RECEIVER(&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=false) +function REMOVE_RECEIVER (&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=false) { $ret = "failed"; if ($uid > 0) @@ -1405,7 +1409,7 @@ WHERE sid='%s' LIMIT 1", $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_online WHERE timestamp <= (UNIX_TIMESTAMP() - %s)", array($_CONFIG['online_timeout']), __FILE__, __LINE__); } -// OBSULETE: Sends out mail to all administrators +// OBSOLETE: Sends out mail to all administrators function SEND_ADMIN_EMAILS ($subj, $msg) { // Load all admin email addresses $result = SQL_QUERY("SELECT email FROM "._MYSQL_PREFIX."_admins ORDER BY id ASC", __FILE__, __LINE__);