FMCorz / AclManager

Plugin to manage Acl for CakePHP 2.x
59 stars 33 forks source link

ACO updating is not being done correctly on Cake 2.1 #3

Closed afolgado closed 12 years ago

afolgado commented 12 years ago

When pressing "Update ACOs", it should update then the first time and report "0 acos updated" the following times. But it always find some ACOs to update.

The bug is on AclController.php, line 212:

$aco = substr($aco, 0, -1); // Remove trailing slash

Sometimes the $aco string doesn't bring a trailing slash, so it's wrongly altered.

Here's the fix:

if (substr($aco, -1) == '/') { $aco = substr($aco, 0, -1); // Remove trailing slash }

FMCorz commented 12 years ago

Thanks for reporting. This has been fixed.