fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [8229] api: cache grant-info in acl as per session


From: Sigurd Nes
Subject: [Fmsystem-commits] [8229] api: cache grant-info in acl as per session
Date: Fri, 02 Dec 2011 07:59:50 +0000

Revision: 8229
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8229
Author:   sigurdne
Date:     2011-12-02 07:59:49 +0000 (Fri, 02 Dec 2011)
Log Message:
-----------
api: cache grant-info in acl as per session

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.acl.inc.php

Modified: trunk/phpgwapi/inc/class.acl.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.acl.inc.php        2011-12-02 07:04:19 UTC (rev 
8228)
+++ trunk/phpgwapi/inc/class.acl.inc.php        2011-12-02 07:59:49 UTC (rev 
8229)
@@ -1321,6 +1321,12 @@
                */
                public function get_grants($app = '', $location = '')
                {
+                       $grant_rights = phpgwapi_cache::session_get('phpgwapi', 
"get_grants_type_{$app}_{$location}");
+                       if ( !is_null($grants) )
+                       {
+                               return $grants; // nothing more to do
+                       }
+
                        $grant_rights   = $this->get_grants_type($app, 
$location, 0);
                        $grant_mask             = $this->get_grants_type($app, 
$location, 1);
                        if ( is_array($grant_mask) )
@@ -1337,6 +1343,7 @@
                                        }
                                }
                        }
+                       phpgwapi_cache::session_set('phpgwapi', 
"get_grants_type_{$app}_{$location}_{$mask}", $grant_rights);
                        return $grant_rights;
                }
                /**




reply via email to

[Prev in Thread] Current Thread [Next in Thread]