From ee54c112bfb488f833fa032758b817e1bb2c1d7d Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 28 Sep 2006 17:13:38 +0000 Subject: --- system/helpers/typography_helper.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'system/helpers/typography_helper.php') diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php index 6a5495239..65924f911 100644 --- a/system/helpers/typography_helper.php +++ b/system/helpers/typography_helper.php @@ -275,13 +275,13 @@ class Auto_typography { $one_before = substr($str, $start+$current-1, 1); $one_after = substr($str, $start+$current+2, 1); - if ( ! in_array($one_after, $space) && $one_after != "<") + if ( ! in_array($one_after, $space, TRUE) && $one_after != "<") { $str = str_replace( $one_before."\"'".$one_after, $one_before."“‘".$one_after, $str); } - elseif ( ! in_array($one_before, $space) && (in_array($one_after, $space) OR $one_after == '<')) + elseif ( ! in_array($one_before, $space, TRUE) && (in_array($one_after, $space, TRUE) OR $one_after == '<')) { $str = str_replace( $one_before."\"'".$one_after, $one_before."”’".$one_after, @@ -302,13 +302,13 @@ class Auto_typography { $one_before = substr($str, $start+$current-1, 1); $one_after = substr($str, $start+$current+2, 1); - if ( in_array($one_before, $space) && ! in_array($one_after, $space) && $one_after != "<") + if ( in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE) && $one_after != "<") { $str = str_replace( $one_before."'\"".$one_after, $one_before."‘“".$one_after, $str); } - elseif ( ! in_array($one_before, $space) && $one_before != ">") + elseif ( ! in_array($one_before, $space, TRUE) && $one_before != ">") { $str = str_replace( $one_before."'\"".$one_after, $one_before."’”".$one_after, @@ -323,7 +323,7 @@ class Auto_typography { { for ($i=0, $s=sizeof($matches['0']); $i < $s; ++$i) { - if ( ! in_array($matches['1'][$i], $space) && ! in_array($matches['3'][$i], $space)) + if ( ! in_array($matches['1'][$i], $space, TRUE) && ! in_array($matches['3'][$i], $space, TRUE)) { $str = str_replace( $matches['0'][$i], $matches['1'][$i]."“".$matches['2'][$i]."”".$matches['3'][$i], @@ -336,7 +336,7 @@ class Auto_typography { { for ($i=0, $s=sizeof($matches['0']); $i < $s; ++$i) { - if ( ! in_array($matches['1'][$i], $space) && ! in_array($matches['3'][$i], $space)) + if ( ! in_array($matches['1'][$i], $space, TRUE) && ! in_array($matches['3'][$i], $space, TRUE)) { $str = str_replace( $matches['0'][$i], $matches['1'][$i]."‘".$matches['2'][$i]."’".$matches['3'][$i], @@ -357,7 +357,7 @@ class Auto_typography { $one_before = substr($str, $start+$current-1, 1); $one_after = substr($str, $start+$current+1, 1); - if ( ! in_array($one_before, $space) && ! in_array($one_after, $space)) + if ( ! in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE)) { $str = str_replace( $one_before."'".$one_after, $one_before."’".$one_after, @@ -380,9 +380,9 @@ class Auto_typography { $two_before = substr($str, $start+$current-2, 1); $two_after = substr($str, $start+$current+3, 1); - if (( ! in_array($one_before, $space) && ! in_array($one_after, $space)) + if (( ! in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE)) OR - ( ! in_array($two_before, $space) && ! in_array($two_after, $space) && $one_before == ' ' && $one_after == ' ') + ( ! in_array($two_before, $space, TRUE) && ! in_array($two_after, $space, TRUE) && $one_before == ' ' && $one_after == ' ') ) { $str = str_replace( $two_before.$one_before."--".$one_after.$two_after, @@ -413,13 +413,13 @@ class Auto_typography { $one_before = substr($str, $start+$current-1, 1); $one_after = substr($str, $start+$current+1, 1); - if ( ! in_array($one_after, $space)) + if ( ! in_array($one_after, $space, TRUE)) { $str = str_replace( $one_before.'"'.$one_after, $one_before."“".$one_after, $str); } - elseif( ! in_array($one_before, $space)) + elseif( ! in_array($one_before, $space, TRUE)) { $str = str_replace( $one_before."'".$one_after, $one_before."”".$one_after, @@ -440,13 +440,13 @@ class Auto_typography { $one_before = substr($str, $start+$current-1, 1); $one_after = substr($str, $start+$current+1, 1); - if ( ! in_array($one_after, $space)) + if ( ! in_array($one_after, $space, TRUE)) { $str = str_replace( $one_before."'".$one_after, $one_before."‘".$one_after, $str); } - elseif( ! in_array($one_before, $space)) + elseif( ! in_array($one_before, $space, TRUE)) { $str = str_replace( $one_before."'".$one_after, $one_before."’".$one_after, -- cgit v1.2.3-24-g4f1b