Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Dec 20, 2012
1 parent 554d579 commit 2b1e5b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Acl/PhpAcl.php
Expand Up @@ -164,7 +164,7 @@ public function check($aro, $aco, $action = "*") {
$allow = $this->options['policy'];
$prioritizedAros = $this->Aro->roles($aro);

if ($action && $action != "*") {
if ($action && $action !== "*") {
$aco .= '/' . $action;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/I18n/I18n.php
Expand Up @@ -456,7 +456,7 @@ public static function loadPo($filename) {

do {
$line = trim(fgets($file));
if ($line == "" || $line[0] == "#") {
if ($line === "" || $line[0] === "#") {
continue;
}
if (preg_match("/msgid[[:space:]]+\"(.+)\"$/i", $line, $regs)) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Model/Permission.php
Expand Up @@ -178,15 +178,15 @@ public function allow($aro, $aco, $actions = "*", $value = 1) {
$save = $perms[0][$this->alias];
}

if ($actions == "*") {
if ($actions === "*") {
$save = array_combine($permKeys, array_pad(array(), count($permKeys), $value));
} else {
if (!is_array($actions)) {
$actions = array('_' . $actions);
}
if (is_array($actions)) {
foreach ($actions as $action) {
if ($action{0} != '_') {
if ($action{0} !== '_') {
$action = '_' . $action;
}
if (in_array($action, $permKeys)) {
Expand Down

0 comments on commit 2b1e5b0

Please sign in to comment.