XOOPS Cube Legacy base repository
Revision | 5906821f49008b57b8b3fae3e000765bcccd9bcf (tree) |
---|---|
Time | 2011-11-16 22:09:39 |
Author | nbuy <nbuy@704c...> |
Commiter | nbuy |
cache init value for speedup
git-svn-id: https://xoopscube.svn.sourceforge.net/svnroot/xoopscube/Package_Legacy/trunk@1053 704cf05f-ae62-4b0e-a484-234ee0250e75
@@ -28,6 +28,11 @@ class LegacyNewblocksObject extends XoopsSimpleObject | ||
28 | 28 | |
29 | 29 | function LegacyNewblocksObject() |
30 | 30 | { |
31 | + static $initVars; | |
32 | + if (isset($initVars)) { | |
33 | + $this->mVars = $initVars; | |
34 | + return; | |
35 | + } | |
31 | 36 | $this->initVar('bid', XOBJ_DTYPE_INT, '0', true); |
32 | 37 | $this->initVar('mid', XOBJ_DTYPE_INT, '0', true); |
33 | 38 | $this->initVar('func_num', XOBJ_DTYPE_INT, '0', true); |
@@ -48,6 +53,7 @@ class LegacyNewblocksObject extends XoopsSimpleObject | ||
48 | 53 | $this->initVar('template', XOBJ_DTYPE_STRING, '', true, 50); |
49 | 54 | $this->initVar('bcachetime', XOBJ_DTYPE_INT, '0', true); |
50 | 55 | $this->initVar('last_modified', XOBJ_DTYPE_INT, time(), true); |
56 | + $initVars = $this->mVars; | |
51 | 57 | } |
52 | 58 | |
53 | 59 | function loadModule() |