| Summary | Reduce number of calls of hasPermission(PERMS_READ) |
| Queue | Kronolith |
| Queue Version | FRAMEWORK_3 |
| Type | Enhancement |
| State | Resolved |
| Priority | 1. Low |
| Owners | Jan Schneider <jan (at) horde (dot) org> |
| Requester | patrick (dot) abiven (at) apitech (dot) fr |
| Created | 11/06/09 (125 days ago) |
| Due | |
| Updated | 11/07/09 (124 days ago) |
| Assigned | |
| Resolved | 11/07/09 (124 days ago) |
| Attachments | |
| Milestone | 2.3.3 |
| Patch | No |
Milestone ⇒ 2.3.3
State ⇒ Resolved
Assigned to Jan Schneider
getLink(). It would really reduce readability and maintainability if
this (and only this, i.e. not the delete and edit checks) is moved out
of this method.
State ⇒ New
Patch ⇒
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Reduce number of calls of hasPermission(PERMS_READ)
Type ⇒ Enhancement
Priority ⇒ 1. Low
In lib/Driver.php, adding a new optional argument $permsread in the
getLink() function enables a valuable optimization (15 seconds instead
of 21 seconds in our scenario). Instead of calling 3 times
hasPermission() we just do a single call.
In lib/Views/Month.php, function html()
$permread = $event->hasPermission(PERMS_READ);
$event->getLink($timestamp, true, $this->link(0, true, $permread)
And then in lib/Driver.php, function getLink() we do not call twice
hasPermission but we use the optional argument.
Regards