Hi,
I saw in the code a couple of times things like
if ($args['lines'] != '') {
if ( $args['lines'] == 'false' ) $content = str_replace("\n", '\n',
$content); // condense
if ( $args['lines'] == 'true' ) $content = str_replace('\n', "\n",
$content); // expand
}
or like if ( $args['lines'] !== 'false' ) $content =
str_replace('\n', "\n", $content);
Also, the return carriage \r is only taken care of in the log function.
I was wondering if this was really the desired behaviour...
Why not write in engine.php a BOLTdealwithlines function like the following
and do $content = BOLTedalwithlines($content,$args); or
$content = BOLTdealwithlines($content,$args,array('!false')); when
necessary?
function BOLTdealwithlines($content,$args,$checkedValues='') {
if($checkedValues == '') $checkedValues = array('true','false');
$content = str_replace(array('\r\n', '\r'), '\n', $content);
$content = str_replace(array("\r\n", "\r"), "\n", $content);
if ($args['lines'] != '') {
if (($args['lines'] === 'false' &&
in_array('false',$checkedValues)) || ($args['lines'] !== true &&
in_array('!true',$checkedValues)))
$content = str_replace("\n", '\n', $content); // condense
if (($args['lines'] === 'true' && in_array('true',$checkedValues))
|| ($args['lines'] !== 'false' && in_array('!false',$checkedValues)))
$content = str_replace('\n', "\n", $content); // expand
}
return $content;
}
Cheers,
Tiffany
--
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/boltwire.
For more options, visit https://groups.google.com/d/optout.