Huge rewrite:
[mailer.git] / inc / modules / member / what-surfbar_book.php
index 6320482153db8a4155e09fef01007e983e21d296..3b11b1a449c389ba85e0fd8d46b4fd6235c57643 100644 (file)
@@ -42,9 +42,9 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_MEMBER()) {
        // Redirect
-       LOAD_URL('modules.php?module=index');
+       redirectToUrl('modules.php?module=index');
 } elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'surfbar'));
+       addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('surfbar'));
        return;
 }
 
@@ -55,7 +55,7 @@ ADD_DESCR('member', __FILE__);
 if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
        // No more URLs allowed to book!
        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_MORE_ALLOWED'));
-} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('limited')))) {
+} elseif ((isFormSent()) && (REQUEST_ISSET_POST(('limited')))) {
        // Is limitation "no" and "limit" is > 0?
        if ((REQUEST_POST('limited') == 'N') && ((REQUEST_ISSET_POST(('limit'))) && (REQUEST_POST('limit') > 0)) || (!REQUEST_ISSET_POST(('limit')))) {
                // Set it to unlimited
@@ -66,21 +66,21 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
        $insertId = SURFBAR_MEMBER_ADD_URL(REQUEST_POST('url'), REQUEST_POST('limit'));
 
        // By default something went wrong
-       $msg = getMessage('MEMBER_SURFBAR_URL_NOT_ADDED');
+       $message = getMessage('MEMBER_SURFBAR_URL_NOT_ADDED');
 
        // Was this fine?
        if ($insertId > 0) {
                // URL added and waiting for unlock
-               $msg = getMessage('MEMBER_SURFBAR_URL_ADDED');
+               $message = getMessage('MEMBER_SURFBAR_URL_ADDED');
        } // END - if
 
        // Load message template
-       LOAD_TEMPLATE('admin_settings_saved', false, $msg);
+       LOAD_TEMPLATE('admin_settings_saved', false, $message);
 } else {
        // Prepare some content
        $content = array(
-               'reward'     => TRANSLATE_COMMA(SURFBAR_DETERMINE_REWARD(true)),
-               'costs'      => TRANSLATE_COMMA(SURFBAR_DETERMINE_COSTS(true)),
+               'reward'     => translateComma(SURFBAR_DETERMINE_REWARD(true)),
+               'costs'      => translateComma(SURFBAR_DETERMINE_COSTS(true)),
                'max_order'  => getConfig('surfbar_max_order'),
                'curr_order' => SURFBAR_GET_TOTAL_USER_URLS()
        );