X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=5dde76d70ff69b904af45f5c951adead74aa4139;hb=522104747cdf407729cdff7c51157e12607207af;hp=6266dbed5b6112d9bbbeb0693bfa90f051812ba2;hpb=8e1fd7e3be3811cb108a074bece2eecd5bcced8f;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 6266dbed5b..5dde76d70f 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -17,7 +17,7 @@ * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -311,7 +311,7 @@ function isInstalling () { // Determine wether we are installing if (!isset($GLOBALS['mailer_installing'])) { // Check URL (css.php/js.php need this) - $GLOBALS['mailer_installing'] = isGetRequestParameterSet('installing'); + $GLOBALS['mailer_installing'] = isGetRequestElementSet('installing'); } // END - if // Return result @@ -540,9 +540,9 @@ function removeFile ($FQFN) { // Wrapper for $_POST['sel'] function countPostSelection ($element = 'sel') { // Is it set? - if (isPostRequestParameterSet($element)) { + if (isPostRequestElementSet($element)) { // Return counted elements - return countSelection(postRequestParameter($element)); + return countSelection(postRequestElement($element)); } else { // Return zero if not found return 0; @@ -674,7 +674,7 @@ function isModuleSet ($strict = false) { // Should we abort here? if (($strict === true) && ($isset === false)) { // Output backtrace - debug_report_bug(__FUNCTION__, __LINE__, 'module is empty.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Module is empty.'); } // END - if // Return it @@ -740,8 +740,8 @@ function isBlockModeEnabled () { } /** - * Wrapper function for addPointsThroughReferalSystem(), you should generally - * avoid this function and use addPointsThroughReferalSystem() directly and add + * Wrapper function for addPointsThroughReferralSystem(), you should generally + * avoid this function and use addPointsThroughReferralSystem() directly and add * your special payment method entry to points_data instead. * * @param $subject A string-encoded subject for this add @@ -751,10 +751,10 @@ function isBlockModeEnabled () { */ function addPointsDirectly ($subject, $userid, $points) { // Reset level here - initReferalSystem(); + initReferralSystem(); // Call more complicated method (due to more parameters) - return addPointsThroughReferalSystem($subject, $userid, $points, false, 0, 'DIRECT'); + return addPointsThroughReferralSystem($subject, $userid, $points, false, 0, 'DIRECT'); } // Wrapper for redirectToUrl but URL comes from a configuration entry @@ -1523,11 +1523,11 @@ function isWhatTitleEnabled () { } // Checks wether stats are enabled -function ifStatsAreEnabled () { +function ifInternalStatsEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { // Then determine it - $GLOBALS[__FUNCTION__] = (getConfig('stats_enabled') == 'Y'); + $GLOBALS[__FUNCTION__] = (getConfig('internal_stats') == 'Y'); } // END - if // Return cached value @@ -1546,8 +1546,8 @@ function isAdminNotificationEnabled () { return $GLOBALS[__FUNCTION__]; } -// Checks wether random referal id selection is enabled -function isRandomReferalIdEnabled () { +// Checks wether random referral id selection is enabled +function isRandomReferralIdEnabled () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it @@ -1570,7 +1570,7 @@ function getDefaultLanguage () { return $GLOBALS[__FUNCTION__]; } -// "Getter" for default referal id +// "Getter" for default referral id function getDefRefid () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { @@ -1678,12 +1678,12 @@ function getPrime () { return $GLOBALS[__FUNCTION__]; } -// "Getter" for encrypt_seperator -function getEncryptSeperator () { +// "Getter" for encrypt_separator +function getEncryptSeparator () { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = getConfig('ENCRYPT_SEPERATOR'); + $GLOBALS[__FUNCTION__] = getConfig('ENCRYPT_SEPARATOR'); } // END - if // Return cache @@ -2475,7 +2475,7 @@ function ifPostContainsSelections ($element = 'sel') { // Do we have cache? if (!isset($GLOBALS[__FUNCTION__][$element])) { // Determine it - $GLOBALS[__FUNCTION__][$element] = ((isPostRequestParameterSet($element)) && (countPostSelection($element) > 0)); + $GLOBALS[__FUNCTION__][$element] = ((isPostRequestElementSet($element)) && (countPostSelection($element) > 0)); } // END - if // Return cache @@ -2539,6 +2539,18 @@ function isDirectPaymentEnabled () { return $GLOBALS[__FUNCTION__]; } +// Checks wether JavaScript-based admin menu is enabled +function isAdminMenuJavascriptEnabled () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('sql_patches', '0.8.7')) && (getConfig('admin_menu_javascript') == 'Y')); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Wrapper to check if current task is for extension (not update) function isExtensionTask ($content) { // Do we have cache? @@ -2629,10 +2641,10 @@ function createConfigurationTimeSelections ($configEntry, $stamps, $align = 'cen // Shortens converting of German comma to Computer's version in POST data function convertCommaToDotInPostData ($postEntry) { // Read and convert given entry - $postValue = convertCommaToDot(postRequestParameter($postEntry)); + $postValue = convertCommaToDot(postRequestElement($postEntry)); // ... and set it again - setPostRequestParameter($postEntry, $postValue); + setPostRequestElement($postEntry, $postValue); } // Converts German commas to Computer's version in all entries @@ -2640,7 +2652,7 @@ function convertCommaToDotInPostDataArray ($postEntries) { // Replace german decimal comma with computer decimal dot foreach ($postEntries as $entry) { // Is the entry there? - if (isPostRequestParameterSet($entry)) { + if (isPostRequestElementSet($entry)) { // Then convert it convertCommaToDotInPostData($entry); } // END - if @@ -2664,9 +2676,9 @@ function parseFloat ($floatString){ } // Generates a YES/NO option list from given default -function generateYesNoOptionList ($configValue = '') { +function generateYesNoOptionList ($defaultValue = '') { // Generate it - return generateOptionList('/ARRAY/', array('Y', 'N'), array('{--YES--}', '{--NO--}'), $configValue); + return generateOptionList('/ARRAY/', array('Y', 'N'), array('{--YES--}', '{--NO--}'), $defaultValue); } // "Getter" for total available receivers