Some functions rewritten to hungarian notation, handling of array rewritten
[mailer.git] / inc / modules / guest / what-beg.php
index 81828860660ae6d65bd0dbaccdce80f2fb0d976b..d61d0d067122c8d156bc5a5e91e4d31567e4a354 100644 (file)
@@ -36,30 +36,30 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
-       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
+       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
        return;
 }
 
 // Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
 
 // Prepare constants
-define('__BEG_POINTS'    , TRANSLATE_COMMA($_CONFIG['beg_points']));
-define('__BEG_POINTS_MAX', TRANSLATE_COMMA($_CONFIG['beg_points_max']));
+define('__BEG_POINTS'    , TRANSLATE_COMMA(getConfig('beg_points')));
+define('__BEG_POINTS_MAX', TRANSLATE_COMMA(getConfig('beg_points_max')));
 if ($GLOBALS['refid'] > 0) {
-       // Take referral ID from URL/Cookie
-       define('__BEG_UID'       , $ref);
+       // Take referal ID from URL/Cookie
+       define('__BEG_UID'       , $GLOBALS['refid']);
 } else {
-       // Take default referral ID
-       define('__BEG_UID'       , $_CONFIG['def_refid']);
+       // Take default referal ID
+       define('__BEG_UID'       , getConfig('def_refid'));
 }
 
 if (function_exists('CREATE_FANCY_TIME')) {
-       define('__BEG_TIMEOUT'    , CREATE_FANCY_TIME($_CONFIG['beg_timeout']));
-       define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME($_CONFIG['beg_uid_timeout']));
+       define('__BEG_TIMEOUT'    , CREATE_FANCY_TIME(getConfig('beg_timeout')));
+       define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME(getConfig('beg_uid_timeout')));
 } else {
-       define('__BEG_TIMEOUT '   , round($_CONFIG['beg_timeout']     / 60)." ".MINUTES);
-       define('__BEG_UID_TIMEOUT', round($_CONFIG['beg_uid_timeout'] / 60)." ".MINUTES);
+       define('__BEG_TIMEOUT '   , round(getConfig('beg_timeout')     / 60)." ".MINUTES);
+       define('__BEG_UID_TIMEOUT', round(getConfig('beg_uid_timeout') / 60)." ".MINUTES);
 }
 
 // Load final template