// Init counter
$count = 0;
- // Compile the raw code
- $code = compileRawCode($code);
-
// Compile all out
while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($count < 7)) {
// Init common variables
// Use it again
$code = $newContent;
+ // Compile the final code
+ $code = compileRawCode($code);
+
// Count round
$count++;
} // END - while
+ // Add debugging data in HTML code, if mode is enabled
+ if ((isDebugModeEnabled()) && ($insertComments === true)) {
+ // Add loop count
+ $code .= '<!-- Total compilation loop=' . $count . ' //-->';
+ } // END - if
+
// Return the compiled code
return $code;
}
$newMatch = str_replace('[', "['", str_replace(']', "']", $match));
$code = str_replace($match, '".' . $newMatch . '."', $code);
$matchesFound[$key . '_' . $matches[4][$key]] = 1;
- $matchesFound[$match] = 1;
+ $matchesFound[$match] = true;
} elseif (!isset($matchesFound[$match])) {
// Not yet replaced!
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'match=' . $match);
$code = str_replace($match, '".' . $match . '."', $code);
$matchesFound[$match] = 1;
+ } else {
+ // Everthing else should be a least logged
+ logDebugMessage(__FUNCTION__, __LINE__, 'match=' . $match . ',key=' . $key);
}
} // END - foreach
} // END - if
$EMAIL = generateSponsorEmailLink($email);
}
- // Shall I close the link when there is no admin?
- if ((!isAdmin()) && ($EMAIL == $email)) $EMAIL = '#'; // Closed!
-
// Return email link
return $EMAIL;
}