./inc/extensions-functions.php:428:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
./inc/extensions-functions.php:544: // @TODO Extension is loaded, what next?
./inc/functions.php:115: // @TODO Extension 'msg' does not exist
-./inc/functions.php:1472: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
-./inc/functions.php:1495: // @TODO Rewrite this old lost code to a template
-./inc/functions.php:1563: // @TODO Are these convertions still required?
-./inc/functions.php:1581:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:1460: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:1483: // @TODO Rewrite this old lost code to a template
+./inc/functions.php:1551: // @TODO Are these convertions still required?
+./inc/functions.php:1569:// @TODO Rewrite this function to use readFromFile() and writeToFile()
./inc/functions.php:178:// @TODO Rewrite this to an extension 'smtp'
-./inc/functions.php:2234: // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2222: // @TODO This is still very static, rewrite it somehow
./inc/install-functions.php:63: // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
./inc/language/de.php:1141:// @TODO Rewrite these two constants
./inc/language/de.php:1156:// @TODO Rewrite these three constants
./inc/libs/register_functions.php:372: // @TODO Rewrite this to a filter
./inc/libs/register_functions.php:379: // @TODO Rewrite this whole if() block to addPointsThroughReferalSystem(). This will also make following if() block obsolete
./inc/libs/register_functions.php:380: // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
-./inc/libs/surfbar_functions.php:1541: // @TODO This can be somehow rewritten
+./inc/libs/surfbar_functions.php:1535: // @TODO This can be somehow rewritten
./inc/libs/surfbar_functions.php:713:// @TODO Can't we use our new expression language instead of this ugly code?
-./inc/libs/surfbar_functions.php:957: // @TODO Invalid salt should be refused
+./inc/libs/surfbar_functions.php:951: // @TODO Invalid salt should be refused
./inc/libs/task_functions.php:241: // @TODO These can be rewritten to filter
./inc/libs/task_functions.php:53:// @TODO Move all extension-dependent queries into filters
./inc/libs/theme_functions.php:95: // @TODO Can't this be rewritten to an API function?
// If the stamp is zero it mostly didn't "happen"
if ($time == '0') {
// Never happend
- return getMessage('NEVER_HAPPENED');
+ return '{--NEVER_HAPPENED--}';
} // END - if
switch (getLanguage()) {
// Translates the "pool type" into human-readable
function translatePoolType ($type) {
- // Default?type is unknown
- $translated = getMaskedMessage('POOL_TYPE_UNKNOWN', $type);
-
- // Generate constant
- $constName = sprintf("POOL_TYPE_%s", $type);
-
- // Does it exist?
- if (isMessageIdValid($constName)) {
- // Then use it
- $translated = getMessage($constName);
- } // END - if
-
// Return "translation"
- return $translated;
+ return sprintf("{--POOL_TYPE_%s--}", $type);
}
// Translates the american decimal dot into a german comma
case 'UNCONFIRMED':
case 'CONFIRMED':
case 'LOCKED':
- $ret = getMessage(sprintf("ACCOUNT_%s", $status));
+ $ret = sprintf("{--ACCOUNT_%s--}", $status);
break;
case '':
// Okay, we have to check it
if (isPostRequestParameterSet('smtp_user') && (!isPostRequestParameterSet('smtp_host'))) {
// Hostname not set
- addToInstallContent('<div class="para">' . getMessage('INSTALL_SMTP_HOSTNAME_EMPTY') . '</div>');
+ addToInstallContent('<div class="para">{--INSTALL_SMTP_HOSTNAME_EMPTY--}</div>');
setGetRequestParameter('page', 3);
} // END - if
if ((!isPostRequestParameterSet('smtp_pass1')) && (isPostRequestParameterSet('smtp_pass2'))) {
// Password is empty
- addToInstallContent('<div class="para">' . getMessage('INSTALL_SMTP_PASS1_EMPTY') . '</div>');
+ addToInstallContent('<div class="para">{--INSTALL_SMTP_PASS1_EMPTY--}</div>');
setGetRequestParameter('page', 3);
} // END - if
if ((isPostRequestParameterSet('smtp_pass1')) && (!isPostRequestParameterSet('smtp_pass2'))) {
// Password repeat is empty
- addToInstallContent('<div class="para">' . getMessage('INSTALL_SMTP_PASS2_EMPTY') . '</div>');
+ addToInstallContent('<div class="para">{--INSTALL_SMTP_PASS2_EMPTY--}</div>');
setGetRequestParameter('page', 3);
} // END - if
if (postRequestParameter('smtp_pass1') != postRequestParameter('smtp_pass1')) {
// Passwords are not matching
- addToInstallContent('<div class="para">' . getMessage('INSTALL_SMTP_PASS_MISMATCH') . '</div>');
+ addToInstallContent('<div class="para">{--INSTALL_SMTP_PASS_MISMATCH--}</div>');
setGetRequestParameter('page', 3);
} // END - if
} // END - if
'POST'
),
array(
- getMessage('ADMIN_NETWORK_REQUEST_TYPE_GET'),
- getMessage('ADMIN_NETWORK_REQUEST_TYPE_POST')
+ '{--ADMIN_NETWORK_REQUEST_TYPE_GET--}',
+ '{--ADMIN_NETWORK_REQUEST_TYPE_POST--}'
),
$networkData['network_request_type']
);
break;
} // END - while
- // Construct constant name
- $constantName = sprintf("REMOVEIP_LEVEL_%s", strtoupper($suffix));
-
// Default message
- $message = getMaskedMessage('REMOVEIP_UNKNOWN_LEVEL', $suffix);
-
- // Is that constant there?
- if (isMessageIdValid($constantName)) {
- // Use that string
- $message = getMessage($constantName);
- } // END - if
+ $message = sprintf("{--REMOVEIP_LEVEL_%s--}", strtoupper($suffix));
// Output message in template
return loadTemplate('removeip_level', true, $message);
$DATA['values'][] = bigintval(getRequestParameter('id'));
// Generate message
- $message = getMessageFromIndexedArray(getMessage('ADMIN_SPONSOR_UPDATED'), 'updated', $messageArray);
- $ret = "updated";
+ $message = getMessageFromIndexedArray('{--ADMIN_SPONSOR_UPDATED--}', 'updated', $messageArray);
+ $ret = 'updated';
} elseif (($ALREADY === false) || (($postData['force'] == 1) && (isAdmin()))) {
// Add new sponsor, first add more data
$DATA['keys'][] = 'sponsor_created'; $DATA['values'][] = time();
}
// Implode all data into strings
- $keyArray = implode("`, `" , $DATA['keys']);
+ $keyArray = implode('`, `' , $DATA['keys']);
$valueArray = str_repeat("%s', '", count($DATA['values']) - 1);
// Generate string
- $sql = "INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_data` (`" . $keyArray . "`) VALUES ('" . $valueArray . "%s')";
+ $sql = 'INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_data` (`' . $keyArray . "`) VALUES ('" . $valueArray . "%s')";
// Generate message
- $message = getMessageFromIndexedArray(getMessage('ADMIN_SPONSOR_ADDED'), 'added', $messageArray);
+ $message = getMessageFromIndexedArray('{--ADMIN_SPONSOR_ADDED--}', 'added', $messageArray);
$ret = 'added';
} elseif (($update === true) && (isAdmin())) {
// Add all data as hidden data
} // END - if
} else {
// Error found!
- $message = getMessageFromIndexedArray(getMessage('SPONSOR_DATA_NOT_SAVED'), 'failed', $messageArray);
+ $message = getMessageFromIndexedArray('{--SPONSOR_DATA_NOT_SAVED--}', 'failed', $messageArray);
loadTemplate('admin_settings_saved', false, $message);
}
$templateName = sprintf("admin_surfbar_%s", $messageType);
// Prepare subject
- $subject = getMessage(sprintf("ADMIN_SURFBAR_NOTIFY_%s_SUBJECT",
+ $subject = sprintf("{--ADMIN_SURFBAR_NOTIFY_%s_SUBJECT--}",
strtoupper($messageType)
- ));
+ );
// Is the subject line there?
if ((substr($subject, 0, 1) == '!') && (substr($subject, -1, 1) == '!')) {
$templateName = sprintf("member_surfbar_%s", $messageType);
// Prepare subject
- $subject = getMessage(sprintf("MEMBER_SURFBAR_NOTIFY_%s_SUBJECT",
+ $subject = sprintf("{--MEMBER_SURFBAR_NOTIFY_%s_SUBJECT--}",
strtoupper($messageType)
- ));
+ );
// Is the subject line there?
if ((substr($subject, 0, 1) == '!') && (substr($subject, -1, 1) == '!')) {
// Translate the URL status
function translateSurfbarUrlStatus ($status) {
- // Create constant name
- $constantName = sprintf("SURFBAR_URL_STATUS_%s", strtoupper($status));
-
- // Get message
- $statusTranslated = getMessage($constantName);
-
// Return result
- return $statusTranslated;
+ return sprintf("{--SURFBAR_URL_STATUS_%s--}", strtoupper($status));
}
// Determine reward
return getMaskedMessage('WERNIS_ERROR_STATUS', $GLOBALS['wernis_data']['status']);
} else {
// Something bad happend
- return getMessage('WERNIS_UNKNOWN_ERROR');
+ return '{--WERNIS_UNKNOWN_ERROR--}';
}
}
return $GLOBALS['wernis_data']['status'];
} else {
// Something bad happend
- return getMessage('WERNIS_UNKNOWN_ERROR');
+ return '{--WERNIS_UNKNOWN_ERROR--}';
}
}
// Is there an account?
if (SQL_HASZERONUMS($result)) {
// No account found!
- return getMessage('ADMIN_NO_LOGIN_WITH_EMAIL');
+ return '{--ADMIN_NO_LOGIN_WITH_EMAIL--}';
} // END - if
// Load all data
sendEmail($email, '{--ADMIN_RESET_PASS_LINK_SUBJECT--}', $mailText);
// Prepare output
- return getMessage('ADMIN_RESET_LINK_SENT');
+ return '{--ADMIN_RESET_LINK_SENT--}';
}
// Validate hash and login for password reset
runFilterChain('post_admin_reset_pass', array('login' => $login, 'hash' => $passHash));
// Return output
- return getMessage('ADMIN_PASSWORD_RESET_DONE');
+ return '{--ADMIN_PASSWORD_RESET_DONE--}';
}
// Solves a task by given id number
}
// Prepare some constants for the template
-$content['auto_add_options'] = generateOptionList('/ARRAY/', array('Y','N'), array(getMessage('YES'), '{--NO--}' ));
-$content['active_options'] = generateOptionList('/ARRAY/', array('N','Y'), array(getMessage('NO') , '{--YES--}'));
-$content['notify_options'] = generateOptionList('/ARRAY/', array('Y','N'), array(getMessage('YES'), '{--NO--}' ));
+$content['auto_add_options'] = generateOptionList('/ARRAY/', array('Y','N'), array('{--YES--}', '{--NO--}' ));
+$content['active_options'] = generateOptionList('/ARRAY/', array('N','Y'), array('{--NO--}' , '{--YES--}'));
+$content['notify_options'] = generateOptionList('/ARRAY/', array('Y','N'), array('{--YES--}', '{--NO--}' ));
// Starting day
$content['start_sec'] = addSelectionBox('sec' , 0 , 'start');
'/ARRAY/',
array('allow', 'deny'),
array(
- getMessage('ADMINS_ALLOW_MODE'),
- getMessage('ADMINS_DENY_MODE')
+ '{--ADMINS_ALLOW_MODE--}',
+ '{--ADMINS_DENY_MODE--}'
),
$mode
),
'/ARRAY/',
array('allow', 'deny'),
array(
- getMessage('ADMINS_ALLOW_MODE'),
- getMessage('ADMINS_DENY_MODE')
+ 'ADMINS_ALLOW_MODE--}',
+ 'ADMINS_DENY_MODE--}'
)
);
$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Get language string
- $content['field_name'] = getMessage(strtoupper($content['field_name']));
+ $content['field_name'] = '{--' . strtoupper($content['field_name']) . '--}';
// Add more data
$content['selection'] = addSelectionBox('yn', $content['field_required'], 'sel[' . $content['id'] . ']');
ORDER BY
`timestamp` DESC";
-$WHO = '{--_ALL--}';
+$WHO = '';
$SQL2 = '';
if (isGetRequestParameterSet(('mid'))) {
// Init result_bonus
$result_bonus = false;
-if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
+if ((isExtensionActive('bonus')) && (empty($WHO))) {
// Check for maximum pages
$result_bonus = SQL_QUERY("SELECT
`id`, `subject`, `text`, `receivers`, `points`, `time`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `mails_sent`, `clicks`
// Run SQL query for normal mails
$result_list = SQL_QUERY($sql, __FILE__, __LINE__);
-if ((!empty($SQL2)) && ($WHO == getMessage('_ALL'))) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
+if ((!empty($SQL2)) && (empty($WHO))) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
// Calculate pages
$numPages = '0';
loadTemplate('admin_list_emails', false, $content);
$MAIL = true;
- if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
+ if ((isExtensionActive('bonus')) && (empty($WHO))) {
// Only check if bonus extension is active
if (SQL_NUMROWS($result_bonus) > 0) outputHtml('<br /><br />');
} // END - if
}
-if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) {
+if ((isExtensionActive('bonus')) && (empty($WHO))) {
// Load bonus mails only when extension is active
if (SQL_NUMROWS($result_bonus) > 0) {
// Calculate pages
$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// "Translate" some data
- $content['actions_action'] = getMessage(sprintf("MEMBER_SURFBAR_ACTION_%s_SUBMIT", $content['actions_action']));
+ $content['actions_action'] = sprintf("{--MEMBER_SURFBAR_ACTION_%s_SUBMIT--}", strtoupper($content['actions_action']));
// New status set?
if (!is_null($content['actions_new_status'])) {
$content['title'] = '{--ADMIN_ALL_ACCOUNTS--}';
if (isGetRequestParameterSet(('status'))) {
// Set title according to the 'status'
- $content['title'] = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(getRequestParameter(('status')))));
+ $content['title'] = sprintf("{--ADMIN_LIST_STATUS_%s_ACCOUNTS--}", strtoupper(getRequestParameter(('status'))));
} elseif (isGetRequestParameterSet('mode')) {
// Set title according to the "mode"
- $content['title'] = getMessage(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(getRequestParameter('mode'))));
+ $content['title'] = sprintf("{--ADMIN_LIST_MODE_%s_ACCOUNTS--}", strtoupper(getRequestParameter('mode')));
}
// Merge more data again
}
} else {
// No sponsor found
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getRequestParameter('hash')));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('SPONSOR_ACCOUNT_404', getRequestParameter('hash')));
}
// Free memory
case 'notify': // Switch off notfication
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `notified`='N', `last_update`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
array(getMemberId()), __FILE__, __LINE__);
- $url = 'modules.php?module=login&what=welcome&code=' . urlencode(getMessage('PROFILE_UPDATED'));
+ $url = 'modules.php?module=login&what=mydata&code=' . getCode('PROFILE_UPDATED');
break;
} // END - switch