-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for ID caching #230
Fix for ID caching #230
Conversation
Rebuilds the cache every time a group or permission is added / deleted (create_perm, delete_perm, create_group, delete_group).
@REJack Merge pls ? |
application/libraries/Aauth.php
Outdated
$query = $this->aauth_db->get($this->config_vars['perms']); | ||
|
||
foreach ($query->result() as $row) { | ||
$key = str_replace(' ', '', trim(strtolower($row->name))); | ||
$this->cache_perm_id[$key] = $row->id; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This curly bracket should not removed! It's cause a error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@REJack Sorry, my mistake, I edited this by the tablet haha, fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name line should be as follows:
private function precache_perms() {
Observer the missing '()' after the function name
/** | ||
* precache_perms() caches all permission IDs for later use. | ||
*/ | ||
private function precache_perms { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name line should be as follows:
private function precache_perms() {
Observer the missing '()' after the function name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the same thing with the function
precache_groups
/** | ||
* precache_groups() caches all group IDs for later use. | ||
*/ | ||
private function precache_groups { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name line should be as follows:
private function precache_groups() {
Observer the missing '()' after the function name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will address issue #234
Rebuilds the cache every time a group or permission is added / deleted (create_perm, delete_perm, create_group, delete_group).