• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

XOOPS Cube Legacy base repository


Commit MetaInfo

Revision618ded4a8ef666931da749bc512543226ede4632 (tree)
Zeit2011-11-21 22:56:26
Autornbuy <nbuy@704c...>
Commiternbuy

Log Message

Caching active modules for speedup

git-svn-id: https://xoopscube.svn.sourceforge.net/svnroot/xoopscube/Package_Legacy/trunk@1059 704cf05f-ae62-4b0e-a484-234ee0250e75

Ändern Zusammenfassung

Diff

--- a/html/modules/legacy/kernel/Legacy_Controller.class.php
+++ b/html/modules/legacy/kernel/Legacy_Controller.class.php
@@ -71,6 +71,11 @@ class Legacy_Controller extends XCube_Controller
7171 var $mSetBlockCachePolicy = null;
7272
7373 /**
74+ * @var XoopsModule[]
75+ */
76+ var $mActiveModules = null;
77+
78+ /**
7479 * @var XCube_Delegate
7580 */
7681 var $mSetModuleCachePolicy = null;
@@ -767,9 +772,13 @@ class Legacy_Controller extends XCube_Controller
767772 // Auto pre-loading for Module.
768773 //
769774 if ($this->mRoot->getSiteConfig('Legacy', 'AutoPreload') == 1) {
775+ if ($this->mActiveModules) $moduleObjects = $this->mActiveModules;
776+ else {
770777 $moduleHandler =& xoops_gethandler('module');
771778 $criteria = new Criteria('isactive', 1);
779+ $this->mActiveModules =
772780 $moduleObjects =& $moduleHandler->getObjects($criteria);
781+ }
773782 foreach ($moduleObjects as $moduleObject) {
774783 $mod_dir = $moduleObject->getVar('dirname');
775784 $dir = XOOPS_ROOT_PATH . '/modules/' . $mod_dir . $dirname . '/';