Skip to content

Commit

Permalink
Removing use of ife() from core classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 21, 2009
1 parent 0cc1d84 commit 8b419d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cake/libs/validation.php
Expand Up @@ -806,7 +806,7 @@ function url($check, $strict = false) {
$_this =& Validation::getInstance();
$_this->check = $check;
$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})?' .
'(?:\/?|\/' . $validChars . '*)?' .
'(?:\?' . $validChars . '*)?' .
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/view/helpers/javascript.php
Expand Up @@ -678,7 +678,7 @@ function value($val, $quoteStrings = true) {
$val = 'null';
break;
case (is_bool($val)):
$val = ife($val, 'true', 'false');
$val = !empty($val) ? 'true' : 'false';
break;
case (is_int($val)):
$val = $val;
Expand Down

0 comments on commit 8b419d2

Please sign in to comment.