From: Roland Häder Date: Mon, 5 Apr 2010 00:36:29 +0000 (+0000) Subject: Fix for missing array elements X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d9f35786166902b9bc3f402d4f2abeed5ae0528d;p=mailer.git Fix for missing array elements --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index a008587de7..b27b2a4ba2 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -8,6 +8,7 @@ ./inc/classes/cachesystem.class.php:471: // @TODO Add support for more types which break in last else-block ./inc/config-functions.php:144: // @TODO Make this all better... :-/ ./inc/expression-functions.php:136:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again +./inc/expression-functions.php:199: // @TODO is escapeQuotes enougth for strings with single/double quotes? ./inc/extensions/ext-html_mail.php:138: // @TODO Move these arrays into config ./inc/extensions/ext-menu.php:54: // @TODO Convert menu-Id to one coding-standard. admin(edit|_add) => admin_menu_(edit|add), mem(edit|_add) => mem_menu_(edit|add) ./inc/extensions/ext-network.php:20: * @TODO AbisZED: Which charset? * @@ -112,12 +113,13 @@ ./inc/modules/admin/what-config_admins.php:146: // @TODO Rewrite this to filter 'run_sqls' ./inc/modules/admin/what-config_mods.php:141: // @TODO Rewritings: mod->module in template ./inc/modules/admin/what-config_mods.php:57: // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function +./inc/modules/admin/what-config_points.php:113: // @TODO Rewrite this to a filter ./inc/modules/admin/what-config_rallye_prices.php:209: // @TODO Rewritings: level->price_level, infos->info in template ./inc/modules/admin/what-config_rallye_prices.php:226: // @TODO Rewrite these two constants ./inc/modules/admin/what-config_register.php:78: // @TODO Move this HTML code into a template ./inc/modules/admin/what-edit_user.php:20: * @TODO Add support for ext-country * ./inc/modules/admin/what-email_stats.php:48:// @TODO Unused at the moment -./inc/modules/admin/what-extensions.php:348: // @TODO Rewrite this to a filter +./inc/modules/admin/what-extensions.php:350: // @TODO Rewrite this to a filter ./inc/modules/admin/what-guest_add.php:137: // @TODO This can be somehow rewritten to a function ./inc/modules/admin/what-guest_add.php:69: // @TODO Cant this be rewritten? ./inc/modules/admin/what-guest_add.php:85: // @TODO This can be somehow rewritten to a function @@ -136,7 +138,6 @@ ./inc/modules/admin/what-list_task.php:192: // @TODO Rewrite this to $OUT .= ..., true, ... ./inc/modules/admin/what-list_task.php:196: // @TODO Rewrite this to $OUT .= ..., true, ... ./inc/modules/admin/what-list_unconfirmed.php:100: // @TODO Rewrite this to $content = SQL_FETCHARRAY(), look some lines above for two differrent queries -./inc/modules/admin/what-list_unconfirmed.php:130: // @TODO Rewritings: userid->userid ./inc/modules/admin/what-list_unconfirmed.php:77: // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_BONUS_LINKS')); ./inc/modules/admin/what-list_unconfirmed.php:88: // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus ./inc/modules/admin/what-list_user.php:160: // @TODO Rewrite these to filters @@ -170,7 +171,7 @@ ./inc/modules/member/what-bonus.php:57: // @TODO Rewrite this to a filter ./inc/modules/member/what-categories.php:129: // @TODO Rewrite this to use $OUT .= ... ./inc/modules/member/what-doubler.php:56:// @TODO The '*100' is in the way to get moved into the template -./inc/modules/member/what-order.php:453: // @TODO Rewrite this to a filter +./inc/modules/member/what-order.php:456: // @TODO Rewrite this to a filter ./inc/modules/member/what-order.php:65:// @TODO Rewrite this to a filter ./inc/modules/member/what-payout.php:221: // @TODO Rewrite this to a filter ./inc/modules/member/what-points.php:55:// @TODO Should we rewrite this to a filter? @@ -198,8 +199,8 @@ ./inc/revision-functions.php:153:// @TODO Please describe this function ./inc/wrapper-functions.php:127:// @TODO Implement $compress ./inc/wrapper-functions.php:134:// @TODO Implement $decompress -./inc/wrapper-functions.php:449:// @TODO Do some more sanity check here -./inc/wrapper-functions.php:764: * @TODO Do we really need this check? If yes, try to fix this: +./inc/wrapper-functions.php:455:// @TODO Do some more sanity check here +./inc/wrapper-functions.php:793: * @TODO Do we really need this check? If yes, try to fix this: ./mailid.php:135: // @TODO Rewrite this to a filter ./mailid.php:215: // @TODO Rewrite this to a dynamic include or so ./mailid.php:95: // @TODO Rewrite this to a filter diff --git a/beg.php b/beg.php index 397fdf302c..57b930c8d9 100644 --- a/beg.php +++ b/beg.php @@ -130,18 +130,18 @@ if (isGetRequestParameterSet('userid')) { // Add points to user or begging rallye account if (addPointsBeg(getUserData('userid'), $points)) { // Set 'done' message - $content['message'] = loadTemplate('beg_done', true); + $content['message'] = loadTemplate('beg_done', true, $content); } else { // Error! - $content['message'] = loadTemplate('beg_failed', true); + $content['message'] = loadTemplate('beg_failed', true, $content); } } else { // Error! - $content['message'] = loadTemplate('beg_failed', true); + $content['message'] = loadTemplate('beg_failed', true, $content); } } elseif (isMember()) { // Logged in user found! - $content['message'] = loadTemplate('beg_login', true); + $content['message'] = loadTemplate('beg_login', true, $content); } elseif (getConfig('beg_pay_mode') != 'NONE') { // Other pay-mode active! // Prepare content for template $content = array( diff --git a/inc/expression-functions.php b/inc/expression-functions.php index e74d378463..c77eb0c92a 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -138,14 +138,29 @@ function doExpressionConfig ($data) { // Read configuration $configValue = getConfig($data['matches'][4][$data['key']]); - // Do we have a call-back? + // Construct a new expression + $replacer = '{%pipe,' . $data['callback'] . ',' . $configValue . '%}'; + + // Replace the config entry + $code = str_replace($data['matches'][0][$data['key']], $replacer, $data['code']); + + // Return replaced code + return $code; +} + +// Expression call-back function for piping data through functions +function doExpressionPipe ($data) { + // We need callback and extra_func: callback is really the call-back function, extra_func is our value + $replacer = $data['extra_func']; + + // Do we have a call-back? Should always be there! if (!empty($data['callback'])) { // Parse it through this function - $configValue = call_user_func_array($data['callback'], array($configValue)); + $replacer = "\" . " . $data['callback'] . "('" . $replacer . "') . \""; } // END - if // Replace the config entry - $code = str_replace($data['matches'][0][$data['key']], $configValue, $data['code']); + $code = str_replace($data['matches'][0][$data['key']], $replacer, $data['code']); // Return replaced code return $code; @@ -186,7 +201,21 @@ function doExpressionValidatorLinks ($data) { // Expression call-back for dynamic messages function doExpressionMessage ($data) { - die('
'.htmlentities(print_r($data, true)).'
'); + // Message string replacement depends on if message is masked + if (isMessageMasked($data['callback'])) { + // Message should be masked + $replacer = "\" . getMaskedMessage('" . $data['callback'] . "', '" . $data['extra_func'] . "') . \""; + } else { + // Regular message + $replacer = "\" . getMessage('" . $data['callback'] . "') . \""; + } + + // Replace the code + // @TODO is escapeQuotes enougth for strings with single/double quotes? + $code = str_replace($data['matches'][0][$data['key']], $replacer, escapeQuotes($data['code'])); + + // Return the (maybe) replaced code + return $code; } // [EOF] diff --git a/inc/filter-functions.php b/inc/filter-functions.php index 7bc55f018c..40b6734599 100644 --- a/inc/filter-functions.php +++ b/inc/filter-functions.php @@ -62,7 +62,7 @@ function initFilterSystem () { $add = ''; if (isExtensionINstalledAndNewer('sql_patches', '0.6.0')) $add = ", `filter_counter`"; - // Load all active filers + // Load all filters $result = SQL_QUERY("SELECT `filter_name`,`filter_function`,`filter_active`".$add." FROM @@ -192,10 +192,10 @@ function registerFilter ($filterName, $filterFunction, $silentAbort = true, $for // Is that filter already there? if ((isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === false)) { - // Then abort here - if ($silentAbort === false) { + // In installation phase we always want to abort + if (($silentAbort === false) || (isInstallationPhase())) { // Add fatal message - addFatalMessage(__FUNCTION__, __LINE__, sprintf("Filter chain %s has already filter function %s registered!", $filterName, $filterFunction)); + debug_report_bug(sprintf("[%s:%s] Filter chain %s has already filter function %s registered!", __FUNCTION__, __LINE__, $filterName, $filterFunction)); } // END - if // Abort here @@ -262,9 +262,9 @@ function runFilterChain ($filterName, $data = null) { // Then run all filters foreach ($GLOBALS['cache_array']['filter']['chains'][$filterName] as $filterFunction => $active) { // Debug message - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Running: name={$filterName},func={$filterFunction},active={$active}"); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Running: name=' . $filterName . ',func=' . $filterFunction . ',active=' . $active); - // Is the filter active? + // Is the filter active or newly added?? if (($active == 'Y') || ($active == 'A') || ((in_array($filterName, array('shutdown','extension_remove','post_extension_run_sql'))) && ($active == 'R'))) { // Is this filter there? if (!function_exists($filterFunction)) { @@ -276,14 +276,14 @@ function runFilterChain ($filterName, $data = null) { } // END - if // Call the filter chain - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $filterName.'/'.$filterFunction.',[]='.gettype($returnValue)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $filterName . '/' . $filterFunction . ',[]=' . gettype($returnValue)); $returnValue = call_user_func_array($filterFunction, array($returnValue)); // Update usage counter countFilterUsage($filterName, $filterFunction); } elseif (isDebugModeEnabled()) { // Debug message - logDebugMessage(__FUNCTION__, __LINE__, "Skipped: name={$filterName},func={$filterFunction},active={$active}"); + logDebugMessage(__FUNCTION__, __LINE__, 'Skipped: name=' . $filterName . ',func=' . $filterFunction . ',active=' . $active); } } // END - foreach diff --git a/inc/filters.php b/inc/filters.php index cc17b3e381..20b7feeff2 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -424,7 +424,7 @@ function FILTER_COMPILE_CONFIG ($code, $compiled = false) { // Use this for replacing $code = str_replace($match, $GLOBALS['compile_config'][$matches[1][$key]], $code); - //* DEBUG: */ if (($match == '{?URL?}') && (strlen($code) > 10000)) die('
'.secureString($code).'
'); + //* DEBUG: */ if (($match == '{?URL?}') && (strlen($code) > 10000)) die(__FUNCTION__.'['.__LINE__.']:
'.secureString($code).'
'); } // END - foreach } // END - if @@ -436,7 +436,7 @@ function FILTER_COMPILE_CONFIG ($code, $compiled = false) { if ($compiled === true) { // Run the code $eval = "\$GLOBALS['compiled_config'][\$uncompiled] = \"" . $GLOBALS['compiled_config'][$uncompiled] . "\";"; - //* DEBUG: */ print('
' . str_replace('$', '$', htmlentities($eval)) . '
'); + //* DEBUG: */ print(__FUNCTION__.'['.__LINE__.']:
' . str_replace('$', '$', htmlentities($eval)) . '
'); eval($eval); } // END - if @@ -449,7 +449,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($code) { // Compile {%cmd,callback,extraFunction=some_value%} to get expression code snippets // See switch() command below for supported commands preg_match_all('/\{%(([a-zA-Z0-9-_,]+)(=([^\}]+)){0,1})*%\}/', $code, $matches); - //* DEBUG: */ print('
'.print_r($matches, true).'
'); + //* DEBUG: */ print(__FUNCTION__.'['.__LINE__.']:
'.print_r($matches, true).'
'); // Default is from outputHtml() $outputMode = getOutputMode(); @@ -485,6 +485,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($code) { ); // Call it + //* DEBUG: */ print __FUNCTION__ . '[' . __LINE__ . ']: function=' . $commandFunction . "
\n"; $code = call_user_func($commandFunction, $data); } else { // Unsupported command detected @@ -497,7 +498,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($code) { if ((getOutputMode() != '0') || ($outputMode != '0')) $code = decodeEntities($code); // Return compiled code - //* DEBUG: */ die('
'.htmlentities($code).'
'); + //* DEBUG: */ print(__FUNCTION__.'['.__LINE__.']:
'.($code).'
'); return $code; } diff --git a/inc/functions.php b/inc/functions.php index 473c494382..50e5f4521a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -149,19 +149,21 @@ function sendHttpHeaders () { // Compiles the final output function compileFinalOutput () { // Init counter - $cnt = '0'; + $cnt = 0; // Add page header and footer addPageHeaderFooter(); // Compile all out - while (((strpos($GLOBALS['output'], '{--') > 0) || (strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) { + while (((strpos($GLOBALS['output'], '{--') !== false) || (strpos($GLOBALS['output'], '{!') !== false) || (strpos($GLOBALS['output'], '{?') !== false) || (strpos($GLOBALS['output'], '{%') !== false)) && ($cnt < 3)) { // Init common variables $content = array(); $newContent = ''; // Compile it - $eval = "\$newContent = \"".compileCode(escapeQuotes($GLOBALS['output']))."\";"; + //* DEBUG: */ print '
'.htmlentities($GLOBALS['output']).'
'; + $eval = '$newContent = "' . compileCode(escapeQuotes($GLOBALS['output'])) . '";'; + //* DEBUG: */ die('
'.htmlentities($eval).'
'); eval($eval); // Was that eval okay? @@ -169,6 +171,8 @@ function compileFinalOutput () { // Something went wrong! debug_report_bug('Evaluation error:
' . linenumberCode($eval) . '
', false); } // END - if + + // Use it again $GLOBALS['output'] = $newContent; // Count round diff --git a/inc/install-inc.php b/inc/install-inc.php index 83571f7071..38e4a6be53 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -47,10 +47,10 @@ if (!defined('__SECURITY')) { } // END - if // Init variables -$mysql = array(); +$GLOBALS['install_mysql'] = array(); if ((isPostRequestParameterSet('mysql')) && (is_array(postRequestParameter('mysql')))) { // Transfer 'mysql' array - $mysql = postRequestParameter('mysql'); + $GLOBALS['install_mysql'] = postRequestParameter('mysql'); } // END - if // Check if both passwords from SMTP are matching @@ -95,23 +95,23 @@ if ((!isInstalled()) || (!isAdminRegistered())) { break; case '2': // MySQL data (alone!) - if (empty($mysql['dbase'])) $mysql['dbase'] = 'your_database'; - if (empty($mysql['login'])) $mysql['login'] = 'your_login'; - if (empty($mysql['host'])) $mysql['host'] = 'localhost'; - if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange'; - if (empty($mysql['type'])) $mysql['type'] = 'MyISAM'; + if (empty($GLOBALS['install_mysql']['dbase'])) $GLOBALS['install_mysql']['dbase'] = 'your_database'; + if (empty($GLOBALS['install_mysql']['login'])) $GLOBALS['install_mysql']['login'] = 'your_login'; + if (empty($GLOBALS['install_mysql']['host'])) $GLOBALS['install_mysql']['host'] = 'localhost'; + if (empty($GLOBALS['install_mysql']['prefix'])) $GLOBALS['install_mysql']['prefix'] = 'mxchange'; + if (empty($GLOBALS['install_mysql']['type'])) $GLOBALS['install_mysql']['type'] = 'MyISAM'; if (ifFatalErrorsDetected()) { addToInstallContent('
'); foreach (getFatalArray() as $key => $err) { addToInstallContent('
· {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '
'); - } + } // END - foreach addToInstallContent('
'); - } - $content['mysql_host'] = $mysql['host']; - $content['mysql_dbase'] = $mysql['dbase']; - $content['mysql_prefix'] = $mysql['prefix']; - $content['mysql_login'] = $mysql['login']; - $content['table_type'] = $mysql['type']; + } // END - if + $content['mysql_host'] = $GLOBALS['install_mysql']['host']; + $content['mysql_dbase'] = $GLOBALS['install_mysql']['dbase']; + $content['mysql_prefix'] = $GLOBALS['install_mysql']['prefix']; + $content['mysql_login'] = $GLOBALS['install_mysql']['login']; + $content['table_type'] = $GLOBALS['install_mysql']['type']; $content['spath'] = postRequestParameter('spath'); $content['burl'] = postRequestParameter('burl'); $content['title'] = postRequestParameter('title'); @@ -145,13 +145,13 @@ if ((!isInstalled()) || (!isAdminRegistered())) { } // END - if // MySQL settings - $content['mysql_host'] = $mysql['host']; - $content['mysql_dbase'] = $mysql['dbase']; - $content['mysql_prefix'] = $mysql['prefix']; - $content['table_type'] = $mysql['type']; - $content['mysql_login'] = $mysql['login']; - $content['mysql_pass1'] = $mysql['pass1']; - $content['mysql_pass2'] = $mysql['pass2']; + $content['mysql_host'] = $GLOBALS['install_mysql']['host']; + $content['mysql_dbase'] = $GLOBALS['install_mysql']['dbase']; + $content['mysql_prefix'] = $GLOBALS['install_mysql']['prefix']; + $content['table_type'] = $GLOBALS['install_mysql']['type']; + $content['mysql_login'] = $GLOBALS['install_mysql']['login']; + $content['mysql_pass1'] = $GLOBALS['install_mysql']['pass1']; + $content['mysql_pass2'] = $GLOBALS['install_mysql']['pass2']; // Set constants for SMTP data $content['smtp_host'] = $smtpHost; @@ -178,7 +178,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // MySQL data $OUT = ''; - foreach ($mysql as $key => $value) { + foreach ($GLOBALS['install_mysql'] as $key => $value) { $OUT .= " \n"; } // END - foreach $content['mysql_hidden'] = $OUT; @@ -193,16 +193,20 @@ if ((!isInstalled()) || (!isAdminRegistered())) { initSqls(); // Connect to MySQL server - SQL_CONNECT($mysql['host'], $mysql['login'], $mysql['pass1'], __FILE__, __LINE__); + SQL_CONNECT($GLOBALS['install_mysql']['host'], $GLOBALS['install_mysql']['login'], $GLOBALS['install_mysql']['pass1'], __FILE__, __LINE__); + + // Is the link up? if (SQL_IS_LINK_UP()) { // Seems to work, also right database? - if (SQL_SELECT_DB($mysql['dbase'], __FILE__, __LINE__) === true) { - // Automatically run install.sql + if (SQL_SELECT_DB($GLOBALS['install_mysql']['dbase'], __FILE__, __LINE__) === true) { + // Check for dumps if ((!isFileReadable(postRequestParameter('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestParameter('spath') . 'install/menu-'.getLanguage().'.sql'))) { // Installation area not found! addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS')); + return; } // END - if + // Any errors detected? if (!ifFatalErrorsDetected()) { // Set type and prefix from POST data setConfigEntry('_TABLE_TYPE' , postRequestParameter('mysql', 'type')); @@ -225,7 +229,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { debug_report_bug(sprintf("SQL dump %s is not readable!", $dump)); } } // END - foreach - //* DEBUG: */ die('
'.print_r(getSqls(), true).'
'); + //* DEBUG: */ die(__FUNCTION__.'['.__LINE__.']:'
'.print_r(getSqls(), true).'
'); // Are some SQLs found? if (countSqls() == 0) { @@ -250,7 +254,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { } // END foreach $content['fatal_errors'] = $OUT; $OUT = ''; - foreach ($mysql as $key => $value) { + foreach ($GLOBALS['install_mysql'] as $key => $value) { $OUT .= ' '; } // END foreach $content['mysql_hidden'] = $OUT; diff --git a/inc/language-functions.php b/inc/language-functions.php index f8e9d61622..a12389d839 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -324,5 +324,20 @@ function getLanguageComparisonDifference ($target) { return $GLOBALS['lang_diff_count'][$target]; } +// Checks wether the given message is masked +function isMessageMasked ($messageId) { + // Is the message id valid? + if (!isMessageIdValid($messageId)) { + // No, then abort here + debug_report_bug(__FUNCTION__ . ': Invalid message id ' . $messageId . ' detected.'); + } // END - if + + // Now simply check it + $masked = (strpos($GLOBALS['messages'][getCurrentLanguage()][$messageId], '%') !== false); + + // Return result + return $masked; +} + // [EOF] ?> diff --git a/inc/language/beg_de.php b/inc/language/beg_de.php index 34c37defbe..19cae426e5 100644 --- a/inc/language/beg_de.php +++ b/inc/language/beg_de.php @@ -49,15 +49,12 @@ addMessages(array( 'ADMIN_CONFIG_BEG_TIMEOUT' => "Zeitsperre global", 'ADMIN_CONFIG_BEG_UID_TIMEOUT' => "Zeitsperre gegen eine Mitglieder-Id", 'ADMIN_CONFIG_BEG_REMOTE_IP_TIMEOUT' => "Zeitsperre gegen eine IP-Nummer", - 'BEG_LINK_BY_1' => "Bettel-Link bei ", - 'BEG_LINK_BY_2' => "", - 'BEG_LINK_USERID_1' => "Unser Mitglied ", - 'BEG_LINK_USERID_2' => " hat {?POINTS?} gebettelt.", + 'BEG_LINK_BY' => "Bettel-Link bei {?MAIN_TITLE?}", + 'BEG_LINK_USERID' => "Unser Mitglied %s hat {?POINTS?} gebettelt.", 'BEG_UID_STEAL_1' => "Das Mitglied ", 'BEG_UID_STEAL_2' => " hat soeben ", 'BEG_UID_STEAL_3' => " {?POINTS?} bei Ihnen erbettelt.", - 'BEG_CLICKS_1' => "Dies war insgesamt der ", - 'BEG_CLICKS_2' => ". Klick auf sein Bettel-Link.", + 'BEG_CLICKS' => "Dies war insgesamt der %s. Klick auf sein Bettel-Link.", 'BEG_THANKS_FOR_CLICK' => "Danke für Ihre Spende.", 'BEG_CONTINUE_REGISTER' => "Und weiter geht es zur Anmeldung bei {?MAIN_TITLE?} ...", 'BEG_SORRY_ANOTHER_WAS_HERE_1' => "Oh schade! Es war vor kurzem schon einer hier! Das Mitglied ", @@ -69,15 +66,13 @@ addMessages(array( 'BEG_MEMBER_EARN_1' => "Sie erhalten von", 'BEG_MEMBER_EARN_2' => "bis", 'BEG_MEMBER_EARN_3' => "für jeden Klick auf Ihren Bettellink.", - 'BEG_MEMBER_TIMEOUT_1' => "Die Zeitsperre ist derzeit eingestellt auf ", - 'BEG_MEMBER_TIMEOUT_2' => ". Innerhalb dieser Zeit erhalten Sie keine erneute Vergütung.", + 'BEG_MEMBER_TIMEOUT' => "Die Zeitsperre ist derzeit eingestellt auf %s. Innerhalb dieser Zeit erhalten Sie keine erneute Vergütung.", 'BEG_MEMBER_HAVE_FUN' => "Viel Spass beim {?POINTS?}-Betteln.", 'BEG_GUEST_TRAILER' => "{?POINTS?} erbetteln bei...", 'BEG_GUEST_EARN_1' => "Betteln macht sich bezahlt! Für jeden Klick erhalten Sie von", 'BEG_GUEST_EARN_2' => "bis", 'BEG_GUEST_EARN_3' => "auf Ihr Mitgliedskonto direkt gutgeschrieben. Zuddem verdienen Sie an den erbettelteten {?POINTS?} Ihrer Refferal mit.", - 'BEG_GUEST_TIMEOUT_1' => "Sie können derzeit alle ", - 'BEG_GUEST_TIMEOUT_2' => " {?POINTS?} betteln.", + 'BEG_GUEST_TIMEOUT' => "Sie können derzeit alle %s {?POINTS?} betteln.", 'BEG_GUEST_HAVE_FUN' => "Heute noch anmelden und Spass haben.", 'ADMIN_BEG_POINTS_MAX' => "Maximale erbettelbare {?POINTS?} bei Klick auf Bettellink", 'ADMIN_BEG_USERID' => "Mitglied-Account zum Abbuchen der erbettelten {?POINTS?}", @@ -107,8 +102,7 @@ addMessages(array( 'BEG_TOTAL' => "Gesamt erbettelt", 'BEG_POINTS' => "Erbettelt", 'BEG_MEMBER_TOTAL' => "Erbettelte {?POINTS?} aller Mitglieder", - 'ADMIN_BEG_TIMEOUT_1' => "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am ", - 'ADMIN_BEG_TIMEOUT_2' => "noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht.", + 'ADMIN_BEG_TIMEOUT' => "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am %s noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht.", 'ADMIN_EDIT_BEG_RALLYE_SETTINGS' => "Einstellungen an der Bettel-Rallye", 'ADMIN_BEG_RALLYE_ACTIVE' => "Ist die Bettel-Rallye aktiv? (Mails können optional versendet werden!)", 'ADMIN_BEG_RALLYE_ONLY_ACTIVE' => "Nur aktive Mitglieder nehmen dran?
(Nur in Verbindung mit der Erweiterung autopurge!)
", diff --git a/inc/language/bonus_de.php b/inc/language/bonus_de.php index 8b45c1b7f3..22665c1a59 100644 --- a/inc/language/bonus_de.php +++ b/inc/language/bonus_de.php @@ -66,9 +66,7 @@ addMessages(array( 'BONUS_POINTS_TITLE' => "Sonderbonus-{?POINTS?}", 'BONUS_RANK_YOU_ARE_404' => "Sie haben bis jetzt noch keine Aktiv-Vergütung erhalten.", 'BONUS_RANK' => "Platz", - 'BONUS_SHOW_HEADER_LINE_1' => "Hier sehen Sie eine Übersicht, wer alles", - 'BONUS_SHOW_HEADER_LINE_2' => "für die Mail", - 'BONUS_SHOW_HEADER_LINE_3' => "erhalten hat", + 'BONUS_SHOW_HEADER_LINE' => "Hier sehen Sie eine Übersicht, wer alles {?POINTS?} für die Mail %s erhalten hat", 'BONUS_SHOW_YOU_HAVE_CONFIRMED' => "Sie haben diese Mail am", 'BONUS_SHOW_CONFIRMED_BONUS_IS' => "Stelle bestätigt. Ihre Zusatz-Gutschrift für diese Mail", 'BONUS_TOTAL' => "Gesamtbonus", @@ -84,8 +82,7 @@ addMessages(array( 'ADMIN_BONUS_WITHDRAW_PREPARED' => "Vergütung des Aktiv-Bonuses vorbereitet.", 'ADMIN_BONUS_WINNER_HIGLIGHTED' => "Mögliche Gewinner der Aktiv-Rallye sind dick marktiert.", 'ADMIN_BONUS_ALREADY_WITHDRAW' => "Manuelle Vergütungvorbereitung bereits betätigt.", - 'ADMIN_BONUS_TIMEOUT_1' => "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am ", - 'ADMIN_BONUS_TIMEOUT_2' => " noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht.", + 'ADMIN_BONUS_TIMEOUT' => "Es werden nur Mitglieder ausgewertet und hier aufgelistet, die spätestens am %s noch aktiv waren. Alle anderen Mitglieder erhalten die Vergütung nicht.", 'ADMIN_BONUS_USERID' => "Mitgliedskonto zum Abbuchen der {?POINTS?}", 'ADMIN_CONFIG_BONUS_TIMEOUT' => "Verweildauer von Aktiv-Bonus-Einträgen", 'ADMIN_BONUS_TURBO_LINES' => "Anzahl angezeigter Aktiv-Bonus-Empfänger in show_bonus.php", @@ -105,7 +102,7 @@ addMessages(array( 'BONUS_STATS_TOTAL' => "100%-Klickratebonus", 'BONUS_POINTS_DISABLED' => "Aktiv-Rallye derzeit nicht aktiv.", 'BONUS_MEMBER_STATS_SUBJECT' => "Ihr Aktiv-Bonus wegen 100% Klickrate", - 'BONUS_LOGIN_BONUS_ADDED' => "Login-Bonus mit {%config,translateComma=login_bonus%} {?POINTS?} vergütet.", + 'BONUS_LOGIN_BONUS_ADDED' => "Login-Bonus mit {%config,translateComma=login_bonus%} {?POINTS?} vergütet.", 'BONUS_LOGIN_BONUS_NOT_ADDED' => "Login-Bonus nicht vergütet.", 'LIST_UNCONFIRMED_BONUS_LINKS' => "Unbest. Bonus-Mail", 'ADMIN_BONUS_MAIL_ALREADY_DELETED' => "Bonus-Mail bereits gelöscht.", @@ -134,8 +131,7 @@ addMessages(array( 'ADMIN_BONUS_RALLYE_REF_INCLUDE' => "Referal-Bonus in monatlicher Auswertung mit einschliessen?", // Header - 'MEMBER_MAIL_BONUS_DETAILS_TITLE_1' => "Details zur Bonusmail ", - 'MEMBER_MAIL_BONUS_DETAILS_TITLE_2' => ":", + 'MEMBER_MAIL_BONUS_DETAILS_TITLE' => "Details zur Bonusmail %s:", // Subject lines 'BONUS_RALLYE_DI_NOTIFY' => "HINWEIS: Aktiv-Rallye gestoppt.", diff --git a/inc/language/de.php b/inc/language/de.php index 6e6be642b1..6f9fde28ea 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -148,8 +148,7 @@ addMessages(array( 'EDIT_MENUS' => "Menüs bearbeiten", 'DEL_MENUS' => "Menüs löschen", 'EDIT_ADMIN_MENU' => "Admin-Menüeinträge ändern", - 'EDIT_MENU_1' => "Es soll/sollen ", - 'EDIT_MENU_2' => " Menüeintrag/-einträge geändert werden:", + 'EDIT_MENU' => "Es soll/sollen %s Menüeintrag/-einträge geändert werden:", 'ENTRY_MODIFY' => "Eintrag", 'SUBMIT_CHANGES' => "Änderungen durchführen", 'ENTRY_404_1' => "Eintrag ", @@ -1177,8 +1176,7 @@ addMessages(array( 'MEMBER_REFLIST_LIST_TITLE_1' => "Ihre Referals in Ebene ", 'MEMBER_REFLIST_LIST_TITLE_2' => " (", 'MEMBER_REFLIST_LIST_TITLE_3' => "%)", - 'MEMBER_REFLIST_COUNTER_1' => "In dieser Ebene haben Sie ", - 'MEMBER_REFLIST_COUNTER_2' => " Mitglieder geworben.", + 'MEMBER_REFLIST_COUNTER' => "In dieser Ebene haben Sie %s Mitglieder geworben.", 'MEMBER_REFLIST_TITLE' => "Referal-Übersicht", 'MEMBER_REFLIST_POINTS' => "Verdienst des Mitgliedes", 'MEMBER_REFLIST_ACTIVITY' => "Mitglied aktiv?", diff --git a/inc/language/doubler_de.php b/inc/language/doubler_de.php index 80cf6e58d2..df79c37f12 100644 --- a/inc/language/doubler_de.php +++ b/inc/language/doubler_de.php @@ -85,8 +85,7 @@ addMessages(array( 'DOUBLER_NOTE_FOR_PASSWORD' => "Das Passwort wird nicht gespeichert.", 'DOUBLER_ENTER_POINTS' => "{?POINTS?} zum Verdoppeln", 'DOUBLER_NOW' => "Verdoppeln.", - 'DOUBLER_ALREADY_PAYED_1' => "Es wurden bereits", - 'DOUBLER_ALREADY_PAYED_2' => "ausgezahlt.", + 'DOUBLER_ALREADY_PAYED' => "Es wurden bereits %s {?POINTS?} ausgezahlt.", 'DOUBLER_MINIMUM_IS' => "Mindestens", 'DOUBLER_MAXIMUM_IS' => "verdoppeln, maximal", 'DOUBLER_HAVE_FUN' => "Viel Spaß.", diff --git a/inc/language/holiday_de.php b/inc/language/holiday_de.php index c46e47b49c..f18ed4dc79 100644 --- a/inc/language/holiday_de.php +++ b/inc/language/holiday_de.php @@ -47,9 +47,7 @@ addMessages(array( 'HOLIDAY_MEMBER_TITLE' => "Von wann bis wann sind Sie im Urlaub?", 'HOLIDAY_MEMBER_TSTART' => "Anfang Ihres Urlaubes", 'HOLIDAY_MEMBER_TEND' => "Ende Ihres Urlaubes", -// @TODO Rewrite these two constants to one - 'HOLIDAY_MAX_DAYS_1' => "Sie können nicht mehr als ", - 'HOLIDAY_MAX_DAYS_2' => " Tag(e) an Urlaub einstellen.", + 'HOLIDAY_MAX_DAYS' => "Sie können nicht mehr als %s Tag(e) an Urlaub einstellen.", 'HOLIDAY_ADD' => "Urlaubsschaltung aktivieren", 'HOLIDAY_COMMENTS' => "Sonstige Hinweise an uns", 'HOLIDAY_NOTES' => "Sobald Sie das Formular abgeschickt haben, wird die Urlaubsschaltung für Ihren Account aktiviert. Sie können sich weiterhin im Mitgliedsbereich aufhalten, können aber keine Mails mehr empfangen und auch selber keine mehr buchen.", diff --git a/inc/language/mailid_de.php b/inc/language/mailid_de.php index ff3c08dbdc..33fb535f2f 100644 --- a/inc/language/mailid_de.php +++ b/inc/language/mailid_de.php @@ -46,18 +46,13 @@ if (!defined('__SECURITY')) { addMessages(array( 'MAIL_DATA_INVALID' => "Daten der Mailbuchung sind fehlerhaft.", 'ERROR_CONFIRMING_MAIL' => "Bitte klicken Sie nur Links aus Ihrem Mitgliedsbereich oder aus den Mails an.", - 'THANX_POINTS_ADDED_1' => "Vielen Dank für die Bestätigung der Mail. Die ", - 'THANX_POINTS_ADDED_2' => " {?POINTS?} wurden Ihnen gerade gutgeschrieben.", - 'THANX_POINTS_LOCKED_1' => "Vielen Dank für die Bestätigung der Mail. Die ", - 'THANX_POINTS_LOCKED_2' => " {?POINTS?} werden Ihnen bald gutgeschrieben.", - 'POINTS_NOT_ADDED_1' => "Falscher Bestätigungscode eingegeben! Die ", - 'POINTS_NOT_ADDED_2' => " {?POINTS?} wurden dem Versender wieder gutgeschrieben.", + 'THANX_POINTS_ADDED' => "Vielen Dank für die Bestätigung der Mail. Die %s {?POINTS?} wurden Ihnen gerade gutgeschrieben.", + 'THANX_POINTS_LOCKED' => "Vielen Dank für die Bestätigung der Mail. Die %s {?POINTS?} werden Ihnen bald gutgeschrieben.", + 'POINTS_NOT_ADDED' => "Falscher Bestätigungscode eingegeben! Die %s {?POINTS?} wurden dem Versender wieder gutgeschrieben.", 'ENTER_CODE' => "Code eingeben", - 'MEMBER_TIME_COUNTER_1' => "Gutschrift der {?POINTS?} erfolgt in", - 'MEMBER_TIME_COUNTER_2' => ".", + 'MEMBER_TIME_COUNTER' => "Gutschrift der {?POINTS?} erfolgt in %s ...", 'SUBMIT_CODE' => "Abschicken", - 'MAILID_TOTAL_POINTS1' => "Ihr Kontostand beträgt jetzt", - 'MAILID_TOTAL_POINTS2' => ".", + 'MAILID_TOTAL_POINTS' => "Ihr Kontostand beträgt jetzt %s {?POINTS?}.", 'MEMBER_GENERAL_MAIL_PROBLEM' => "Allgemeines Mail-Problem erkannt. Bitte beim Support melden" )); diff --git a/inc/language/rallye_de.php b/inc/language/rallye_de.php index 77c4766da7..871d3f83c6 100644 --- a/inc/language/rallye_de.php +++ b/inc/language/rallye_de.php @@ -60,8 +60,7 @@ addMessages(array( 'RALLYE_TEMPLATE' => "Template (anstelle freien HTML-Codes)", 'RALLYE_PROBLEM_CREATE' => "Problem beim Erzeugen der Referal-Rallye.", 'RALLYE_NO_RALLYES_SETUP' => "Bitte fügen Sie zuerst eine neue Referal-Rallye hinzu.", - 'RALLYE_CONFIG_PRICES_1' => "Preise einrichten für Referal-Rallye ", - 'RALLYE_CONFIG_PRICES_2' => "", + 'RALLYE_CONFIG_PRICES' => "Preise einrichten für Referal-Rallye %s", 'RALLYE_PRICE_LEVEL' => "Platz eingeben (1, 2, 3, usw.)", 'RALLYE_PRICE_POINTS' => "Preis in {?POINTS?}", 'RALLYE_PRICE_INFOS' => "Preisbeschreibung (Sie können auch nur die Beschreibung eingeben!)", @@ -112,8 +111,7 @@ addMessages(array( 'RALLYE_ADMIN_NOTIFY' => "Neue Ref-Rallye: %s", 'RALLYE_ADMIN_USERS_404' => "Zur ausgewählten Referal-Rallye sind noch keine Mitglieder hinzugefügt worden.", // @TODO Rewrite following two lines to one - 'RALLYE_LIST_USERS_1' => "Teilnehmende Mitglieder an der Referal-Rallye ", - 'RALLYE_LIST_USERS_2' => "", + 'RALLYE_LIST_USERS' => "Teilnehmende Mitglieder an der Referal-Rallye %s", 'RALLYE_OLD_REFS' => "Refs vor Referal-Rallye", 'RALLYE_NEW_REFS' => "Neue Refs", 'RALLYE_STOP_AUTO_ADD_NOW' => "Auto-Beitreten neuer Mitglieder deaktivieren", diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index c54e54c2ee..54a610c4ca 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -45,10 +45,8 @@ if (!defined('__SECURITY')) { // Admin language strings // @TODO Rewrite these constants to one addMessages(array( - 'ADMIN_LIST_USER_NOREFS_1' => "Das Mitglied ", - 'ADMIN_LIST_USER_NOREFS_2' => " hat in dieser Referal-Ebene keine Refs.", - 'ADMIN_LIST_USER_NODATA_1' => "Das Mitglied ", - 'ADMIN_LIST_USER_NODATA_2' => " wurde bereits gelöscht.", + 'ADMIN_LIST_USER_NOREFS' => "Das Mitglied %s hat in dieser Referal-Ebene keine Refs.", + 'ADMIN_LIST_USER_NODATA' => "Das Mitglied %s wurde bereits gelöscht.", 'ADMIN_CONFIG_REFBACK_TITLE' => "Refback-Einstellungen", 'ADMIN_CONFIG_REFBACK_ENABLED' => "Refback eingeschaltet? (Wenn nein, ist nur die Referal-Übersicht funktionell.)", 'ADMIN_CONFIG_REFBACK_MIN_PERCENTS' => "Minimum erlaubte Refback-Prozente:
(0% ist immer erlaubt!)", diff --git a/inc/language/sponsor_de.php b/inc/language/sponsor_de.php index 718c6a0de4..cd52172e63 100644 --- a/inc/language/sponsor_de.php +++ b/inc/language/sponsor_de.php @@ -117,10 +117,8 @@ addMessages(array( 'ADMIN_SPONSOR_POINTS_SUBTRACTED' => "{?POINTS?} wurden abgezogen.", 'ADMIN_SPONSPOR_CANNOT_LOCK_PENDING_UNCINFIRMED_ACCOUNTS' => "Sie können keine auf Freischaltung wartende oder unbestätigte Accounts sperren/freigeben.", // @TODO Rewrite these four constants to one and use sprintf() - 'ADMIN_HEADER_DEL_SPONSOR_1' => "Sponsorenaccount ", - 'ADMIN_HEADER_DEL_SPONSOR_2' => " löschen", - 'ADMIN_TEXT_DEL_SPONSOR_1' => "Möchten Sie den Sponsoren ", - 'ADMIN_TEXT_DEL_SPONSOR_2' => " mit samt aller seiner Bestellungen unwiederruflich löschen?", + 'ADMIN_HEADER_DEL_SPONSOR' => "Sponsorenaccount %s löschen", + 'ADMIN_TEXT_DEL_SPONSOR' => "Möchten Sie den Sponsoren %s mit samt aller seiner Bestellungen unwiederruflich löschen?", 'ADMIN_SPONSOR_DELETED' => "Sponsorenaccount %s entfernt.", 'GUEST_SPONSOR_TITLE' => "Anmeldung als Sponsor", 'SPONSOR_ENTER_COMPANY_DATA' => "Daten zum Unternehmen", diff --git a/inc/modules/admin.php b/inc/modules/admin.php index b12271915c..7822bf081f 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -58,6 +58,9 @@ if (!isAdminRegistered()) { setPostRequestParameter('ok', '***'); } // END - if + // Clear error message + $errorMessage = ''; + if ((isFormSent()) && (postRequestParameter('ok') != '***')) { // Hash the password with the old function because we are here in install mode $hashedPass = md5(postRequestParameter('pass1')); @@ -76,21 +79,35 @@ if (!isAdminRegistered()) { // Registering is done redirectToUrl('modules.php?module=admin&register=done'); } else { - $ret = getMessage('ADMIN_CANNOT_COMPLETE'); + // Registration incomplete + $errorMessage = getMessage('ADMIN_CANNOT_COMPLETE'); + + // Set this to have our error message displayed + setPostRequestParameter('ok', '***'); } break; case 'failed': // Registration has failed - $ret = getMessage('ADMIN_REGISTER_FAILED'); + $errorMessage = getMessage('ADMIN_REGISTER_FAILED'); + + // Set this to have our error message displayed + setPostRequestParameter('ok', '***'); break; case 'already': // Admin does already exists! - $ret = getMessage('ADMIN_LOGIN_ALREADY_REG'); + $errorMessage = getMessage('ADMIN_LOGIN_ALREADY_REG'); + + // Set this to have our error message displayed + setPostRequestParameter('ok', '***'); break; default: // Any other kind will be logged - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown return code %s from ifAdminLoginDataIsValid().", $ret)); + $errorMessage = sprintf("Unknown return code %s from ifAdminLoginDataIsValid().", $ret); + logDebugMessage(__FILE__, __LINE__, $errorMessage); + + // Set this to have our error message displayed + setPostRequestParameter('ok', '***'); break; } // END - switch } // END - if @@ -119,7 +136,7 @@ if (!isAdminRegistered()) { if (empty($content['login'])) $loginMessage = getMessage('ADMIN_NO_LOGIN'); // An error comes back from registration? - if ((!empty($ret)) && ($ret != 'init')) $loginMessage = $ret; + if ((!empty($ret)) && ($ret != 'init')) $loginMessage = $errorMessage; // No password 1 entered or to short? if (!isPostRequestParameterSet('pass1')) $pass1Message = getMessage('ADMIN_NO_PASS1'); @@ -147,7 +164,7 @@ if (!isAdminRegistered()) { // Load register template loadTemplate('admin_reg_form', false, $content); - } + } // END - if } elseif (isGetRequestParameterSet('reset_pass')) { // Is the form submitted? if ((isPostRequestParameterSet('send_link')) && (isPostRequestParameterSet('email'))) { diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index aa6ca5fed6..6a273ad932 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -100,11 +100,11 @@ ORDER BY `points` DESC, `last_online` DESC, `userid` ASC", } // END - if // Prepare content - $content['userid'] = generateUserProfileLink($content['userid']); - $content['email'] = generateEmailLink($content['email'], 'user_data'); - $content['gender'] = translateGender($content['gender']); - $content['points'] = translateComma($content['points']); - $content['last_online'] = generateDateTime($content['last_online'], 2); + $content['userid'] = generateUserProfileLink($content['userid']); + $content['email'] = generateEmailLink($content['email'], 'user_data'); + $content['gender'] = translateGender($content['gender']); + $content['points'] = translateComma($content['points']); + $content['last_online'] = generateDateTime($content['last_online'], 2); $content['sw'] = $SW; $content['win1'] = $WIN1; $content['win2'] = $WIN2; @@ -128,10 +128,11 @@ ORDER BY `points` DESC, `last_online` DESC, `userid` ASC", } // Prepare constant for timemark + // @TODO Can't this be moved into our expression language? if (isExtensionActive('autopurge')) { $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), 2); } else { - $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('EXTENSION_PROBLEM_NOT_INSTALLED', 'autopurge')); + $content['autopurge_timeout'] = getMaskedMessage('EXTENSION_PROBLEM_NOT_INSTALLED', 'autopurge'); } // Load final template diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 9b21491ad1..1d56c3a785 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -111,7 +111,7 @@ LIMIT 1", } // Transfer variables... - $eval = "\$URL = \"".$eurl."\";"; + $eval = '$URL = "' . $eurl . '";'; $reason = encodeString(getMessage('PAYOUT_REASON_PAYOUT'), false); // Run code... diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index 526741c10c..4ad7d8b267 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -151,20 +151,17 @@ if ((!isInstalling()) && (!isInstallationPhase())) { loadIncludeOnce($inc); } // END - foreach - // Init filter system here - initFilterSystem(); + // Load cache + loadIncludeOnce('inc/load_cache.php'); + + // Run the init filter chain + runFilterChain('init'); // Are we installation routine? if ((!isInstalling()) && (getOutputMode() != 1) && (getOutputMode() != -1)) { // You have to install first! redirectToUrl('install.php'); } // END - if - - // Load cache - loadIncludeOnce('inc/load_cache.php'); - - // Run the init filter chain - runFilterChain('init'); } // Handle fatal errors diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 52091822ef..bbdcca0569 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -702,6 +702,11 @@ function fetchUserData ($userid, $column = 'userid') { // This patched function will reduce many SELECT queries for the specified or current admin login function isAdmin ($adminLogin = '') { + // No admin in installation phase! + if (isInstallationPhase()) { + return false; + } // END - if + // Init variables $ret = false; $passCookie = ''; diff --git a/index.php b/index.php index b752d94ed5..57059d512a 100644 --- a/index.php +++ b/index.php @@ -38,6 +38,9 @@ * MA 02110-1301 USA * ************************************************************************/ +// XDEBUG call +//* DEBUG: */ xdebug_start_trace(); + // Load security stuff here require('inc/libs/security_functions.php'); diff --git a/templates/de/html/admin/admin_add_rallye_prices.tpl b/templates/de/html/admin/admin_add_rallye_prices.tpl index b872162f62..64abd933dc 100644 --- a/templates/de/html/admin/admin_add_rallye_prices.tpl +++ b/templates/de/html/admin/admin_add_rallye_prices.tpl @@ -3,7 +3,7 @@ diff --git a/templates/de/html/admin/admin_amenu_edit_form.tpl b/templates/de/html/admin/admin_amenu_edit_form.tpl index 552bd82036..a05516d6bd 100644 --- a/templates/de/html/admin/admin_amenu_edit_form.tpl +++ b/templates/de/html/admin/admin_amenu_edit_form.tpl @@ -8,7 +8,7 @@ $content[rows] diff --git a/templates/de/html/admin/admin_del_sponsor.tpl b/templates/de/html/admin/admin_del_sponsor.tpl index 2241b46c13..4f7a0a295b 100644 --- a/templates/de/html/admin/admin_del_sponsor.tpl +++ b/templates/de/html/admin/admin_del_sponsor.tpl @@ -2,11 +2,11 @@
-
{--ADMIN_HEADER_DEL_SPONSOR_1--}$content[userid]{--ADMIN_HEADER_DEL_SPONSOR_2--}
+
{%message,ADMIN_HEADER_DEL_SPONSOR,$content[userid]%}
- {--ADMIN_TEXT_DEL_SPONSOR_1--}$content[userid]{--ADMIN_TEXT_DEL_SPONSOR_2--} + {%message,ADMIN_TEXT_DEL_SPONSOR,$content[userid]%}
diff --git a/templates/de/html/admin/admin_gmenu_edit_form.tpl b/templates/de/html/admin/admin_gmenu_edit_form.tpl index cbfe83f117..385138a55f 100644 --- a/templates/de/html/admin/admin_gmenu_edit_form.tpl +++ b/templates/de/html/admin/admin_gmenu_edit_form.tpl @@ -8,7 +8,7 @@
$content[rows] diff --git a/templates/de/html/admin/admin_list_beg.tpl b/templates/de/html/admin/admin_list_beg.tpl index 2645e40f1d..2b3d6df300 100644 --- a/templates/de/html/admin/admin_list_beg.tpl +++ b/templates/de/html/admin/admin_list_beg.tpl @@ -39,7 +39,7 @@ {--ADMIN_BEG_WINNER_HIGLIGHTED--}
- {--ADMIN_BEG_TIMEOUT_1--} $content[autopurge_timeout] {--ADMIN_BEG_TIMEOUT_2--} + {%message,ADMIN_BEG_TIMEOUT,$content[autopurge_timeout]%}
diff --git a/templates/de/html/admin/admin_list_bonus.tpl b/templates/de/html/admin/admin_list_bonus.tpl index 40eaf1c2ab..b0cb600612 100644 --- a/templates/de/html/admin/admin_list_bonus.tpl +++ b/templates/de/html/admin/admin_list_bonus.tpl @@ -40,7 +40,7 @@ {--ADMIN_BONUS_WINNER_HIGLIGHTED--}
- {--ADMIN_BONUS_TIMEOUT_1--}$content[autopurge_timeout]{--ADMIN_BONUS_TIMEOUT_2--} + {%message,ADMIN_BONUS_TIMEOUT,$content[autopurge_timeout]%}
diff --git a/templates/de/html/admin/admin_list_rallye_usr.tpl b/templates/de/html/admin/admin_list_rallye_usr.tpl index 4e140849c7..bbe7e1ca8a 100644 --- a/templates/de/html/admin/admin_list_rallye_usr.tpl +++ b/templates/de/html/admin/admin_list_rallye_usr.tpl @@ -1,7 +1,7 @@
- {--RALLYE_CONFIG_PRICES_1--}$content{--RALLYE_CONFIG_PRICES_2--}: + {%message,RALLYE_CONFIG_PRICES,$content%}:
- {--EDIT_MENU_1--}$content[chk]{--EDIT_MENU_2--} + {%message,EDIT_MENU,$content[chk]%}
- {--EDIT_MENU_1--}$content[chk]{--EDIT_MENU_2--} + {%message,EDIT_MENU,$content[chk]%}
diff --git a/templates/de/html/admin/admin_list_refs_nodata.tpl b/templates/de/html/admin/admin_list_refs_nodata.tpl index 801ad1b2d0..fcfe5a14d6 100644 --- a/templates/de/html/admin/admin_list_refs_nodata.tpl +++ b/templates/de/html/admin/admin_list_refs_nodata.tpl @@ -1,5 +1,5 @@ diff --git a/templates/de/html/admin/admin_list_refs_norefs.tpl b/templates/de/html/admin/admin_list_refs_norefs.tpl index 59c8bbf182..6b28682544 100644 --- a/templates/de/html/admin/admin_list_refs_norefs.tpl +++ b/templates/de/html/admin/admin_list_refs_norefs.tpl @@ -1,5 +1,5 @@ diff --git a/templates/de/html/admin/admin_mmenu_edit.tpl b/templates/de/html/admin/admin_mmenu_edit.tpl index 288e297f7e..cf802a8294 100644 --- a/templates/de/html/admin/admin_mmenu_edit.tpl +++ b/templates/de/html/admin/admin_mmenu_edit.tpl @@ -8,7 +8,7 @@ $content[rows] diff --git a/templates/de/html/beg/beg_done.tpl b/templates/de/html/beg/beg_done.tpl index 369db95223..e91418d964 100644 --- a/templates/de/html/beg/beg_done.tpl +++ b/templates/de/html/beg/beg_done.tpl @@ -2,7 +2,7 @@ diff --git a/templates/de/html/beg/beg_failed.tpl b/templates/de/html/beg/beg_failed.tpl index f6af94a2f8..4e1026e71c 100644 --- a/templates/de/html/beg/beg_failed.tpl +++ b/templates/de/html/beg/beg_failed.tpl @@ -2,7 +2,7 @@ diff --git a/templates/de/html/beg/beg_link.tpl b/templates/de/html/beg/beg_link.tpl index c0bad54f22..d7fe78f14d 100644 --- a/templates/de/html/beg/beg_link.tpl +++ b/templates/de/html/beg/beg_link.tpl @@ -11,11 +11,11 @@ diff --git a/templates/de/html/beg/beg_login.tpl b/templates/de/html/beg/beg_login.tpl index 133f2ede70..2c85a222bb 100644 --- a/templates/de/html/beg/beg_login.tpl +++ b/templates/de/html/beg/beg_login.tpl @@ -2,7 +2,7 @@ diff --git a/templates/de/html/doubler/doubler_index.tpl b/templates/de/html/doubler/doubler_index.tpl index 419b4faa29..fce4115973 100644 --- a/templates/de/html/doubler/doubler_index.tpl +++ b/templates/de/html/doubler/doubler_index.tpl @@ -51,12 +51,9 @@
- {--RALLYE_LIST_USERS_1--}$content[rallye]{--RALLYE_LIST_USERS_2--}: + {%message,RALLYE_LIST_USERS,$content[rallye]%}:
- {--ADMIN_LIST_USER_NODATA_1--}$content[refid]{--ADMIN_LIST_USER_NODATA_2--} + {%message,ADMIN_LIST_USER_NODATA,$content[refid]%}
- {--ADMIN_LIST_USER_NOREFS_1--}$content[userid]{--ADMIN_LIST_USER_NOREFS_2--} + {%message,ADMIN_LIST_USER_NOREFS,$content[userid]%}
- {--EDIT_MENU_1--}$content[chk]{--EDIT_MENU_2--} + {%message,EDIT_MENU,$content[chk]%}
{--BEG_UID_STEAL_1--}$content[userid]{--BEG_UID_STEAL_2--}$content[points]{--BEG_UID_STEAL_3--}
-
{--BEG_CLICKS_1--}$content[clicks]{--BEG_CLICKS_2--}
+
{%message,BEG_CLICKS,$content[clicks]%}
{--BEG_THANKS_FOR_CLICK--}
{--BEG_SORRY_ANOTHER_WAS_HERE_1--}$content[userid]{--BEG_SORRY_ANOTHER_WAS_HERE_2--}$content[points]{--BEG_SORRY_ANOTHER_WAS_HERE_3--}
-
{--BEG_CLICKS_1--}$content[clicks]{--BEG_CLICKS_2--}
+
{%message,BEG_CLICKS,$content[clicks]%}
{--BEG_THANKS_FOR_CLICK_AGAIN--}
- {--BEG_LINK_BY_1--}{?MAIN_TITLE?}{--BEG_LINK_BY_2--} + {--BEG_LINK_BY--}
- {--BEG_LINK_USERID_1--}$content[userid]{--BEG_LINK_USERID_2--} + {%message,BEG_LINK_USERID,$content[userid]%}
{--BEG_SORRY_YOURE_LOGGED_IN_1--}$content[userid]{--BEG_SORRY_YOURE_LOGGED_IN_2--}$content[points]{--BEG_SORRY_YOURE_LOGGED_IN_3--}
-
{--BEG_CLICKS_1--}$content[clicks]{--BEG_CLICKS_2--}
+
{%message,BEG_CLICKS,$content[clicks]%}
{--BEG_THANKS_FOR_CLICK_AGAIN--}

- {--DOUBLER_ALREADY_PAYED_1--} $content[total] - {?POINTS?} {--DOUBLER_ALREADY_PAYED_2--}
- {--DOUBLER_POINTS_LEFT_1--} $content[left] - {?POINTS?} {--DOUBLER_POINTS_LEFT_2--}
- {--DOUBLER_USAGE_COUNTER_1--} {?doubler_counter?} - {--DOUBLER_USAGE_COUNTER_2--}
+ {%message,DOUBLER_ALREADY_PAYED,$content[total]%}
+ {--DOUBLER_POINTS_LEFT_1--} $content[left] {?POINTS?} {--DOUBLER_POINTS_LEFT_2--}
+ {--DOUBLER_USAGE_COUNTER_1--} {?doubler_counter?} {--DOUBLER_USAGE_COUNTER_2--}

{--DOUBLER_MINIMUM_IS--} $content[min] {?POINTS?} {--DOUBLER_MAXIMUM_IS--} $content[max] {?POINTS?}
@@ -80,7 +77,7 @@ {--DOUBLER_REFERAL_8--} {--DOUBLER_REFERAL_LINK--}
$content[message]
{--DOUBLER_NOT_YET_REGISTERED--} {--DOUBLER_REGISTER_NOW--}
+ href="{%url=ref.php?refid=$content[refid]%}">{--DOUBLER_REGISTER_NOW--}

{--DOUBLER_YOUR_ADVERTISING_HERE--} {--DOUBLER_CONTACT_US--}
diff --git a/templates/de/html/guest/guest_beg.tpl b/templates/de/html/guest/guest_beg.tpl index 8154aa2912..e4c56b657a 100644 --- a/templates/de/html/guest/guest_beg.tpl +++ b/templates/de/html/guest/guest_beg.tpl @@ -10,14 +10,13 @@ {--BEG_GUEST_EARN_3--}
- {--BEG_GUEST_TIMEOUT_1--} $content[timeout] - {--BEG_GUEST_TIMEOUT_2--} + {%message,BEG_GUEST_TIMEOUT,$content[timeout]%}
{--BEG_GUEST_HAVE_FUN--}
diff --git a/templates/de/html/guest/guest_doubler.tpl b/templates/de/html/guest/guest_doubler.tpl index 2296fbc4b4..d0a2ef7405 100644 --- a/templates/de/html/guest/guest_doubler.tpl +++ b/templates/de/html/guest/guest_doubler.tpl @@ -9,7 +9,7 @@