From: quix0r Date: Sat, 1 Dec 2012 15:39:50 +0000 (+0000) Subject: More improvements: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ae5ff91fe758e72325514e5fdd4597a25b3bb7d5;p=mailer.git More improvements: - More configuration wrapper functions added - Renamed templates to naming convention - Updated TODOs.txt --- diff --git a/.gitattributes b/.gitattributes index a1d804a5dc..3a6daeb5e0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1959,6 +1959,12 @@ templates/de/html/member/member_list_surfbar.tpl svneol=native#text/plain templates/de/html/member/member_list_surfbar_form.tpl svneol=native#text/plain templates/de/html/member/member_list_surfbar_row.tpl svneol=native#text/plain templates/de/html/member/member_list_surfbar_table.tpl svneol=native#text/plain +templates/de/html/member/member_list_unconfirmed.tpl svneol=native#text/plain +templates/de/html/member/member_list_unconfirmed_404_row.tpl svneol=native#text/plain +templates/de/html/member/member_list_unconfirmed_nopoints.tpl svneol=native#text/plain +templates/de/html/member/member_list_unconfirmed_nopoints_404_row.tpl svneol=native#text/plain +templates/de/html/member/member_list_unconfirmed_nopoints_row.tpl svneol=native#text/plain +templates/de/html/member/member_list_unconfirmed_row.tpl svneol=native#text/plain templates/de/html/member/member_list_user_subids.tpl svneol=native#text/plain templates/de/html/member/member_list_user_subids_row.tpl svneol=native#text/plain templates/de/html/member/member_login_js.tpl svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index d88844211d..cc3ed37918 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -8,8 +8,8 @@ ./inc/config-functions.php:353: // @TODO Call setConfigEntry() somehow ./inc/daily/daily_beg.php:52:// @TODO This should be converted in a daily beg rallye ./inc/daily/daily_birthday.php:99: // @TODO 4 is hard-coded here, should we move it out in config? -./inc/email-functions.php:109: * @TODO Rewrite this to an extension 'smtp' -./inc/email-functions.php:205:// @TODO $rawUserId is currently unused +./inc/email-functions.php:113: * @TODO Rewrite this to an extension 'smtp' +./inc/email-functions.php:209:// @TODO $rawUserId is currently unused ./inc/expression-functions.php:173:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again ./inc/expression-functions.php:46: // @TODO is escapeQuotes() enough for strings with single/double quotes? ./inc/extensions/ext-html_mail.php:136: // @TODO Move these arrays into config @@ -45,10 +45,10 @@ ./inc/extensions/ext-nickname.php:52: // @TODO NOT NULL DEFAULT '' is bad practice, use NULL ./inc/extensions/ext-yoomedia.php:121: // @TODO Can this be moved into a database table? ./inc/extensions/ext-yoomedia.php:54:// @TODO Only deprecated when 'ext-network' is ready! setExtensionDeprecated('Y'); -./inc/extensions-functions.php:2181:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable' -./inc/extensions-functions.php:429: // @TODO This redirect is still needed to register sql_patches! Please try to avoid it -./inc/extensions-functions.php:445:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) -./inc/extensions-functions.php:585: // @TODO Extension is loaded, what next? +./inc/extensions-functions.php:2201:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable' +./inc/extensions-functions.php:436: // @TODO This redirect is still needed to register sql_patches! Please try to avoid it +./inc/extensions-functions.php:452:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) +./inc/extensions-functions.php:592: // @TODO Extension is loaded, what next? ./inc/filter/bonus_filter.php:56: // @TODO This query isn't right, it will only update if the user was for a longer time away! ./inc/filter/cache_filter.php:94: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal. ./inc/filter/forced_filter.php:73: // @TODO This part is unfinished @@ -56,10 +56,10 @@ ./inc/functions.php:1104: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ? ./inc/functions.php:1190: // @TODO Are these convertions still required? ./inc/functions.php:1211:// @TODO Rewrite this function to use readFromFile() and writeToFile() -./inc/functions.php:1816: // @TODO Find a way to cache this -./inc/functions.php:1920: // @TODO This is still very static, rewrite it somehow -./inc/functions.php:2124: // @TODO Rename column data_type to e.g. mail_status -./inc/functions.php:2474:// @TODO cacheFiles is not yet supported +./inc/functions.php:1820: // @TODO Find a way to cache this +./inc/functions.php:1924: // @TODO This is still very static, rewrite it somehow +./inc/functions.php:2128: // @TODO Rename column data_type to e.g. mail_status +./inc/functions.php:2478:// @TODO cacheFiles is not yet supported ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter ./inc/header.php:66:// @TODO Find a way to not use direct module comparison ./inc/install-functions.php:402: // @TODO Comparing with DEFAULT_MAIN_TITLE doesn't work @@ -123,11 +123,11 @@ ./inc/modules/admin/what-admins_mails.php:58: // @TODO Can this be rewritten to an API function? ./inc/modules/admin/what-bonus.php:46:// @TODO Unused at the moment ./inc/modules/admin/what-config_points.php:90: // @TODO Rewrite these two lines for new user_points columns (e.g. locked_order_points) with a filter -./inc/modules/admin/what-config_register.php:75: // @TODO Move this HTML code into a template +./inc/modules/admin/what-config_register.php:79: // @TODO Move this HTML code into a template ./inc/modules/admin/what-del_email.php:61: // @TODO Unused: cat_id, payment_id ./inc/modules/admin/what-edit_user.php:18: * @TODO Add support for ext-country * ./inc/modules/admin/what-email_stats.php:46:// @TODO Unused at the moment -./inc/modules/admin/what-extensions.php:362: // @TODO Rewrite this to a filter +./inc/modules/admin/what-extensions.php:366: // @TODO Rewrite this to a filter ./inc/modules/admin/what-guest_add.php:129: // @TODO This can be somehow rewritten to a function ./inc/modules/admin/what-guest_add.php:67: // @TODO Cant this be rewritten? ./inc/modules/admin/what-guest_add.php:80: // @TODO This can be somehow rewritten to a function @@ -163,9 +163,9 @@ ./inc/modules/guest/what-mediadata.php:67: // @TODO Find a better formular than this one ./inc/modules/guest/what-rallyes.php:99: // @TODO Reactivate this: $content['admin'] = '' . $content['login'] . ''; ./inc/modules/guest/what-sponsor_reg.php:293: // @TODO Maybe a default referral id? -./inc/modules/guest/what-stats.php:110: // @TODO This can be somehow rewritten -./inc/modules/guest/what-stats.php:119: // @TODO This does not exclude testers -./inc/modules/guest/what-stats.php:82:// @TODO This can be rewritten in a dynamic include +./inc/modules/guest/what-stats.php:111: // @TODO This can be somehow rewritten +./inc/modules/guest/what-stats.php:120: // @TODO This does not exclude testers +./inc/modules/guest/what-stats.php:83:// @TODO This can be rewritten in a dynamic include ./inc/modules/member/what-beg.php:54:// @TODO Can't this be moved into EL? ./inc/modules/member/what-beg.php:63:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout())); ./inc/modules/member/what-logout.php:17: * @TODO Rewrite the code to a filter * @@ -201,7 +201,7 @@ ./inc/template-functions.php:288: // @TODO Remove these sanity checks if all is fine ./inc/template-functions.php:625:// @TODO $simple/$constants are deprecated ./inc/template-functions.php:723: // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates -./inc/wrapper-functions.php:3020: // @TODO Find a way to not use direct module comparison +./inc/wrapper-functions.php:3176: // @TODO Find a way to not use direct module comparison ./inc/wrapper-functions.php:512:// @TODO Do some more sanity check here ./inc/xml-functions.php:240: // @TODO Handle characters ./mailid.php:102: // @TODO Rewrite this to a filter @@ -224,7 +224,7 @@ ./templates/de/html/guest/guest_login.tpl:21: @TODO Deactivated feature, try to implement it or remove it. ./templates/de/html/guest/guest_nickname_login.tpl:21: @TODO Deactivated feature, try to find a solution for this or remove it. ./templates/de/html/guest/guest_stats_member.tpl:21: @TODO We have to fix these counters. -./templates/de/html/member/member_unconfirmed_table_nopoints.tpl:12: +./templates/de/html/member/member_list_unconfirmed_nopoints.tpl:12: ./templates/de/html/surfbar/surfbar_frameset.tpl:4: // @TODO This redirect kills our own frameset ./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5: ./.htaccess:10: # @TODO When ext-imprint is finished RewriteRule ^modules.php?module=index&what=impressum$ modules.php?module=index&what=imprint [L] @@ -323,6 +323,12 @@ ./templates/de/html/guest/guest_paidlinks_register_header.tpl:1: ./templates/de/html/guest/guest_paidlinks_register.tpl:1: ./templates/de/html/install/install_header.tpl:1: +./templates/de/html/member/member_unconfirmed_404_nopoints.tpl:1: +./templates/de/html/member/member_unconfirmed_404.tpl:1: +./templates/de/html/member/member_unconfirmed_row_nopoints.tpl:1: +./templates/de/html/member/member_unconfirmed_row.tpl:1: +./templates/de/html/member/member_unconfirmed_table_nopoints.tpl:1: +./templates/de/html/member/member_unconfirmed_table.tpl:1: ./templates/de/html/metadata.tpl:1: ./templates/de/html/theme_one.tpl:1: ./templates/de/html/theme_select_box.tpl:1: diff --git a/inc/filter/bonus_filter.php b/inc/filter/bonus_filter.php index d3ef5f112d..c86dda30de 100644 --- a/inc/filter/bonus_filter.php +++ b/inc/filter/bonus_filter.php @@ -51,7 +51,7 @@ function FILTER_ADD_LOGIN_BONUS ($filterData) { // Bonus is not given by default ;-) $bonus = FALSE; - if ((isExtensionInstalledAndNewer('sql_patches', '0.2.8')) && (isBonusRallyeActive()) && (getIncludeBonusLogin() == 'Y')) { + if ((isExtensionInstalledAndNewer('sql_patches', '0.2.8')) && (isBonusRallyeActive()) && (isIncludeBonusLoginEnabled())) { // Update last login if far enougth away // @TODO This query isn't right, it will only update if the user was for a longer time away! SQL_QUERY_ESC('UPDATE @@ -110,11 +110,11 @@ function FILTER_ADD_BONUS_POINTS_USER_COLUMNS ($add = '') { } // END - if // Add more columns only when the corresponding configuration is enabled, too - if (getIncludeBonusClick() == 'Y') $add .= ' + `turbo_bonus`'; - if (getIncludeBonusLogin() == 'Y') $add .= ' + `login_bonus`'; - if (getIncludeBonusOrder() == 'Y') $add .= ' + `bonus_order`'; - if (getIncludeBonusRef() == 'Y') $add .= ' + `bonus_ref`'; - if (getIncludeBonusStats() == 'Y') $add .= ' + `bonus_stats`'; + if (isIncludeBonusClickEnabled()) $add .= ' + `turbo_bonus`'; + if (isIncludeBonusLoginEnabled()) $add .= ' + `login_bonus`'; + if (isIncludeBonusOrderEnabled()) $add .= ' + `bonus_order`'; + if (isIncludeBonusRefEnabled() ) $add .= ' + `bonus_ref`'; + if (isIncludeBonusStatsEnabled()) $add .= ' + `bonus_stats`'; // Return $add //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); diff --git a/inc/filters.php b/inc/filters.php index ce8f99fcd8..668eaa2f25 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -984,7 +984,7 @@ function FILTER_HANDLE_FATAL_ERRORS () { // Filter for displaying copyright line function FILTER_DISPLAY_COPYRIGHT () { // Shall we display the copyright notice? - if ((isFullPage()) && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['__header_sent'] == 2) && (ifCopyrightFooterEnabled())) { + if ((isFullPage()) && ((getWriteFooter() == 'Y') || (isInstalling())) && ($GLOBALS['__header_sent'] == 2) && (ifCopyrightFooterEnabled())) { // Backlink enabled? if (((isConfigEntrySet('ENABLE_BACKLINK')) && (getConfig('ENABLE_BACKLINK') == 'Y')) || (isInstalling())) { // Copyright with backlink, thanks! :-) @@ -999,8 +999,8 @@ function FILTER_DISPLAY_COPYRIGHT () { // Filter for displaying parsing time function FILTER_DISPLAY_PARSING_TIME () { // Shall we display the parsing time and number of queries? - // 1234 5 54 4 5 5 4 4 5543 3 4432 2 332 2 21 - if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (isFullPage())) && (!isInstallationPhase())) && (isHtmlOutputMode()) && ($GLOBALS['__header_sent'] == 2)) { + // 1234 5 54 4 554 4 5543 3 4432 2 332 2 21 + if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (isShowTimingsEnabled()) && (isFullPage())) && (!isInstallationPhase())) && (isHtmlOutputMode()) && ($GLOBALS['__header_sent'] == 2)) { // Then display it here displayParsingTime(); } // END - if diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 7b3e26ddd3..befed20d39 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -496,6 +496,18 @@ function getBonusIncludeOwn () { return $GLOBALS[__FUNCTION__]; } +// Checks whether bonus_include_own is set to 'Y' +function isBonusIncludeOwnEnabled () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getBonusIncludeOwn() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Getter for bonus_disable_notify function getBonusDisableNotify () { // Is there cache? @@ -532,6 +544,18 @@ function getIncludeBonusClick () { return $GLOBALS[__FUNCTION__]; } +// Checks whether include_bonus_click is set to 'Y' +function isIncludeBonusClickEnabled () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getIncludeBonusClick() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Getter for include_bonus_login function getIncludeBonusLogin () { // Is there cache? @@ -544,6 +568,18 @@ function getIncludeBonusLogin () { return $GLOBALS[__FUNCTION__]; } +// Checks whether include_bonus_login is set to 'Y' +function isIncludeBonusLoginEnabled () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getIncludeBonusLogin() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Getter for include_bonus_order function getIncludeBonusOrder () { // Is there cache? @@ -556,6 +592,18 @@ function getIncludeBonusOrder () { return $GLOBALS[__FUNCTION__]; } +// Checks whether include_bonus_order is set to 'Y' +function isIncludeBonusOrderEnabled () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getIncludeBonusOrder() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Getter for include_bonus_Ref function getIncludeBonusRef () { // Is there cache? @@ -568,6 +616,18 @@ function getIncludeBonusRef () { return $GLOBALS[__FUNCTION__]; } +// Checks whether include_bonus_ref is set to 'Y' +function isIncludeBonusRefEnabled () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getIncludeBonusRef() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Getter for include_bonus_stats function getIncludeBonusStats () { // Is there cache? @@ -580,5 +640,17 @@ function getIncludeBonusStats () { return $GLOBALS[__FUNCTION__]; } +// Checks whether include_bonus_stats is set to 'Y' +function isIncludeBonusStatsEnabled () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getIncludeBonusStats() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?> diff --git a/inc/libs/other_functions.php b/inc/libs/other_functions.php index f6ee8282e3..d80080f1cd 100644 --- a/inc/libs/other_functions.php +++ b/inc/libs/other_functions.php @@ -60,5 +60,21 @@ function displayDebugSqls () { $GLOBALS['__page_footer'] .= loadTemplate('admin_other_sqls', TRUE, $OUT); } +//----------------------------------------------------------------------------- +// Wrapper functions for configuration entries +//----------------------------------------------------------------------------- + +// Getter for 'reject_url' config entry +function getRejectUrl () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('reject_url'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?> diff --git a/inc/libs/profile_functions.php b/inc/libs/profile_functions.php index 2af462437b..6394642c17 100644 --- a/inc/libs/profile_functions.php +++ b/inc/libs/profile_functions.php @@ -68,12 +68,24 @@ function getResendProfileUpdate () { return $GLOBALS[__FUNCTION__]; } +// Getter for send_prof_update +function getSendProfUpdate () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('send_prof_update'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Determines whether sending profile update notification is enabled function isSendProfileUpdateEnabled() { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = (getConfig('send_prof_update') == 'Y'); + $GLOBALS[__FUNCTION__] = (getSendProfUpdate() == 'Y'); } // END - if // Return cache diff --git a/inc/modules/index.php b/inc/modules/index.php index 3c52cb5013..93b647fb32 100644 --- a/inc/modules/index.php +++ b/inc/modules/index.php @@ -53,7 +53,7 @@ handleCodeMessage(); loadTemplate('guest_menu_td'); // Add the guest's menu here... -if ((getConfig('guest_menu') == 'Y') || (!isExtensionActive('sql_patches', TRUE))) { +if ((isGuestMenuEnabled()) || (!isExtensionActive('sql_patches', TRUE))) { // Show only when guest menu is active addMenu('guest', getAction(), getWhat()); } // END - if @@ -76,7 +76,7 @@ if ((isIncludeReadable($inc)) && (isMenuActionValid('guest', getAction(), getWha redirectToUrl('modules.php?module=index'); } -if ((getConfig('guest_menu') == 'Y') || (!isExtensionActive('sql_patches'))) { +if ((isGuestMenuEnabled()) || (!isExtensionActive('sql_patches'))) { // Right side of content (hint: a good place for 120x600 skyscraper banner!) loadTemplate('guest_content_footer'); diff --git a/inc/modules/login.php b/inc/modules/login.php index 52f09fddc2..110c9e10fe 100644 --- a/inc/modules/login.php +++ b/inc/modules/login.php @@ -65,7 +65,7 @@ if (!isActionSet()) { } // Add the member's menu here... -if ((getConfig('member_menu') == 'Y') || (!isExtensionActive('sql_patches', TRUE))) { +if ((isMemberMenuEnabled()) || (!isExtensionActive('sql_patches', TRUE))) { addMenu('member', getActionFromModuleWhat('member', getWhat()), getWhat()); } // END - if @@ -85,7 +85,7 @@ if ((isIncludeReadable($inc)) && (isMenuActionValid('member', getAction(), getWh redirectToUrl('modules.php?module=login'); } -if ((getConfig('member_menu') == 'Y') || (!isExtensionActive('sql_patches', TRUE))) { +if ((isMemberMenuEnabled()) || (!isExtensionActive('sql_patches', TRUE))) { // Right side of content (hint: a good place for 120x600 skyscraper banner!) loadTemplate('member_content_right'); diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index a8c1607607..283aa9ed51 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -254,10 +254,10 @@ LIMIT 1", ); // Load row template - if (getConfig('show_points_unconfirmed') == 'Y') { - $OUT .= loadTemplate('member_unconfirmed_row', TRUE, $content); + if (isShowPointsUnconfirmedEnabled()) { + $OUT .= loadTemplate('member_list_unconfirmed_row', TRUE, $content); } else { - $OUT .= loadTemplate('member_unconfirmed_row_nopoints', TRUE, $content); + $OUT .= loadTemplate('member_list_unconfirmed_nopoints_row', TRUE, $content); } // Count points @@ -270,10 +270,10 @@ LIMIT 1", ); // Display points or not? - if (getConfig('show_points_unconfirmed') == 'Y') { - $OUT .= loadTemplate('member_unconfirmed_404', TRUE, $content); + if (isShowPointsUnconfirmedEnabled()) { + $OUT .= loadTemplate('member_list_unconfirmed_404_row', TRUE, $content); } else { - $OUT .= loadTemplate('member_unconfirmed_404_nopoints', TRUE, $content); + $OUT .= loadTemplate('member_list_unconfirmed_nopoints_404_row', TRUE, $content); } } @@ -291,10 +291,10 @@ LIMIT 1", $content['rows'] = $OUT; // Load main template - if (getConfig('show_points_unconfirmed') == 'Y') { - loadTemplate('member_unconfirmed_table', FALSE, $content); + if (isShowPointsUnconfirmedEnabled()) { + loadTemplate('member_list_unconfirmed', FALSE, $content); } else { - loadTemplate('member_unconfirmed_table_nopoints', FALSE, $content); + loadTemplate('member_list_unconfirmed_nopoints', FALSE, $content); } } else { // No mails left to confirm... :) diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 737d06a99d..7751f364b2 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -160,8 +160,8 @@ function addYouAreHereLink ($accessLevel, $FQFN, $return = FALSE) { } // END - if // Is ext-sql_patches installed? - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isExtensionInstalledAndNewer()=' . intval(isExtensionInstalledAndNewer('sql_patches', '0.2.3')) . ',youre_here=' . getConfig('youre_here') . ',isAdmin()=' . intval(isAdmin()) . ',modCheck=' . $modCheck); - if (((isExtensionInstalledAndNewer('sql_patches', '0.2.3')) && (getConfig('youre_here') == 'Y')) || ((isAdmin()) && ($modCheck == 'admin'))) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isExtensionInstalledAndNewer()=' . intval(isExtensionInstalledAndNewer('sql_patches', '0.2.3')) . ',youre_here=' . getYoureHere() . ',isAdmin()=' . intval(isAdmin()) . ',modCheck=' . $modCheck); + if (((isExtensionInstalledAndNewer('sql_patches', '0.2.3')) && (isYourHereEnabled())) || ((isAdmin()) && ($modCheck == 'admin'))) { // Output HTML code $OUT = $prefix . '' . getTitleFromMenu($accessLevel, $search, $type, $ADD) . ''; diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 5c8db1d70d..4bd75bad61 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -1671,6 +1671,18 @@ function getCachePath () { return $GLOBALS[__FUNCTION__]; } +// "Getter" for WRITE_FOOTER +function getWriteFooter () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('WRITE_FOOTER'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // "Getter" for secret_key function getSecretKey () { // Is there cache? @@ -2474,6 +2486,78 @@ function isDisplayHomeInIndexEnabled () { return $GLOBALS[__FUNCTION__]; } +// Getter for 'show_points_unconfirmed' +function getShowPointsUnconfirmed () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = getConfig('show_points_unconfirmed'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Checks whether 'show_points_unconfirmed' is 'Y' +function isShowPointsUnconfirmedEnabled () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = (getShowPointsUnconfirmed() == 'Y'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'youre_here' +function getYoureHere () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = getConfig('youre_here'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Checks whether 'show_timings' is 'Y' +function isYoureHereEnabled () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = (getYoureHere() == 'Y'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'show_timings' +function getShowTimings () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = getConfig('show_timings'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Checks whether 'show_timings' is 'Y' +function isShowTimingsEnabled () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = (getShowTimings() == 'Y'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + // Getter for 'ap_server_name_since' function getApServerNameSince () { // Is the cache entry set? @@ -2558,6 +2642,54 @@ function getCssPhp () { return $GLOBALS[__FUNCTION__]; } +// Getter for 'guest_menu' +function getGuestMenu () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = getConfig('guest_menu'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Checks if guest menu is enabled +function isGuestMenuEnabled () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = (getGuestMenu() == 'Y'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'member_menu' +function getMemberMenu () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = getConfig('member_menu'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Checks if member menu is enabled +function isMemberMenuEnabled () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = (getMemberMenu() == 'Y'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + // Getter for 'word_wrap' function getWordWrap () { // Is the cache entry set? diff --git a/mailid_top.php b/mailid_top.php index 11b984d145..59253188f4 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -282,7 +282,7 @@ if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr // Is an active-rallye running and this is not a notification mail? if ((isBonusRallyeActive()) && ($data['is_notify'] != 'Y')) { // Shall I exclude the webmaster's own userid from the active-rallye? - if ((((getBonusUserid() == $userId) && (getBonusIncludeOwn() == 'Y')) || (getBonusUserid() != $userId)) && (getDefRefid() != $userId)) { + if ((((getBonusUserid() == $userId) && (isBonusIncludeOwnEnabled())) || (getBonusUserid() != $userId)) && (getDefRefid() != $userId)) { // Add points and remember ranking are done in this function.... addTurboBonus($urlId, $userId, $type); diff --git a/templates/de/html/member/member_list_unconfirmed.tpl b/templates/de/html/member/member_list_unconfirmed.tpl new file mode 100644 index 0000000000..f42860088f --- /dev/null +++ b/templates/de/html/member/member_list_unconfirmed.tpl @@ -0,0 +1,20 @@ +
+ + + + + + + + +$content[rows] + + + + +
{--CONFIRM_LINK2--}:{--EMAIL_SENDER--}:{--EMAIL_DETAILS--}:{--EMAIL_TIMESTAMP--}:{--EMAIL_POINTS--}:
+
diff --git a/templates/de/html/member/member_list_unconfirmed_404_row.tpl b/templates/de/html/member/member_list_unconfirmed_404_row.tpl new file mode 100644 index 0000000000..20d712cc71 --- /dev/null +++ b/templates/de/html/member/member_list_unconfirmed_404_row.tpl @@ -0,0 +1,6 @@ + + + $content[message]: + $content[data] + + diff --git a/templates/de/html/member/member_list_unconfirmed_nopoints.tpl b/templates/de/html/member/member_list_unconfirmed_nopoints.tpl new file mode 100644 index 0000000000..99d3641819 --- /dev/null +++ b/templates/de/html/member/member_list_unconfirmed_nopoints.tpl @@ -0,0 +1,17 @@ +
+ + + + + + + +$content[rows] + + + +
{--CONFIRM_LINK2--}:{--EMAIL_SENDER--}:{--EMAIL_DETAILS--}:{--EMAIL_TIMESTAMP--}:
+
diff --git a/templates/de/html/member/member_list_unconfirmed_nopoints_404_row.tpl b/templates/de/html/member/member_list_unconfirmed_nopoints_404_row.tpl new file mode 100644 index 0000000000..780550e7af --- /dev/null +++ b/templates/de/html/member/member_list_unconfirmed_nopoints_404_row.tpl @@ -0,0 +1,6 @@ + + + $content[message]: + $content[data] + + diff --git a/templates/de/html/member/member_list_unconfirmed_nopoints_row.tpl b/templates/de/html/member/member_list_unconfirmed_nopoints_row.tpl new file mode 100644 index 0000000000..24ef8c00ad --- /dev/null +++ b/templates/de/html/member/member_list_unconfirmed_nopoints_row.tpl @@ -0,0 +1,13 @@ + + + [$content[data]] + + + $content[sender] + + + [{--EMAIL_DETAILS_LINK--}] + + $content[timestamp] + diff --git a/templates/de/html/member/member_list_unconfirmed_row.tpl b/templates/de/html/member/member_list_unconfirmed_row.tpl new file mode 100644 index 0000000000..6766718276 --- /dev/null +++ b/templates/de/html/member/member_list_unconfirmed_row.tpl @@ -0,0 +1,15 @@ + + + [$content[data]] + + + $content[sender] + + + [{--EMAIL_DETAILS_LINK--}] + + $content[timestamp] + + {%pipe,translateComma=$content[points]%} {?POINTS?} + + diff --git a/templates/de/html/member/member_unconfirmed_404.tpl b/templates/de/html/member/member_unconfirmed_404.tpl index 20d712cc71..11f5d85d80 100644 --- a/templates/de/html/member/member_unconfirmed_404.tpl +++ b/templates/de/html/member/member_unconfirmed_404.tpl @@ -1,6 +1 @@ - - - $content[message]: - $content[data] - - + diff --git a/templates/de/html/member/member_unconfirmed_404_nopoints.tpl b/templates/de/html/member/member_unconfirmed_404_nopoints.tpl index 780550e7af..11f5d85d80 100644 --- a/templates/de/html/member/member_unconfirmed_404_nopoints.tpl +++ b/templates/de/html/member/member_unconfirmed_404_nopoints.tpl @@ -1,6 +1 @@ - - - $content[message]: - $content[data] - - + diff --git a/templates/de/html/member/member_unconfirmed_row.tpl b/templates/de/html/member/member_unconfirmed_row.tpl index 6766718276..11f5d85d80 100644 --- a/templates/de/html/member/member_unconfirmed_row.tpl +++ b/templates/de/html/member/member_unconfirmed_row.tpl @@ -1,15 +1 @@ - - - [$content[data]] - - - $content[sender] - - - [{--EMAIL_DETAILS_LINK--}] - - $content[timestamp] - - {%pipe,translateComma=$content[points]%} {?POINTS?} - - + diff --git a/templates/de/html/member/member_unconfirmed_row_nopoints.tpl b/templates/de/html/member/member_unconfirmed_row_nopoints.tpl index 24ef8c00ad..11f5d85d80 100644 --- a/templates/de/html/member/member_unconfirmed_row_nopoints.tpl +++ b/templates/de/html/member/member_unconfirmed_row_nopoints.tpl @@ -1,13 +1 @@ - - - [$content[data]] - - - $content[sender] - - - [{--EMAIL_DETAILS_LINK--}] - - $content[timestamp] - + diff --git a/templates/de/html/member/member_unconfirmed_table.tpl b/templates/de/html/member/member_unconfirmed_table.tpl index f42860088f..11f5d85d80 100644 --- a/templates/de/html/member/member_unconfirmed_table.tpl +++ b/templates/de/html/member/member_unconfirmed_table.tpl @@ -1,20 +1 @@ -
- - - - - - - - -$content[rows] - - - - -
{--CONFIRM_LINK2--}:{--EMAIL_SENDER--}:{--EMAIL_DETAILS--}:{--EMAIL_TIMESTAMP--}:{--EMAIL_POINTS--}:
-
+ diff --git a/templates/de/html/member/member_unconfirmed_table_nopoints.tpl b/templates/de/html/member/member_unconfirmed_table_nopoints.tpl index 99d3641819..11f5d85d80 100644 --- a/templates/de/html/member/member_unconfirmed_table_nopoints.tpl +++ b/templates/de/html/member/member_unconfirmed_table_nopoints.tpl @@ -1,17 +1 @@ -
- - - - - - - -$content[rows] - - - -
{--CONFIRM_LINK2--}:{--EMAIL_SENDER--}:{--EMAIL_DETAILS--}:{--EMAIL_TIMESTAMP--}:
-
+