Removing use of ife() from core classes.

This commit is contained in:
mark_story 2009-08-27 22:54:57 -04:00
parent 213b78727f
commit 81865bc960
2 changed files with 2 additions and 2 deletions

View file

@ -844,7 +844,7 @@ class Validation extends Object {
$_this =& Validation::getInstance(); $_this =& Validation::getInstance();
$_this->check = $check; $_this->check = $check;
$validChars = '([' . preg_quote('!"$&\'()*+,-.@_:;=') . '\/0-9a-z]|(%[0-9a-f]{2}))'; $validChars = '([' . preg_quote('!"$&\'()*+,-.@_:;=') . '\/0-9a-z]|(%[0-9a-f]{2}))';
$_this->regex = '/^(?:(?:https?|ftps?|file|news|gopher):\/\/)' . ife($strict, '', '?') . $_this->regex = '/^(?:(?:https?|ftps?|file|news|gopher):\/\/)' . (!empty($strict) ? '' : '?') .
'(?:' . $_this->__pattern['ip'] . '|' . $_this->__pattern['hostname'] . ')(?::[1-9][0-9]{0,3})?' . '(?:' . $_this->__pattern['ip'] . '|' . $_this->__pattern['hostname'] . ')(?::[1-9][0-9]{0,3})?' .
'(?:\/?|\/' . $validChars . '*)?' . '(?:\/?|\/' . $validChars . '*)?' .
'(?:\?' . $validChars . '*)?' . '(?:\?' . $validChars . '*)?' .

View file

@ -702,7 +702,7 @@ class JavascriptHelper extends AppHelper {
$val = 'null'; $val = 'null';
break; break;
case (is_bool($val)): case (is_bool($val)):
$val = ife($val, 'true', 'false'); $val = !empty($val) ? 'true' : 'false';
break; break;
case (is_int($val)): case (is_int($val)):
$val = $val; $val = $val;