$GLOBALS['output'] = '';
} // END - if
- // Transfer username
- $username = getMessage('USERNAME_UNKNOWN');
- if (isset($GLOBALS['username'])) $username = getUsername();
-
// Do we have HTML-Code here?
if (!empty($htmlCode)) {
// Yes, so we handle it as you have configured
// Evaluate the cache
eval(readTemplateCache($template));
} elseif (!isset($GLOBALS['template_eval'][$template])) {
- // Add more variables which you want to use in your template files
- $username = getUsername();
-
// Make all template names lowercase
$template = strtolower($template);
return $ret;
}
+// "Translates" 'visible' and 'locked' to a CSS class
+function translateMenuVisibleLocked ($content, $prefix = '') {
+ // Translate 'visible' and keep an eye on the prefix
+ switch ($content[$prefix . 'visible']) {
+ // Should be visible
+ case 'Y': $content[$prefix . 'visible_css'] = $prefix . 'menu_visible' ; break;
+ case 'N': $content[$prefix . 'visible_css'] = $prefix . 'menu_invisible'; break;
+ default:
+ // Please report this
+ debug_report_bug('Unsupported visible value detected. content=<pre>'.print_r($content, true).'</pre>');
+ break;
+ } // END - switch
+
+ // Translate 'locked' and keep an eye on the prefix
+ switch ($content[$prefix . 'locked']) {
+ // Should be locked
+ case 'Y': $content[$prefix . 'locked_css'] = $prefix . 'menu_locked' ; break;
+ case 'N': $content[$prefix . 'locked_css'] = $prefix . 'menu_unlocked'; break;
+ default:
+ // Please report this
+ debug_report_bug('Unsupported locked value detected. content=<pre>'.print_r($content, true).'</pre>');
+ break;
+ } // END - switch
+
+ // Return the resulting array
+ return $content;
+}
+
// Generates an URL for the dereferer
function generateDerefererUrl ($URL) {
// Don't de-refer our own links!
// Clear own output buffer
$GLOBALS['output'] = '';
+ // Set header
+ setHttpStatus('302 Found');
+
// Load URL when headers are not sent
sendHeader('Location: '.str_replace('&', '&', $URL));
} else {
if ($constants === true) {
// BEFORE 0.2.1 : Language and data constants
// WITH 0.2.1+ : Only language constants
- $code = str_replace('{--', "\" . getMessage('", str_replace('--}', "') . \"", $code));
+ $code = str_replace('{--', "{DQUOTE} . getMessage('", str_replace('--}', "') . {DQUOTE}", $code));
// BEFORE 0.2.1 : Not used
// WITH 0.2.1+ : Data constants
- $code = str_replace('{!', "\" . constant('", str_replace('!}', "') . \"", $code));
+ $code = str_replace('{!', "{DQUOTE} . constant('", str_replace('!}', "') . {DQUOTE}", $code));
} // END - if
// Compile QUOT and other non-HTML codes
// Prepare output
// @TODO This can be easily moved out after the merge from EL branch to this is complete
$content = array(
- 'run_time' => translateComma($runTime),
+ 'run_time' => $runTime,
'sql_time' => translateComma(getConfig('sql_time') * 1000),
);
if (isExtensionActive('mailid', true)) {
$message = getMessage('ERROR_CONFIRMING_MAIL');
} else {
- $message = getMaskedMessage('EXTENSION_PROBLEM_NOT_INSTALLED', 'mailid');
+ $message = getMaskedMessage('EXTENSION_PROBLEM_EXTENSION_NOT_INSTALLED', 'mailid');
}
break;
$pageTitle = '[-- ' . getConfig('MAIN_TITLE') . ' - ' . getModuleTitle(getModule()) . ' --]';
} elseif ((isInstalled()) && (!isAdminRegistered())) {
// Installed but no admin registered
- $pageTitle = getMessage('SETUP_OF_MXCHANGE');
+ $pageTitle = getMessage('SETUP_OF_MAILER');
} elseif ((!isInstalled()) || (!isAdminRegistered())) {
// Installation mode
- $pageTitle = getMessage('INSTALLATION_OF_MXCHANGE');
+ $pageTitle = getMessage('INSTALLATION_OF_MAILER');
} else {
// Configuration not found!
$pageTitle = getMessage('NO_CONFIG_FOUND_TITLE');
// Generate FQFN
$FQFN = generateCacheFqfn($template);
- // Replace username with a call
- $eval = str_replace('$username', '".getUsername()."', $eval);
-
// And flush it
writeToFile($FQFN, $eval, true);
} // END - if