* Kurzbeschreibung : Template-Funktionen *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Main compilation loop
function doFinalCompilation ($code, $insertComments = TRUE, $enableCodes = TRUE) {
+ // Code must not be an array (happens in installer)
+ assert(!is_array($code));
+
// Insert comments? (Only valid with HTML templates, of course)
enableTemplateHtml($insertComments);
// Compile it
//* DEBUG: */ debugOutput('<pre>'.lineNumberCode($code).'</pre>');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'code[]=' . gettype($code) . ',enableCodes[]=' . gettype($enableCodes));
$eval = '$newContent = "' . str_replace('{DQUOTE}', '"', compileCode(escapeQuotes($code), $enableCodes)) . '";';
//* DEBUG: */ if (!$insertComments) print('EVAL=<pre>'.lineNumberCode($eval).'</pre>');
eval($eval);
// Allow none?
if ($allowNone === TRUE) {
// Then add it
- $OUT .= '<option value="0">{--SELECT_NONE--}</option>';
+ $OUT .= '<option value="">{--SELECT_NONE--}</option>';
} // END - if
// Walk through all options
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'name=' . $name . ',default[' . gettype($default) . ']=' . $default . ',optionKey[' . gettype($optionKey) . ']=' . $optionKey);
// Is default value same as given value?
- if ((!is_null($default)) && (isset($option[$optionKey])) && ($default == $option[$optionKey])) {
+ if ((!is_null($default)) && (isset($option[$optionKey])) && ($default === $option[$optionKey])) {
// Then set default
$option['default'] = ' selected="selected"';
} // END - if