• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No 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

Revision68780a2968105a518eecaa98da60d72b197f2f9d (tree)
Time2011-11-03 19:30:08
Authornbuy <nbuy@704c...>
Commiternbuy

Log Message

XoopsObject extents constractor cachce for speedup

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

Change Summary

Incremental Difference

--- a/html/kernel/group.php
+++ b/html/kernel/group.php
@@ -47,11 +47,17 @@ class XoopsGroup extends XoopsObject
4747 */
4848 function XoopsGroup()
4949 {
50+ static $initVars;
51+ if (isset($initVars)) {
52+ $this->vars = $initVars;
53+ return;
54+ }
5055 $this->XoopsObject();
5156 $this->initVar('groupid', XOBJ_DTYPE_INT, null, false);
5257 $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 100);
5358 $this->initVar('description', XOBJ_DTYPE_TXTAREA, null, false);
5459 $this->initVar('group_type', XOBJ_DTYPE_OTHER, null, false);
60+ $initVars = $this->vars;
5561 }
5662 }
5763
--- a/html/kernel/groupperm.php
+++ b/html/kernel/groupperm.php
@@ -65,12 +65,18 @@ class XoopsGroupPerm extends XoopsObject
6565 */
6666 function XoopsGroupPerm()
6767 {
68+ static $initVars;
69+ if (isset($initVars)) {
70+ $this->vars = $initVars;
71+ return;
72+ }
6873 $this->XoopsObject();
6974 $this->initVar('gperm_id', XOBJ_DTYPE_INT, null, false);
7075 $this->initVar('gperm_groupid', XOBJ_DTYPE_INT, null, false);
7176 $this->initVar('gperm_itemid', XOBJ_DTYPE_INT, null, false);
7277 $this->initVar('gperm_modid', XOBJ_DTYPE_INT, 0, false);
7378 $this->initVar('gperm_name', XOBJ_DTYPE_OTHER, null, false);
79+ $initVars = $this->vars;
7480 }
7581
7682 function cleanVars()