You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(19) |
Nov
(16) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(29) |
Feb
(19) |
Mar
(13) |
Apr
(4) |
May
(7) |
Jun
(18) |
Jul
(10) |
Aug
(43) |
Sep
(58) |
Oct
(39) |
Nov
(13) |
Dec
(27) |
2009 |
Jan
(1) |
Feb
(14) |
Mar
(5) |
Apr
(18) |
May
|
Jun
(1) |
Jul
(3) |
Aug
(5) |
Sep
(2) |
Oct
(4) |
Nov
(1) |
Dec
|
2010 |
Jan
(27) |
Feb
(14) |
Mar
(24) |
Apr
(9) |
May
(10) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ki...@us...> - 2012-02-08 06:52:05
|
Revision: 536 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=536&view=rev Author: kilica Date: 2012-02-08 06:51:59 +0000 (Wed, 08 Feb 2012) Log Message: ----------- Fix Bug : get all Detail data, not 20 data. Fix Bug : english language file Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/main.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2012-02-08 06:51:59 UTC (rev 536) @@ -18,6 +18,10 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.25(2012.02.08) +\x81E\x83o\x83O\x8FC\x90\xB3\x81i\x89p\x8Cꌾ\x8C\xEA\x83t\x83@\x83C\x83\x8B\x81j +\x81E\x83o\x83O\x8FC\x90\xB3\x81i\x8FW\x8Cv\x83f\x81[\x83^\x82\xF020\x8C\x8F\x82\xB5\x82\xA9\x8E擾\x82\xB5\x82Ă\xA2\x82Ȃ\xA9\x82\xC1\x82\xBD\x81j + 0.24(2011.04.21) \x81E\x83J\x83e\x83S\x83\x8A\x96\xA2\x90ݒ莞\x82ɃA\x83\x93\x83P\x81[\x83g\x82\xF0\x8D쐬\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƃG\x83\x89\x81[\x82ɂȂ\xC1\x82Ă\xA2\x82\xBD\x82̂\xF0\x8FC\x90\xB3 \x81EPHP5.3\x82ŏo\x82\xE9 & new \x82\xCC Warning \x82\xF0\x8FC\x90\xB3 Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2012-02-08 06:51:59 UTC (rev 536) @@ -103,7 +103,7 @@ $this->mEnqId = $this->_getId(); $handler =& $this->_getHandler(); - $criteria=$this->mFilter->getCriteria(); + $criteria=$this->mFilter->getCriteria(0, 0); //set enq_id request $criteria->add(new Criteria('enq_id', $this->_getId())); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/main.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/main.php 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/main.php 2012-02-08 06:51:59 UTC (rev 536) @@ -8,7 +8,7 @@ define('_MD_BIZPOLL_ERROR_REQUIRED', '{0} is required.'); define('_MD_BIZPOLL_ERROR_MINLENGTH', 'Input {0} with {1} or more characters.'); define('_MD_BIZPOLL_ERROR_MAXLENGTH', 'Input {0} with {1} or less characters.'); -define('_MD_BIZPOLL_ERROR_EXTENSION', 'Uploaded file's extension does not match any entry in the allowed list.'); +define('_MD_BIZPOLL_ERROR_EXTENSION', 'Uploaded file\'s extension does not match any entry in the allowed list.'); define('_MD_BIZPOLL_ERROR_INTRANGE', 'Incorrect input on {0}.'); define('_MD_BIZPOLL_ERROR_MIN', 'Input {0} with {1} or more numeric value.'); define('_MD_BIZPOLL_ERROR_MAX', 'Input {0} with {1} or less numeric value.'); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php 2012-02-08 06:51:59 UTC (rev 536) @@ -84,6 +84,6 @@ define('_MI_BIZPOLL_BLOCK_NAME_POLLNEW', "Latest Enquete"); define('_MI_BIZPOLL_BLOCK_DESC_POLLNEW', ""); define('_MI_BIZPOLL_TITLE_CHART', "Google Chart API Setting"); -define('_MI_BIZPOLL_DESC_CHART', "Set Chart Type, Width(px), Height(px), separated with ','. Default Value:"p,400,100". 'Type' is bhs(Horizontal Bar), bvs(Vertical Bar), p(Pie) or p3(3D Pie)"); +define('_MI_BIZPOLL_DESC_CHART', "Set Chart Type, Width(px), Height(px), separated with ','. Default Value:\"p,400,100\". 'Type' is bhs(Horizontal Bar), bvs(Vertical Bar), p(Pie) or p3(3D Pie)"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2012-02-08 06:51:59 UTC (rev 536) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.24; +$modversion['version'] = 0.25; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mum...@us...> - 2011-08-01 04:14:46
|
Revision: 535 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=535&view=rev Author: mumincacao Date: 2011-08-01 04:14:40 +0000 (Mon, 01 Aug 2011) Log Message: ----------- Append admin action fallback process. Modified Paths: -------------- tools_Tubson/trunk/cubson/Generator/Project/TrustAssetPreloadGenerator.cs Modified: tools_Tubson/trunk/cubson/Generator/Project/TrustAssetPreloadGenerator.cs =================================================================== --- tools_Tubson/trunk/cubson/Generator/Project/TrustAssetPreloadGenerator.cs 2011-08-01 04:11:31 UTC (rev 534) +++ tools_Tubson/trunk/cubson/Generator/Project/TrustAssetPreloadGenerator.cs 2011-08-01 04:14:40 UTC (rev 535) @@ -67,6 +67,7 @@ #region preBlockFilter MethodTemplate preBlockFilter = new MethodTemplate(assetPreload, AccessLevel.PUBLIC, false, "preBlockFilter", paramVoid, "void"); preBlockFilter.AppendCode("$this->mRoot->mDelegateManager->add('Module.{dirname}.Global.Event.GetAssetManager','{Dirname}_AssetPreloadBase::getManager');"); + preBlockFilter.AppendCode("$this->mRoot->mDelegateManager->add('Module.{dirname}.Global.Event.Exception.ActionNotFound','{Dirname}_AssetPreloadBase::actionNotFound');"); preBlockFilter.AppendCode("$this->mRoot->mDelegateManager->add('Legacy_Utils.CreateModule','{Dirname}_AssetPreloadBase::getModule');"); preBlockFilter.AppendCode("$this->mRoot->mDelegateManager->add('Legacy_Utils.CreateBlockProcedure','{Dirname}_AssetPreloadBase::getBlock');"); #endregion @@ -82,6 +83,19 @@ getManager.AppendCode("$obj = {Dirname}_AssetManager::getInstance($dirname);"); #endregion + #region actionNotFound + ParamType[] actionNotFoundParam = new ParamType[1]; + actionNotFoundParam[0].type = "string"; + actionNotFoundParam[0].type = "$dirname"; + MethodTemplate actionNotFound = new MethodTemplate(assetPreload,AccessLevel.STATIC,false,"actionNotFound",actionNotFoundParam,"void"); + actionNotFound.AppendCode("$root = XCube_Root::getSingleton();"); + actionNotFound.AppendCode("$module = $root->mContext->mModule;"); + actionNotFound.AppendCode("if($module->mAdminFlag)"); + actionNotFound.AppendCode("{"); + actionNotFound.AppendCode(" $root->mController->executeForward($module->getHelpViewUrl());"); + actionNotFound.AppendCode("}"); + #endregion + #region getModule ParamType[] getModuleParam = new ParamType[2]; getModuleParam[0].type = "Legacy_AbstractModule"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mum...@us...> - 2011-08-01 04:11:37
|
Revision: 534 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=534&view=rev Author: mumincacao Date: 2011-08-01 04:11:31 +0000 (Mon, 01 Aug 2011) Log Message: ----------- Fixed Typo:Module config install error constant not found. Modified Paths: -------------- tools_Tubson/trunk/cubson/Generator/Project/InstallUtilsGenerator.cs Modified: tools_Tubson/trunk/cubson/Generator/Project/InstallUtilsGenerator.cs =================================================================== --- tools_Tubson/trunk/cubson/Generator/Project/InstallUtilsGenerator.cs 2011-07-11 05:22:24 UTC (rev 533) +++ tools_Tubson/trunk/cubson/Generator/Project/InstallUtilsGenerator.cs 2011-08-01 04:11:31 UTC (rev 534) @@ -1081,7 +1081,7 @@ updateConfigByInfo.AppendBreak(); updateConfigByInfo.AppendCode("if(!(count($configs) > 0 && is_object($configs[0])))"); updateConfigByInfo.AppendCode("{"); - updateConfigByInfo.AppendCode(" $log->addError(_MI{DIRNAME}_INSTALL_ERROR_CONFIG_NOT_FOUND);"); + updateConfigByInfo.AppendCode(" $log->addError(_MI_{DIRNAME}_INSTALL_ERROR_CONFIG_NOT_FOUND);"); updateConfigByInfo.AppendCode(" return false;"); updateConfigByInfo.AppendCode("}"); updateConfigByInfo.AppendBreak(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mum...@us...> - 2011-07-11 05:22:31
|
Revision: 533 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=533&view=rev Author: mumincacao Date: 2011-07-11 05:22:24 +0000 (Mon, 11 Jul 2011) Log Message: ----------- Remove unused method at AbstractFilterForm::_getId() and AbstractFilterForm::_getHandler(). Modified Paths: -------------- tools_Tubson/trunk/cubson/Generator/Project/AbstractFilterFormGenerator.cs Modified: tools_Tubson/trunk/cubson/Generator/Project/AbstractFilterFormGenerator.cs =================================================================== --- tools_Tubson/trunk/cubson/Generator/Project/AbstractFilterFormGenerator.cs 2011-04-26 14:50:25 UTC (rev 532) +++ tools_Tubson/trunk/cubson/Generator/Project/AbstractFilterFormGenerator.cs 2011-07-11 05:22:24 UTC (rev 533) @@ -43,9 +43,6 @@ filter.AddProperty(new PropertyTemplate("_mCriteria", "null", "Criteria", AccessLevel.PROTECTED)); #endregion - filter.AddMethod(new MethodTemplate(AccessLevel.PROTECTED, false, "_getId", paramVoid, "int")); - filter.AddMethod(new MethodTemplate(AccessLevel.PROTECTED, true, "_getHandler", paramVoid, "XoopsObjectGenericHandler")); - #region constructor MethodTemplate constructor = new MethodTemplate(filter, AccessLevel.PUBLIC, false, filter.GetClassName(), paramVoid, "void"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2011-04-26 14:50:32
|
Revision: 532 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=532&view=rev Author: kilica Date: 2011-04-26 14:50:25 +0000 (Tue, 26 Apr 2011) Log Message: ----------- PHP5.3 ready Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceDeleteAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceEditAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceListAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqDeleteAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqEditAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDeleteAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollListAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/BizpollAdminRenderSystem.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstallUtils.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstaller.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUninstaller.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUpdater.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractFilterForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractListAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AssetManager.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/Module.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceDeleteForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceEditForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqDeleteForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqEditForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollDeleteForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Removed Paths: ------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/.xml/ Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-04-26 14:50:25 UTC (rev 532) @@ -18,6 +18,10 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.24(2011.04.21) +\x81E\x83J\x83e\x83S\x83\x8A\x96\xA2\x90ݒ莞\x82ɃA\x83\x93\x83P\x81[\x83g\x82\xF0\x8D쐬\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƃG\x83\x89\x81[\x82ɂȂ\xC1\x82Ă\xA2\x82\xBD\x82̂\xF0\x8FC\x90\xB3 +\x81EPHP5.3\x82ŏo\x82\xE9 & new \x82\xCC Warning \x82\xF0\x8FC\x90\xB3 + 0.23(2011.03.17) \x81E\x81u\x8C\x8B\x89ʂ\xF0\x8AJ\x8E\xA6\x82\xB5\x82Ȃ\xA2\x81v\x82ɂ\xB5\x82\xBD\x8Fꍇ\x82ɊǗ\x9D\x8Eҁieditor\x81j\x82\xE0\x8C\xA9\x82\xEA\x82Ȃ\xAD\x82Ȃ\xC1\x82Ă\xB5\x82܂\xA4\x83o\x83O\x82\xF0\x8FC\x90\xB3\x81iThanks chipy\x81j Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceDeleteAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceDeleteAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceDeleteAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -51,7 +51,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_ChoiceDeleteForm(); + // $this->mActionForm = new Bizpoll_ChoiceDeleteForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'choice',false,'delete'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceEditAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceEditAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceEditAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -70,7 +70,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_ChoiceEditForm(); + // $this->mActionForm = new Bizpoll_ChoiceEditForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'choice',false,'edit'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceListAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceListAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceListAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -39,7 +39,7 @@ **/ protected function &_getFilterForm() { - // $filter =& new Bizpoll_ChoiceFilterForm(); + // $filter = new Bizpoll_ChoiceFilterForm(); $filter =& $this->mAsset->getObject('filter', 'choice',false); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqDeleteAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqDeleteAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqDeleteAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -51,7 +51,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_EnqDeleteForm(); + // $this->mActionForm = new Bizpoll_EnqDeleteForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'enq',false,'delete'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqEditAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqEditAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqEditAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -70,7 +70,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_EnqEditForm(); + // $this->mActionForm = new Bizpoll_EnqEditForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'enq', false, 'edit'); $this->mActionForm->prepare(); } @@ -80,7 +80,6 @@ */ public function prepare() { - $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); $this->mUseCat = ($this->mModule->getModuleConfig('gr_id')>0) ? true : false; @@ -99,8 +98,11 @@ } } else{ - if(! $xcatHandler->checkPermit($this->mObject->get('cat_id'), 'editor', $this->mObject->get('uid'))){ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + if($this->mUseCat){ + $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); + if(! $xcatHandler->checkPermit($this->mObject->get('cat_id'), 'editor', $this->mObject->get('uid'))){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + } } } } @@ -228,10 +230,17 @@ **/ public function execute() { - $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); - if(! $xcatHandler->checkPermit($this->mObject->get('cat_id'), 'editor', $this->mObject->get('uid'))){ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + if(! $this->mUseCat){ + if(! $this->mRoot->mContext->mXoopsUser){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + } } + else{ + $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); + if(! $xcatHandler->checkPermit($this->mObject->get('cat_id'), 'editor', $this->mObject->get('uid'))){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + } + } if ($this->mObject == null) { Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -44,7 +44,7 @@ **/ protected function &_getFilterForm() { - // $filter =& new Bizpoll_EnqFilterForm(); + // $filter = new Bizpoll_EnqFilterForm(); $filter =& $this->mAsset->getObject('filter', 'enq',false); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -52,7 +52,7 @@ **/ protected function _setupPollActionForm() { - // $this->mActionForm =& new Bizpoll_PollEditForm(); + // $this->mActionForm = new Bizpoll_PollEditForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'poll', false, 'edit'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDeleteAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDeleteAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDeleteAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -51,7 +51,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_PollDeleteForm(); + // $this->mActionForm = new Bizpoll_PollDeleteForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'poll',false,'delete'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -57,7 +57,7 @@ **/ protected function &_getFilterForm() { - // $filter =& new Bizpoll_PollFilterForm(); + // $filter = new Bizpoll_PollFilterForm(); $filter =& $this->mAsset->getObject('filter', 'poll',false); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -57,7 +57,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_PollEditForm(); + // $this->mActionForm = new Bizpoll_PollEditForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'poll', false, 'edit'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollListAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollListAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollListAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -37,7 +37,7 @@ **/ protected function &_getFilterForm() { - // $filter =& new Bizpoll_PollFilterForm(); + // $filter = new Bizpoll_PollFilterForm(); $filter =& $this->mAsset->getObject('filter', 'poll',false); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/BizpollAdminRenderSystem.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/BizpollAdminRenderSystem.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/BizpollAdminRenderSystem.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -30,7 +30,7 @@ { $this->mController =& $controller; - $this->mSmarty =& new Legacy_AdminSmarty(); // TODO will be use other class? + $this->mSmarty = new Legacy_AdminSmarty(); // TODO will be use other class? $this->mSmarty->register_modifier('theme',array($this,'modifierTheme')); $this->mSmarty->register_function('stylesheet',array($this,'functionStylesheet')); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstallUtils.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstallUtils.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstallUtils.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -50,7 +50,7 @@ } require_once XOOPS_MODULE_PATH . '/legacy/admin/class/Legacy_SQLScanner.class.php'; // TODO will be use other class? - $scanner =& new Legacy_SQLScanner(); + $scanner = new Legacy_SQLScanner(); $scanner->setDB_PREFIX(XOOPS_DB_PREFIX); $scanner->setDirname($dirname); if(!$scanner->loadFile($sqlFilePath)) @@ -92,7 +92,7 @@ public static function DBquery(/*** string ***/ $query,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { require_once XOOPS_MODULE_PATH . '/legacy/admin/class/Legacy_SQLScanner.class.php'; // TODO will be use other class? - $scanner =& new Legacy_SQLScanner(); + $scanner = new Legacy_SQLScanner(); $scanner->setDB_PREFIX(XOOPS_DB_PREFIX); $scanner->setDirname($module->get('dirname')); $scanner->setBuffer($query); @@ -286,7 +286,7 @@ if(is_array($delTemplates) && count($delTemplates) > 0) { - $xoopsTpl =& new XoopsTpl(); + $xoopsTpl = new XoopsTpl(); $xoopsTpl->clear_cache(null,'mod_' . $module->get('dirname')); foreach($delTemplates as $tpl) { @@ -492,7 +492,7 @@ ); $tplHandler =& Bizpoll_Utils::getXoopsHandler('tplfile'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('tpl_type','block')); $cri->add(new Criteria('tpl_tplset','default')); $cri->add(new Criteria('tpl_module',$module->get('dirname'))); @@ -559,7 +559,7 @@ $blockHandler =& Bizpoll_Utils::getXoopsHandler('block'); $gpermHandler =& Bizpoll_Utils::getXoopsHandler('groupperm'); - $cri =& new Criteria('mid',$module->get('mid')); + $cri = new Criteria('mid',$module->get('mid')); $blocks =& $blockHandler->getObjectsDirectly($cri); foreach($blocks as $block) @@ -584,7 +584,7 @@ $successFlag = false; } - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('gperm_name','block_read')); $cri->add(new Criteria('gperm_itemid',$block->get('bid'))); $cri->add(new Criteria('gperm_modid',1)); @@ -615,8 +615,8 @@ { $dirname = $module->get('dirname'); - $fileReader =& new Legacy_ModinfoX2FileReader($dirname); - $dbReader =& new Legacy_ModinfoX2DBReader($dirname); + $fileReader = new Legacy_ModinfoX2FileReader($dirname); + $dbReader = new Legacy_ModinfoX2DBReader($dirname); $blocks =& $dbReader->loadBlockInformations(); $blocks->update($fileReader->loadBlockInformations()); @@ -655,7 +655,7 @@ public static function updateBlockTemplateByInfo(/*** Legacy_BlockInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $blockHandler =& Bizpoll_Utils::getModuleHandler('newblocks','legacy'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('dirname',$module->get('dirname'))); $cri->add(new Criteria('func_num',$info->mFuncNum)); $blocks =& $blockHandler->getObjects($cri); @@ -679,7 +679,7 @@ public static function updateBlockByInfo(/*** Legacy_BlockInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $blockHandler =& Bizpoll_Utils::getModuleHandler('newblocks','legacy'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('dirname',$module->get('dirname'))); $cri->add(new Criteria('func_num',$info->mFuncNum)); $blocks =& $blockHandler->getObjects($cri); @@ -787,7 +787,7 @@ public static function uninstallBlockByFuncNum(/*** int ***/ $func_num,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $blockHandler =& Bizpoll_Utils::getModuleHandler('newblocks','legacy'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('dirname',$module->get('dirname'))); $cri->add(new Criteria('func_num',$func_num)); $blocks =& $blockHandler->getObjects($cri); @@ -870,7 +870,7 @@ { $successFlag = true; $configHandler =& Bizpoll_Utils::getXoopsHandler('config'); - $fileReader =& new Legacy_ModinfoX2FileReader($module->get('dirname')); // TODO will be use other class? + $fileReader = new Legacy_ModinfoX2FileReader($module->get('dirname')); // TODO will be use other class? $preferences =& $fileReader->loadPreferenceInformations(); foreach($preferences->mPreferences as $info) @@ -1040,7 +1040,7 @@ { $configHandler =& Bizpoll_Utils::getXoopsHandler('config'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('conf_modid',$module->get('mid'))); $cri->add(new Criteria('conf_catid',0)); $cri->add(new Criteria('conf_order',$order)); @@ -1081,8 +1081,8 @@ { $dirname = $module->get('dirname'); - $fileReader =& new Legacy_ModinfoX2FileReader($dirname); - $dbReader =& new Legacy_ModinfoX2DBReader($dirname); + $fileReader = new Legacy_ModinfoX2FileReader($dirname); + $dbReader = new Legacy_ModinfoX2DBReader($dirname); $configs =& $dbReader->loadPreferenceInformations(); $configs->update($fileReader->loadPreferenceInformations()); @@ -1121,7 +1121,7 @@ public static function updateConfigByInfo(/*** Legacy_PreferenceInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $configHandler =& Bizpoll_Utils::getXoopsHandler('config'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('conf_modid',$module->get('mid'))); $cri->add(new Criteria('conf_catid',0)); $cri->add(new Criteria('conf_name',$info->mName)); @@ -1203,7 +1203,7 @@ public static function updateConfigOrderByInfo(/*** Legacy_PreferenceInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $configHandler =& Bizpoll_Utils::getXoopsHandler('config'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('conf_modid',$module->get('mid'))); $cri->add(new Criteria('conf_catid',0)); $cri->add(new Criteria('conf_name',$info->mName)); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstaller.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstaller.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstaller.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -41,7 +41,7 @@ **/ public function __construct() { - $this->mLog =& new Legacy_ModuleInstallLog(); + $this->mLog = new Legacy_ModuleInstallLog(); } /** Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUninstaller.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUninstaller.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUninstaller.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -41,7 +41,7 @@ **/ public function __construct() { - $this->mLog =& new Legacy_ModuleInstallLog(); + $this->mLog = new Legacy_ModuleInstallLog(); } /** @@ -160,7 +160,7 @@ Bizpoll_InstallUtils::uninstallAllOfBlocks($this->_mXoopsModule,$this->mLog); $tplHandler =& Bizpoll_Utils::getXoopsHandler('tplfile'); - $cri =& new Criteria('tpl_module',$this->_mXoopsModule->get('dirname')); + $cri = new Criteria('tpl_module',$this->_mXoopsModule->get('dirname')); if(!$tplHandler->deleteAll($cri)) { $this->mLog->addError( Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUpdater.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUpdater.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUpdater.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -61,7 +61,7 @@ **/ public function __construct() { - $this->mLog =& new Legacy_ModuleInstallLog(); + $this->mLog = new Legacy_ModuleInstallLog(); } /** Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractFilterForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractFilterForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractFilterForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -71,7 +71,7 @@ **/ public function __construct() { - $this->_mCriteria =& new CriteriaCompo(); + $this->_mCriteria = new CriteriaCompo(); } /** Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractListAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractListAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractListAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -69,7 +69,7 @@ **/ protected function &_getPageNavi() { - $navi =& new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START); + $navi = new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START); return $navi; } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AssetManager.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AssetManager.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AssetManager.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -174,11 +174,11 @@ if($type == 'handler') { $root =& XCube_Root::getSingleton(); - $instance =& new $className($root->mController->getDB(),$this->mDirname); + $instance = new $className($root->mController->getDB(),$this->mDirname); } else { - $instance =& new $className(); + $instance = new $className(); } return $instance; } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/Module.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/Module.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/Module.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -360,7 +360,7 @@ . ucfirst($this->mActionName) . 'Action'; if(class_exists($className)) { - $this->mAction =& new $className(); + $this->mAction = new $className(); } if(!$this->mAction instanceof Bizpoll_AbstractAction) { Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceDeleteForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceDeleteForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceDeleteForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,12 +42,12 @@ // // Set form properties // - $this->mFormProperties['choice_id'] =& new XCube_IntProperty('choice_id'); + $this->mFormProperties['choice_id'] = new XCube_IntProperty('choice_id'); // // Set field properties // - $this->mFieldProperties['choice_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['choice_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['choice_id']->setDependsByArray(array('required')); $this->mFieldProperties['choice_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_CHOICE_ID); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceEditForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceEditForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceEditForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,31 +42,31 @@ // // Set form properties // - $this->mFormProperties['choice_id'] =& new XCube_IntProperty('choice_id'); - $this->mFormProperties['title'] =& new XCube_StringProperty('title'); - $this->mFormProperties['enq_id'] =& new XCube_IntProperty('enq_id'); - $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); - $this->mFormProperties['weight'] =& new XCube_IntProperty('weight'); - $this->mFormProperties['description'] =& new XCube_TextProperty('description'); + $this->mFormProperties['choice_id'] = new XCube_IntProperty('choice_id'); + $this->mFormProperties['title'] = new XCube_StringProperty('title'); + $this->mFormProperties['enq_id'] = new XCube_IntProperty('enq_id'); + $this->mFormProperties['uid'] = new XCube_IntProperty('uid'); + $this->mFormProperties['weight'] = new XCube_IntProperty('weight'); + $this->mFormProperties['description'] = new XCube_TextProperty('description'); // // Set field properties // - $this->mFieldProperties['choice_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['choice_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['choice_id']->setDependsByArray(array('required')); $this->mFieldProperties['choice_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_CHOICE_ID); - $this->mFieldProperties['title'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['title'] = new XCube_FieldProperty($this); $this->mFieldProperties['title']->setDependsByArray(array('required','maxlength')); $this->mFieldProperties['title']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_TITLE, '255'); $this->mFieldProperties['title']->addMessage('maxlength', _MD_BIZPOLL_ERROR_MAXLENGTH, _MD_BIZPOLL_LANG_TITLE, '255'); $this->mFieldProperties['title']->addVar('maxlength', '255'); - $this->mFieldProperties['enq_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['enq_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['enq_id']->setDependsByArray(array('required')); $this->mFieldProperties['enq_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_ENQ_ID); - $this->mFieldProperties['weight'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['weight'] = new XCube_FieldProperty($this); $this->mFieldProperties['weight']->setDependsByArray(array('required')); $this->mFieldProperties['weight']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_WEIGHT); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqDeleteForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqDeleteForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqDeleteForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,12 +42,12 @@ // // Set form properties // - $this->mFormProperties['enq_id'] =& new XCube_IntProperty('enq_id'); + $this->mFormProperties['enq_id'] = new XCube_IntProperty('enq_id'); // // Set field properties // - $this->mFieldProperties['enq_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['enq_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['enq_id']->setDependsByArray(array('required')); $this->mFieldProperties['enq_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_ENQ_ID); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqEditForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqEditForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqEditForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,40 +42,40 @@ // // Set form properties // - $this->mFormProperties['enq_id'] =& new XCube_IntProperty('enq_id'); - $this->mFormProperties['title'] =& new XCube_StringProperty('title'); - $this->mFormProperties['cat_id'] =& new XCube_IntProperty('cat_id'); - $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); - $this->mFormProperties['type'] =& new XCube_IntProperty('type'); - $this->mFormProperties['pub_unixtime'] =& new XCube_IntProperty('pub_unixtime'); - $this->mFormProperties['pub_date'] =& new XCube_StringProperty('pub_date'); - $this->mFormProperties['pub_Hour'] =& new XCube_StringProperty('pub_Hour'); - $this->mFormProperties['pub_Minute'] =& new XCube_StringProperty('pub_Minute'); - $this->mFormProperties['end_unixtime'] =& new XCube_IntProperty('end_unixtime'); - $this->mFormProperties['end_date'] =& new XCube_TextProperty('end_date'); - $this->mFormProperties['end_Hour'] =& new XCube_StringProperty('end_Hour'); - $this->mFormProperties['end_Minute'] =& new XCube_StringProperty('end_Minute'); - $this->mFormProperties['choices'] =& new XCube_TextProperty('choices'); - $this->mFormProperties['description'] =& new XCube_TextProperty('description'); - $this->mFormProperties['option'] =& new XCube_TextProperty('option'); - $this->mFormProperties['reg_unixtime'] =& new XCube_IntProperty('reg_unixtime'); - $this->mFormProperties['opt_show_result'] =& new XCube_IntProperty('opt_show_result'); - $this->mFormProperties['opt_add_choice'] =& new XCube_IntProperty('opt_add_choice'); + $this->mFormProperties['enq_id'] = new XCube_IntProperty('enq_id'); + $this->mFormProperties['title'] = new XCube_StringProperty('title'); + $this->mFormProperties['cat_id'] = new XCube_IntProperty('cat_id'); + $this->mFormProperties['uid'] = new XCube_IntProperty('uid'); + $this->mFormProperties['type'] = new XCube_IntProperty('type'); + $this->mFormProperties['pub_unixtime'] = new XCube_IntProperty('pub_unixtime'); + $this->mFormProperties['pub_date'] = new XCube_StringProperty('pub_date'); + $this->mFormProperties['pub_Hour'] = new XCube_StringProperty('pub_Hour'); + $this->mFormProperties['pub_Minute'] = new XCube_StringProperty('pub_Minute'); + $this->mFormProperties['end_unixtime'] = new XCube_IntProperty('end_unixtime'); + $this->mFormProperties['end_date'] = new XCube_TextProperty('end_date'); + $this->mFormProperties['end_Hour'] = new XCube_StringProperty('end_Hour'); + $this->mFormProperties['end_Minute'] = new XCube_StringProperty('end_Minute'); + $this->mFormProperties['choices'] = new XCube_TextProperty('choices'); + $this->mFormProperties['description'] = new XCube_TextProperty('description'); + $this->mFormProperties['option'] = new XCube_TextProperty('option'); + $this->mFormProperties['reg_unixtime'] = new XCube_IntProperty('reg_unixtime'); + $this->mFormProperties['opt_show_result'] = new XCube_IntProperty('opt_show_result'); + $this->mFormProperties['opt_add_choice'] = new XCube_IntProperty('opt_add_choice'); // // Set field properties // - $this->mFieldProperties['enq_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['enq_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['enq_id']->setDependsByArray(array('required')); $this->mFieldProperties['enq_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_ENQ_ID); - $this->mFieldProperties['title'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['title'] = new XCube_FieldProperty($this); $this->mFieldProperties['title']->setDependsByArray(array('required','maxlength')); $this->mFieldProperties['title']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_TITLE, '255'); $this->mFieldProperties['title']->addMessage('maxlength', _MD_BIZPOLL_ERROR_MAXLENGTH, _MD_BIZPOLL_LANG_TITLE, '255'); $this->mFieldProperties['title']->addVar('maxlength', '255'); - $this->mFieldProperties['type'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['type'] = new XCube_FieldProperty($this); $this->mFieldProperties['type']->setDependsByArray(array('required')); $this->mFieldProperties['type']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_TYPE); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollDeleteForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollDeleteForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollDeleteForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,12 +42,12 @@ // // Set form properties // - $this->mFormProperties['poll_id'] =& new XCube_IntProperty('poll_id'); + $this->mFormProperties['poll_id'] = new XCube_IntProperty('poll_id'); // // Set field properties // - $this->mFieldProperties['poll_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['poll_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['poll_id']->setDependsByArray(array('required')); $this->mFieldProperties['poll_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_POLL_ID); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -43,33 +43,33 @@ // // Set form properties // - $this->mFormProperties['poll_id'] =& new XCube_IntProperty('poll_id'); - $this->mFormProperties['enq_id'] =& new XCube_IntProperty('enq_id'); - $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); - $this->mFormProperties['name'] =& new XCube_StringProperty('name'); - $this->mFormProperties['choice_id'] =& new XCube_TextProperty('choice_id'); - $this->mFormProperties['ip'] =& new XCube_StringProperty('ip'); - $this->mFormProperties['comment'] =& new XCube_TextProperty('comment'); - $this->mFormProperties['reg_unixtime'] =& new XCube_IntProperty('reg_unixtime'); + $this->mFormProperties['poll_id'] = new XCube_IntProperty('poll_id'); + $this->mFormProperties['enq_id'] = new XCube_IntProperty('enq_id'); + $this->mFormProperties['uid'] = new XCube_IntProperty('uid'); + $this->mFormProperties['name'] = new XCube_StringProperty('name'); + $this->mFormProperties['choice_id'] = new XCube_TextProperty('choice_id'); + $this->mFormProperties['ip'] = new XCube_StringProperty('ip'); + $this->mFormProperties['comment'] = new XCube_TextProperty('comment'); + $this->mFormProperties['reg_unixtime'] = new XCube_IntProperty('reg_unixtime'); // // Set field properties // - $this->mFieldProperties['poll_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['poll_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['poll_id']->setDependsByArray(array('required')); $this->mFieldProperties['poll_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_POLL_ID); - $this->mFieldProperties['enq_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['enq_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['enq_id']->setDependsByArray(array('required')); $this->mFieldProperties['enq_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_ENQ_ID); if(! $root->mContext->mXoopsUser){ - $this->mFieldProperties['name'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['name'] = new XCube_FieldProperty($this); $this->mFieldProperties['name']->setDependsByArray(array('required')); $this->mFieldProperties['name']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_NAME); } - $this->mFieldProperties['choice_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['choice_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['choice_id']->setDependsByArray(array('required')); $this->mFieldProperties['choice_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_CHOICE_ID); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-04-26 14:50:25 UTC (rev 532) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.23; +$modversion['version'] = 0.24; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2011-04-26 14:27:19
|
Revision: 531 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=531&view=rev Author: kilica Date: 2011-04-26 14:27:13 +0000 (Tue, 26 Apr 2011) Log Message: ----------- delete unnecessary directories Removed Paths: ------------- modules_bizpoll/trunk/html/modules/bizpoll/.xml/ modules_bizpoll/trunk/html/modules/bizpoll/actions/ modules_bizpoll/trunk/html/modules/bizpoll/admin/.xml/ modules_bizpoll/trunk/html/modules/bizpoll/blocks/ modules_bizpoll/trunk/html/modules/bizpoll/forms/ modules_bizpoll/trunk/html/modules/bizpoll/sql/ modules_bizpoll/trunk/html/modules/bizpoll/templates/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2011-03-17 09:45:35
|
Revision: 530 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=530&view=rev Author: kilica Date: 2011-03-17 09:45:28 +0000 (Thu, 17 Mar 2011) Log Message: ----------- Fix Bug: allow show result Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Enq.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-03-03 10:50:45 UTC (rev 529) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-03-17 09:45:28 UTC (rev 530) @@ -18,6 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.23(2011.03.17) +\x81E\x81u\x8C\x8B\x89ʂ\xF0\x8AJ\x8E\xA6\x82\xB5\x82Ȃ\xA2\x81v\x82ɂ\xB5\x82\xBD\x8Fꍇ\x82ɊǗ\x9D\x8Eҁieditor\x81j\x82\xE0\x8C\xA9\x82\xEA\x82Ȃ\xAD\x82Ȃ\xC1\x82Ă\xB5\x82܂\xA4\x83o\x83O\x82\xF0\x8FC\x90\xB3\x81iThanks chipy\x81j + 0.22(2010.06.02) \x81E\x83o\x83O\x8FC\x90\xB3\x81iThanks chipy\x81j Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-03-03 10:50:45 UTC (rev 529) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-03-17 09:45:28 UTC (rev 530) @@ -7,7 +7,7 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } require_once BIZPOLL_TRUST_PATH . '/class/AbstractListAction.class.php'; @@ -18,132 +18,133 @@ **/ class Bizpoll_PollDetailAction extends Bizpoll_AbstractListAction { - var $mEnq = null; - var $mEnqId = 0; - var $mChart = array(); + var $mEnq = null; + var $mEnqId = 0; + var $mChart = array(); - /** - * _getId - * @param void - * @return int - **/ - protected function _getId() - { - if($this->mRoot->mContext->mRequest->getRequest('enq_id')){ - return intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); - } - else{ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_ENQ_ID_REQUIRED); - } - } + /** + * _getId + * @param void + * @return int + **/ + protected function _getId() + { + if($this->mRoot->mContext->mRequest->getRequest('enq_id')){ + return intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); + } + else{ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_ENQ_ID_REQUIRED); + } + } - /** - * &_getHandler - * @param void - * @return Bizpoll_PollHandler - **/ - protected function &_getHandler() - { - $handler =& $this->mAsset->getObject('handler', 'poll'); - return $handler; - } + /** + * &_getHandler + * @param void + * @return Bizpoll_PollHandler + **/ + protected function &_getHandler() + { + $handler =& $this->mAsset->getObject('handler', 'poll'); + return $handler; + } - /** - * &_getFilterForm - * - * @param void - * - * @return Bizpoll_PollFilterForm - **/ - protected function &_getFilterForm() - { - // $filter =& new Bizpoll_PollFilterForm(); - $filter =& $this->mAsset->getObject('filter', 'poll',false); - $filter->prepare($this->_getPageNavi(), $this->_getHandler()); - return $filter; - } + /** + * &_getFilterForm + * + * @param void + * + * @return Bizpoll_PollFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Bizpoll_PollFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'poll',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } - /** - * _getBaseUrl - * @param void - * @return string - **/ - protected function _getBaseUrl() - { - return './index.php?action=PollDetail'; - } + /** + * _getBaseUrl + * @param void + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=PollDetail'; + } - /** - * @public - */ - function getDefaultView() - { - $this->mUseCat = ($this->mModule->getModuleConfig('gr_id')>0) ? true : false; - - //get Enq object - $enqHandler =& $this->mAsset->getObject('handler', 'enq'); - $this->mEnq =& $enqHandler->get($this->_getId()); - if(! $this->mEnq->allowShowResult($this->mAsset->mDirname)){ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_MESSAGE_HIDE_RESULT); - } - - //check permissions - if($this->mUseCat){ - $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); - - if(! $xcatHandler->checkPermit($this->mEnq->get('cat_id'), 'viewer')){ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); - } - } - - //getDefaultView - $this->mFilter =& $this->_getFilterForm(); - $this->mFilter->fetch(); - $this->mEnqId = $this->_getId(); - - $handler =& $this->_getHandler(); - $criteria=$this->mFilter->getCriteria(); - - //set enq_id request - $criteria->add(new Criteria('enq_id', $this->_getId())); - - $criteria->addSort('reg_unixtime', 'DESC'); - $this->mObjects =& $handler->getObjects($criteria); - - //loadChoice - $this->mChart['count'] = array(); - $this->mChart['title'] = array(); - $this->mChart['total'] = array(); - foreach(array_keys($this->mObjects) as $key){ - $this->mObjects[$key]->loadChoice($this->mAsset->mDirname); - //for Google Chart API - $choiceArr = explode(',', $this->mObjects[$key]->get('choice_id')); - foreach(array_keys($choiceArr) as $keyC){ - @$this->mChart['count'][$choiceArr[$keyC]]++; - $this->mChart['title'][$choiceArr[$keyC]] = $this->mObjects[$key]->mChoice[$keyC]->getShow('title') . ' ('. $this->mChart['count'][$choiceArr[$keyC]] .')'; - } - } - $this->mChart['total'] = count($this->mChart['title']); - - return BIZPOLL_FRAME_VIEW_INDEX; - } + /** + * @public + */ + function getDefaultView() + { + $this->mUseCat = ($this->mModule->getModuleConfig('gr_id')>0) ? true : false; + + //get Enq object + $enqHandler =& $this->mAsset->getObject('handler', 'enq'); + $this->mEnq =& $enqHandler->get($this->_getId()); + + //check permissions + if($this->mUseCat){ + $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); + + if(! $this->mEnq->allowShowResult($this->mAsset->mDirname) && ! $xcatHandler->checkPermit($this->mEnq->get('cat_id'), 'editor')){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_MESSAGE_HIDE_RESULT); + } + + if(! $xcatHandler->checkPermit($this->mEnq->get('cat_id'), 'viewer')){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + } + } + + //getDefaultView + $this->mFilter =& $this->_getFilterForm(); + $this->mFilter->fetch(); + $this->mEnqId = $this->_getId(); + + $handler =& $this->_getHandler(); + $criteria=$this->mFilter->getCriteria(); + + //set enq_id request + $criteria->add(new Criteria('enq_id', $this->_getId())); + + $criteria->addSort('reg_unixtime', 'DESC'); + $this->mObjects =& $handler->getObjects($criteria); + + //loadChoice + $this->mChart['count'] = array(); + $this->mChart['title'] = array(); + $this->mChart['total'] = array(); + foreach(array_keys($this->mObjects) as $key){ + $this->mObjects[$key]->loadChoice($this->mAsset->mDirname); + //for Google Chart API + $choiceArr = explode(',', $this->mObjects[$key]->get('choice_id')); + foreach(array_keys($choiceArr) as $keyC){ + @$this->mChart['count'][$choiceArr[$keyC]]++; + $this->mChart['title'][$choiceArr[$keyC]] = $this->mObjects[$key]->mChoice[$keyC]->getShow('title') . ' ('. $this->mChart['count'][$choiceArr[$keyC]] .')'; + } + } + $this->mChart['total'] = count($this->mChart['title']); + + return BIZPOLL_FRAME_VIEW_INDEX; + } - /** - * executeViewIndex - * @param XCube_RenderTarget &$render - * @return void - **/ - public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) - { - $render->setTemplateName($this->mAsset->mDirname . '_poll_detail.html'); - $render->setAttribute('objects', $this->mObjects); - $render->setAttribute('enq', $this->mEnq); - $render->setAttribute('chart', $this->mChart); - $render->setAttribute('pageNavi', $this->mFilter->mNavi); - $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); - rsort($this->mChart['count']); - $render->setAttribute('chartMax', array_shift($this->mChart['count'])); - } + /** + * executeViewIndex + * @param XCube_RenderTarget &$render + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_poll_detail.html'); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('enq', $this->mEnq); + $render->setAttribute('chart', $this->mChart); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); + rsort($this->mChart['count']); + $render->setAttribute('chartMax', array_shift($this->mChart['count'])); + } } ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Enq.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Enq.class.php 2011-03-03 10:50:45 UTC (rev 529) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Enq.class.php 2011-03-17 09:45:28 UTC (rev 530) @@ -15,14 +15,14 @@ **/ class Bizpoll_EnqObject extends XoopsSimpleObject { - var $mPoll = array(); - var $_mPollLoadedFlag = false; - var $mMyPoll = array(); - var $_mMyPollLoadedFlag = false; - var $mChoice = array(); - var $_mChoiceLoadedFlag = false; - var $mPollCount = 0; - var $_mPollCountFlag = false; + var $mPoll = array(); + var $_mPollLoadedFlag = false; + var $mMyPoll = array(); + var $_mMyPollLoadedFlag = false; + var $mChoice = array(); + var $_mChoiceLoadedFlag = false; + var $mPollCount = 0; + var $_mPollCountFlag = false; /** * __construct @@ -47,171 +47,171 @@ $this->initVar('reg_unixtime', XOBJ_DTYPE_INT, time(), false); } - public function checkEnd() - { - if($this->get('end_unixtime')>86400 && $this->get('end_unixtime')<time()){ - return false; //expired - } - return true; - } + public function checkEnd() + { + if($this->get('end_unixtime')>86400 && $this->get('end_unixtime')<time()){ + return false; //expired + } + return true; + } - public function countPoll($dirname) - { - if ($this->_mPollCountFlag == false) { - $this->loadPoll($dirname); - $this->mPollCount = count($this->mPoll); - $this->_mPollCountFlag = true; - } - } + public function countPoll($dirname) + { + if ($this->_mPollCountFlag == false) { + $this->loadPoll($dirname); + $this->mPollCount = count($this->mPoll); + $this->_mPollCountFlag = true; + } + } - public function allowAddChoice() - { - $root = XCube_Root::getSingleton(); - //if the poster is guest, anyone can add choices. - if($this->get('uid')==0){ - return true; - } - //if 'allowAddChoice' option is true, anyone can add choices. - $optionArr = unserialize($this->get('option')); - if($optionArr['add_choice']==1){ - return true; - } - else{ - //otherwise, only the enq poster can add choices. - $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; - if($uid==$this->get('uid')){ - return true; - } - else{ - return false; - } - } - } + public function allowAddChoice() + { + $root = XCube_Root::getSingleton(); + //if the poster is guest, anyone can add choices. + if($this->get('uid')==0){ + return true; + } + //if 'allowAddChoice' option is true, anyone can add choices. + $optionArr = unserialize($this->get('option')); + if($optionArr['add_choice']==1){ + return true; + } + else{ + //otherwise, only the enq poster can add choices. + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + if($uid==$this->get('uid')){ + return true; + } + else{ + return false; + } + } + } - public function allowShowResult($dirname) - { - $root = XCube_Root::getSingleton(); - $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; - $xcatHandler = new Bizpoll_XcatHandler($dirname); - $optionArr = unserialize($this->get('option')); - - if(intval($optionArr['show_result']==0)){ //show result before poll - return true; - } - elseif(intval($optionArr['show_result']==1)){ //show result after he polled or end of the poll - if($this->checkEnd()==false){ //when the poll is end - return true; - } - - if($xcatHandler->checkPermit($this->get('cat_id'), 'poster') || $this->get('uid')==$uid){ - return true; - } - - $this->loadMyPoll($dirname); - return ($this->mMyPoll) ? true : false; - } - elseif(intval($optionArr['opt_show_result']==2)){ //show result only editors - if($xcatHandler->checkPermit($this->get('cat_id'), 'poster') || $this->get('uid')==$root->mContext->mXoopsUser->get('uid')){ - return true; - } - return false; - } - } + public function allowShowResult($dirname) + { + $root = XCube_Root::getSingleton(); + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + $xcatHandler = new Bizpoll_XcatHandler($dirname); + $optionArr = unserialize($this->get('option')); + + if(intval($optionArr['show_result']==0)){ //show result before poll + return true; + } + elseif(intval($optionArr['show_result']==1)){ //show result after he polled or end of the poll + if($this->checkEnd()==false){ //when the poll is end + return true; + } + + if($xcatHandler->checkPermit($this->get('cat_id'), 'poster') || $this->get('uid')==$uid){ + return true; + } + + $this->loadMyPoll($dirname); + return ($this->mMyPoll) ? true : false; + } + elseif(intval($optionArr['show_result']==2)){ //show result only editors + if($xcatHandler->checkPermit($this->get('cat_id'), 'editor') || $this->get('uid')==$root->mContext->mXoopsUser->get('uid')){ + return true; + } + return false; + } + } - public function loadPoll($dirname, $criteria = null) - { - if ($this->_mPollLoadedFlag == false) { - $handler =& $this->_getHandler($dirname, 'poll'); - - if($criteria){ - $this->mPoll =& $handler->getObjects($criteria); - unset($criteria); - }else{ - $this->mPoll =& $handler->getObjects(new Criteria('enq_id', $this->get('enq_id'))); - } - $this->_mPollLoadedFlag = true; - } - } + public function loadPoll($dirname, $criteria = null) + { + if ($this->_mPollLoadedFlag == false) { + $handler =& $this->_getHandler($dirname, 'poll'); + + if($criteria){ + $this->mPoll =& $handler->getObjects($criteria); + unset($criteria); + }else{ + $this->mPoll =& $handler->getObjects(new Criteria('enq_id', $this->get('enq_id'))); + } + $this->_mPollLoadedFlag = true; + } + } - public function loadMyPoll($dirname) - { - if ($this->_mMyPollLoadedFlag == false) { - $root = XCube_Root::getSingleton(); - $handler =& $this->_getHandler($dirname, 'poll'); - if($root->mContext->mXoopsUser){ - $criteria = new CriteriaCompo('1', '1'); - $criteria->add(new Criteria('enq_id', $this->get('enq_id'))); - $criteria->add(new Criteria('uid', $root->mContext->mXoopsUser->get('uid'))); - $poll =& $handler->getObjects($criteria); - unset($criteria); - - if(count($poll)>0){ - $this->mMyPoll = $poll[0]; - } - else{ - $this->mMyPoll = $handler->create(); - $this->mMyPoll->set('enq_id', $this->get('enq_id')); - $this->mMyPoll->set('uid', $root->mContext->mXoopsUser->get('uid')); - } - } - else{ - $this->mMyPoll = $handler->create(); - $this->mMyPoll->set('enq_id', $this->get('enq_id')); - $this->mMyPoll->set('uid', 0); - } - $this->_mMyPollLoadedFlag = true; - } - } + public function loadMyPoll($dirname) + { + if ($this->_mMyPollLoadedFlag == false) { + $root = XCube_Root::getSingleton(); + $handler =& $this->_getHandler($dirname, 'poll'); + if($root->mContext->mXoopsUser){ + $criteria = new CriteriaCompo('1', '1'); + $criteria->add(new Criteria('enq_id', $this->get('enq_id'))); + $criteria->add(new Criteria('uid', $root->mContext->mXoopsUser->get('uid'))); + $poll =& $handler->getObjects($criteria); + unset($criteria); + + if(count($poll)>0){ + $this->mMyPoll = $poll[0]; + } + else{ + $this->mMyPoll = $handler->create(); + $this->mMyPoll->set('enq_id', $this->get('enq_id')); + $this->mMyPoll->set('uid', $root->mContext->mXoopsUser->get('uid')); + } + } + else{ + $this->mMyPoll = $handler->create(); + $this->mMyPoll->set('enq_id', $this->get('enq_id')); + $this->mMyPoll->set('uid', 0); + } + $this->_mMyPollLoadedFlag = true; + } + } - public function &createPoll($dirname) - { - $handler =& $this->_getHandler($dirname, 'poll'); - - $obj =& $handler->create(); - $obj->set('enq_id', $this->get('enq_id')); - return $obj; - } + public function &createPoll($dirname) + { + $handler =& $this->_getHandler($dirname, 'poll'); + + $obj =& $handler->create(); + $obj->set('enq_id', $this->get('enq_id')); + return $obj; + } - public function loadChoice($dirname, $criteria = null) - { - if ($this->_mChoiceLoadedFlag == false) { - $handler =& $this->_getHandler($dirname, 'choice'); - - if($criteria){ - $this->mChoice =& $handler->getObjects($criteria); - unset($criteria); - }else{ - $criteria = new CriteriaCompo('1', '1'); - $criteria->add(new Criteria('enq_id', $this->get('enq_id'))); - $criteria->setSort('weight'); - $this->mChoice =& $handler->getObjects($criteria); - } - $this->_mChoiceLoadedFlag = true; - } - } + public function loadChoice($dirname, $criteria = null) + { + if ($this->_mChoiceLoadedFlag == false) { + $handler =& $this->_getHandler($dirname, 'choice'); + + if($criteria){ + $this->mChoice =& $handler->getObjects($criteria); + unset($criteria); + }else{ + $criteria = new CriteriaCompo('1', '1'); + $criteria->add(new Criteria('enq_id', $this->get('enq_id'))); + $criteria->setSort('weight'); + $this->mChoice =& $handler->getObjects($criteria); + } + $this->_mChoiceLoadedFlag = true; + } + } - public function &createChoice($dirname) - { - $handler =& $this->_getHandler($dirname, 'choice'); - - $obj =& $handler->create(); - $obj->set('enq_id', $this->get('enq_id')); - return $obj; - } + public function &createChoice($dirname) + { + $handler =& $this->_getHandler($dirname, 'choice'); + + $obj =& $handler->create(); + $obj->set('enq_id', $this->get('enq_id')); + return $obj; + } - protected function &_getHandler($dirname, $tablename) - { - $asset = null; - XCube_DelegateUtils::call( - 'Module.bizpoll.Global.Event.GetAssetManager', - new XCube_Ref($asset), - $dirname - ); - if(is_object($asset) && is_a($asset, 'Bizpoll_AssetManager')) - { - return $asset->getObject('handler',$tablename); - } - } + protected function &_getHandler($dirname, $tablename) + { + $asset = null; + XCube_DelegateUtils::call( + 'Module.bizpoll.Global.Event.GetAssetManager', + new XCube_Ref($asset), + $dirname + ); + if(is_object($asset) && is_a($asset, 'Bizpoll_AssetManager')) + { + return $asset->getObject('handler',$tablename); + } + } } @@ -249,29 +249,29 @@ parent::XoopsObjectGenericHandler($db); } - function &_getHandler($dirname, $tablename) - { - $asset = null; - XCube_DelegateUtils::call( - 'Module.bizpoll.Global.Event.GetAssetManager', - new XCube_Ref($asset), - $dirname - ); - if(is_object($asset) && is_a($asset, 'Bizpoll_AssetManager')) - { - return $asset->getObject('handler',$tablename); - } - } + function &_getHandler($dirname, $tablename) + { + $asset = null; + XCube_DelegateUtils::call( + 'Module.bizpoll.Global.Event.GetAssetManager', + new XCube_Ref($asset), + $dirname + ); + if(is_object($asset) && is_a($asset, 'Bizpoll_AssetManager')) + { + return $asset->getObject('handler',$tablename); + } + } - function delete(&$obj) - { - $dirnameArr = explode('_', $this->mTable); - $handler =& $this->_getHandler($dirnameArr[1], 'poll'); - $handler->deleteAll(new Criteria('enq_id', $obj->get('enq_id'))); - unset($handler); - - return parent::delete($obj); - } + function delete(&$obj) + { + $dirnameArr = explode('_', $this->mTable); + $handler =& $this->_getHandler($dirnameArr[1], 'poll'); + $handler->deleteAll(new Criteria('enq_id', $obj->get('enq_id'))); + unset($handler); + + return parent::delete($obj); + } } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-03-03 10:50:45 UTC (rev 529) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-03-17 09:45:28 UTC (rev 530) @@ -7,12 +7,12 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } if(!defined('BIZPOLL_TRUST_PATH')) { - define('BIZPOLL_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/bizpoll'); + define('BIZPOLL_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/bizpoll'); } require_once BIZPOLL_TRUST_PATH . '/class/BizpollUtils.class.php'; @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.22; +$modversion['version'] = 0.23; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; @@ -34,27 +34,27 @@ $modversion['cube_style'] = true; $modversion['legacy_installer'] = array( - 'installer' => array( - 'class' => 'Installer', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollInstaller.class.php' - ), - 'uninstaller' => array( - 'class' => 'Uninstaller', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUninstaller.class.php' - ), - 'updater' => array( - 'class' => 'Updater', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUpdater.class.php' - ) + 'installer' => array( + 'class' => 'Installer', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollInstaller.class.php' + ), + 'uninstaller' => array( + 'class' => 'Uninstaller', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUninstaller.class.php' + ), + 'updater' => array( + 'class' => 'Updater', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUpdater.class.php' + ) ); $modversion['disable_legacy_2nd_installer'] = false; $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; $modversion['tables'] = array( -// '{prefix}_{dirname}_xxxx', +// '{prefix}_{dirname}_xxxx', ##[cubson:tables] '{prefix}_{dirname}_enq', '{prefix}_{dirname}_choice', @@ -67,25 +67,25 @@ // $modversion['templates'] = array( /* - array( - 'file' => '{dirname}_xxx.html', - 'description' => _MI_BIZPOLL_TPL_XXX - ), + array( + 'file' => '{dirname}_xxx.html', + 'description' => _MI_BIZPOLL_TPL_XXX + ), */ ##[cubson:templates] - array('file' => '{dirname}_enq_list.html','description' => _MI_BIZPOLL_TPL_ENQ_LIST), - array('file' => '{dirname}_enq_edit.html','description' => _MI_BIZPOLL_TPL_ENQ_EDIT), - array('file' => '{dirname}_enq_delete.html','description' => _MI_BIZPOLL_TPL_ENQ_DELETE), - array('file' => '{dirname}_enq_view.html','description' => _MI_BIZPOLL_TPL_ENQ_VIEW), - array('file' => '{dirname}_poll_list.html','description' => _MI_BIZPOLL_TPL_POLL_LIST), - array('file' => '{dirname}_poll_edit.html','description' => _MI_BIZPOLL_TPL_POLL_EDIT), - array('file' => '{dirname}_poll_delete.html','description' => _MI_BIZPOLL_TPL_POLL_DELETE), - array('file' => '{dirname}_poll_detail.html','description' => _MI_BIZPOLL_TPL_POLL_VIEW), - array('file' => '{dirname}_choice_list.html','description' => _MI_BIZPOLL_TPL_CHOICE_LIST), - array('file' => '{dirname}_choice_edit.html','description' => _MI_BIZPOLL_TPL_CHOICE_EDIT), - array('file' => '{dirname}_choice_delete.html','description' => _MI_BIZPOLL_TPL_CHOICE_DELETE), - array('file' => '{dirname}_choice_view.html','description' => _MI_BIZPOLL_TPL_CHOICE_VIEW), - array('file' => '{dirname}_enq_rss.html','description' => _MI_BIZPOLL_TPL_ENQ_RSS), + array('file' => '{dirname}_enq_list.html','description' => _MI_BIZPOLL_TPL_ENQ_LIST), + array('file' => '{dirname}_enq_edit.html','description' => _MI_BIZPOLL_TPL_ENQ_EDIT), + array('file' => '{dirname}_enq_delete.html','description' => _MI_BIZPOLL_TPL_ENQ_DELETE), + array('file' => '{dirname}_enq_view.html','description' => _MI_BIZPOLL_TPL_ENQ_VIEW), + array('file' => '{dirname}_poll_list.html','description' => _MI_BIZPOLL_TPL_POLL_LIST), + array('file' => '{dirname}_poll_edit.html','description' => _MI_BIZPOLL_TPL_POLL_EDIT), + array('file' => '{dirname}_poll_delete.html','description' => _MI_BIZPOLL_TPL_POLL_DELETE), + array('file' => '{dirname}_poll_detail.html','description' => _MI_BIZPOLL_TPL_POLL_VIEW), + array('file' => '{dirname}_choice_list.html','description' => _MI_BIZPOLL_TPL_CHOICE_LIST), + array('file' => '{dirname}_choice_edit.html','description' => _MI_BIZPOLL_TPL_CHOICE_EDIT), + array('file' => '{dirname}_choice_delete.html','description' => _MI_BIZPOLL_TPL_CHOICE_DELETE), + array('file' => '{dirname}_choice_view.html','description' => _MI_BIZPOLL_TPL_CHOICE_VIEW), + array('file' => '{dirname}_enq_rss.html','description' => _MI_BIZPOLL_TPL_ENQ_RSS), ##[/cubson:templates] ); @@ -96,13 +96,13 @@ $modversion['adminindex'] = 'admin/index.php'; $modversion['adminmenu'] = array( /* - array( - 'title' => _MI_BIZPOLL_LANG_XXXX, - 'link' => 'admin/index.php?action=xxx', - 'keywords' => _MI_BIZPOLL_KEYWORD_XXX, - 'show' => true, - 'absolute' => false - ), + array( + 'title' => _MI_BIZPOLL_LANG_XXXX, + 'link' => 'admin/index.php?action=xxx', + 'keywords' => _MI_BIZPOLL_KEYWORD_XXX, + 'show' => true, + 'absolute' => false + ), */ ##[cubson:adminmenu] ##[/cubson:adminmenu] @@ -115,10 +115,10 @@ $modversion['hasSearch'] = 0; $modversion['sub'] = array( /* - array( - 'name' => _MI_BIZPOLL_LANG_SUB_XXX, - 'url' => 'index.php?action=XXX' - ), + array( + 'name' => _MI_BIZPOLL_LANG_SUB_XXX, + 'url' => 'index.php?action=XXX' + ), */ ##[cubson:submenu] ##[/cubson:submenu] @@ -128,79 +128,79 @@ // Config setting // $modversion['config'] = array( - array( - 'name' => 'gr_id', - 'title' => "_MI_BIZPOLL_TITLE_GR_ID", - 'description' => "_MI_BIZPOLL_DESC_GR_ID", - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'options' => array(), - 'default' => 0 - ), - array( - 'name' => 'css_file', - 'title' => "_MI_BIZPOLL_TITLE_CSS_FILE", - 'description' => "_MI_BIZPOLL_DESC_CSS_FILE", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => '/modules/'. $myDirName. '/bizpoll.css' - ), - array( - 'name' => 'permit_title', - 'title' => "_MI_BIZPOLL_TITLE_PERMIT", - 'description' => "_MI_BIZPOLL_DESC_PERMIT", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => 'viewer|poster|editor|viewer' - ), - array( - 'name' => 'show_rss', - 'title' => "_MI_BIZPOLL_TITLE_SHOW_RSS", - 'description' => "_MI_BIZPOLL_DESC_SHOW_RSS", - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'options' => array(), - 'default' => '1' - ), - array( - 'name' => 'editor', - 'title' => "_MI_BIZPOLL_TITLE_EDITOR", - 'description' => "_MI_BIZPOLL_DESC_EDITOR", - 'formtype' => 'select', - 'valuetype' => 'text', - 'options' => array("bbcode"=>"bbcode", "fckeditor"=>"fckeditor"), - 'default' => 'bbcode' - ), - array( - 'name' => 'ip_period', - 'title' => "_MI_BIZPOLL_TITLE_IP_PERIOD", - 'description' => "_MI_BIZPOLL_DESC_IP_PERIOD", - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'options' => array(), - 'default' => '24' - ), - array( - 'name' => 'chart', - 'title' => "_MI_BIZPOLL_TITLE_CHART", - 'description' => "_MI_BIZPOLL_DESC_CHART", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => 'p,400,100' - ), + array( + 'name' => 'gr_id', + 'title' => "_MI_BIZPOLL_TITLE_GR_ID", + 'description' => "_MI_BIZPOLL_DESC_GR_ID", + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'options' => array(), + 'default' => 0 + ), + array( + 'name' => 'css_file', + 'title' => "_MI_BIZPOLL_TITLE_CSS_FILE", + 'description' => "_MI_BIZPOLL_DESC_CSS_FILE", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => '/modules/'. $myDirName. '/bizpoll.css' + ), + array( + 'name' => 'permit_title', + 'title' => "_MI_BIZPOLL_TITLE_PERMIT", + 'description' => "_MI_BIZPOLL_DESC_PERMIT", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => 'viewer|poster|editor|viewer' + ), + array( + 'name' => 'show_rss', + 'title' => "_MI_BIZPOLL_TITLE_SHOW_RSS", + 'description' => "_MI_BIZPOLL_DESC_SHOW_RSS", + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'options' => array(), + 'default' => '1' + ), + array( + 'name' => 'editor', + 'title' => "_MI_BIZPOLL_TITLE_EDITOR", + 'description' => "_MI_BIZPOLL_DESC_EDITOR", + 'formtype' => 'select', + 'valuetype' => 'text', + 'options' => array("bbcode"=>"bbcode", "fckeditor"=>"fckeditor"), + 'default' => 'bbcode' + ), + array( + 'name' => 'ip_period', + 'title' => "_MI_BIZPOLL_TITLE_IP_PERIOD", + 'description' => "_MI_BIZPOLL_DESC_IP_PERIOD", + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'options' => array(), + 'default' => '24' + ), + array( + 'name' => 'chart', + 'title' => "_MI_BIZPOLL_TITLE_CHART", + 'description' => "_MI_BIZPOLL_DESC_CHART", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => 'p,400,100' + ), /* - array( - 'name' => 'xxxx', - 'title' => '_MI_BIZPOLL_TITLE_XXXX', - 'description' => '_MI_BIZPOLL_DESC_XXXX', - 'formtype' => 'xxxx', - 'valuetype' => 'xxx', - 'options' => array(xxx => xxx,xxx => xxx), - 'default' => 0 - ), + array( + 'name' => 'xxxx', + 'title' => '_MI_BIZPOLL_TITLE_XXXX', + 'description' => '_MI_BIZPOLL_DESC_XXXX', + 'formtype' => 'xxxx', + 'valuetype' => 'xxx', + 'options' => array(xxx => xxx,xxx => xxx), + 'default' => 0 + ), */ ##[cubson:config] ##[/cubson:config] @@ -210,42 +210,42 @@ // Block setting // $modversion['blocks'] = array( - 1 => array( - 'func_num' => 1, - 'file' => 'EnqBlock.class.php', - 'class' => 'EnqBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_ENQ, - 'description' => _MI_BIZPOLL_BLOCK_DESC_ENQ, - 'options' => '5|', - 'template' => '{dirname}_block_enq.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), - 2 => array( - 'func_num' => 2, - 'file' => 'PollOneBlock.class.php', - 'class' => 'PollOneBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, - 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLONE, - 'options' => '0|', - 'template' => '{dirname}_block_pollone.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), - 3 => array( - 'func_num' => 3, - 'file' => 'PollNewBlock.class.php', - 'class' => 'PollNewBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, - 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, - 'options' => '', - 'template' => '{dirname}_block_pollnew.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), + 1 => array( + 'func_num' => 1, + 'file' => 'EnqBlock.class.php', + 'class' => 'EnqBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_ENQ, + 'description' => _MI_BIZPOLL_BLOCK_DESC_ENQ, + 'options' => '5|', + 'template' => '{dirname}_block_enq.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), + 2 => array( + 'func_num' => 2, + 'file' => 'PollOneBlock.class.php', + 'class' => 'PollOneBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLONE, + 'options' => '0|', + 'template' => '{dirname}_block_pollone.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), + 3 => array( + 'func_num' => 3, + 'file' => 'PollNewBlock.class.php', + 'class' => 'PollNewBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, + 'options' => '', + 'template' => '{dirname}_block_pollnew.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), ##[cubson:block] ##[/cubson:block] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mum...@us...> - 2011-03-03 10:50:51
|
Revision: 529 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=529&view=rev Author: mumincacao Date: 2011-03-03 10:50:45 +0000 (Thu, 03 Mar 2011) Log Message: ----------- Fixed Bug: Asset manager cannot handling multiple action form. Modified Paths: -------------- tools_Tubson/trunk/cubson/Generator/Project/AssetManagerGenerator.cs Modified: tools_Tubson/trunk/cubson/Generator/Project/AssetManagerGenerator.cs =================================================================== --- tools_Tubson/trunk/cubson/Generator/Project/AssetManagerGenerator.cs 2011-03-03 10:40:15 UTC (rev 528) +++ tools_Tubson/trunk/cubson/Generator/Project/AssetManagerGenerator.cs 2011-03-03 10:50:45 UTC (rev 529) @@ -104,9 +104,10 @@ param[3].defaultValue = "null"; MethodTemplate getObject = new MethodTemplate(AccessLevel.PUBLIC, true, "getObject", param, "&object<XCube_ActionFilter,XCube_ActionForm,XoopsObjectGenericHandler>"); - getObject.AppendCode("if(isset($this->_mCache[$type][$name]))"); + getObject.AppendCode("$key = md5(serialize(array($name,$isAdmin,$mode)));"); + getObject.AppendCode("if(isset($this->_mCache[$type][$key]))"); getObject.AppendCode("{"); - getObject.AppendCode(" return $this->_mCache[$type][$name];"); + getObject.AppendCode(" return $this->_mCache[$type][$key];"); getObject.AppendCode("}"); getObject.AppendBreak(); getObject.AppendCode("$instance = null;"); @@ -122,7 +123,7 @@ getObject.AppendCode(" $instance =& $this->_fallbackCreate($type,$name,$isAdmin,$mode);"); getObject.AppendCode("}"); getObject.AppendBreak(); - getObject.AppendCode("$this->_mCache[$type][$name] =& $instance;"); + getObject.AppendCode("$this->_mCache[$type][$key] =& $instance;"); getObject.AppendBreak(); getObject.AppendCode("return $instance;"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mum...@us...> - 2011-03-03 10:40:21
|
Revision: 528 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=528&view=rev Author: mumincacao Date: 2011-03-03 10:40:15 +0000 (Thu, 03 Mar 2011) Log Message: ----------- Fixed Typo: Message constant of module uninstall error. Modified Paths: -------------- tools_Tubson/trunk/cubson/Generator/Project/BasicMessageGenerator.cs Modified: tools_Tubson/trunk/cubson/Generator/Project/BasicMessageGenerator.cs =================================================================== --- tools_Tubson/trunk/cubson/Generator/Project/BasicMessageGenerator.cs 2011-02-22 15:23:28 UTC (rev 527) +++ tools_Tubson/trunk/cubson/Generator/Project/BasicMessageGenerator.cs 2011-03-03 10:40:15 UTC (rev 528) @@ -287,7 +287,7 @@ message.AddTranslation("ja_utf8", "もじゅーる『{0}』をあんいんすとーるしました。"); message.AddTranslation("japanese", "もじゅーる『{0}』をあんいんすとーるしました。"); - message = installMsgs.AddMessage("install", "ERROR_MODULOE_UNINSTALLED"); + message = installMsgs.AddMessage("install", "ERROR_MODULE_UNINSTALLED"); message.AddTranslation("english", "Module '{0}' could not uninstalled."); message.AddTranslation("ja_utf8", "もじゅーる『{0}』があんいんすとーるできませんでした。"); message.AddTranslation("japanese", "もじゅーる『{0}』があんいんすとーるできませんでした。"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2011-02-22 15:23:35
|
Revision: 527 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=527&view=rev Author: kilica Date: 2011-02-22 15:23:28 +0000 (Tue, 22 Feb 2011) Log Message: ----------- xcl2.2 readiness Modified Paths: -------------- modules_xcat/trunk/README.txt modules_xcat/trunk/actions/CatDeleteAction.class.php modules_xcat/trunk/actions/CatEditAction.class.php modules_xcat/trunk/actions/GrDeleteAction.class.php modules_xcat/trunk/actions/GrEditAction.class.php modules_xcat/trunk/actions/GrListAction.class.php modules_xcat/trunk/actions/ModDeleteAction.class.php modules_xcat/trunk/actions/ModEditAction.class.php modules_xcat/trunk/actions/ModListAction.class.php modules_xcat/trunk/actions/PermitDeleteAction.class.php modules_xcat/trunk/actions/PermitEditAction.class.php modules_xcat/trunk/class/AbstractFilterForm.class.php modules_xcat/trunk/class/AbstractListAction.class.php modules_xcat/trunk/class/AssetManager.class.php modules_xcat/trunk/class/Module.class.php modules_xcat/trunk/forms/CatDeleteForm.class.php modules_xcat/trunk/forms/CatEditForm.class.php modules_xcat/trunk/forms/GrDeleteForm.class.php modules_xcat/trunk/forms/GrEditForm.class.php modules_xcat/trunk/forms/ModDeleteForm.class.php modules_xcat/trunk/forms/ModEditForm.class.php modules_xcat/trunk/forms/PermitDeleteForm.class.php modules_xcat/trunk/forms/PermitEditForm.class.php modules_xcat/trunk/preload/AssetPreload.class.php modules_xcat/trunk/preload/CatPreload.class.php modules_xcat/trunk/templates/xcat_cat_list.html modules_xcat/trunk/templates/xcat_cat_view.html modules_xcat/trunk/templates/xcat_gr_view.html modules_xcat/trunk/xoops_version.php Added Paths: ----------- modules_xcat/trunk/templates/xcat_inc_tree.html Removed Paths: ------------- modules_xcat/trunk/.xml/ modules_xcat/trunk/admin/.xml/ Modified: modules_xcat/trunk/README.txt =================================================================== --- modules_xcat/trunk/README.txt 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/README.txt 2011-02-22 15:23:28 UTC (rev 527) @@ -26,6 +26,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.44(2011.02.22) +\x81Excl2.2\x8C\xFC\x82\xAF\x82ɏC\x90\xB3\x81ismarty plugin legacy_tree \x82\xF0\x8Eg\x97p\x81j + 0.43(2008.09.19) \x81Eservice \x82\xCC getCatPath \x82\xF0\x8F\xB8\x8F\x87\x8Ew\x92\xE8(order="ASC")\x82Ŏ擾\x82\xB5\x82\xBD\x8Fꍇ\x81A\x94z\x97\xF1\x82̕\xC0\x82я\x87\x82\xAA\x95s\x90\xB3\x82\xBE\x82\xC1\x82\xBD\x82̂\xF0\x8FC\x90\xB3 Modified: modules_xcat/trunk/actions/CatDeleteAction.class.php =================================================================== --- modules_xcat/trunk/actions/CatDeleteAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/CatDeleteAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -33,7 +33,7 @@ */ function &_setupActionForm() { - // $this->mActionForm =& new Xcat_CatDeleteForm(); + // $this->mActionForm = new Xcat_CatDeleteForm(); $this->mActionForm =& $this->mAsset->create('form', "delete_cat"); $this->mActionForm->prepare(); } Modified: modules_xcat/trunk/actions/CatEditAction.class.php =================================================================== --- modules_xcat/trunk/actions/CatEditAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/CatEditAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -45,7 +45,7 @@ */ function _setupActionForm() { - // $this->mActionForm =& new Xcat_CatEditForm(); + // $this->mActionForm = new Xcat_CatEditForm(); $this->mActionForm =& $this->mAsset->create('form', "edit_cat"); $this->mActionForm->prepare(); } @@ -61,9 +61,6 @@ //add new record if ($this->mObject->isNew()) { - if($this->mRoot->mContext->mXoopsUser){ - $this->mObject->set('uid', $this->mRoot->mContext->mXoopsUser->get('uid')); - } //set parent category if requested if(xoops_getrequest('p_id')){ $this->mObject->set('p_id', xoops_getrequest('p_id')); @@ -76,8 +73,8 @@ } //set default values - $this->mObject->set('count1', 0); - $this->mObject->set('count2', 0); + //$this->mObject->set('count1', 0); + //$this->mObject->set('count2', 0); } else{ //load permission data if not new category $this->mObject->loadPermit(); Modified: modules_xcat/trunk/actions/GrDeleteAction.class.php =================================================================== --- modules_xcat/trunk/actions/GrDeleteAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/GrDeleteAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -41,7 +41,7 @@ */ function &_setupActionForm() { - // $this->mActionForm =& new Xcat_GrDeleteForm(); + // $this->mActionForm = new Xcat_GrDeleteForm(); $this->mActionForm =& $this->mAsset->create('form', "delete_gr"); $this->mActionForm->prepare(); } Modified: modules_xcat/trunk/actions/GrEditAction.class.php =================================================================== --- modules_xcat/trunk/actions/GrEditAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/GrEditAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -69,7 +69,7 @@ */ function _setupActionForm() { - // $this->mActionForm =& new Xcat_GrEditForm(); + // $this->mActionForm = new Xcat_GrEditForm(); $this->mActionForm =& $this->mAsset->create('form', "edit_gr"); $this->mActionForm->prepare(); } Modified: modules_xcat/trunk/actions/GrListAction.class.php =================================================================== --- modules_xcat/trunk/actions/GrListAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/GrListAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -33,7 +33,7 @@ */ function &_getFilterForm() { - // $filter =& new Xcat_GrFilterForm(); + // $filter = new Xcat_GrFilterForm(); $filter =& $this->mAsset->create('filter', "gr"); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_xcat/trunk/actions/ModDeleteAction.class.php =================================================================== --- modules_xcat/trunk/actions/ModDeleteAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/ModDeleteAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -41,7 +41,7 @@ */ function &_setupActionForm() { - // $this->mActionForm =& new Xcat_ModDeleteForm(); + // $this->mActionForm = new Xcat_ModDeleteForm(); $this->mActionForm =& $this->mAsset->create('form', "delete_mod"); $this->mActionForm->prepare(); } Modified: modules_xcat/trunk/actions/ModEditAction.class.php =================================================================== --- modules_xcat/trunk/actions/ModEditAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/ModEditAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -41,7 +41,7 @@ */ function _setupActionForm() { - // $this->mActionForm =& new Xcat_ModEditForm(); + // $this->mActionForm = new Xcat_ModEditForm(); $this->mActionForm =& $this->mAsset->create('form', "edit_mod"); $this->mActionForm->prepare(); } Modified: modules_xcat/trunk/actions/ModListAction.class.php =================================================================== --- modules_xcat/trunk/actions/ModListAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/ModListAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -25,7 +25,7 @@ */ function &_getFilterForm() { - // $filter =& new Xcat_ModFilterForm(); + // $filter = new Xcat_ModFilterForm(); $filter =& $this->mAsset->create('filter', "mod"); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_xcat/trunk/actions/PermitDeleteAction.class.php =================================================================== --- modules_xcat/trunk/actions/PermitDeleteAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/PermitDeleteAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -33,7 +33,7 @@ */ function _setupActionForm() { - // $this->mActionForm =& new Xcat_PermitDeleteForm(); + // $this->mActionForm = new Xcat_PermitDeleteForm(); $this->mActionForm =& $this->mAsset->create('form', "delete_permit"); $this->mActionForm->prepare(); } Modified: modules_xcat/trunk/actions/PermitEditAction.class.php =================================================================== --- modules_xcat/trunk/actions/PermitEditAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/actions/PermitEditAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -46,7 +46,7 @@ */ function _setupActionForm() { - // $this->mActionForm =& new Xcat_PermitEditForm(); + // $this->mActionForm = new Xcat_PermitEditForm(); $this->mActionForm =& $this->mAsset->create('form', "edit_permit"); $this->mActionForm->prepare(); } Modified: modules_xcat/trunk/class/AbstractFilterForm.class.php =================================================================== --- modules_xcat/trunk/class/AbstractFilterForm.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/class/AbstractFilterForm.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -35,7 +35,7 @@ */ function Xcat_AbstractFilterForm() { - $this->_mCriteria =& new CriteriaCompo(); + $this->_mCriteria = new CriteriaCompo(); } Modified: modules_xcat/trunk/class/AbstractListAction.class.php =================================================================== --- modules_xcat/trunk/class/AbstractListAction.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/class/AbstractListAction.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -40,7 +40,7 @@ */ function &_getPageNavi() { - $navi =& new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START); + $navi = new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START); return $navi; } Modified: modules_xcat/trunk/class/AssetManager.class.php =================================================================== --- modules_xcat/trunk/class/AssetManager.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/class/AssetManager.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -166,7 +166,7 @@ $instance = null; if (class_exists($className)) { - $instance =& new $className(); + $instance = new $className(); return $instance; } @@ -177,7 +177,7 @@ require_once $filePath; if (class_exists($className)) { - $instance =& new $className(); + $instance = new $className(); } return $instance; Modified: modules_xcat/trunk/class/Module.class.php =================================================================== --- modules_xcat/trunk/class/Module.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/class/Module.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -99,7 +99,7 @@ require_once $fileName; if (class_exists($className)) { - $this->mAction =& new $className(); + $this->mAction = new $className(); } if (!is_object($this->mAction)) { Modified: modules_xcat/trunk/forms/CatDeleteForm.class.php =================================================================== --- modules_xcat/trunk/forms/CatDeleteForm.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/forms/CatDeleteForm.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -28,12 +28,12 @@ // // Set form properties // - $this->mFormProperties['cat_id'] =& new XCube_IntProperty('cat_id'); + $this->mFormProperties['cat_id'] = new XCube_IntProperty('cat_id'); // // Set field properties // - $this->mFieldProperties['cat_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['cat_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['cat_id']->setDependsByArray(array('required')); $this->mFieldProperties['cat_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_CAT_ID); } Modified: modules_xcat/trunk/forms/CatEditForm.class.php =================================================================== --- modules_xcat/trunk/forms/CatEditForm.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/forms/CatEditForm.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -28,40 +28,40 @@ // // Set form properties // - $this->mFormProperties['cat_id'] =& new XCube_IntProperty('cat_id'); - $this->mFormProperties['cat_title'] =& new XCube_StringProperty('cat_title'); - $this->mFormProperties['gr_id'] =& new XCube_IntProperty('gr_id'); - $this->mFormProperties['p_id'] =& new XCube_IntProperty('p_id'); - $this->mFormProperties['cat_desc'] =& new XCube_TextProperty('cat_desc'); - $this->mFormProperties['modules'] =& new XCube_TextProperty('modules'); - $this->mFormProperties['imageurl'] =& new XCube_TextProperty('imageurl'); - $this->mFormProperties['weight'] =& new XCube_IntProperty('weight'); - $this->mFormProperties['options'] =& new XCube_TextProperty('options'); + $this->mFormProperties['cat_id'] = new XCube_IntProperty('cat_id'); + $this->mFormProperties['cat_title'] = new XCube_StringProperty('cat_title'); + $this->mFormProperties['gr_id'] = new XCube_IntProperty('gr_id'); + $this->mFormProperties['p_id'] = new XCube_IntProperty('p_id'); + $this->mFormProperties['cat_desc'] = new XCube_TextProperty('cat_desc'); + $this->mFormProperties['modules'] = new XCube_TextProperty('modules'); + $this->mFormProperties['imageurl'] = new XCube_TextProperty('imageurl'); + $this->mFormProperties['weight'] = new XCube_IntProperty('weight'); + $this->mFormProperties['options'] = new XCube_TextProperty('options'); // // Set field properties // - $this->mFieldProperties['cat_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['cat_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['cat_id']->setDependsByArray(array('required')); $this->mFieldProperties['cat_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_CAT_ID); - $this->mFieldProperties['cat_title'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['cat_title'] = new XCube_FieldProperty($this); $this->mFieldProperties['cat_title']->setDependsByArray(array('required','maxlength')); $this->mFieldProperties['cat_title']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_CAT_TITLE, '255'); $this->mFieldProperties['cat_title']->addMessage('maxlength', _MD_XCAT_ERROR_MAXLENGTH, _MD_XCAT_LANG_CAT_TITLE, '255'); $this->mFieldProperties['cat_title']->addVar('maxlength', '255'); - $this->mFieldProperties['gr_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['gr_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['gr_id']->setDependsByArray(array('required')); $this->mFieldProperties['gr_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_GR_ID); - $this->mFieldProperties['p_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['p_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['p_id']->setDependsByArray(array('required')); $this->mFieldProperties['p_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_P_ID); - $this->mFieldProperties['cat_desc'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['cat_desc'] = new XCube_FieldProperty($this); - $this->mFieldProperties['weight'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['weight'] = new XCube_FieldProperty($this); $this->mFieldProperties['weight']->setDependsByArray(array('required')); $this->mFieldProperties['weight']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_WEIGHT); Modified: modules_xcat/trunk/forms/GrDeleteForm.class.php =================================================================== --- modules_xcat/trunk/forms/GrDeleteForm.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/forms/GrDeleteForm.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -28,12 +28,12 @@ // // Set form properties // - $this->mFormProperties['gr_id'] =& new XCube_IntProperty('gr_id'); + $this->mFormProperties['gr_id'] = new XCube_IntProperty('gr_id'); // // Set field properties // - $this->mFieldProperties['gr_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['gr_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['gr_id']->setDependsByArray(array('required')); $this->mFieldProperties['gr_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_GR_ID); } Modified: modules_xcat/trunk/forms/GrEditForm.class.php =================================================================== --- modules_xcat/trunk/forms/GrEditForm.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/forms/GrEditForm.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -28,25 +28,25 @@ // // Set form properties // - $this->mFormProperties['gr_id'] =& new XCube_IntProperty('gr_id'); - $this->mFormProperties['gr_title'] =& new XCube_StringProperty('gr_title'); - $this->mFormProperties['level'] =& new XCube_IntProperty('level'); - $this->mFormProperties['actions'] =& new XCube_TextProperty('actions'); + $this->mFormProperties['gr_id'] = new XCube_IntProperty('gr_id'); + $this->mFormProperties['gr_title'] = new XCube_StringProperty('gr_title'); + $this->mFormProperties['level'] = new XCube_IntProperty('level'); + $this->mFormProperties['actions'] = new XCube_TextProperty('actions'); // // Set field properties // - $this->mFieldProperties['gr_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['gr_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['gr_id']->setDependsByArray(array('required')); $this->mFieldProperties['gr_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_GR_ID); - $this->mFieldProperties['gr_title'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['gr_title'] = new XCube_FieldProperty($this); $this->mFieldProperties['gr_title']->setDependsByArray(array('required','maxlength')); $this->mFieldProperties['gr_title']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_GR_TITLE, '255'); $this->mFieldProperties['gr_title']->addMessage('maxlength', _MD_XCAT_ERROR_MAXLENGTH, _MD_XCAT_LANG_GR_TITLE, '255'); $this->mFieldProperties['gr_title']->addVar('maxlength', '255'); - $this->mFieldProperties['level'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['level'] = new XCube_FieldProperty($this); $this->mFieldProperties['level']->setDependsByArray(array('required')); $this->mFieldProperties['level']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_LEVEL); Modified: modules_xcat/trunk/forms/ModDeleteForm.class.php =================================================================== --- modules_xcat/trunk/forms/ModDeleteForm.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/forms/ModDeleteForm.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -28,12 +28,12 @@ // // Set form properties // - $this->mFormProperties['mod_id'] =& new XCube_IntProperty('mod_id'); + $this->mFormProperties['mod_id'] = new XCube_IntProperty('mod_id'); // // Set field properties // - $this->mFieldProperties['mod_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['mod_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['mod_id']->setDependsByArray(array('required')); $this->mFieldProperties['mod_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_MOD_ID); } Modified: modules_xcat/trunk/forms/ModEditForm.class.php =================================================================== --- modules_xcat/trunk/forms/ModEditForm.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/forms/ModEditForm.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -28,29 +28,29 @@ // // Set form properties // - $this->mFormProperties['mod_id'] =& new XCube_IntProperty('mod_id'); - $this->mFormProperties['gr_id'] =& new XCube_IntProperty('gr_id'); - $this->mFormProperties['mid'] =& new XCube_IntProperty('mid'); - $this->mFormProperties['dir_name'] =& new XCube_StringProperty('dir_name'); - $this->mFormProperties['weight'] =& new XCube_IntProperty('weight'); - $this->mFormProperties['option'] =& new XCube_TextProperty('option'); + $this->mFormProperties['mod_id'] = new XCube_IntProperty('mod_id'); + $this->mFormProperties['gr_id'] = new XCube_IntProperty('gr_id'); + $this->mFormProperties['mid'] = new XCube_IntProperty('mid'); + $this->mFormProperties['dir_name'] = new XCube_StringProperty('dir_name'); + $this->mFormProperties['weight'] = new XCube_IntProperty('weight'); + $this->mFormProperties['option'] = new XCube_TextProperty('option'); // // Set field properties // - $this->mFieldProperties['mod_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['mod_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['mod_id']->setDependsByArray(array('required')); $this->mFieldProperties['mod_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_MOD_ID); - $this->mFieldProperties['gr_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['gr_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['gr_id']->setDependsByArray(array('required')); $this->mFieldProperties['gr_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_GR_ID); - $this->mFieldProperties['mid'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['mid'] = new XCube_FieldProperty($this); $this->mFieldProperties['mid']->setDependsByArray(array('required')); $this->mFieldProperties['mid']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_MID); - $this->mFieldProperties['dir_name'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['dir_name'] = new XCube_FieldProperty($this); $this->mFieldProperties['dir_name']->setDependsByArray(array('required','maxlength')); $this->mFieldProperties['dir_name']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_DIR_NAME, '25'); $this->mFieldProperties['dir_name']->addMessage('maxlength', _MD_XCAT_ERROR_MAXLENGTH, _MD_XCAT_LANG_DIR_NAME, '25'); Modified: modules_xcat/trunk/forms/PermitDeleteForm.class.php =================================================================== --- modules_xcat/trunk/forms/PermitDeleteForm.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/forms/PermitDeleteForm.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -28,12 +28,12 @@ // // Set form properties // - //$this->mFormProperties['cat_id'] =& new XCube_IntProperty('cat_id'); + //$this->mFormProperties['cat_id'] = new XCube_IntProperty('cat_id'); // // Set field properties // - //$this->mFieldProperties['cat_id'] =& new XCube_FieldProperty($this); + //$this->mFieldProperties['cat_id'] = new XCube_FieldProperty($this); //$this->mFieldProperties['cat_id']->setDependsByArray(array('required')); //$this->mFieldProperties['cat_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_CAT_ID); } Modified: modules_xcat/trunk/forms/PermitEditForm.class.php =================================================================== --- modules_xcat/trunk/forms/PermitEditForm.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/forms/PermitEditForm.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -28,26 +28,26 @@ // // Set form properties // - $this->mFormProperties['permit_id'] =& new XCube_IntProperty('permit_id'); - $this->mFormProperties['cat_id'] =& new XCube_IntProperty('cat_id'); - $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); - $this->mFormProperties['groupid'] =& new XCube_IntProperty('groupid'); - $this->mFormProperties['permissions'] =& new XCube_TextProperty('permissions'); + $this->mFormProperties['permit_id'] = new XCube_IntProperty('permit_id'); + $this->mFormProperties['cat_id'] = new XCube_IntProperty('cat_id'); + $this->mFormProperties['uid'] = new XCube_IntProperty('uid'); + $this->mFormProperties['groupid'] = new XCube_IntProperty('groupid'); + $this->mFormProperties['permissions'] = new XCube_TextProperty('permissions'); // // Set field properties // - $this->mFieldProperties['permit_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['permit_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['permit_id']->setDependsByArray(array('required')); $this->mFieldProperties['permit_id']->addMessage('required', _MD_XCAT_ERROR_REQUIRED, _MD_XCAT_LANG_PERMIT_ID); - $this->mFieldProperties['cat_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['cat_id'] = new XCube_FieldProperty($this); - $this->mFieldProperties['uid'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['uid'] = new XCube_FieldProperty($this); - $this->mFieldProperties['groupid'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['groupid'] = new XCube_FieldProperty($this); - $this->mFieldProperties['permissions'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['permissions'] = new XCube_FieldProperty($this); } /** Modified: modules_xcat/trunk/preload/AssetPreload.class.php =================================================================== --- modules_xcat/trunk/preload/AssetPreload.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/preload/AssetPreload.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -15,7 +15,7 @@ function preBlockFilter() { if (!$this->mRoot->mContext->hasAttribute('module.xcat.HasSetAssetManager')) { - $delegate =& new XCube_Delegate(); + $delegate = new XCube_Delegate(); $delegate->register('Module.xcat.Event.GetAssetManager'); $delegate->add(array(&$this, 'getManager')); $this->mRoot->mContext->setAttribute('module.xcat.HasSetAssetManager', true); Modified: modules_xcat/trunk/preload/CatPreload.class.php =================================================================== --- modules_xcat/trunk/preload/CatPreload.class.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/preload/CatPreload.class.php 2011-02-22 15:23:28 UTC (rev 527) @@ -1,74 +1,74 @@ -<?php -/** - * @file - * @package xcat - * @version $Id$ - */ - -if (!defined('XOOPS_ROOT_PATH')) exit(); - -require_once XOOPS_MODULE_PATH . "/xcat/class/TreeObject.class.php"; -require_once XOOPS_MODULE_PATH . "/xcat/class/GrList.class.php"; - -class Xcat_CatPreload extends XCube_ActionFilter -{ - /** - * @public - */ - function preBlockFilter() - { - $root =& XCube_Root::getSingleton(); - - require_once XOOPS_MODULE_PATH . "/xcat/service/XcatService.class.php"; - $service =& new Xcat_CatService(); - $service->prepare(); - - $this->mRoot->mServiceManager->addService('Xcat_CatService', $service); - - $root->mDelegateManager->add("Module.xcat.Event.GetCatManager", "Xcat_CatPreload::getCatManager"); - $root->mDelegateManager->add("Module.xcat.Event.GetCatTree", "Xcat_CatPreload::getCatTree"); - $root->mDelegateManager->add("Module.xcat.Event.GetGrList", "Xcat_CatPreload::getGrList"); - } - - /** - * @private - * get single category's object - */ - function getCatManager(&$obj, $catId=0) - { - $cat = null; - $handler =& xoops_getmodulehandler('cat', 'xcat'); - - if($catId>0){ - $cat =& $handler->get($catId); - $obj = $cat; - } - } - - /** - * @private - * get category tree object - */ - function getCatTree(&$obj, $grId) - { - //TreeObject - $catTree = new Xcat_TreeObject($grId); - $catTree->loadTree(); - - $obj = $catTree; - } - - - /** - * @private - * Get Gr list for category group selection - */ - function getGrList(&$obj) - { - $gr = null; - - $obj = $gr; - } -} - -?> +<?php +/** + * @file + * @package xcat + * @version $Id$ + */ + +if (!defined('XOOPS_ROOT_PATH')) exit(); + +require_once XOOPS_MODULE_PATH . "/xcat/class/TreeObject.class.php"; +require_once XOOPS_MODULE_PATH . "/xcat/class/GrList.class.php"; + +class Xcat_CatPreload extends XCube_ActionFilter +{ + /** + * @public + */ + function preBlockFilter() + { + $root =& XCube_Root::getSingleton(); + + require_once XOOPS_MODULE_PATH . "/xcat/service/XcatService.class.php"; + $service = new Xcat_CatService(); + $service->prepare(); + + $this->mRoot->mServiceManager->addService('Xcat_CatService', $service); + + $root->mDelegateManager->add("Module.xcat.Event.GetCatManager", "Xcat_CatPreload::getCatManager"); + $root->mDelegateManager->add("Module.xcat.Event.GetCatTree", "Xcat_CatPreload::getCatTree"); + $root->mDelegateManager->add("Module.xcat.Event.GetGrList", "Xcat_CatPreload::getGrList"); + } + + /** + * @private + * get single category's object + */ + function getCatManager(&$obj, $catId=0) + { + $cat = null; + $handler =& xoops_getmodulehandler('cat', 'xcat'); + + if($catId>0){ + $cat =& $handler->get($catId); + $obj = $cat; + } + } + + /** + * @private + * get category tree object + */ + function getCatTree(&$obj, $grId) + { + //TreeObject + $catTree = new Xcat_TreeObject($grId); + $catTree->loadTree(); + + $obj = $catTree; + } + + + /** + * @private + * Get Gr list for category group selection + */ + function getGrList(&$obj) + { + $gr = null; + + $obj = $gr; + } +} + +?> Modified: modules_xcat/trunk/templates/xcat_cat_list.html =================================================================== --- modules_xcat/trunk/templates/xcat_cat_list.html 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/templates/xcat_cat_list.html 2011-02-22 15:23:28 UTC (rev 527) @@ -7,7 +7,7 @@ <div class="xcat_group"> <h2><{$smarty.const._MD_XCAT_LANG_GR}> : <{$obj->mGr->getShow('gr_title')}></h2> [<a href="./index.php?action=GrView&gr_id=<{$obj->mGr->getShow('gr_id')}>"><{$smarty.const._VIEW}></a>] [<a href="./index.php?action=CatEdit&gr_id=<{$obj->mGr->getShow('gr_id')}>"><{$smarty.const._MD_XCAT_LANG_ADD_A_NEW_CAT}></a>] - <{xcat_tree tree=$obj->mTree control=true}> + <{legacy_tree tree=$obj->mTree dirname=xcat control=true template=xcat_inc_tree.html}> </div> <{/foreach}> </div> Modified: modules_xcat/trunk/templates/xcat_cat_view.html =================================================================== --- modules_xcat/trunk/templates/xcat_cat_view.html 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/templates/xcat_cat_view.html 2011-02-22 15:23:28 UTC (rev 527) @@ -24,7 +24,7 @@ </div> <div class="catTree"> <h2><{$smarty.const._MD_XCAT_LANG_CAT}></h2> - <{xcat_tree tree=$childrenTree url="./index.php?action=CatView&cat_id="}> + <{legacy_tree tree=$childrenTree template=xcat_inc_tree.html dirname=xcat}> </div> <hr style="clear:both;" /> <div> Modified: modules_xcat/trunk/templates/xcat_gr_view.html =================================================================== --- modules_xcat/trunk/templates/xcat_gr_view.html 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/templates/xcat_gr_view.html 2011-02-22 15:23:28 UTC (rev 527) @@ -19,6 +19,6 @@ <div class="catTree"> <h2><{$smarty.const._MD_XCAT_LANG_CAT}></h2> - <{xcat_tree tree=$childrenTree url="./index.php?action=CatView&cat_id="}> + <{legacy_tree tree=$childrenTree template=xcat_inc_tree.html dirname=xcat}> </div> </div> Added: modules_xcat/trunk/templates/xcat_inc_tree.html =================================================================== --- modules_xcat/trunk/templates/xcat_inc_tree.html (rev 0) +++ modules_xcat/trunk/templates/xcat_inc_tree.html 2011-02-22 15:23:28 UTC (rev 527) @@ -0,0 +1,25 @@ +<div class="<{$className}>"> +<{foreach item=cat from=$tree name=tree}> +<{if $smarty.foreach.tree.first}> +<{assign var=d value=$cat->getDepth()}> +<{/if}> + +<{if $smarty.foreach.tree.first || $d < $cat->getDepth()}> + <ul class="catL<{$cat->getDepth()}>"> + <li><a href="./index.php?action=CatView&cat_id=<{$cat->getShow('cat_id')}>"><{$cat->getShow('cat_title')}></a></li> +<{elseif $d==$cat->getDepth()}> + <li><a href="./index.php?action=CatView&cat_id=<{$cat->getShow('cat_id')}>"><{$cat->getShow('cat_title')}></a></li> +<{else}> + <{section name=i start=0 loop=$d-$cat->getDepth()}> + </ul> + <{/section}> + <li><a href="./index.php?action=CatView&cat_id=<{$cat->getShow('cat_id')}>"><{$cat->getShow('cat_title')}></a></li> +<{/if}> +<{if $smarty.foreach.tree.last}> + <{section name=i start=0 loop=$cat->getDepth()}> + </ul> + <{/section}> +<{/if}> +<{assign var=d value=$cat->getDepth()}> +<{/foreach}> +</div> Modified: modules_xcat/trunk/xoops_version.php =================================================================== --- modules_xcat/trunk/xoops_version.php 2011-02-22 14:33:03 UTC (rev 526) +++ modules_xcat/trunk/xoops_version.php 2011-02-22 15:23:28 UTC (rev 527) @@ -11,7 +11,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_XCAT_LANG_XCAT; -$modversion['version'] = 0.43; +$modversion['version'] = 0.44; $modversion['description'] = _MI_XCAT_DESC_XCAT; $modversion['author'] = "HIKAWA Kilica"; $modversion['credits'] = ""; @@ -55,6 +55,7 @@ $modversion['templates'][13]['file'] = 'xcat_mod_edit.html'; $modversion['templates'][14]['file'] = 'xcat_mod_delete.html'; $modversion['templates'][15]['file'] = 'xcat_mod_view.html'; +$modversion['templates'][16]['file'] = 'xcat_inc_tree.html'; ##[/cubson:templates] // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2011-02-22 14:33:09
|
Revision: 526 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=526&view=rev Author: kilica Date: 2011-02-22 14:33:03 +0000 (Tue, 22 Feb 2011) Log Message: ----------- delete unnecessary files Removed Paths: ------------- modules_xq/trunk/public_html/modules/xq/actions/ modules_xq/trunk/public_html/modules/xq/admin/actions/ modules_xq/trunk/public_html/modules/xq/admin/class/ modules_xq/trunk/public_html/modules/xq/admin/forms/ modules_xq/trunk/public_html/modules/xq/admin/preload/ modules_xq/trunk/public_html/modules/xq/admin/templates/ modules_xq/trunk/public_html/modules/xq/blocks/ modules_xq/trunk/public_html/modules/xq/class/ modules_xq/trunk/public_html/modules/xq/forms/ modules_xq/trunk/public_html/modules/xq/sql/ modules_xq/trunk/public_html/modules/xq/templates/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2011-02-21 10:53:34
|
Revision: 525 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=525&view=rev Author: kilica Date: 2011-02-21 10:53:27 +0000 (Mon, 21 Feb 2011) Log Message: ----------- add xcat Modified Paths: -------------- modules_xq/trunk/xoops_trust_path/modules/xq/actions/AnsDeleteAction.class.php modules_xq/trunk/xoops_trust_path/modules/xq/actions/AnsEditAction.class.php modules_xq/trunk/xoops_trust_path/modules/xq/actions/CatListAction.class.php modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueDeleteAction.class.php modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueEditAction.class.php modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueListAction.class.php modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueViewAction.class.php modules_xq/trunk/xoops_trust_path/modules/xq/class/AbstractAction.class.php Added Paths: ----------- modules_xq/trunk/xoops_trust_path/modules/xq/class/CatCategoryManager.class.php modules_xq/trunk/xoops_trust_path/modules/xq/class/XcatCategoryManager.class.php modules_xq/trunk/xoops_trust_path/modules/xq/class/XcatHandler.class.php Modified: modules_xq/trunk/xoops_trust_path/modules/xq/actions/AnsDeleteAction.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/actions/AnsDeleteAction.class.php 2010-06-06 14:22:41 UTC (rev 524) +++ modules_xq/trunk/xoops_trust_path/modules/xq/actions/AnsDeleteAction.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -17,6 +17,7 @@ **/ class Xq_AnsDeleteAction extends Xq_AbstractDeleteAction { + public $mDataname = 'ans'; protected $_mQueId = 0; /** Modified: modules_xq/trunk/xoops_trust_path/modules/xq/actions/AnsEditAction.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/actions/AnsEditAction.class.php 2010-06-06 14:22:41 UTC (rev 524) +++ modules_xq/trunk/xoops_trust_path/modules/xq/actions/AnsEditAction.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -17,6 +17,8 @@ **/ class Xq_AnsEditAction extends Xq_AbstractEditAction { + public $mDataname = 'ans'; + /** * _getId * Modified: modules_xq/trunk/xoops_trust_path/modules/xq/actions/CatListAction.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/actions/CatListAction.class.php 2010-06-06 14:22:41 UTC (rev 524) +++ modules_xq/trunk/xoops_trust_path/modules/xq/actions/CatListAction.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -17,6 +17,7 @@ **/ class Xq_CatListAction extends Xq_AbstractListAction { + public $mDataname = 'cat'; const _QUE_NUMBER = 10; public $mQue = array(); Modified: modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueDeleteAction.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueDeleteAction.class.php 2010-06-06 14:22:41 UTC (rev 524) +++ modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueDeleteAction.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -17,6 +17,8 @@ **/ class Xq_QueDeleteAction extends Xq_AbstractDeleteAction { + public $mDataname = 'que'; + /** * _getId * Modified: modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueEditAction.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueEditAction.class.php 2010-06-06 14:22:41 UTC (rev 524) +++ modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueEditAction.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -17,6 +17,8 @@ **/ class Xq_QueEditAction extends Xq_AbstractEditAction { + public $mDataname = 'que'; + /** * _getId * Modified: modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueListAction.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueListAction.class.php 2010-06-06 14:22:41 UTC (rev 524) +++ modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueListAction.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -17,6 +17,7 @@ **/ class Xq_QueListAction extends Xq_AbstractListAction { + public $mDataname = 'que'; public $mAnsCount = array(); /** Modified: modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueViewAction.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueViewAction.class.php 2010-06-06 14:22:41 UTC (rev 524) +++ modules_xq/trunk/xoops_trust_path/modules/xq/actions/QueViewAction.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -17,6 +17,8 @@ **/ class Xq_QueViewAction extends Xq_AbstractViewAction { + public $mDataname = 'que'; + /** * _getId * Modified: modules_xq/trunk/xoops_trust_path/modules/xq/class/AbstractAction.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/class/AbstractAction.class.php 2010-06-06 14:22:41 UTC (rev 524) +++ modules_xq/trunk/xoops_trust_path/modules/xq/class/AbstractAction.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -38,6 +38,47 @@ } /** + * _setupCategoryManager + * + * @param string $dataname + * + * @return void + **/ + protected function _setupCategoryManager() + { + $this->mCategoryManager = new Xq_XcatCategoryManager('xcat', $this->mAsset->mDirname, $this->mDataname); + /* + $dataname = $this->mDataname; + $server = $this->mModule->mModuleConfig['access_controller']; + + //get server's role + $handler = xoops_gethandler('module'); + $module = $handler->getByDirname($server); + if(! $module){ + require_once XQ_TRUST_PATH . '/class/NoneCategoryManager.class.php'; + $this->mCategoryManager = new Xq_NoneCategoryManager($server, $this->mAsset->mDirname, $dataname); + return; + } + $role = $module->get('role'); + + switch($role){ + case 'cat': + require_once XQ_TRUST_PATH . '/class/CatCategoryManager.class.php'; + $this->mCategoryManager = new Xq_CatCategoryManager($server, $this->mAsset->mDirname, $dataname); + break; + case 'group': + require_once XQ_TRUST_PATH . '/class/GroupCategoryManager.class.php'; + $this->mCategoryManager = new Xq_GroupCategoryManager($server, $this->mAsset->mDirname, $dataname); + break; + default: + require_once XQ_TRUST_PATH . '/class/NoneCategoryManager.class.php'; + $this->mCategoryManager = new Xq_NoneCategoryManager($server, $this->mAsset->mDirname, $dataname); + break; + } + */ + } + + /** * getAuthType * * @param void @@ -144,6 +185,7 @@ **/ public function prepare() { + $this->_setupCategoryManager(); return true; } Added: modules_xq/trunk/xoops_trust_path/modules/xq/class/CatCategoryManager.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/class/CatCategoryManager.class.php (rev 0) +++ modules_xq/trunk/xoops_trust_path/modules/xq/class/CatCategoryManager.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -0,0 +1,183 @@ +<?php +/** + * @file + * @package xq + * @version $Id$ +**/ + +if(!defined('XOOPS_ROOT_PATH')) +{ + exit; +} + +require_once XQ_TRUST_PATH . '/class/AbstractCategoryManager.class.php'; + +/** + * Xq_CatManager +**/ +class Xq_CatCategoryManager extends Xq_AbstractCategoryManager +{ + public $mType = 'cat'; + + /** + * __construct + * + * @param string $categoryDir + * @param string $dirname this module's dirname + * @param string $dataname this module's dataname + * + * @return void + **/ + public function __construct(/*** string ***/ $categoryDir, /*** string ***/ $dirname, /*** string ***/ $dataname) + { + $this->_mDirname = $dirname; + $this->_mCategoryDir = $categoryDir; + } + + /** + * check + * + * @param int $categoryId + * @param string $action + * + * @return bool + **/ + public function check(/*** int ***/ $categoryId, /*** string ***/ $action, /*** string ***/ $dataname='que') + { + $check = null; + XCube_DelegateUtils::call('Legacy_Category.'.$this->_mCategoryDir.'.HasPermission', new XCube_Ref($check), $this->_mCategoryDir, $categoryId, $this->_getAuthType($action)); + return $check; + } + + /** + * isQuestioner + * + * @param int $categoryId + * + * @return bool + **/ + public function isQuestioner(/*** int ***/ $categoryId=0) + { + if($categoryId>0){ + if($this->check($categoryId, Xq_AuthType::QUESTION, 'que')===true){ + return true; + } + } + else{ + $categoryIds = $this->getPermittedIdList(Xq_AuthType::QUESTION); + if(count($categoryIds)>0){ + return true; + } + } + return false; + } + + /** + * isAnswerer + * + * @param int $categoryId + * + * @return bool + **/ + public function isAnswerer(/*** int ***/ $categoryId=0) + { + if($categoryId>0){ + if($this->check($categoryId, Xq_AuthType::ANSWER, 'ans')===true){ + return true; + } + } + else{ + $categoryIds = $this->getPermittedIdList(Xq_AuthType::ANSWER); + if(count($categoryIds)>0){ + return true; + } + } + return false; + } + + /** + * getTree + * + * @param string $action + * + * @return Legacy_AbstractCatObject[] + **/ + public function getTree($action) + { + $tree = null; + XCube_DelegateUtils::call('Legacy_Category.'.$this->_mCategoryDir.'.GetTree', new XCube_Ref($tree), $this->_mCategoryDir, $this->_getAuthType($action)); + return $tree; + } + + /** + * _getAuthType + * + * @param string $action + * + * @return string + **/ + protected function _getAuthType(/*** string ***/ $action) + { + @$authSetting = XCube_Root::getSingleton()->mContext->mModuleConfig['auth_type']; + $authType = isset($authSetting) ? explode('|', $authSetting) : array('viewer', 'poster', 'poster', 'manager'); + switch($action){ + case self::VIEW: + return trim($authType[0]); + break; + case self::QUESTION: + return trim($authType[1]); + break; + case self::ANSWER: + return trim($authType[2]); + break; + case self::MANAGE: + return trim($authType[3]); + break; + } + } + + /** + * getTitle + * + * @param int $categoryId + * + * @return string + **/ + public function getTitle(/*** int ***/ $categoryId) + { + $ret = null; + XCube_DelegateUtils::call('Legacy_Category.'.$this->_mCategoryDir.'.GetTitle', new XCube_Ref($ret), $this->_mCategoryDir, $categoryId); + return $ret; + } + + /** + * getTitleList + * + * @param void + * + * @return string[] + **/ + public function getTitleList() + { + $list = null; + XCube_DelegateUtils::call('Legacy_Category.'.$this->_mCategoryDir.'.GetTitleList', new XCube_Ref($list), $this->_mCategoryDir); + return $list; + } + + /** + * getPermittedIdList + * + * @param string $action + * @param int $categoryId + * + * @return int[] + **/ + public function getPermittedIdList(/*** string ***/ $action, /*** int ***/ $categoryId=0) + { + $idList = array(); + XCube_DelegateUtils::call('Legacy_Category.'.$this->_mCategoryDir.'.GetPermittedIdList', new XCube_Ref($idList), $this->_mCategoryDir, $this->_getAuthType($action), Legacy_Utils::getUid(), $categoryId); + return $idList; + } +} + +?> Added: modules_xq/trunk/xoops_trust_path/modules/xq/class/XcatCategoryManager.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/class/XcatCategoryManager.class.php (rev 0) +++ modules_xq/trunk/xoops_trust_path/modules/xq/class/XcatCategoryManager.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -0,0 +1,207 @@ +<?php +/** + * @file + * @package xq + * @version $Id$ +**/ + +if(!defined('XOOPS_ROOT_PATH')) +{ + exit; +} + +require_once XQ_TRUST_PATH . '/class/AbstractCategoryManager.class.php'; + +/** + * Xq_XcatCategoryManager +**/ +class Xq_XcatCategoryManager extends Xq_AbstractCategoryManager +{ + public $mType = 'xcat'; + var $mService = null; + var $mClient = null; + var $mCatGr = 0; + + /** + * __construct + * + * @param string $categoryDir + * @param string $dirname this module's dirname + * @param string $dataname this module's dataname + * + * @return void + **/ + public function __construct(/*** string ***/ $categoryDir, /*** string ***/ $dirname, /*** string ***/ $dataname) + { + $this->_mDirname = $dirname; + $this->_mCategoryDir = $categoryDir; + $this->_mDataname = $dataname; + + //get category lists from xcat service + $root =& XCube_Root::getSingleton(); + $this->mService = $root->mServiceManager->getService("Xcat_CatService"); + $this->mClient = $root->mServiceManager->createClient($this->mService); + + $this->mCatGr = $this->_getConfig('gr_id'); + } + + /** + * check + * + * @param int $categoryId + * @param string $action + * + * @return bool + **/ + public function check(/*** int ***/ $categoryId, /*** string ***/ $action, /*** string ***/ $dataname='que') + { + $root =& XCube_Root::getSingleton(); + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + + return $this->mClient->call('checkPermitByUid', array('action'=>$action, 'uid'=>$uid, 'cat_id'=>$categoryId)); + } + + /** + * isQuestioner + * + * @param int $categoryId + * + * @return bool + **/ + public function isQuestioner(/*** int ***/ $categoryId=0) + { + if($categoryId>0){ + if($this->check($categoryId, Xq_AuthType::QUESTION, 'que')===true){ + return true; + } + } + else{ + $categoryIds = $this->getPermittedIdList(Xq_AuthType::QUESTION); + if(count($categoryIds)>0){ + return true; + } + } + return false; + } + + /** + * isAnswerer + * + * @param int $categoryId + * + * @return bool + **/ + public function isAnswerer(/*** int ***/ $categoryId=0) + { + if($categoryId>0){ + if($this->check($categoryId, Xq_AuthType::ANSWER, 'ans')===true){ + return true; + } + } + else{ + $categoryIds = $this->getPermittedIdList(Xq_AuthType::ANSWER); + if(count($categoryIds)>0){ + return true; + } + } + return false; + } + + /** + * getTree + * + * @param string $action + * + * @return mixed[] + * //@return Legacy_AbstractCatObject[] + **/ + public function getTree($action) + { + return $this->mClient->call('getTree', array('gr_id'=>$this->mCatGr)); + } + + /** + * _getAuthType + * + * @param string $action + * + * @return string + **/ + protected function _getAuthType(/*** string ***/ $action) + { + @$authSetting = XCube_Root::getSingleton()->mContext->mModuleConfig['auth_type']; + $authType = isset($authSetting) ? explode('|', $authSetting) : array('viewer', 'poster', 'poster', 'manager'); + switch($action){ + case self::VIEW: + return trim($authType[0]); + break; + case self::QUESTION: + return trim($authType[1]); + break; + case self::ANSWER: + return trim($authType[2]); + break; + case self::MANAGE: + return trim($authType[3]); + break; + } + } + + /** + * getTitle + * + * @param int $categoryId + * + * @return string + **/ + public function getTitle(/*** int ***/ $categoryId) + { + //get list from xcat service + return $this->mClient->call('getTitle', array('cat_id'=>$categoryId)); + } + + /** + * getTitleList + * + * @param void + * + * @return string[] + **/ + public function getTitleList() + { + return $this->mClient->call('getTitleList', array('gr_id'=>$this->mCatGr)); + } + + /** + * getPermittedIdList + * + * @param string $action + * @param int $categoryId + * + * @return int[] + **/ + public function getPermittedIdList(/*** string ***/ $action, /*** int ***/ $categoryId=0) + { + //get gr/cat/parent id + $grId = ($categoryId==0) ? $this->mCatGr : 0; + + if($categryId>0){ + //$pId = $this->mClient->call('getCat', array('cat_id'=>$categoryId)); + } + + //get user id + $root =& XCube_Root::getSingleton(); + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + + $tree = $this->mClient->call('getTree', array('gr_id'=>$grId, 'cat_id'=>0, 'p_id'=>$categoryId, 'action'=>$action, 'uid'=>$uid)); + $ids = array(); + foreach(array_keys($tree) as $key){ + if($tree[$key]['permit']==1){ + $ids[] = $tree[$key]['cat_id']; + } + } + return $ids; + } +} + +?> Added: modules_xq/trunk/xoops_trust_path/modules/xq/class/XcatHandler.class.php =================================================================== --- modules_xq/trunk/xoops_trust_path/modules/xq/class/XcatHandler.class.php (rev 0) +++ modules_xq/trunk/xoops_trust_path/modules/xq/class/XcatHandler.class.php 2011-02-21 10:53:27 UTC (rev 525) @@ -0,0 +1,235 @@ +<?php + +if (!defined('XOOPS_ROOT_PATH')) exit(); + +class Bizq_XcatHandler +{ + var $mService = null; + var $mClient = null; + var $mCatGr = 0; + + //constructor + function Bizq_XcatHandler() + { + //get category lists from xcat service + $root =& XCube_Root::getSingleton(); + $this->mService = $root->mServiceManager->getService("Xcat_CatService"); + $this->mClient = $root->mServiceManager->createClient($this->mService); + + $this->mCatGr = $this->_getConfig('gr_id'); + } + + function _getConfig($config) + { + $root =& XCube_Root::getSingleton(); + return $root->mContext->mModule->getModuleConfig($config); + } + + /** + * @public + * get the module config about category system, xcat's or bizq's + * return==0:bizq's category system return==1:xcat's category system + */ + function getCatGr() + { + return $this->mCatGr; + } + + function getTitle($catId) + { + if($this->getCatGr()==0){ + $handler =& xoops_getmodulehandler('cat', 'bizq'); + $cat =& $handler->get($catId); + return $cat->getShow('cat_name'); + } + elseif (is_object($this->mClient)) { + //get list from xcat service + return $this->mClient->call('getTitle', array('cat_id'=>$catId)); + } + } + + function getTitleList() + { + if($this->getCatGr()==0){ + $handler =& xoops_getmodulehandler('cat', 'bizq'); + $cat =& $handler->get(); + foreach(array_keys($cat) as $key){ + $catArr[$cat[$key]->get('cat_id')] = $cat[$key]->get('cat_name'); + } + return $catArr; + } + if (is_object($this->mClient)) { + //get list from xcat service + return $this->mClient->call('getTitleList', array('gr_id'=>$this->getCatGr())); + } + } + + function getPermitCatIds($catId=0) + { + if(! $this->getCatGr()){ + return ""; + } + //get gr/cat/parent id + $grId = ($catId==0) ? $this->getCatGr() : 0; + + if($catId>0){ + //$pId = $this->mClient->call('getCat', array('cat_id'=>$catId)); + } + + //get user id + $root =& XCube_Root::getSingleton(); + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + + $tree = $this->mClient->call('getTree', array('gr_id'=>$grId, 'cat_id'=>0, 'p_id'=>$catId, 'action'=>'viewer', 'uid'=>$uid)); + $ids = array(); + foreach(array_keys($tree) as $key){ + if($tree[$key]['permit']==1){ + $ids[] = $tree[$key]['cat_id']; + } + } + return $ids; + } + + function getCatList() + { + if (is_object($this->mClient)) { + //get cat list from xcat service + if($this->getCatGr()>0){ + return $this->mClient->call('getTree', array('gr_id'=>$this->getCatGr())); + } + else{ + $handler =& xoops_getmodulehandler('cat', 'bizq'); + $criteria = new CriteriaCompo('1', '1'); + $criteria->setSort('weight'); + $cat =& $handler->getObjects($criteria); + foreach(array_keys($cat) as $key){ + $catArr[$key]['cat_id'] = $cat[$key]->getShow('cat_id'); + $catArr[$key]['cat_title'] = $cat[$key]->getShow('cat_name'); + $catArr[$key]['gr_id'] = $this->getCatGr(); + $catArr[$key]['p_id'] = 0; + $catArr[$key]['p_id'] = ""; + $catArr[$key]['weight'] = $cat[$key]->getShow('weight'); + $catArr[$key]['options'] = ""; + $catArr[$key]['cat_path'] = ""; + $catArr[$key]['cat_depth'] = 1; + $catArr[$key]['permit'] = 1; + } + return $catArr; + } + } + } + + function getCatPath($catId) + { + if (is_object($this->mClient)) { + //get cat list from xcat service + if($this->getCatGr()>0){ + return $this->mClient->call('getCatPath', array('cat_id'=>$catId, 'order'=>'ASC')); + } + else{ + $handler =& xoops_getmodulehandler('cat', 'bizq'); + $cat =& $handler->get($catId); + $catArr = array(); + if($cat){ + $catArr['cat_id'] = $cat->get('cat_id'); + $catArr['cat_title'] = $cat->get('cat_name'); + } + else{ + $catArr['cat_id'] = $cat_id; + $catArr['cat_title'] = ""; + } + return $catArr; + } + } + } + + + /** + * @public + * check if the user can view Q&A + */ + function checkViewPermit($catId) + { + $root =& XCube_Root::getSingleton(); + if($this->getCatGr()==0){ //use BIZQ's category + return true; + } + else{ + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + return $this->mClient->call('checkPermitByUid', array('action'=>'viewer', 'uid'=>$uid, 'cat_id'=>$catId)); + } + } + + /** + * @public + * check if the user can post question + */ + function checkPostQPermit($catId) + { + $root =& XCube_Root::getSingleton(); + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + + if($this->getCatGr()==0){ //use BIZQ's category + if($uid>0){ + return true; + } + else{ + return $this->_getConfig('guest_qst'); + } + } + else{ + return $this->mClient->call('checkPermitByUid', array('action'=>'poster', 'uid'=>$uid, 'cat_id'=>$catId)); + } + } + + /** + * @public + * check if the user can post answer + */ + function checkPostAPermit($catId) + { + $root =& XCube_Root::getSingleton(); + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + + if($this->getCatGr()==0){ //use BIZQ's category + if($uid>0){ + return true; + } + else{ + return $this->_getConfig('guest_ans'); + } + } + else{ + return $this->mClient->call('checkPermitByUid', array('action'=>'answerer', 'uid'=>$uid, 'cat_id'=>$catId)); + } + } + + /** + * @public + * check if the user can post question + */ + function checkEditPermit($catId, $posterUid) + { + + $root =& XCube_Root::getSingleton(); + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + + if($uid>0 && $posterUid==$uid){ //case1:poster user == current user + return true; + } + + if($this->getCatGr()==0){ //use BIZQ's category + if($uid>0){ + return $root->mContext->mUser->isInRole('Module.user.Admin'); + } + else{ + return false; + } + } + else{ //use XCat + return $this->mClient->call('checkPermitByUid', array('action'=>'editor', 'uid'=>$uid, 'cat_id'=>$catId)); + } + } +} + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-06-06 14:22:47
|
Revision: 524 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=524&view=rev Author: kilica Date: 2010-06-06 14:22:41 +0000 (Sun, 06 Jun 2010) Log Message: ----------- update for cooluri Modified Paths: -------------- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php 2010-06-02 13:40:36 UTC (rev 523) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php 2010-06-06 14:22:41 UTC (rev 524) @@ -22,7 +22,7 @@ public function getNormalUri(/*** string ***/ &$uri, /*** string ***/ $dirname, /*** string ***/ $dataname=null, /*** int ***/ $data_id=0, /*** string ***/ $action=null, /*** string ***/ $query=null) { $sUri = '/%s/index.php?action=%s%s'; - $lUri = '/%s/index.php?action=%s%s&%s=%d'; + $lUri = '/%s/index.php?action=%s%s&%s=%d'; $table = isset($dataname) ? $dataname : '{{mainTable}}'; $key = $table.'_id'; Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php 2010-06-02 13:40:36 UTC (rev 523) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php 2010-06-06 14:22:41 UTC (rev 524) @@ -53,7 +53,7 @@ **/ protected function _getBaseUrl() { - return './index.php?action={Tablename}List'; + return Legacy_Utils::renderUri($this->mAsset->mDirname, '{tablename}'); } {{hasPermission}}{{getDefaultView}} /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-06-02 13:40:42
|
Revision: 523 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=523&view=rev Author: kilica Date: 2010-06-02 13:40:36 +0000 (Wed, 02 Jun 2010) Log Message: ----------- update for cool uri Modified Paths: -------------- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractEditAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractViewAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/Module.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/DeleteAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/EditAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ViewAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/delete.html modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/edit.html Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractEditAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractEditAction.class.php 2010-06-02 13:17:12 UTC (rev 522) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractEditAction.class.php 2010-06-02 13:40:36 UTC (rev 523) @@ -30,6 +30,9 @@ **/ protected function _getId() { + $req = $this->mRoot->mContext->mRequest; + $dataId = $req->getRequest(_REQUESTED_DATA_ID); + return isset($dataId) ? intval($dataId) : intval($req->getRequest($this->_getHandler()->mPrimary)); } /** Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractViewAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractViewAction.class.php 2010-06-02 13:17:12 UTC (rev 522) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractViewAction.class.php 2010-06-02 13:40:36 UTC (rev 523) @@ -28,6 +28,9 @@ **/ protected function _getId() { + $req = $this->mRoot->mContext->mRequest; + $dataId = $req->getRequest(_REQUESTED_DATA_ID); + return isset($dataId) ? intval($dataId) : intval($req->getRequest($this->_getHandler()->mPrimary)); } /** Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/Module.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/Module.class.php 2010-06-02 13:17:12 UTC (rev 522) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/Module.class.php 2010-06-02 13:40:36 UTC (rev 523) @@ -93,8 +93,30 @@ **/ private function _getDefaultActionName() { - // TODO insert your default action name - return '{{mainTable}}List'; + $req = XCube_Root::getSingleton()->mContext->mRequest; + $dataId = $req->getRequest(_REQUESTED_DATA_ID); + $dataname = $req->getRequest(_REQUESTED_DATA_NAME); + $dataname = isset($dataname) ? $dataname : '{{mainTable}}'; + $action = $req->getRequest(_REQUESTED_ACTION_NAME); + + if($dataId>0){ + if(isset($action)){ + $actionName = ucfirst($dataname).ucfirst($action); + } + else{ + $actionName = ucfirst($dataname).'View'; + } + } + else{ + if(isset($action)){ + $actionName = ucfirst($dataname).ucfirst($action); + } + else{ + $actionName = ucfirst($dataname).'List'; + } + } + + return $actionName; } /** Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/DeleteAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/DeleteAction.class.php 2010-06-02 13:17:12 UTC (rev 522) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/DeleteAction.class.php 2010-06-02 13:40:36 UTC (rev 523) @@ -17,17 +17,6 @@ **/ class {Modulename}_{Tablename}DeleteAction extends {Modulename}_AbstractDeleteAction { - /** - * _getId - * - * @param void - * - * @return int - **/ - protected function _getId() - { - return $this->mRoot->mContext->mRequest->getRequest('{primary_key_id}'); - } {{_getCatId}} /** * &_getHandler Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/EditAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/EditAction.class.php 2010-06-02 13:17:12 UTC (rev 522) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/EditAction.class.php 2010-06-02 13:40:36 UTC (rev 523) @@ -17,17 +17,6 @@ **/ class {Modulename}_{Tablename}EditAction extends {Modulename}_AbstractEditAction { - /** - * _getId - * - * @param void - * - * @return int - **/ - protected function _getId() - { - return $this->mRoot->mContext->mRequest->getRequest('{primary_key_id}'); - } {{_getCatId}} /** * &_getHandler Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ViewAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ViewAction.class.php 2010-06-02 13:17:12 UTC (rev 522) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ViewAction.class.php 2010-06-02 13:40:36 UTC (rev 523) @@ -17,14 +17,6 @@ **/ class {Modulename}_{Tablename}ViewAction extends {Modulename}_AbstractViewAction { - /** - * _getId - * - **/ - protected function _getId() - { - return $this->mRoot->mContext->mRequest->getRequest('{primary_key_id}'); - } {{_getCatId}} /** * &_getHandler Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/delete.html =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/delete.html 2010-06-02 13:17:12 UTC (rev 522) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/delete.html 2010-06-02 13:40:36 UTC (rev 523) @@ -3,7 +3,7 @@ <div class="confirm"><{$smarty.const._MD_{MODULENAME}_MESSAGE_CONFIRM_DELETE}></div> -<form action="./index.php?action={Tablename}Delete" method="post"> +<form action="<{xoops_cooluri dirname=$dirname dataname={tablename} action=delete}>" method="post"> <dl> {{delete}} <dd> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/edit.html =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/edit.html 2010-06-02 13:17:12 UTC (rev 522) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/edit.html 2010-06-02 13:40:36 UTC (rev 523) @@ -7,7 +7,7 @@ <{/foreach}> </ul> <{/if}> -<form action="index.php?action={Tablename}Edit" method="post"> +<form action="<{xoops_cooluri dirname=$dirname dataname={tablename} action=edit}>" method="post"> <dl> {{edit}} <dt></dt> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-06-02 13:17:20
|
Revision: 522 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=522&view=rev Author: kilica Date: 2010-06-02 13:17:12 +0000 (Wed, 02 Jun 2010) Log Message: ----------- Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2010-05-30 13:00:44 UTC (rev 521) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2010-06-02 13:17:12 UTC (rev 522) @@ -18,6 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.22(2010.06.02) +\x81E\x83o\x83O\x8FC\x90\xB3\x81iThanks chipy\x81j + 0.21(2010.01.15) \x81E\x89p\x8C\xEA\x82̌\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82\xF5 Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2010-05-30 13:00:44 UTC (rev 521) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2010-06-02 13:17:12 UTC (rev 522) @@ -7,7 +7,7 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } require_once BIZPOLL_TRUST_PATH . '/class/AbstractListAction.class.php'; @@ -22,56 +22,56 @@ var $mEnqId = 0; var $mChart = array(); - /** - * _getId - * @param void - * @return int - **/ - protected function _getId() - { - if($this->mRoot->mContext->mRequest->getRequest('enq_id')){ - return intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); - } - else{ + /** + * _getId + * @param void + * @return int + **/ + protected function _getId() + { + if($this->mRoot->mContext->mRequest->getRequest('enq_id')){ + return intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); + } + else{ $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_ENQ_ID_REQUIRED); - } - } + } + } - /** - * &_getHandler - * @param void - * @return Bizpoll_PollHandler - **/ - protected function &_getHandler() - { - $handler =& $this->mAsset->getObject('handler', 'poll'); - return $handler; - } + /** + * &_getHandler + * @param void + * @return Bizpoll_PollHandler + **/ + protected function &_getHandler() + { + $handler =& $this->mAsset->getObject('handler', 'poll'); + return $handler; + } - /** - * &_getFilterForm - * - * @param void - * - * @return Bizpoll_PollFilterForm - **/ - protected function &_getFilterForm() - { - // $filter =& new Bizpoll_PollFilterForm(); - $filter =& $this->mAsset->getObject('filter', 'poll',false); - $filter->prepare($this->_getPageNavi(), $this->_getHandler()); - return $filter; - } + /** + * &_getFilterForm + * + * @param void + * + * @return Bizpoll_PollFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Bizpoll_PollFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'poll',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } - /** - * _getBaseUrl - * @param void - * @return string - **/ - protected function _getBaseUrl() - { - return './index.php?action=PollList'; - } + /** + * _getBaseUrl + * @param void + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=PollDetail'; + } /** * @public @@ -128,22 +128,22 @@ return BIZPOLL_FRAME_VIEW_INDEX; } - /** - * executeViewIndex - * @param XCube_RenderTarget &$render - * @return void - **/ - public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) - { - $render->setTemplateName($this->mAsset->mDirname . '_poll_detail.html'); - $render->setAttribute('objects', $this->mObjects); - $render->setAttribute('enq', $this->mEnq); - $render->setAttribute('chart', $this->mChart); - $render->setAttribute('pageNavi', $this->mFilter->mNavi); - $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); - rsort($this->mChart['count']); - $render->setAttribute('chartMax', array_shift($this->mChart['count'])); - } + /** + * executeViewIndex + * @param XCube_RenderTarget &$render + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_poll_detail.html'); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('enq', $this->mEnq); + $render->setAttribute('chart', $this->mChart); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); + rsort($this->mChart['count']); + $render->setAttribute('chartMax', array_shift($this->mChart['count'])); + } } ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2010-05-30 13:00:44 UTC (rev 521) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2010-06-02 13:17:12 UTC (rev 522) @@ -7,12 +7,12 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } if(!defined('BIZPOLL_TRUST_PATH')) { - define('BIZPOLL_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/bizpoll'); + define('BIZPOLL_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/bizpoll'); } require_once BIZPOLL_TRUST_PATH . '/class/BizpollUtils.class.php'; @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.21; +$modversion['version'] = 0.22; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; @@ -34,27 +34,27 @@ $modversion['cube_style'] = true; $modversion['legacy_installer'] = array( - 'installer' => array( - 'class' => 'Installer', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollInstaller.class.php' - ), - 'uninstaller' => array( - 'class' => 'Uninstaller', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUninstaller.class.php' - ), - 'updater' => array( - 'class' => 'Updater', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUpdater.class.php' - ) + 'installer' => array( + 'class' => 'Installer', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollInstaller.class.php' + ), + 'uninstaller' => array( + 'class' => 'Uninstaller', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUninstaller.class.php' + ), + 'updater' => array( + 'class' => 'Updater', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUpdater.class.php' + ) ); $modversion['disable_legacy_2nd_installer'] = false; $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; $modversion['tables'] = array( -// '{prefix}_{dirname}_xxxx', +// '{prefix}_{dirname}_xxxx', ##[cubson:tables] '{prefix}_{dirname}_enq', '{prefix}_{dirname}_choice', @@ -67,25 +67,25 @@ // $modversion['templates'] = array( /* - array( - 'file' => '{dirname}_xxx.html', - 'description' => _MI_BIZPOLL_TPL_XXX - ), + array( + 'file' => '{dirname}_xxx.html', + 'description' => _MI_BIZPOLL_TPL_XXX + ), */ ##[cubson:templates] - array('file' => '{dirname}_enq_list.html','description' => _MI_BIZPOLL_TPL_ENQ_LIST), - array('file' => '{dirname}_enq_edit.html','description' => _MI_BIZPOLL_TPL_ENQ_EDIT), - array('file' => '{dirname}_enq_delete.html','description' => _MI_BIZPOLL_TPL_ENQ_DELETE), - array('file' => '{dirname}_enq_view.html','description' => _MI_BIZPOLL_TPL_ENQ_VIEW), - array('file' => '{dirname}_poll_list.html','description' => _MI_BIZPOLL_TPL_POLL_LIST), - array('file' => '{dirname}_poll_edit.html','description' => _MI_BIZPOLL_TPL_POLL_EDIT), - array('file' => '{dirname}_poll_delete.html','description' => _MI_BIZPOLL_TPL_POLL_DELETE), - array('file' => '{dirname}_poll_detail.html','description' => _MI_BIZPOLL_TPL_POLL_VIEW), - array('file' => '{dirname}_choice_list.html','description' => _MI_BIZPOLL_TPL_CHOICE_LIST), - array('file' => '{dirname}_choice_edit.html','description' => _MI_BIZPOLL_TPL_CHOICE_EDIT), - array('file' => '{dirname}_choice_delete.html','description' => _MI_BIZPOLL_TPL_CHOICE_DELETE), - array('file' => '{dirname}_choice_view.html','description' => _MI_BIZPOLL_TPL_CHOICE_VIEW), - array('file' => '{dirname}_enq_rss.html','description' => _MI_BIZPOLL_TPL_ENQ_RSS), + array('file' => '{dirname}_enq_list.html','description' => _MI_BIZPOLL_TPL_ENQ_LIST), + array('file' => '{dirname}_enq_edit.html','description' => _MI_BIZPOLL_TPL_ENQ_EDIT), + array('file' => '{dirname}_enq_delete.html','description' => _MI_BIZPOLL_TPL_ENQ_DELETE), + array('file' => '{dirname}_enq_view.html','description' => _MI_BIZPOLL_TPL_ENQ_VIEW), + array('file' => '{dirname}_poll_list.html','description' => _MI_BIZPOLL_TPL_POLL_LIST), + array('file' => '{dirname}_poll_edit.html','description' => _MI_BIZPOLL_TPL_POLL_EDIT), + array('file' => '{dirname}_poll_delete.html','description' => _MI_BIZPOLL_TPL_POLL_DELETE), + array('file' => '{dirname}_poll_detail.html','description' => _MI_BIZPOLL_TPL_POLL_VIEW), + array('file' => '{dirname}_choice_list.html','description' => _MI_BIZPOLL_TPL_CHOICE_LIST), + array('file' => '{dirname}_choice_edit.html','description' => _MI_BIZPOLL_TPL_CHOICE_EDIT), + array('file' => '{dirname}_choice_delete.html','description' => _MI_BIZPOLL_TPL_CHOICE_DELETE), + array('file' => '{dirname}_choice_view.html','description' => _MI_BIZPOLL_TPL_CHOICE_VIEW), + array('file' => '{dirname}_enq_rss.html','description' => _MI_BIZPOLL_TPL_ENQ_RSS), ##[/cubson:templates] ); @@ -96,13 +96,13 @@ $modversion['adminindex'] = 'admin/index.php'; $modversion['adminmenu'] = array( /* - array( - 'title' => _MI_BIZPOLL_LANG_XXXX, - 'link' => 'admin/index.php?action=xxx', - 'keywords' => _MI_BIZPOLL_KEYWORD_XXX, - 'show' => true, - 'absolute' => false - ), + array( + 'title' => _MI_BIZPOLL_LANG_XXXX, + 'link' => 'admin/index.php?action=xxx', + 'keywords' => _MI_BIZPOLL_KEYWORD_XXX, + 'show' => true, + 'absolute' => false + ), */ ##[cubson:adminmenu] ##[/cubson:adminmenu] @@ -115,10 +115,10 @@ $modversion['hasSearch'] = 0; $modversion['sub'] = array( /* - array( - 'name' => _MI_BIZPOLL_LANG_SUB_XXX, - 'url' => 'index.php?action=XXX' - ), + array( + 'name' => _MI_BIZPOLL_LANG_SUB_XXX, + 'url' => 'index.php?action=XXX' + ), */ ##[cubson:submenu] ##[/cubson:submenu] @@ -128,79 +128,79 @@ // Config setting // $modversion['config'] = array( - array( - 'name' => 'gr_id', - 'title' => "_MI_BIZPOLL_TITLE_GR_ID", - 'description' => "_MI_BIZPOLL_DESC_GR_ID", - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'options' => array(), - 'default' => 0 - ), - array( - 'name' => 'css_file', - 'title' => "_MI_BIZPOLL_TITLE_CSS_FILE", - 'description' => "_MI_BIZPOLL_DESC_CSS_FILE", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => '/modules/'. $myDirName. '/bizpoll.css' - ), - array( - 'name' => 'permit_title', - 'title' => "_MI_BIZPOLL_TITLE_PERMIT", - 'description' => "_MI_BIZPOLL_DESC_PERMIT", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => 'viewer|poster|editor|viewer' - ), - array( - 'name' => 'show_rss', - 'title' => "_MI_BIZPOLL_TITLE_SHOW_RSS", - 'description' => "_MI_BIZPOLL_DESC_SHOW_RSS", - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'options' => array(), - 'default' => '1' - ), - array( - 'name' => 'editor', - 'title' => "_MI_BIZPOLL_TITLE_EDITOR", - 'description' => "_MI_BIZPOLL_DESC_EDITOR", - 'formtype' => 'select', - 'valuetype' => 'text', - 'options' => array("bbcode"=>"bbcode", "fckeditor"=>"fckeditor"), - 'default' => 'bbcode' - ), - array( - 'name' => 'ip_period', - 'title' => "_MI_BIZPOLL_TITLE_IP_PERIOD", - 'description' => "_MI_BIZPOLL_DESC_IP_PERIOD", - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'options' => array(), - 'default' => '24' - ), - array( - 'name' => 'chart', - 'title' => "_MI_BIZPOLL_TITLE_CHART", - 'description' => "_MI_BIZPOLL_DESC_CHART", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => 'p,400,100' - ), + array( + 'name' => 'gr_id', + 'title' => "_MI_BIZPOLL_TITLE_GR_ID", + 'description' => "_MI_BIZPOLL_DESC_GR_ID", + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'options' => array(), + 'default' => 0 + ), + array( + 'name' => 'css_file', + 'title' => "_MI_BIZPOLL_TITLE_CSS_FILE", + 'description' => "_MI_BIZPOLL_DESC_CSS_FILE", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => '/modules/'. $myDirName. '/bizpoll.css' + ), + array( + 'name' => 'permit_title', + 'title' => "_MI_BIZPOLL_TITLE_PERMIT", + 'description' => "_MI_BIZPOLL_DESC_PERMIT", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => 'viewer|poster|editor|viewer' + ), + array( + 'name' => 'show_rss', + 'title' => "_MI_BIZPOLL_TITLE_SHOW_RSS", + 'description' => "_MI_BIZPOLL_DESC_SHOW_RSS", + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'options' => array(), + 'default' => '1' + ), + array( + 'name' => 'editor', + 'title' => "_MI_BIZPOLL_TITLE_EDITOR", + 'description' => "_MI_BIZPOLL_DESC_EDITOR", + 'formtype' => 'select', + 'valuetype' => 'text', + 'options' => array("bbcode"=>"bbcode", "fckeditor"=>"fckeditor"), + 'default' => 'bbcode' + ), + array( + 'name' => 'ip_period', + 'title' => "_MI_BIZPOLL_TITLE_IP_PERIOD", + 'description' => "_MI_BIZPOLL_DESC_IP_PERIOD", + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'options' => array(), + 'default' => '24' + ), + array( + 'name' => 'chart', + 'title' => "_MI_BIZPOLL_TITLE_CHART", + 'description' => "_MI_BIZPOLL_DESC_CHART", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => 'p,400,100' + ), /* - array( - 'name' => 'xxxx', - 'title' => '_MI_BIZPOLL_TITLE_XXXX', - 'description' => '_MI_BIZPOLL_DESC_XXXX', - 'formtype' => 'xxxx', - 'valuetype' => 'xxx', - 'options' => array(xxx => xxx,xxx => xxx), - 'default' => 0 - ), + array( + 'name' => 'xxxx', + 'title' => '_MI_BIZPOLL_TITLE_XXXX', + 'description' => '_MI_BIZPOLL_DESC_XXXX', + 'formtype' => 'xxxx', + 'valuetype' => 'xxx', + 'options' => array(xxx => xxx,xxx => xxx), + 'default' => 0 + ), */ ##[cubson:config] ##[/cubson:config] @@ -210,42 +210,42 @@ // Block setting // $modversion['blocks'] = array( - 1 => array( - 'func_num' => 1, - 'file' => 'EnqBlock.class.php', - 'class' => 'EnqBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_ENQ, - 'description' => _MI_BIZPOLL_BLOCK_DESC_ENQ, - 'options' => '5|', - 'template' => '{dirname}_block_enq.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), - 2 => array( - 'func_num' => 2, - 'file' => 'PollOneBlock.class.php', - 'class' => 'PollOneBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, - 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLONE, - 'options' => '0|', - 'template' => '{dirname}_block_pollone.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), - 3 => array( - 'func_num' => 3, - 'file' => 'PollNewBlock.class.php', - 'class' => 'PollNewBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, - 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, - 'options' => '', - 'template' => '{dirname}_block_pollnew.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), + 1 => array( + 'func_num' => 1, + 'file' => 'EnqBlock.class.php', + 'class' => 'EnqBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_ENQ, + 'description' => _MI_BIZPOLL_BLOCK_DESC_ENQ, + 'options' => '5|', + 'template' => '{dirname}_block_enq.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), + 2 => array( + 'func_num' => 2, + 'file' => 'PollOneBlock.class.php', + 'class' => 'PollOneBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLONE, + 'options' => '0|', + 'template' => '{dirname}_block_pollone.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), + 3 => array( + 'func_num' => 3, + 'file' => 'PollNewBlock.class.php', + 'class' => 'PollNewBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, + 'options' => '', + 'template' => '{dirname}_block_pollnew.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), ##[cubson:block] ##[/cubson:block] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-30 13:00:51
|
Revision: 521 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=521&view=rev Author: kilica Date: 2010-05-30 13:00:44 +0000 (Sun, 30 May 2010) Log Message: ----------- Update javascript Modified Paths: -------------- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/forms/StoryEditForm.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_delete.html modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html modules_biznews/trunk/xoops_trust_path/modules/biznews/xoops_version.php Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php 2010-05-30 13:00:44 UTC (rev 521) @@ -69,7 +69,7 @@ $render->setAttribute('actionForm', $this->mActionForm); $render->setAttribute('dirname', $this->mAsset->mDirname); $render->setAttribute('object', $this->mObject); - $render->setAttribute('useEditor', $this->mModule->getModuleConfig('editor')); + $render->setAttribute('editor', $this->mModule->getModuleConfig('editor')); } /** Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php 2010-05-30 13:00:44 UTC (rev 521) @@ -102,43 +102,20 @@ $render->setAttribute('dirname', $this->mAsset->mDirname); $render->setAttribute('actionForm', $this->mActionForm); $render->setAttribute('object', $this->mObject); - $render->setAttribute('useEditor', $this->mModule->getModuleConfig('editor')); + $render->setAttribute('editor', $this->mModule->getModuleConfig('editor')); } /** - * setHeaderScript + * _setHeaderScript * * @param void * * @return void **/ - public function setHeaderScript() + protected function _setHeaderScript() { $headerScript = $this->mRoot->mContext->getAttribute('headerScript'); - $headerScript->addStylesheet($this->_getStylesheet()); - - $moduleHeader = '$(".datePick").datepicker({dateFormat:"yy/mm/dd"});'; - - $moduleHeader .= ($this->mObject->get('end_unixtime')<86400) ? ' $("#legacy_xoopsform_end_date").datepicker("disable");' : ' $("#displayEndDatetime").css("display", "none"); - $("#removeEndDatetime").css("display", "block");'; - - $moduleHeader .= ' $("#displayAbstract").click(function(){ - $("#legacy_xoopsform_abstract").css("display", "block") - }); - $("#displayEndDatetime").click(function(){ - $("#legacy_xoopsform_end_date").datepicker("enable"); - $("#legacy_xoopsform_end_date").datepicker("setDate", new Date()); - $("#displayEndDatetime").css("display", "none"); - $("#removeEndDatetime").css("display", "block"); - }); - $("#removeEndDatetime").click(function(){ - $("#legacy_xoopsform_end_date").datepicker("disable"); - $("#legacy_xoopsform_end_date").datepicker("setDate", new Date(0)); - $("#displayEndDatetime").css("display", "block"); - $("#removeEndDatetime").css("display", "none"); - }); -}); -</script>'; + $headerScript->addScript('$(".datePicker").each(function(){$(this).datepicker({dateFormat: "'._JSDATEPICKSTRING.'"});});'); } /** Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php 2010-05-30 13:00:44 UTC (rev 521) @@ -177,7 +177,7 @@ if($this->mModule->getModuleConfig('show_rss')){ $render->setAttribute('flgShowRSS', 1); } - $render->setAttribute('useEditor', $this->mModule->getModuleConfig('editor')); + $render->setAttribute('editor', $this->mModule->getModuleConfig('editor')); } } Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php 2010-05-30 13:00:44 UTC (rev 521) @@ -96,7 +96,7 @@ $render->setTemplateName($this->mAsset->mDirname . '_story_view.html'); $render->setAttribute('dirname', $this->mAsset->mDirname); $render->setAttribute('object', $this->mObject); - $render->setAttribute('useEditor', $this->mModule->getModuleConfig('editor')); + $render->setAttribute('editor', $this->mModule->getModuleConfig('editor')); } /** Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php 2010-05-30 13:00:44 UTC (rev 521) @@ -102,10 +102,21 @@ **/ protected function _getStylesheet() { - return $this->mRoot->mContext->mModuleConfig['css_file']; + return $this->mModule->getModuleConfig('css_file'); } /** + * _setHeaderScript + * + * @param void + * + * @return void + **/ + protected function _setHeaderScript() + { + } + + /** * setHeaderScript * * @param void @@ -116,6 +127,7 @@ { $headerScript = $this->mRoot->mContext->getAttribute('headerScript'); $headerScript->addStylesheet($this->_getStylesheet()); + $this->_setHeaderScript(); } /** Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/forms/StoryEditForm.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/forms/StoryEditForm.class.php 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/forms/StoryEditForm.class.php 2010-05-30 13:00:44 UTC (rev 521) @@ -7,7 +7,7 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } require_once XOOPS_ROOT_PATH . '/core/XCube_ActionForm.class.php'; @@ -18,125 +18,128 @@ **/ class Biznews_StoryEditForm extends XCube_ActionForm { - /** - * getTokenName - * - * @param void - * - * @return string - **/ - public function getTokenName() - { - return "module.biznews.StoryEditForm.TOKEN"; - } + /** + * getTokenName + * + * @param void + * + * @return string + **/ + public function getTokenName() + { + return "module.biznews.StoryEditForm.TOKEN"; + } - /** - * prepare - * - * @param void - * - * @return void - **/ - public function prepare() - { - // - // Set form properties - // - $this->mFormProperties['story_id'] =& new XCube_IntProperty('story_id'); - $this->mFormProperties['story_title'] =& new XCube_StringProperty('story_title'); - $this->mFormProperties['cat_id'] =& new XCube_IntProperty('cat_id'); - $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); - $this->mFormProperties['counter'] =& new XCube_IntProperty('counter'); - $this->mFormProperties['status'] =& new XCube_IntProperty('status'); - $this->mFormProperties['approver_uid'] =& new XCube_IntProperty('approver_uid'); - $this->mFormProperties['approve_unixtime'] =& new XCube_IntProperty('approve_unixtime'); - $this->mFormProperties['abstract'] =& new XCube_TextProperty('abstract'); - $this->mFormProperties['content'] =& new XCube_TextProperty('content'); - $this->mFormProperties['options'] =& new XCube_TextProperty('options'); - $this->mFormProperties['reg_unixtime'] =& new XCube_IntProperty('reg_unixtime'); - $this->mFormProperties['pub_unixtime'] =& new XCube_StringProperty('pub_unixtime'); - $this->mFormProperties['pub_date'] =& new XCube_StringProperty('pub_date'); + /** + * prepare + * + * @param void + * + * @return void + **/ + public function prepare() + { + // + // Set form properties + // + $this->mFormProperties['story_id'] =& new XCube_IntProperty('story_id'); + $this->mFormProperties['story_title'] =& new XCube_StringProperty('story_title'); + $this->mFormProperties['cat_id'] =& new XCube_IntProperty('cat_id'); + $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); + $this->mFormProperties['counter'] =& new XCube_IntProperty('counter'); + $this->mFormProperties['status'] =& new XCube_IntProperty('status'); + $this->mFormProperties['approver_uid'] =& new XCube_IntProperty('approver_uid'); + $this->mFormProperties['approve_unixtime'] =& new XCube_IntProperty('approve_unixtime'); + $this->mFormProperties['abstract'] =& new XCube_TextProperty('abstract'); + $this->mFormProperties['content'] =& new XCube_TextProperty('content'); + $this->mFormProperties['options'] =& new XCube_TextProperty('options'); + $this->mFormProperties['reg_unixtime'] =& new XCube_IntProperty('reg_unixtime'); + $this->mFormProperties['pub_unixtime'] =& new XCube_StringProperty('pub_unixtime'); + $this->mFormProperties['pub_date'] =& new XCube_StringProperty('pub_date'); $this->mFormProperties['pub_Hour'] =& new XCube_StringProperty('pub_Hour'); $this->mFormProperties['pub_Minute'] =& new XCube_StringProperty('pub_Minute'); - $this->mFormProperties['end_unixtime'] =& new XCube_TextProperty('end_unixtime'); - $this->mFormProperties['end_date'] =& new XCube_TextProperty('end_date'); + $this->mFormProperties['end_unixtime'] =& new XCube_TextProperty('end_unixtime'); + $this->mFormProperties['end_date'] =& new XCube_TextProperty('end_date'); $this->mFormProperties['end_Hour'] =& new XCube_StringProperty('end_Hour'); $this->mFormProperties['end_Minute'] =& new XCube_StringProperty('end_Minute'); - - // - // Set field properties - // - $this->mFieldProperties['story_id'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['story_id']->setDependsByArray(array('required')); - $this->mFieldProperties['story_id']->addMessage('required', _MD_BIZNEWS_ERROR_REQUIRED, _MD_BIZNEWS_LANG_STORY_ID); - - $this->mFieldProperties['story_title'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['story_title']->setDependsByArray(array('required','maxlength')); - $this->mFieldProperties['story_title']->addMessage('required', _MD_BIZNEWS_ERROR_REQUIRED, _MD_BIZNEWS_LANG_STORY_TITLE, '255'); - $this->mFieldProperties['story_title']->addMessage('maxlength', _MD_BIZNEWS_ERROR_MAXLENGTH, _MD_BIZNEWS_LANG_STORY_TITLE, '255'); - $this->mFieldProperties['story_title']->addVar('maxlength', '255'); - - $this->mFieldProperties['cat_id'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['cat_id']->setDependsByArray(array('required')); - $this->mFieldProperties['cat_id']->addMessage('required', _MD_BIZNEWS_ERROR_REQUIRED, _MD_BIZNEWS_LANG_CAT_ID); - - $this->mFieldProperties['content'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['content']->setDependsByArray(array('required')); - $this->mFieldProperties['content']->addMessage('required', _MD_BIZNEWS_ERROR_REQUIRED, _MD_BIZNEWS_LANG_CONTENT); - } + + // + // Set field properties + // + $this->mFieldProperties['story_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['story_id']->setDependsByArray(array('required')); + $this->mFieldProperties['story_id']->addMessage('required', _MD_BIZNEWS_ERROR_REQUIRED, _MD_BIZNEWS_LANG_STORY_ID); + + $this->mFieldProperties['story_title'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['story_title']->setDependsByArray(array('required','maxlength')); + $this->mFieldProperties['story_title']->addMessage('required', _MD_BIZNEWS_ERROR_REQUIRED, _MD_BIZNEWS_LANG_STORY_TITLE, '255'); + $this->mFieldProperties['story_title']->addMessage('maxlength', _MD_BIZNEWS_ERROR_MAXLENGTH, _MD_BIZNEWS_LANG_STORY_TITLE, '255'); + $this->mFieldProperties['story_title']->addVar('maxlength', '255'); + + $this->mFieldProperties['cat_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['cat_id']->setDependsByArray(array('required')); + $this->mFieldProperties['cat_id']->addMessage('required', _MD_BIZNEWS_ERROR_REQUIRED, _MD_BIZNEWS_LANG_CAT_ID); + + $this->mFieldProperties['content'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['content']->setDependsByArray(array('required')); + $this->mFieldProperties['content']->addMessage('required', _MD_BIZNEWS_ERROR_REQUIRED, _MD_BIZNEWS_LANG_CONTENT); + } - /** - * load - * - * @param XoopsSimpleObject &$obj - * - * @return void - **/ - public function load(/*** XoopsSimpleObject ***/ &$obj) - { - $this->set('story_id', $obj->get('story_id')); - $this->set('story_title', $obj->get('story_title')); - $this->set('cat_id', $obj->get('cat_id')); - $this->set('uid', $obj->get('uid')); - $this->set('counter', $obj->get('counter')); - $this->set('status', $obj->get('status')); - $this->set('approver_uid', $obj->get('approver_uid')); - $this->set('approve_unixtime', $obj->get('approve_unixtime')); - $this->set('abstract', $obj->get('abstract')); - $this->set('content', $obj->get('content')); - $this->set('options', $obj->get('options')); - $this->set('reg_unixtime', $obj->get('reg_unixtime')); - $this->set('pub_unixtime', $obj->get('pub_unixtime')); + /** + * load + * + * @param XoopsSimpleObject &$obj + * + * @return void + **/ + public function load(/*** XoopsSimpleObject ***/ &$obj) + { + $this->set('story_id', $obj->get('story_id')); + $this->set('story_title', $obj->get('story_title')); + $this->set('cat_id', $obj->get('cat_id')); + $this->set('uid', $obj->get('uid')); + $this->set('counter', $obj->get('counter')); + $this->set('status', $obj->get('status')); + $this->set('approver_uid', $obj->get('approver_uid')); + $this->set('approve_unixtime', $obj->get('approve_unixtime')); + $this->set('abstract', $obj->get('abstract')); + $this->set('content', $obj->get('content')); + $this->set('options', $obj->get('options')); + $this->set('reg_unixtime', $obj->get('reg_unixtime')); + $this->set('pub_unixtime', $obj->get('pub_unixtime')); $this->set('pub_date', date("Y/m/d", $obj->get('pub_unixtime'))); $this->set('pub_Hour', date("H", $obj->get('pub_unixtime'))); $this->set('pub_Minute', date("i", $obj->get('pub_unixtime'))); - $this->set('end_unixtime', $obj->get('end_unixtime')); + $this->set('end_unixtime', $obj->get('end_unixtime')); $this->set('end_date', date("Y/m/d", $obj->get('end_unixtime'))); $this->set('end_Hour', date("H", $obj->get('end_unixtime'))); $this->set('end_Minute', date("i", $obj->get('end_unixtime'))); - } + } - /** - * update - * - * @param XoopsSimpleObject &$obj - * - * @return void - **/ - public function update(/*** XoopsSimpleObject ***/ &$obj) - { - //$obj->set('story_id', $this->get('story_id')); - $obj->set('story_title', $this->get('story_title')); - $obj->set('cat_id', $this->get('cat_id')); - //$obj->set('uid', $this->get('uid')); - //$obj->set('counter', $this->get('counter')); - //$obj->set('status', $this->get('status')); - //$obj->set('approver_uid', $this->get('approver_uid')); - //$obj->set('approve_unixtime', $this->get('approve_unixtime')); - $obj->set('abstract', $this->get('abstract')); - $obj->set('content', $this->get('content')); - //$obj->set('options', $this->get('options')); - //$obj->set('reg_unixtime', $this->get('reg_unixtime')); + /** + * update + * + * @param XoopsSimpleObject &$obj + * + * @return void + **/ + public function update(/*** XoopsSimpleObject ***/ &$obj) + { + //$obj->set('story_id', $this->get('story_id')); + $obj->set('story_title', $this->get('story_title')); + $obj->set('cat_id', $this->get('cat_id')); + //$obj->set('uid', $this->get('uid')); + //$obj->set('counter', $this->get('counter')); + //$obj->set('status', $this->get('status')); + //$obj->set('approver_uid', $this->get('approver_uid')); + //$obj->set('approve_unixtime', $this->get('approve_unixtime')); + $obj->set('abstract', $this->get('abstract')); + $obj->set('content', $this->get('content')); + if(XCube_Root::getSingleton()->mContext->mModule->getModuleConfig('editor')=='html'){ + $obj->set('content', $obj->getPurifiedHtml('content')); + } + //$obj->set('options', $this->get('options')); + //$obj->set('reg_unixtime', $this->get('reg_unixtime')); $pubUnixtimeArray = explode('/', $this->get('pub_date')); $pub_unixtime = mktime($this->get('pub_Hour'), $this->get('pub_Minute'), 0, $pubUnixtimeArray[1], $pubUnixtimeArray[2], $pubUnixtimeArray[0]); $obj->set('pub_unixtime', $pub_unixtime); @@ -148,7 +151,7 @@ $end_unixtime = mktime($this->get('end_Hour'), $this->get('end_Minute'), 0, $endUnixtimeArray[1], $endUnixtimeArray[2], $endUnixtimeArray[0]); } $obj->set('end_unixtime', $end_unixtime); - } + } } ?> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_delete.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_delete.html 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_delete.html 2010-05-30 13:00:44 UTC (rev 521) @@ -44,7 +44,7 @@ <tr> <th class="head"><{$smarty.const._MD_BIZNEWS_LANG_CONTENT}></th> <td class="<{cycle values="odd,even"}>"> - <{if $useEditor=="fckeditor"}> + <{if $editor=="html"}> <{$object->get('content')}> <{else}> <{$object->getShow('content')}> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html 2010-05-30 13:00:44 UTC (rev 521) @@ -41,25 +41,20 @@ <tr> <th class="head"><{$smarty.const._MD_BIZNEWS_LANG_CONTENT}></th> <td class="<{cycle values="odd,even"}>"> - <{if $useEditor=='fckeditor'}> - <{xoops_textarea type=text name=content value=$actionForm->get('content')}> - <script>fckeditor_exec();</script> - <{else}> - <{xoops_dhtmltarea type=text name=content value=$actionForm->get('content')}> - <{/if}> + <{xoops_dhtmltarea type=text name=content value=$actionForm->get('content') editor=$editor}> </td> </tr> <tr> <th class="head"><{$smarty.const._MD_BIZNEWS_LANG_PUB_UNIXTIME}></th> <td class="<{cycle values="odd,even"}>"> - <{xoops_input type=text name=pub_date value=$actionForm->get('pub_date') class="datePick"}> + <{xoops_input type=text name=pub_date value=$actionForm->get('pub_date') class="datePicker"}> <{html_select_time prefix=pub_ time=$actionForm->get('pub_unixtime') display_seconds=false minute_interval=30}> </td> </tr> <tr> <th class="head"><{$smarty.const._MD_BIZNEWS_LANG_END_UNIXTIME}></th> <td class="<{cycle values="odd,even"}>"> - <{xoops_input type=text name=end_date value=$actionForm->get('end_date') class="datePick"}> + <{xoops_input type=text name=end_date value=$actionForm->get('end_date') class="datePicker"}> <{html_select_time prefix=end_ time=$actionForm->get('end_unixtime') display_seconds=false minute_interval=30}> <p> <input type="button" name="displayEndDatetime" id="displayEndDatetime" value="<{$smarty.const._MD_BIZNEWS_LANG_DISPLAY_END_DATETIME}>" /> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html 2010-05-30 13:00:44 UTC (rev 521) @@ -39,7 +39,7 @@ <a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id')}>"><span class="more"><{$smarty.const._MD_BIZNEWS_LANG_MORE}></span></a> <{else}> <p> - <{if $useEditor=="fckeditor"}> + <{if $editor=="html"}> <{$obj->get('content')}> <{else}> <{$obj->getShow('content')}> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html 2010-05-30 13:00:44 UTC (rev 521) @@ -27,7 +27,7 @@ </span> </div> <div class="itemBody"> - <{if $useEditor=="fckeditor"}> + <{if $editor=="html"}> <{$object->get('content')}> <{else}> <{$object->getShow('content')}> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/xoops_version.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/xoops_version.php 2010-05-30 11:20:14 UTC (rev 520) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/xoops_version.php 2010-05-30 13:00:44 UTC (rev 521) @@ -168,7 +168,7 @@ 'description' => "_MI_BIZNEWS_DESC_EDITOR", 'formtype' => 'select', 'valuetype' => 'text', - 'options' => array("bbcode"=>"bbcode", "fckeditor"=>"fckeditor"), + 'options' => array("bbcode"=>"bbcode", "html"=>"html"), 'default' => 'bbcode' ), array( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-30 11:20:20
|
Revision: 520 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=520&view=rev Author: kilica Date: 2010-05-30 11:20:14 +0000 (Sun, 30 May 2010) Log Message: ----------- Update biznews for cool uri Modified Paths: -------------- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html modules_biznews/trunk/xoops_trust_path/modules/biznews/xoops_version.php Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html 2010-05-30 10:34:32 UTC (rev 519) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html 2010-05-30 11:20:14 UTC (rev 520) @@ -49,7 +49,6 @@ </div> <div class="itemFoot"> <span class="itemStats"> - <{if $obj->get('status')!=2}><a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$obj->getShow('story_id') action=approve}>"><img src="/images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a><{/if}> <{if $obj->getShow('uid') == $xoops_userid}> <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$obj->getShow('story_id') action=edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$obj->getShow('story_id') action=delete}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html 2010-05-30 10:34:32 UTC (rev 519) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html 2010-05-30 11:20:14 UTC (rev 520) @@ -16,9 +16,6 @@ </div> <div class="itemInfo"> <{if $object->getShow('uid') == $xoops_userid}> - <{if $object->getShow('status')!="2"}> - <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$object->getShow('story_id') action=approve}>"><img src="images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a> - <{/if}> <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$object->getShow('story_id') action=edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$object->getShow('story_id') action=delete}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> <{/if}> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/xoops_version.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/xoops_version.php 2010-05-30 10:34:32 UTC (rev 519) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/xoops_version.php 2010-05-30 11:20:14 UTC (rev 520) @@ -160,7 +160,7 @@ 'formtype' => 'textbox', 'valuetype' => 'text', 'options' => array(), - 'default' => 'viewer|poster|reviewer|manager' + 'default' => 'viewer|poster|manager|manager' ), array( 'name' => 'editor', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-30 10:34:40
|
Revision: 519 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=519&view=rev Author: kilica Date: 2010-05-30 10:34:32 +0000 (Sun, 30 May 2010) Log Message: ----------- Update biznews for cool uri Modified Paths: -------------- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractEditAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/DelegateFunctions.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/Module.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/preload/AssetPreload.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_delete.html modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php 2010-05-30 10:34:32 UTC (rev 519) @@ -18,18 +18,6 @@ class Biznews_StoryDeleteAction extends Biznews_AbstractDeleteAction { /** - * _getId - * - * @param void - * - * @return int - **/ - protected function _getId() - { - return $this->mRoot->mContext->mRequest->getRequest('story_id'); - } - - /** * _getPageTitle * * @param void Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php 2010-05-30 10:34:32 UTC (rev 519) @@ -18,18 +18,6 @@ class Biznews_StoryEditAction extends Biznews_AbstractEditAction { /** - * _getId - * - * @param void - * - * @return int - **/ - protected function _getId() - { - return $this->mRoot->mContext->mRequest->getRequest('story_id'); - } - - /** * @protected */ function _getCatId() @@ -163,7 +151,7 @@ protected function _doExecute() { if(parent::_doExecute() == BIZNEWS_FRAME_VIEW_SUCCESS){ - XCube_DelegateUtils::call('Legacy_Progress.AddItem', $this->mObject->getShow('story_title'), $this->mAsset->mDirname, 'story', $this->mObject->get('story_id')); + XCube_DelegateUtils::call('Legacy_Progress.AddItem', $this->mObject->getShow('story_title'), $this->mAsset->mDirname, 'story', $this->mObject->get('story_id'), Legacy_Utils::renderUri($this->mAsset->mDirname, null, $this->mObject->get('story_id'))); return BIZNEWS_FRAME_VIEW_SUCCESS; } else{ Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php 2010-05-30 10:34:32 UTC (rev 519) @@ -19,7 +19,6 @@ { var $mCatId = 0; var $mCatTitleList = array(); - var $mIsPoster = array(); var $mIsEditor = false; var $mWaitingObjects = array(); @@ -84,13 +83,13 @@ **/ public function hasPermission() { - if($this->_useCategory()==false){ + if($this->mRoot->mContext->mModuleConfig['set_id']==0){ return true; } $authType = new Biznews_AuthType($this->mAsset->mDirname); if($this->_getCatId() > 0){ - XCube_DelegateUtils::call('Legacy_Category.CheckPermitByUserId', new XCube_Ref($check), $this->_getCatId(), $authType->getAuthType('view'), Legacy_Utils::getUid(), $module); + XCube_DelegateUtils::call('Legacy_Category.CheckPermitByUserId', new XCube_Ref($check), $this->_getCatId(), $authType->getAuthType('view'), Legacy_Utils::getUid(), null); return ($check==true) ? true : false; } return true; @@ -136,7 +135,6 @@ //get permitted categories to show $idList = array(); XCube_DelegateUtils::call('Legacy_Category.GetPermittedIdList', new XCube_Ref($idList), $this->mModule->getModuleConfig('set_id'), $mode, Legacy_Utils::getUid(), $this->_getCatId()); - if(count($idList)>0) $this->mIsPoster = true; foreach($idList as $id){ $childCriteria->add(new Criteria('cat_id', $id, 'OR')); } @@ -174,17 +172,12 @@ $render->setAttribute('waitingObjects', $this->mWaitingObjects); $render->setAttribute('pageNavi', $this->mFilter->mNavi); $render->setAttribute('catId', $this->_getCatId()); - $render->setAttribute('isPoster', $this->mIsPoster); + $render->setAttribute('isPoster', $this->_isPoster()); $render->setAttribute('isEditor', $this->mIsEditor); if($this->mModule->getModuleConfig('show_rss')){ $render->setAttribute('flgShowRSS', 1); } $render->setAttribute('useEditor', $this->mModule->getModuleConfig('editor')); - //feed auto discovery - if($this->mModule->getModuleConfig('show_rss')){ - $moduleHeader .= '<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.php?action=StoryRss">'; - } - $render->setAttribute('xoops_module_header', $moduleHeader); } } Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php 2010-05-30 10:34:32 UTC (rev 519) @@ -21,18 +21,6 @@ var $mCatPath = array(); /** - * _getId - * - * @param void - * - * @return int - **/ - protected function _getId() - { - return $this->mRoot->mContext->mRequest->getRequest('story_id'); - } - - /** * _getCatId * * @param void Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php 2010-05-30 10:34:32 UTC (rev 519) @@ -171,6 +171,24 @@ return $check; } + /** + * _isPoster + * + * @param void + * + * @return bool + **/ + protected function _isPoster() + { + //has post permission ? + if($this->_getCatSetId()==0){ + return $this->mRoot->mContext->mUser->isInRole('Site.Owner'); + } + else{ + XCube_DelegateUtils::call('Legacy_Category.GetPermittedIdList', new XCube_Ref($list), $this->_getCatSetId(), $this->getAuthType('post'), Legacy_Utils::getUid()); + return (count($list)>0) ? true : false; + } + } /** * getDefaultView Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractEditAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractEditAction.class.php 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractEditAction.class.php 2010-05-30 10:34:32 UTC (rev 519) @@ -108,6 +108,10 @@ **/ public function hasPermission() { + if($this->_getCatSetId()==0){ + return $this->mRoot->mContext->mUser->isInRole('Site.Owner'); + } + $catId = $this->mObject->get('cat_id'); if($this->mObject->isNew()){ if($catId==0){ Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/DelegateFunctions.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/DelegateFunctions.class.php 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/DelegateFunctions.class.php 2010-05-30 10:34:32 UTC (rev 519) @@ -25,46 +25,94 @@ } /** - * getSourceUrl + * updateStatus * - * @param string &$url + * @param bool &$result * @param string $dirname * @param string $dataname * @param int $id * * @return void */ - public function getSourceUrl(/*** string ***/ &$url, /*** string ***/ $dirname, /*** string ***/ $dataname, /*** int ***/ $id) + public function updateStatus(/*** bool ***/ &$result, /*** string ***/ $dirname, /*** string ***/ $dataname, /*** int ***/ $id, /*** int ***/ $status) { $dirnameList = Legacy_Utils::getDirnameListByTrustDirname('biznews'); foreach($dirnameList as $biznewsDirname){ if($dirname == $biznewsDirname && $dataname=='story'){ - $url = XOOPS_URL. '/modules/'.$dirname.'/index.php?action=StoryView&story_id='.$id; + $handler = Legacy_Utils::getModuleHandler('story', $dirname); + $obj = $handler->get($id); + $obj->set('status', $status); + $result = $handler->insert($obj); } } } +} +class Biznews_CoolUriDelegate +{ /** - * updateStatus + * getNormalUri * - * @param bool &$result - * @param string $dirname - * @param string $dataname - * @param int $id + * @param string $uri + * @param string $dirname + * @param string $dataname + * @param int $data_id + * @param string $action + * @param string $query * * @return void */ - public function updateStatus(/*** bool ***/ &$result, /*** string ***/ $dirname, /*** string ***/ $dataname, /*** int ***/ $id, /*** int ***/ $status) + public function getNormalUri(/*** string ***/ &$uri, /*** string ***/ $dirname, /*** string ***/ $dataname=null, /*** int ***/ $data_id=0, /*** string ***/ $action=null, /*** string ***/ $query=null) { - $dirnameList = Legacy_Utils::getDirnameListByTrustDirname('biznews'); - foreach($dirnameList as $biznewsDirname){ - if($dirname == $biznewsDirname && $dataname=='story'){ - $handler = Legacy_Utils::getModuleHandler('story', $dirname); - $obj = $handler->get($id); - $obj->set('status', $status); - $result = $handler->insert($obj); + $sUri = '/%s/index.php?action=%s%s'; + $lUri = '/%s/index.php?action=%s%s&%s=%d'; + switch($dataname){ + default: $key = $dataname.'_id';break; + } + + $table = isset($dataname) ? $dataname : 'story'; + + if(isset($dataname)){ + if($data_id>0){ + if(isset($action)){ + $uri = sprintf($lUri, $dirname, ucfirst($dataname), ucfirst($action), $key, $data_id); + } + else{ + $uri = sprintf($lUri, $dirname, ucfirst($dataname), 'View', $key, $data_id); + } } + else{ + if(isset($action)){ + $uri = sprintf($sUri, $dirname, ucfirst($dataname), ucfirst($action)); + } + else{ + $uri = sprintf($sUri, $dirname, ucfirst($dataname), 'List'); + } + } + $uri = isset($query) ? $uri.'&'.$query : $uri; } + else{ + if($data_id>0){ + if(isset($action)){ + die(); + } + else{ + $handler = Legacy_Utils::getModuleHandler($table, $dirname); + $key = $handler->mPrimary; + $uri = sprintf($lUri, $dirname, ucfirst($table), 'View', $key, $data_id); + } + $uri = isset($query) ? $uri.'&'.$query : $uri; + } + else{ + if(isset($action)){ + die(); + } + else{ + $uri = sprintf('/%s/', $dirname); + $uri = isset($query) ? $uri.'index.php?'.$query : $uri; + } + } + } } } Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/Module.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/Module.class.php 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/Module.class.php 2010-05-30 10:34:32 UTC (rev 519) @@ -116,7 +116,7 @@ { $req = XCube_Root::getSingleton()->mContext->mRequest; $dataId = $req->getRequest(_REQUESTED_DATA_ID); - $dataname = $req->getRequest(_REQUESTED_DATA_NAME) + $dataname = $req->getRequest(_REQUESTED_DATA_NAME); $dataname = isset($dataname) ? $dataname : 'story'; $action = $req->getRequest(_REQUESTED_ACTION_NAME); Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/preload/AssetPreload.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/preload/AssetPreload.class.php 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/preload/AssetPreload.class.php 2010-05-30 10:34:32 UTC (rev 519) @@ -55,6 +55,7 @@ $this->mRoot->mDelegateManager->add('Legacy_Progress.GetManagedModules','Biznews_DelegateFunctions::getManagedModules', $file); $this->mRoot->mDelegateManager->add('Legacy_Progress.GetSourceUrl','Biznews_DelegateFunctions::getSourceUrl', $file); $this->mRoot->mDelegateManager->add('Legacy_Progress.UpdateStatus','Biznews_DelegateFunctions::updateStatus', $file); + $this->mRoot->mDelegateManager->add('Module.biznews.Global.Event.GetNormalUri','Biznews_CoolUriDelegate::getNormalUri', $file); } /** Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_delete.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_delete.html 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_delete.html 2010-05-30 10:34:32 UTC (rev 519) @@ -1,8 +1,8 @@ -<h3><{$smarty.const._MD_BIZNEWS_LANG_STORY_DELETE}></h3> +<h1><{$smarty.const._MD_BIZNEWS_LANG_STORY_DELETE}></h1> <div class="msgWarning"><{$smarty.const._MD_BIZNEWS_MESSAGE_CONFIRM_DELETE}></div> -<form action="./index.php?action=StoryDelete" method="post"> +<form action="<{xoops_cooluri dirname=$dirname dataname=story action=delete}>" method="post"> <table class="outer"> <tbody> <tr> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html 2010-05-30 10:34:32 UTC (rev 519) @@ -7,7 +7,7 @@ </ul> </div> <{/if}> -<form action="<{xoops_cooluri dirname=$dirname action=edit}>" method="post"> +<form action="<{xoops_cooluri dirname=$dirname dataname=story action=edit}>" method="post"> <table class="outer" summary=""> <caption> <{if $actionForm->get('story_id')}> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html 2010-05-30 10:34:32 UTC (rev 519) @@ -4,14 +4,14 @@ <{/if}> <ul class="toptab"> - <{if $isPoster}> - <li><a href="<{xoops_cooluri dirname=$dirname action=edit}>"><{$smarty.const._MD_BIZNEWS_LANG_ADD_A_NEW_STORY}></a></li> + <{if $isPoster==true}> + <li><a href="<{xoops_cooluri dirname=$dirname dataname=story action=edit}>"><{$smarty.const._MD_BIZNEWS_LANG_ADD_A_NEW_STORY}></a></li> <{/if}> - <li><a href="<{xoops_cooluri dirname=$dirname query=$query}>"><{$smarty.const._MD_BIZNEWS_MESSAGE_SHOW_ALL_NEWS}></a></li> + <li><a href="<{xoops_cooluri dirname=$dirname dataname=story query=$query}>"><{$smarty.const._MD_BIZNEWS_MESSAGE_SHOW_ALL_NEWS}></a></li> </ul> <{if $isEditor==true}> <ul> - <li><a href="<{xoops_cooluri dirname=$dirname action=catrepl}>"><{$smarty.const._MD_BIZNEWS_LANG_CAT_REPLACE}></a></li> + <li><a href="<{xoops_cooluri dirname=$dirname dataname=story action=catrepl}>"><{$smarty.const._MD_BIZNEWS_LANG_CAT_REPLACE}></a></li> </ul> <{/if}> @@ -20,14 +20,14 @@ <!-- Main --> <div class="item"> <div class="itemHead"> - <h3 class="itemTitle"> + <h2 class="itemTitle"> <a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id')}>"><{$obj->getShow('story_title')}></a> - </h3> + </h2> </div> <div class="itemInfo"> <span class="itemStat"> <{assign var=catId value=$obj->getShow('cat_id')}> - <a href="<{xoops_cooluri dirname=$dirname query='cat_id='|cat:cat_id=<{$obj->getShow('cat_id')}>"><{$catTitleList[$catId]}></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=story query='cat_id='|cat:$obj->getShow('cat_id')}>"><{$catTitleList[$catId]}></a> </span> <span class="itemPostDate"> <{$obj->get('pub_unixtime')|xoops_formattimestamp:l}> @@ -49,14 +49,14 @@ </div> <div class="itemFoot"> <span class="itemStats"> - <{if $obj->get('status')!=2}><a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id') action=approve}>"><img src="/images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a><{/if}> + <{if $obj->get('status')!=2}><a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$obj->getShow('story_id') action=approve}>"><img src="/images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a><{/if}> <{if $obj->getShow('uid') == $xoops_userid}> - <a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id') action=edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> - <a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id') action=delete}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$obj->getShow('story_id') action=edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$obj->getShow('story_id') action=delete}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> <{/if}> </span> <span class="itemStats"> - by: <a href="<{xoops_cooluri dirname=$dirname query='uid='|cat:$obj->getShow('uid')}><{$obj->getShow('uid')|xoops_user:"user_name"}></a> + by: <a href="<{xoops_cooluri dirname=$dirname dataname=story query='uid='|cat:$obj->getShow('uid')}>"><{$obj->getShow('uid')|xoops_user:"user_name"}></a> </span> </div> </div> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html 2010-05-30 07:45:12 UTC (rev 518) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html 2010-05-30 10:34:32 UTC (rev 519) @@ -9,24 +9,24 @@ <{foreach item=catPath from=$catPathArr.cat_title name=cat}> <{$catPath}> » <{/foreach}> - <a href="<{xoops_cooluri dirname=$dirname query='cat_id='|cat:$object->getShow('cat_id')}>"><{$catTitle}></a> : - <h3 class="itemTitle"> + <a href="<{xoops_cooluri dirname=$dirname dataname=story query='cat_id='|cat:$object->getShow('cat_id')}>"><{$catTitle}></a> : + <h1 class="itemTitle"> <a href="<{xoops_cooluri dirname=$dirname data_id=$object->getShow('story_id')}>"><{$object->getShow('story_title')}></a> - </h3> + </h1> </div> <div class="itemInfo"> <{if $object->getShow('uid') == $xoops_userid}> <{if $object->getShow('status')!="2"}> - <a href="<{xoops_cooluri dirname=$dirname data_id=$object->getShow('story_id') action=approve}>"><img src="images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$object->getShow('story_id') action=approve}>"><img src="images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a> <{/if}> - <a href="<{xoops_cooluri dirname=$dirname data_id=$object->getShow('story_id') action=edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> - <a href="<{xoops_cooluri dirname=$dirname data_id=$object->getShow('story_id') action=delete}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$object->getShow('story_id') action=edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=story data_id=$object->getShow('story_id') action=delete}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> <{/if}> <span class="itemPostDate"> <{$object->get('pub_unixtime')|xoops_formattimestamp:l}> </span> <span class="itemStats"> - by: <a href="<{xoops_cooluri dirname=$dirname query='uid=$object->getShow('uid')}>"><{$object->getShow('uid')|xoops_user:"user_name"}></a> + by: <a href="<{xoops_cooluri dirname=$dirname dataname=story query='uid='|cat:$object->getShow('uid')}>"><{$object->getShow('uid')|xoops_user:"user_name"}></a> </span> </div> <div class="itemBody"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-30 07:45:18
|
Revision: 518 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=518&view=rev Author: kilica Date: 2010-05-30 07:45:12 +0000 (Sun, 30 May 2010) Log Message: ----------- Update biznews for cool uri Modified Paths: -------------- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryCatreplAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractEditAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractViewAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/Module.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryCatreplAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryCatreplAction.class.php 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryCatreplAction.class.php 2010-05-30 07:45:12 UTC (rev 518) @@ -7,7 +7,7 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } require_once BIZNEWS_TRUST_PATH . '/class/AbstractEditAction.class.php'; @@ -22,48 +22,48 @@ var $mNewId = 0; var $mOldId = 0; - /** - * _getOldId - * @param void - * @return int - **/ - protected function _getOldId() - { - return intval($this->mRoot->mContext->mRequest->getRequest('old')); - } + /** + * _getOldId + * @param void + * @return int + **/ + protected function _getOldId() + { + return intval($this->mRoot->mContext->mRequest->getRequest('old')); + } - /** - * _getNewId - * @param void - * @return int - **/ - protected function _getNewId() - { - return intval($this->mRoot->mContext->mRequest->getRequest('new')); - } + /** + * _getNewId + * @param void + * @return int + **/ + protected function _getNewId() + { + return intval($this->mRoot->mContext->mRequest->getRequest('new')); + } - /** - * &_getHandler - * @param void - * @return Biznews_StoryHandler - **/ - protected function &_getHandler() - { - $handler =& $this->mAsset->getObject('handler', 'story'); - return $handler; - } + /** + * &_getHandler + * @param void + * @return Biznews_StoryHandler + **/ + protected function &_getHandler() + { + $handler =& $this->mAsset->getObject('handler', 'story'); + return $handler; + } - /** - * _setupActionForm - * @param void - * @return void - **/ - protected function _setupActionForm() - { - // $this->mActionForm =& new Biznews_StoryEditForm(); - $this->mActionForm =& $this->mAsset->getObject('form', 'story', false, 'catrepl'); - $this->mActionForm->prepare(); - } + /** + * _setupActionForm + * @param void + * @return void + **/ + protected function _setupActionForm() + { + // $this->mActionForm =& new Biznews_StoryEditForm(); + $this->mActionForm =& $this->mAsset->getObject('form', 'story', false, 'catrepl'); + $this->mActionForm->prepare(); + } /** * @public @@ -87,24 +87,24 @@ $this->mObject->unsetNew(); } - /** - * executeViewInput - * @param XCube_RenderTarget &$render - * @return void - **/ - public function executeViewInput(/*** XCube_RenderTarget ***/ &$render) - { - $render->setTemplateName($this->mAsset->mDirname . '_story_catrepl.html'); - $render->setAttribute('actionForm', $this->mActionForm); - #cubson::lazy_load('story', $this->mObject); - $render->setAttribute('object', $this->mObject); - $render->setAttribute('cat', $this->mCat); - } + /** + * executeViewInput + * @param XCube_RenderTarget &$render + * @return void + **/ + public function executeViewInput(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_story_catrepl.html'); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('dirname', $this->mAsset->mDirname); + $render->setAttribute('object', $this->mObject); + $render->setAttribute('cat', $this->mCat); + } public function execute() { - $this->mActionForm->fetch(); - $this->mActionForm->validate(); + $this->mActionForm->fetch(); + $this->mActionForm->validate(); //batch replace tag_name global $xoopsDB; @@ -121,35 +121,35 @@ } - /** - * executeViewSuccess - * @param XCube_RenderTarget &$render - * @return void - **/ - public function executeViewSuccess(/*** XCube_RenderTarget ***/ &$render) - { - $this->mRoot->mController->executeForward('./index.php?action=StoryList'); - } + /** + * executeViewSuccess + * @param XCube_RenderTarget &$render + * @return void + **/ + public function executeViewSuccess(/*** XCube_RenderTarget ***/ &$render) + { + $this->mRoot->mController->executeForward('./index.php?action=StoryList'); + } - /** - * executeViewError - * @param XCube_RenderTarget &$render - * @return void - **/ - public function executeViewError(/*** XCube_RenderTarget ***/ &$render) - { - $this->mRoot->mController->executeRedirect('./index.php?action=StoryList', 1, _MD_BIZNEWS_ERROR_DBUPDATE_FAILED); - } + /** + * executeViewError + * @param XCube_RenderTarget &$render + * @return void + **/ + public function executeViewError(/*** XCube_RenderTarget ***/ &$render) + { + $this->mRoot->mController->executeRedirect('./index.php?action=StoryList', 1, _MD_BIZNEWS_ERROR_DBUPDATE_FAILED); + } - /** - * executeViewCancel - * @param XCube_RenderTarget &$render - * @return void - **/ - public function executeViewCancel(/*** XCube_RenderTarget ***/ &$render) - { - $this->mRoot->mController->executeForward('./index.php?action=StoryList'); - } + /** + * executeViewCancel + * @param XCube_RenderTarget &$render + * @return void + **/ + public function executeViewCancel(/*** XCube_RenderTarget ***/ &$render) + { + $this->mRoot->mController->executeForward('./index.php?action=StoryList'); + } } ?> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryDeleteAction.class.php 2010-05-30 07:45:12 UTC (rev 518) @@ -79,6 +79,7 @@ { $render->setTemplateName($this->mAsset->mDirname . '_story_delete.html'); $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('dirname', $this->mAsset->mDirname); $render->setAttribute('object', $this->mObject); $render->setAttribute('useEditor', $this->mModule->getModuleConfig('editor')); } @@ -92,7 +93,7 @@ **/ public function executeViewSuccess(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeForward('./index.php?action=StoryList'); + $this->mRoot->mController->executeForward($this->_getNextUri('story')); } /** @@ -104,7 +105,7 @@ **/ public function executeViewError(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeRedirect('./index.php?action=StoryList', 1, _MD_BIZNEWS_ERROR_DBUPDATE_FAILED); + $this->mRoot->mController->executeRedirect($this->_getNextUri('story'), 1, _MD_BIZNEWS_ERROR_DBUPDATE_FAILED); } /** @@ -116,7 +117,7 @@ **/ public function executeViewCancel(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeForward('./index.php?action=StoryList'); + $this->mRoot->mController->executeForward($this->_getNextUri('story')); } /** Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php 2010-05-30 07:45:12 UTC (rev 518) @@ -111,6 +111,7 @@ $render->setAttribute('cat', $tree); $render->setTemplateName($this->mAsset->mDirname . '_story_edit.html'); + $render->setAttribute('dirname', $this->mAsset->mDirname); $render->setAttribute('actionForm', $this->mActionForm); $render->setAttribute('object', $this->mObject); $render->setAttribute('useEditor', $this->mModule->getModuleConfig('editor')); @@ -180,7 +181,7 @@ **/ public function executeViewSuccess(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeForward('./index.php?action=StoryView&story_id='. $this->mObject->get('story_id')); + $this->mRoot->mController->executeForward($this->_getNextUri('story')); } /** @@ -192,7 +193,7 @@ **/ public function executeViewError(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeRedirect('./index.php?action=StoryList', 1, _MD_BIZNEWS_ERROR_DBUPDATE_FAILED); + $this->mRoot->mController->executeRedirect($this->_getNextUri('story'), 1, _MD_BIZNEWS_ERROR_DBUPDATE_FAILED); } /** @@ -204,7 +205,7 @@ **/ public function executeViewCancel(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeForward('./index.php?action=StoryList'); + $this->mRoot->mController->executeForward($this->_getNextUri('story')); } } Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php 2010-05-30 07:45:12 UTC (rev 518) @@ -166,7 +166,11 @@ $render->setAttribute('catTree', $tree); $render->setTemplateName($this->mAsset->mDirname . '_story_list.html'); + $render->setAttribute('dirname', $this->mAsset->mDirname); $render->setAttribute('objects', $this->mObjects); + + $query = ($this->_getCatId()>0) ? 'mode=all&cat_id='.$this->_getCatId() : 'mode=all'; + $render->setAttribute('query', $query); $render->setAttribute('waitingObjects', $this->mWaitingObjects); $render->setAttribute('pageNavi', $this->mFilter->mNavi); $render->setAttribute('catId', $this->_getCatId()); Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryViewAction.class.php 2010-05-30 07:45:12 UTC (rev 518) @@ -106,6 +106,7 @@ $render->setAttribute('catPathArr', $catPath); $render->setTemplateName($this->mAsset->mDirname . '_story_view.html'); + $render->setAttribute('dirname', $this->mAsset->mDirname); $render->setAttribute('object', $this->mObject); $render->setAttribute('useEditor', $this->mModule->getModuleConfig('editor')); } Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractAction.class.php 2010-05-30 07:45:12 UTC (rev 518) @@ -261,6 +261,24 @@ public function executeViewCancel(/*** XCube_RenderTarget ***/ &$render) { } + + /** + * _getNextUri + * + * @param void + * + * @return string + **/ + protected function _getNextUri($tableName, $actionName=null) + { + $handler = $this->_getHandler(); + if($this->mObject->get($handler->mPrimary)>0){ + return Legacy_Utils::renderUri($this->mAsset->mDirname, $tableName, $this->mObject->get($handler->mPrimary), $actionName); + } + else{ + return Legacy_Utils::renderUri($this->mAsset->mDirname, $tableName, 0, $actionName); + } + } } ?> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractEditAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractEditAction.class.php 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractEditAction.class.php 2010-05-30 07:45:12 UTC (rev 518) @@ -39,6 +39,9 @@ **/ protected function _getId() { + $req = $this->mRoot->mContext->mRequest; + $dataId = $req->getRequest(_REQUESTED_DATA_ID); + return isset($dataId) ? intval($dataId) : intval($req->getRequest($this->_getHandler()->mPrimary)); } /** Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractViewAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractViewAction.class.php 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/AbstractViewAction.class.php 2010-05-30 07:45:12 UTC (rev 518) @@ -34,6 +34,9 @@ **/ protected function _getId() { + $req = $this->mRoot->mContext->mRequest; + $dataId = $req->getRequest(_REQUESTED_DATA_ID); + return isset($dataId) ? intval($dataId) : intval($req->getRequest($this->_getHandler()->mPrimary)); } /** Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/Module.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/Module.class.php 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/Module.class.php 2010-05-30 07:45:12 UTC (rev 518) @@ -7,7 +7,7 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } require_once BIZNEWS_TRUST_PATH . '/class/AbstractAction.class.php'; @@ -29,436 +29,458 @@ **/ class Biznews_Module extends Legacy_ModuleAdapter { - /** - * @brief string - **/ - public $mActionName = null; + /** + * @brief string + **/ + public $mActionName = null; - /** - * @brief Biznews_AbstractAction - **/ - public $mAction = null; + /** + * @brief Biznews_AbstractAction + **/ + public $mAction = null; - /** - * @brief bool - **/ - public $mAdminFlag = false; + /** + * @brief bool + **/ + public $mAdminFlag = false; - /** - * @brief Biznews_AssetManager - **/ - public $mAssetManager = null; + /** + * @brief Biznews_AssetManager + **/ + public $mAssetManager = null; - /** - * @brief string - **/ - protected $_mPreferenceEditUrl = null; + /** + * @brief string + **/ + protected $_mPreferenceEditUrl = null; - /** - * @brief string - **/ - protected $_mHelpViewUrl = null; + /** + * @brief string + **/ + protected $_mHelpViewUrl = null; - /** - * @brief Enum[] - **/ - protected $_mAllowViewNames = array( - BIZNEWS_FRAME_VIEW_NONE, - BIZNEWS_FRAME_VIEW_SUCCESS, - BIZNEWS_FRAME_VIEW_ERROR, - BIZNEWS_FRAME_VIEW_INDEX, - BIZNEWS_FRAME_VIEW_INPUT, - BIZNEWS_FRAME_VIEW_PREVIEW, - BIZNEWS_FRAME_VIEW_CANCEL - ); + /** + * @brief Enum[] + **/ + protected $_mAllowViewNames = array( + BIZNEWS_FRAME_VIEW_NONE, + BIZNEWS_FRAME_VIEW_SUCCESS, + BIZNEWS_FRAME_VIEW_ERROR, + BIZNEWS_FRAME_VIEW_INDEX, + BIZNEWS_FRAME_VIEW_INPUT, + BIZNEWS_FRAME_VIEW_PREVIEW, + BIZNEWS_FRAME_VIEW_CANCEL + ); - /** - * startup - * - * @param void - * - * @return void - **/ - public function startup() - { - parent::startup(); - - XCube_DelegateUtils::call('Module.biznews.Global.Event.GetAssetManager',new XCube_Ref($this->mAssetManager),$this->mXoopsModule->get('dirname')); - - $root =& XCube_Root::getSingleton(); - $root->mController->mExecute->add(array(&$this, 'execute')); - - // - // TODO/Insert your initialization code. - // - } + /** + * startup + * + * @param void + * + * @return void + **/ + public function startup() + { + parent::startup(); + + XCube_DelegateUtils::call('Module.biznews.Global.Event.GetAssetManager',new XCube_Ref($this->mAssetManager),$this->mXoopsModule->get('dirname')); + + $root =& XCube_Root::getSingleton(); + $root->mController->mExecute->add(array(&$this, 'execute')); + + // + // TODO/Insert your initialization code. + // + } - /** - * setAdminMode - * - * @param bool $flag - * - * @return void - **/ - public function setAdminMode(/*** bool ***/ $flag) - { - $this->mAdminFlag = $flag; - } + /** + * setAdminMode + * + * @param bool $flag + * + * @return void + **/ + public function setAdminMode(/*** bool ***/ $flag) + { + $this->mAdminFlag = $flag; + } - /** - * _getDefaultActionName - * - * @param void - * - * @return string - **/ - private function _getDefaultActionName() - { - // TODO insert your default action name - return 'StoryList'; - } + /** + * _getDefaultActionName + * + * @param void + * + * @return string + **/ + private function _getDefaultActionName() + { + $req = XCube_Root::getSingleton()->mContext->mRequest; + $dataId = $req->getRequest(_REQUESTED_DATA_ID); + $dataname = $req->getRequest(_REQUESTED_DATA_NAME) + $dataname = isset($dataname) ? $dataname : 'story'; + $action = $req->getRequest(_REQUESTED_ACTION_NAME); + + if($dataId>0){ + if(isset($action)){ + $actionName = ucfirst($dataname).ucfirst($action); + } + else{ + $actionName = ucfirst($dataname).'View'; + } + } + else{ + if(isset($action)){ + $actionName = ucfirst($dataname).ucfirst($action); + } + else{ + $actionName = ucfirst($dataname).'List'; + } + } + + return $actionName; + } - /** - * setActionName - * - * @param string $name - * - * @return void - **/ - public function setActionName(/*** string ***/ $name) - { - $this->mActionName = $name; - } + /** + * setActionName + * + * @param string $name + * + * @return void + **/ + public function setActionName(/*** string ***/ $name) + { + $this->mActionName = $name; + } - /** - * getRenderSystemName - * - * @param void - * - * @return string - **/ - public function getRenderSystemName() - { - if(!$this->mAdminFlag) - { - return parent::getRenderSystemName(); - } - - // TODO will be use site config - if(!defined('BIZNEWS_ADMIN_RENDER_REGISTED')) - { - define('BIZNEWS_ADMIN_RENDER_REGISTED',true); - $root =& XCube_Root::getSingleton(); - $root->overrideSiteConfig( - array( - 'RenderSystems' => array( - 'Biznews_AdminRenderSystem' => 'Biznews_AdminRenderSystem' - ), - 'Biznews_AdminRenderSystem' => array( - 'root' => BIZNEWS_TRUST_PATH, - 'path' => '/admin/class/BiznewsAdminRenderSystem.class.php', - 'class' => 'Biznews_AdminRenderSystem' - ) - ) - ); - } - - return 'Biznews_AdminRenderSystem'; - } + /** + * getRenderSystemName + * + * @param void + * + * @return string + **/ + public function getRenderSystemName() + { + if(!$this->mAdminFlag) + { + return parent::getRenderSystemName(); + } + + // TODO will be use site config + if(!defined('BIZNEWS_ADMIN_RENDER_REGISTED')) + { + define('BIZNEWS_ADMIN_RENDER_REGISTED',true); + $root =& XCube_Root::getSingleton(); + $root->overrideSiteConfig( + array( + 'RenderSystems' => array( + 'Biznews_AdminRenderSystem' => 'Biznews_AdminRenderSystem' + ), + 'Biznews_AdminRenderSystem' => array( + 'root' => BIZNEWS_TRUST_PATH, + 'path' => '/admin/class/BiznewsAdminRenderSystem.class.php', + 'class' => 'Biznews_AdminRenderSystem' + ) + ) + ); + } + + return 'Biznews_AdminRenderSystem'; + } - /** - * getAdminMenu - * - * @param void - * - * @return {string 'title',string 'link',string 'keywords',bool 'show',bool 'absolute'}[] - **/ - public function getAdminMenu() - { - if(is_array($this->mAdminMenu)) - { - return $this->mAdminMenu; - } - - $root =& XCube_Root::getSingleton(); - - // load admin menu - $adminMenu = $this->mXoopsModule->getInfo('adminmenu'); - if(!is_array($adminMenu)) - { - $adminMenu = array(); - } - - // add preference menu - if($url = $this->getPreferenceEditUrl()) - { - $adminMenu[] = array( - 'title' => _PREFERENCES, - 'link' => $url, - 'absolute' => true - ); - } - - // add help menu - if($url = $this->getHelpViewUrl()) - { - $adminMenu[] = array( - 'title' => _HELP, - 'link' => $url, - 'absolute' => true - ); - } - - $this->mAdminMenu = array(); - foreach($adminMenu as $menu) - { - if(!(isset($menu['absolute']) && $menu['absolute'])) - { - $menu['link'] = XOOPS_MODULE_URL . '/' . $this->mXoopsModule->get('dirname') . '/' . $menu['link']; - } - $this->mAdminMenu[] = $menu; - } - - return $this->mAdminMenu; - } + /** + * getAdminMenu + * + * @param void + * + * @return {string 'title',string 'link',string 'keywords',bool 'show',bool 'absolute'}[] + **/ + public function getAdminMenu() + { + if(is_array($this->mAdminMenu)) + { + return $this->mAdminMenu; + } + + $root =& XCube_Root::getSingleton(); + + // load admin menu + $adminMenu = $this->mXoopsModule->getInfo('adminmenu'); + if(!is_array($adminMenu)) + { + $adminMenu = array(); + } + + // add preference menu + if($url = $this->getPreferenceEditUrl()) + { + $adminMenu[] = array( + 'title' => _PREFERENCES, + 'link' => $url, + 'absolute' => true + ); + } + + // add help menu + if($url = $this->getHelpViewUrl()) + { + $adminMenu[] = array( + 'title' => _HELP, + 'link' => $url, + 'absolute' => true + ); + } + + $this->mAdminMenu = array(); + foreach($adminMenu as $menu) + { + if(!(isset($menu['absolute']) && $menu['absolute'])) + { + $menu['link'] = XOOPS_MODULE_URL . '/' . $this->mXoopsModule->get('dirname') . '/' . $menu['link']; + } + $this->mAdminMenu[] = $menu; + } + + return $this->mAdminMenu; + } - /** - * getPreferenceEditUrl - * - * @param void - * - * @return string - **/ - public function getPreferenceEditUrl() - { - if($this->_mPreferenceEditUrl === null) - { - if(is_array($this->mXoopsModule->getInfo('config')) && count($this->mXoopsModule->getInfo('config')) > 0) - { - $root =& XCube_Root::getSingleton(); - $this->_mPreferenceEditUrl = $root->mController->getPreferenceEditUrl($this->mXoopsModule); - } - else - { - $this->_mPreferenceEditUrl = false; - } - } - - return $this->_mPreferenceEditUrl; - } + /** + * getPreferenceEditUrl + * + * @param void + * + * @return string + **/ + public function getPreferenceEditUrl() + { + if($this->_mPreferenceEditUrl === null) + { + if(is_array($this->mXoopsModule->getInfo('config')) && count($this->mXoopsModule->getInfo('config')) > 0) + { + $root =& XCube_Root::getSingleton(); + $this->_mPreferenceEditUrl = $root->mController->getPreferenceEditUrl($this->mXoopsModule); + } + else + { + $this->_mPreferenceEditUrl = false; + } + } + + return $this->_mPreferenceEditUrl; + } - /** - * getHelpViewUrl - * - * @param void - * - * @return string - **/ - public function getHelpViewUrl() - { - if($this->_mHelpViewUrl === null) - { - if($this->mXoopsModule->hasHelp()) - { - $root =& XCube_Root::getSingleton(); - $this->_mHelpViewUrl = $root->mController->getHelpViewUrl($this->mXoopsModule); - } - else - { - $this->_mHelpViewUrl = false; - } - } - - return $this->_mHelpViewUrl; - } + /** + * getHelpViewUrl + * + * @param void + * + * @return string + **/ + public function getHelpViewUrl() + { + if($this->_mHelpViewUrl === null) + { + if($this->mXoopsModule->hasHelp()) + { + $root =& XCube_Root::getSingleton(); + $this->_mHelpViewUrl = $root->mController->getHelpViewUrl($this->mXoopsModule); + } + else + { + $this->_mHelpViewUrl = false; + } + } + + return $this->_mHelpViewUrl; + } - /** - * execute - * - * @param XCube_Controller &$controller - * - * @return void - **/ - public function execute(/*** XCube_Controller ***/ &$controller) - { - if($this->_createAction() === false) - { - $this->doActionNotFoundError(); - die(); - } - - if($this->mAction->prepare() === false) - { - $this->doPreparationError(); - die(); - } - - if($this->mAction->hasPermission() === false) - { - $this->doPermissionError(); - die(); - } - - $viewStatus = (Biznews_Utils::getEnv('REQUEST_METHOD') == 'POST') ? - $this->mAction->execute() : - $this->mAction->getDefaultView(); - - if(in_array($viewStatus,$this->_mAllowViewNames)) - { - $methodName = 'executeView' . ucfirst($viewStatus); - if(is_callable(array($this->mAction,$methodName))) - { - $render = $this->getRenderTarget(); - $this->mAction->$methodName($render); - $render->setAttribute('xoops_pagetitle', $this->mAction->getPagetitle()); - $this->mAction->setHeaderScript(); - } - } - } + /** + * execute + * + * @param XCube_Controller &$controller + * + * @return void + **/ + public function execute(/*** XCube_Controller ***/ &$controller) + { + if($this->_createAction() === false) + { + $this->doActionNotFoundError(); + die(); + } + + if($this->mAction->prepare() === false) + { + $this->doPreparationError(); + die(); + } + + if($this->mAction->hasPermission() === false) + { + $this->doPermissionError(); + die(); + } + + $viewStatus = (Biznews_Utils::getEnv('REQUEST_METHOD') == 'POST') ? + $this->mAction->execute() : + $this->mAction->getDefaultView(); + + if(in_array($viewStatus,$this->_mAllowViewNames)) + { + $methodName = 'executeView' . ucfirst($viewStatus); + if(is_callable(array($this->mAction,$methodName))) + { + $render = $this->getRenderTarget(); + $this->mAction->$methodName($render); + $render->setAttribute('xoops_pagetitle', $this->mAction->getPagetitle()); + $this->mAction->setHeaderScript(); + } + } + } - /** - * _createAction - * - * @param void - * - * @return bool - **/ - private function _createAction() - { - $root =& XCube_Root::getSingleton(); - - if($this->mActionName == null) - { - $this->mActionName = $root->mContext->mRequest->getRequest('action'); - if($this->mActionName == null) - { - $this->mActionName = $this->_getDefaultActionName(); - } - } - - if(!ctype_alnum($this->mActionName)) - { - return false; - } - - $fileName = ($this->mAdminFlag ? '/admin' : '') - . '/actions/' . ucfirst($this->mActionName) . 'Action.class.php'; - switch(true) - { - case file_exists( - $path = XOOPS_MODULE_PATH . '/' . $this->mXoopsModule->get('dirname') . $fileName - ): - break; - case file_exists( - $path = BIZNEWS_TRUST_PATH . '/' . $fileName - ): - break; - default: - return false; - } - - require_once $path; - - $className = 'Biznews_' . ($this->mAdminFlag ? 'Admin_' : '') - . ucfirst($this->mActionName) . 'Action'; - if(class_exists($className)) - { - $this->mAction =& new $className(); - } - if(!$this->mAction instanceof Biznews_AbstractAction) - { - return false; - } - - return true; - } + /** + * _createAction + * + * @param void + * + * @return bool + **/ + private function _createAction() + { + $root =& XCube_Root::getSingleton(); + + if($this->mActionName == null) + { + $this->mActionName = $root->mContext->mRequest->getRequest('action'); + if($this->mActionName == null) + { + $this->mActionName = $this->_getDefaultActionName(); + } + } + + if(!ctype_alnum($this->mActionName)) + { + return false; + } + + $fileName = ($this->mAdminFlag ? '/admin' : '') + . '/actions/' . ucfirst($this->mActionName) . 'Action.class.php'; + switch(true) + { + case file_exists( + $path = XOOPS_MODULE_PATH . '/' . $this->mXoopsModule->get('dirname') . $fileName + ): + break; + case file_exists( + $path = BIZNEWS_TRUST_PATH . '/' . $fileName + ): + break; + default: + return false; + } + + require_once $path; + + $className = 'Biznews_' . ($this->mAdminFlag ? 'Admin_' : '') + . ucfirst($this->mActionName) . 'Action'; + if(class_exists($className)) + { + $this->mAction =& new $className(); + } + if(!$this->mAction instanceof Biznews_AbstractAction) + { + return false; + } + + return true; + } - /** - * doActionNotFoundError - * - * @param void - * - * @return void - **/ - private function doActionNotFoundError() - { - /** - * Module.biznews.Global.Event.Exception.ActionNotFound - * - * @param string $dirname - * - * @return void - **/ - XCube_DelegateUtils::call('Module.biznews.Global.Event.Exception.ActionNotFound',$this->mAssetManager->mDirname); - /** - * Module.{dirname}.Event.Exception.ActionNotFound - * - * @param void - * - * @return void - **/ - XCube_DelegateUtils::call('Module.' . $this->mXoopsModule->get('dirname') . '.Event.Exception.ActionNotFound'); - $root =& XCube_Root::getSingleton(); - $root->mController->executeForward(XOOPS_URL); - } + /** + * doActionNotFoundError + * + * @param void + * + * @return void + **/ + private function doActionNotFoundError() + { + /** + * Module.biznews.Global.Event.Exception.ActionNotFound + * + * @param string $dirname + * + * @return void + **/ + XCube_DelegateUtils::call('Module.biznews.Global.Event.Exception.ActionNotFound',$this->mAssetManager->mDirname); + /** + * Module.{dirname}.Event.Exception.ActionNotFound + * + * @param void + * + * @return void + **/ + XCube_DelegateUtils::call('Module.' . $this->mXoopsModule->get('dirname') . '.Event.Exception.ActionNotFound'); + $root =& XCube_Root::getSingleton(); + $root->mController->executeForward(XOOPS_URL); + } - /** - * doPreparationError - * - * @param void - * - * @return void - **/ - private function doPreparationError() - { - /** - * Module.biznews.Global.Event.Exception.Preparation - * - * @param string $dirname - * - * @return void - **/ - XCube_DelegateUtils::call('Module.biznews.Global.Event.Exception.Preparation',$this->mAssetManager->mDirname); - /** - * Module.{dirname}.Event.Exception.Preparation - * - * @param void - * - * @return void - **/ - XCube_DelegateUtils::call('Module.' . $this->mXoopsModule->get('dirname') . '.Event.Exception.Preparation'); - $root =& XCube_Root::getSingleton(); - $root->mController->executeForward(XOOPS_URL); - } + /** + * doPreparationError + * + * @param void + * + * @return void + **/ + private function doPreparationError() + { + /** + * Module.biznews.Global.Event.Exception.Preparation + * + * @param string $dirname + * + * @return void + **/ + XCube_DelegateUtils::call('Module.biznews.Global.Event.Exception.Preparation',$this->mAssetManager->mDirname); + /** + * Module.{dirname}.Event.Exception.Preparation + * + * @param void + * + * @return void + **/ + XCube_DelegateUtils::call('Module.' . $this->mXoopsModule->get('dirname') . '.Event.Exception.Preparation'); + $root =& XCube_Root::getSingleton(); + $root->mController->executeForward(XOOPS_URL); + } - /** - * doPermissionError - * - * @param void - * - * @return void - **/ - private function doPermissionError() - { - /** - * Module.biznews.Global.Event.Exception.Permission - * - * @param string $dirname - * - * @return void - **/ - XCube_DelegateUtils::call('Module.biznews.Global.Event.Exception.Permission',$this->mAssetManager->mDirname); - /** - * Module.{dirname}.Event.Exception.Permission - * - * @param void - * - * @return void - **/ - XCube_DelegateUtils::call('Module.' . $this->mXoopsModule->get('dirname') . '.Event.Exception.Permission'); - $root =& XCube_Root::getSingleton(); - $root->mController->executeForward(XOOPS_URL); - } + /** + * doPermissionError + * + * @param void + * + * @return void + **/ + private function doPermissionError() + { + /** + * Module.biznews.Global.Event.Exception.Permission + * + * @param string $dirname + * + * @return void + **/ + XCube_DelegateUtils::call('Module.biznews.Global.Event.Exception.Permission',$this->mAssetManager->mDirname); + /** + * Module.{dirname}.Event.Exception.Permission + * + * @param void + * + * @return void + **/ + XCube_DelegateUtils::call('Module.' . $this->mXoopsModule->get('dirname') . '.Event.Exception.Permission'); + $root =& XCube_Root::getSingleton(); + $root->mController->executeForward(XOOPS_URL); + } } ?> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_edit.html 2010-05-30 07:45:12 UTC (rev 518) @@ -7,7 +7,7 @@ </ul> </div> <{/if}> -<form action="index.php?action=StoryEdit" method="post"> +<form action="<{xoops_cooluri dirname=$dirname action=edit}>" method="post"> <table class="outer" summary=""> <caption> <{if $actionForm->get('story_id')}> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_list.html 2010-05-30 07:45:12 UTC (rev 518) @@ -1,28 +1,18 @@ <div class="biznews"> <{if $flgShowRSS==1}> - <a href="./rss.php?action=StoryRss"><img src="images/icon_rss20.gif" alt="RSS" /></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=story action=rss}>"><img src="images/icon_rss20.gif" alt="RSS" /></a> <{/if}> <ul class="toptab"> <{if $isPoster}> - <li><a href="index.php?action=StoryEdit"><{$smarty.const._MD_BIZNEWS_LANG_ADD_A_NEW_STORY}></a></li> + <li><a href="<{xoops_cooluri dirname=$dirname action=edit}>"><{$smarty.const._MD_BIZNEWS_LANG_ADD_A_NEW_STORY}></a></li> <{/if}> - <li><a href="index.php?action=StoryList&mode=all<{if $catId>0}>&cat_id=<{$catId}><{/if}>"><{$smarty.const._MD_BIZNEWS_MESSAGE_SHOW_ALL_NEWS}></a></li> + <li><a href="<{xoops_cooluri dirname=$dirname query=$query}>"><{$smarty.const._MD_BIZNEWS_MESSAGE_SHOW_ALL_NEWS}></a></li> </ul> <{if $isEditor==true}> <ul> - <li><a href="index.php?action=StoryCatrepl"><{$smarty.const._MD_BIZNEWS_LANG_CAT_REPLACE}></a></li> + <li><a href="<{xoops_cooluri dirname=$dirname action=catrepl}>"><{$smarty.const._MD_BIZNEWS_LANG_CAT_REPLACE}></a></li> </ul> - <div class="msgWarning"> - <h3><{$smarty.const._MD_BIZNEWS_LANG_STATUS_0}><{$smarty.const._LIST}></h3> - <ul> - <{foreach item=waiting from=$waitingObjects}> - <li><a href="index.php?action=StoryApprove&story_id=<{$waiting->getShow('story_id')}>"><{$waiting->getShow('story_title')}></a></li> - <{foreachelse}> - <{$smarty.const._MD_BIZNEWS_MESSAGE_NO_WAITING}> - <{/foreach}> - </ul> - </div> <{/if}> <div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div> @@ -31,13 +21,13 @@ <div class="item"> <div class="itemHead"> <h3 class="itemTitle"> - <a href="./index.php?action=StoryView&story_id=<{$obj->getShow('story_id')}>"><{$obj->getShow('story_title')}></a> + <a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id')}>"><{$obj->getShow('story_title')}></a> </h3> </div> <div class="itemInfo"> <span class="itemStat"> <{assign var=catId value=$obj->getShow('cat_id')}> - <a href="./index.php?action=StoryList&cat_id=<{$obj->getShow('cat_id')}>"><{$catTitleList[$catId]}></a> + <a href="<{xoops_cooluri dirname=$dirname query='cat_id='|cat:cat_id=<{$obj->getShow('cat_id')}>"><{$catTitleList[$catId]}></a> </span> <span class="itemPostDate"> <{$obj->get('pub_unixtime')|xoops_formattimestamp:l}> @@ -46,7 +36,7 @@ <div class="itemBody"> <{if $obj->getShow('abstract')}> <p><{$obj->getShow('abstract')}></p> - <a href="./index.php?action=StoryView&story_id=<{$obj->getShow('story_id')}>"><span class="more"><{$smarty.const._MD_BIZNEWS_LANG_MORE}></span></a> + <a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id')}>"><span class="more"><{$smarty.const._MD_BIZNEWS_LANG_MORE}></span></a> <{else}> <p> <{if $useEditor=="fckeditor"}> @@ -59,14 +49,14 @@ </div> <div class="itemFoot"> <span class="itemStats"> - <{if $obj->get('status')!=2}><a href="./index.php?action=StoryApprove&story_id=<{$obj->getShow('story_id')}>"><img src="/images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a><{/if}> + <{if $obj->get('status')!=2}><a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id') action=approve}>"><img src="/images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a><{/if}> <{if $obj->getShow('uid') == $xoops_userid}> - <a href="./index.php?action=StoryEdit&story_id=<{$obj->getShow('story_id')}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> - <a href="./index.php?action=StoryDelete&story_id=<{$obj->getShow('story_id')}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id') action=edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname data_id=$obj->getShow('story_id') action=delete}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> <{/if}> </span> <span class="itemStats"> - by: <a href="./index.php?action=StoryList&uid=<{$obj->getShow('uid')}>"><{$obj->getShow('uid')|xoops_user:"user_name"}></a> + by: <a href="<{xoops_cooluri dirname=$dirname query='uid='|cat:$obj->getShow('uid')}><{$obj->getShow('uid')|xoops_user:"user_name"}></a> </span> </div> </div> Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html 2010-05-30 01:08:52 UTC (rev 517) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/templates/biznews_story_view.html 2010-05-30 07:45:12 UTC (rev 518) @@ -9,24 +9,24 @@ <{foreach item=catPath from=$catPathArr.cat_title name=cat}> <{$catPath}> » <{/foreach}> - <a href="./index.php?action=StoryList&cat_id=<{$object->getShow('cat_id')}>"><{$catTitle}></a> : + <a href="<{xoops_cooluri dirname=$dirname query='cat_id='|cat:$object->getShow('cat_id')}>"><{$catTitle}></a> : <h3 class="itemTitle"> - <a href="./index.php?action=StoryView&story_id=<{$object->getShow('story_id')}>"><{$object->getShow('story_title')}></a> + <a href="<{xoops_cooluri dirname=$dirname data_id=$object->getShow('story_id')}>"><{$object->getShow('story_title')}></a> </h3> </div> <div class="itemInfo"> <{if $object->getShow('uid') == $xoops_userid}> <{if $object->getShow('status')!="2"}> - <a href="./index.php?action=StoryApprove&story_id=<{$object->getShow('story_id')}>"><img src="images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname data_id=$object->getShow('story_id') action=approve}>"><img src="images/approve.gif" alt="<{$smarty.const._MD_BIZNEWS_LANG_APPROVE}>" /></a> <{/if}> - <a href="./index.php?action=StoryEdit&story_id=<{$object->getShow('story_id')}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> - <a href="./index.php?action=StoryDelete&story_id=<{$object->getShow('story_id')}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname data_id=$object->getShow('story_id') action=edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> + <a href="<{xoops_cooluri dirname=$dirname data_id=$object->getShow('story_id') action=delete}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$smarty.const._DELETE}>" /></a> <{/if}> <span class="itemPostDate"> <{$object->get('pub_unixtime')|xoops_formattimestamp:l}> </span> <span class="itemStats"> - by: <a href="./index.php?action=StoryList&uid=<{$object->getShow('uid')}>"><{$object->getShow('uid')|xoops_user:"user_name"}></a> + by: <a href="<{xoops_cooluri dirname=$dirname query='uid=$object->getShow('uid')}>"><{$object->getShow('uid')|xoops_user:"user_name"}></a> </span> </div> <div class="itemBody"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-30 01:08:58
|
Revision: 517 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=517&view=rev Author: kilica Date: 2010-05-30 01:08:52 +0000 (Sun, 30 May 2010) Log Message: ----------- Update for Enum name Modified Paths: -------------- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/blocks/CatBlock.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/blocks/StoryBlock.class.php modules_biznews/trunk/xoops_trust_path/modules/biznews/class/handler/Story.class.php Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php 2010-05-15 01:02:43 UTC (rev 516) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryEditAction.class.php 2010-05-30 01:08:52 UTC (rev 517) @@ -88,10 +88,10 @@ } $this->mObject->set('cat_id', $this->_getCatId()); if($this->mRoot->mContext->mModuleConfig['progress']==false){ - $this->mObject->set('status', Legacy_Status::PUBLISHED); + $this->mObject->set('status', Lenum_Status::PUBLISHED); } else{ - $this->mObject->set('status', Legacy_Status::PROGRESS); + $this->mObject->set('status', Lenum_Status::PROGRESS); } } } Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php 2010-05-15 01:02:43 UTC (rev 516) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/actions/StoryListAction.class.php 2010-05-30 01:08:52 UTC (rev 517) @@ -76,6 +76,27 @@ } /** + * hasPermission + * + * @param void + * + * @return bool + **/ + public function hasPermission() + { + if($this->_useCategory()==false){ + return true; + } + + $authType = new Biznews_AuthType($this->mAsset->mDirname); + if($this->_getCatId() > 0){ + XCube_DelegateUtils::call('Legacy_Category.CheckPermitByUserId', new XCube_Ref($check), $this->_getCatId(), $authType->getAuthType('view'), Legacy_Utils::getUid(), $module); + return ($check==true) ? true : false; + } + return true; + } + + /** * @public */ function getDefaultView() @@ -95,7 +116,7 @@ else{ $mode = $this->getAuthType(Biznews_AuthType::VIEW); - $criteria->add(new Criteria('status', Legacy_Status::PUBLISHED)); + $criteria->add(new Criteria('status', Lenum_Status::PUBLISHED)); $criteria->add(new Criteria('pub_unixtime', time(), '<')); $endCriteria = new CriteriaCompo(); $endCriteria->add(new Criteria('end_unixtime', '0'), 'OR'); Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/blocks/CatBlock.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/blocks/CatBlock.class.php 2010-05-15 01:02:43 UTC (rev 516) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/blocks/CatBlock.class.php 2010-05-30 01:08:52 UTC (rev 517) @@ -139,7 +139,7 @@ foreach(array_keys($this->_mObject) as $key){ $criteria = new CriteriaCompo(); $criteria->add(new Criteria('cat_id', $this->_mObject[$key]->getShow('cat_id'))); - $criteria->add(new Criteria('status', Legacy_Status::PUBLISHED)); + $criteria->add(new Criteria('status', Lenum_Status::PUBLISHED)); //$criteria->add(new Criteria('pub_unixtime', time(), '<')); //$criteria->add(new Criteria('end_unixtime', time(), '>')); $countArr[$this->_mObject[$key]->getShow('cat_id')] = $this->_mHandler->getCount($criteria); Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/blocks/StoryBlock.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/blocks/StoryBlock.class.php 2010-05-15 01:02:43 UTC (rev 516) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/blocks/StoryBlock.class.php 2010-05-30 01:08:52 UTC (rev 517) @@ -135,7 +135,7 @@ $this->_mHandler = Biznews_Utils::getBiznewsHandler('Story', $this->_mBlock->get('dirname')); $criteria = new CriteriaCompo(); //don't show unapproved news - $criteria->add(new Criteria('status', Legacy_Status::PUBLISHED)); + $criteria->add(new Criteria('status', Lenum_Status::PUBLISHED)); //don't show pre-published news $criteria->add(new Criteria('pub_unixtime', time(), '<')); //don't show expired news using subcriteria Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/class/handler/Story.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/class/handler/Story.class.php 2010-05-15 01:02:43 UTC (rev 516) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/class/handler/Story.class.php 2010-05-30 01:08:52 UTC (rev 517) @@ -31,7 +31,7 @@ $this->initVar('cat_id', XOBJ_DTYPE_INT, '', false); $this->initVar('uid', XOBJ_DTYPE_INT, '', false); $this->initVar('counter', XOBJ_DTYPE_INT, '0', false); - $this->initVar('status', XOBJ_DTYPE_INT, Legacy_Status::PROGRESS, false); + $this->initVar('status', XOBJ_DTYPE_INT, Lenum_Status::PROGRESS, false); $this->initVar('approver_uid', XOBJ_DTYPE_INT, '0', false); $this->initVar('approve_unixtime', XOBJ_DTYPE_INT, 0, false); $this->initVar('abstract', XOBJ_DTYPE_TEXT, '', false); @@ -51,7 +51,7 @@ **/ public function isPublished() { - return ($this->get('pub_unixtime')>time() && $this->get('status')===Legacy_Status::PUBLISHED) ? true : false; + return ($this->get('pub_unixtime')>time() && $this->get('status')===Lenum_Status::PUBLISHED) ? true : false; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-15 01:02:49
|
Revision: 516 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=516&view=rev Author: kilica Date: 2010-05-15 01:02:43 +0000 (Sat, 15 May 2010) Log Message: ----------- add delegate functions to preload/AssetPreload.class.php Modified Paths: -------------- modules_biznews/trunk/xoops_trust_path/modules/biznews/preload/AssetPreload.class.php Modified: modules_biznews/trunk/xoops_trust_path/modules/biznews/preload/AssetPreload.class.php =================================================================== --- modules_biznews/trunk/xoops_trust_path/modules/biznews/preload/AssetPreload.class.php 2010-05-11 14:16:42 UTC (rev 515) +++ modules_biznews/trunk/xoops_trust_path/modules/biznews/preload/AssetPreload.class.php 2010-05-15 01:02:43 UTC (rev 516) @@ -53,6 +53,8 @@ $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateBlockProcedure','Biznews_AssetPreloadBase::getBlock'); $file = BIZNEWS_TRUST_PATH.'/class/DelegateFunctions.class.php'; $this->mRoot->mDelegateManager->add('Legacy_Progress.GetManagedModules','Biznews_DelegateFunctions::getManagedModules', $file); + $this->mRoot->mDelegateManager->add('Legacy_Progress.GetSourceUrl','Biznews_DelegateFunctions::getSourceUrl', $file); + $this->mRoot->mDelegateManager->add('Legacy_Progress.UpdateStatus','Biznews_DelegateFunctions::updateStatus', $file); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-11 14:16:49
|
Revision: 515 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=515&view=rev Author: kilica Date: 2010-05-11 14:16:42 +0000 (Tue, 11 May 2010) Log Message: ----------- Modified Paths: -------------- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/preload/AssetPreload.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -309,6 +309,7 @@ { //default Action $this->_addString('{{mainTable}}', ucfirst($this->mObject->mMainTableName), $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->get('title').'/class/Module.class.php'); + $this->_addString('{{mainTable}}', ucfirst($this->mObject->mMainTableName), $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->get('title').'/class/DelegateFunctions.class.php'); if($this->mObject->get('version')>1){ ///XCL2.2 @@ -540,7 +541,7 @@ //mTable for parent table:xcl2.2 only if($table->mParent){ - $mRelatedTable .= sprintf(' public $m%s = null;'."\n".' protected $_m%sLoadedFlag = false;'."\n", ucfirst($table->getShow('title')), ucfirst($table->getShow('title'))); + $mRelatedTable .= sprintf(' public $m%s = null;'."\n".' protected $_m%sLoadedFlag = false;'."\n", ucfirst($table->mParent->getShow('title')), ucfirst($table->mParent->getShow('title'))); $loadTable .= $table->mParent->getParentObjectString(); } @@ -612,7 +613,7 @@ $delete .= $field->getTemplateString('delete'); $edit .= $field->getTemplateString('edit'); $listTitle .= $field->getTemplateString('listTitle'); - $listValue .= $field->getTemplateString('listValue'); + $listValue .= $field->getTemplateString('list'); $view .= $field->getTemplateString('view'); } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-05-11 14:16:42 UTC (rev 515) @@ -61,11 +61,11 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf(' - <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> + <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{xoops_input type=text name=%s value=$actionForm->get(\'%s\') size=20 maxlength=%d%s}></dd>'."\n", - $NAME, $name, $name, $length, $class); + $class, $NAME, $name, $name, $length, $class); break; case 'view': case 'delete': @@ -77,7 +77,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -148,18 +148,17 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; if($this->mPrimary==true){ return sprintf(' - <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> - <dd><{xoops_input type=hidden name=%s value=$actionForm->get(\'%s\')}></dd>'."\n", + <{xoops_input type=hidden name=%s value=$actionForm->get(\'%s\')}>'."\n", $NAME, $name, $name, $class); } else{ return sprintf(' - <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> + <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{xoops_input type=text name=%s value=$actionForm->get(\'%s\') size=10}></dd>'."\n", - $NAME, $name, $name, $class); + $class, $NAME, $name, $name, $class); } break; case 'view': @@ -174,7 +173,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -202,25 +201,25 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf( -' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> +' <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><select name="%s"> <{legacy_category_select tree=$%sTree selectedValue=$actionForm->get(\'%s\')}> </select></dd>'."\n", - $NAME, $name, ucfirst($name), $name); + $class, $NAME, $name, ucfirst($name), $name); break; case 'view': case 'delete': return sprintf( ' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> - <dd><{$catTitle%s}></dd>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + <dd><{$%sTitle}></dd>'."\n", + strtoupper($name), ucfirst($name), $this->getShowModifier()); break; case 'list': return sprintf( -' <td><{assign var=catId value=$obj->getShow(\'%s\')}><{$catTitleList.$catId%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); +' <td><{assign var=catId value=$obj->getShow(\'%s\')}><{$%sTitleList.$catId}></td>'."\n", + $name, ucfirst($name)); break; } } @@ -285,7 +284,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -339,7 +338,7 @@ case 'list': return sprintf( ' <td><{$obj->getShowStatus()%s}></td>'."\n", - strtoupper($name), $this->getShowModifier()); + $this->getShowModifier()); break; } } @@ -393,7 +392,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -447,10 +446,15 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } + + public function getShowModifier() + { + return '|xoops_formattimestamp:s'; + } } /** @@ -500,11 +504,11 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf( -' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> +' <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{xoops_textarea type=text name=%s value=$actionForm->get(\'%s\')%s}></dd>'."\n", - $NAME, $name, $name, $class); + $class, $NAME, $name, $name, $class); break; case 'view': case 'delete': @@ -514,9 +518,10 @@ strtoupper($name), $name, $this->getShowModifier()); break; case 'list': - return sprintf( + return null; + /*sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + strtoupper($name), $name, $this->getShowModifier());*/ break; } } @@ -574,11 +579,11 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf( -' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> +' <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{xoops_input type=text name=%s value=$actionForm->get(\'%s\') size=10%s}></dd>'."\n", - $NAME, $name, $name, $class); + $class, $NAME, $name, $name, $class); break; case 'view': case 'delete': @@ -590,7 +595,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } @@ -628,7 +633,7 @@ public function getFormUpdateString() { return -' $obj->set(\'%s_lat\', $this->get(\'%s_lat\'));'."\n"; +' $obj->set(\'%s_lat\', $this->get(\'%s_lat\'));'."\n". ' $obj->set(\'%s_lng\', $this->get(\'%s_lng\'));'."\n"; } @@ -637,14 +642,14 @@ switch($action){ case 'edit': $NAME = strtoupper($name); - $class = ($required) ? ' class=required' : ''; + $class = ($required==1) ? ' class="required"' : ''; return sprintf( -' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> +' <dt%s><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.jp/maps?q=google+map&ll=<{$actionForm->get(\'%s_lat\')}>,<{$actionForm->get(\'%s_lng\')}>"></iframe> <{xoops_input type=text name=%s_lat value=$actionForm->get(\'%s_lat\') size=10%s}> <{xoops_input type=text name=%s_lng value=$actionForm->get(\'%s_lng\') size=10%s}> </dd>'."\n", - $NAME, $name, $name, $name, $name, $class, $name, $name, $class); + $class, $NAME, $name, $name, $name, $name, $class, $name, $name, $class); break; case 'view': case 'delete': @@ -722,7 +727,7 @@ case 'list': return sprintf( ' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + $name, $this->getShowModifier()); break; } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -144,7 +144,7 @@ { $this->mString['template'] = array( 'listTitle' => ' <th> - <{$smarty.const._MD_{MODULENAME}_LANG_%s}><br /> + <{$smarty.const._MD_{MODULENAME}_LANG_%s}> <a href="<{$pageNavi->renderUrlForSort()}>&<{$pageNavi->getPrefix()}>sort=<{$smarty.const.{MODULENAME}_%s_SORT_KEY_%s}>"><img src="images/up.gif" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a> <a href="<{$pageNavi->renderUrlForSort()}>&<{$pageNavi->getPrefix()}>sort=-<{$smarty.const.{MODULENAME}_%s_SORT_KEY_%s}>"><img src="images/down.gif" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a> </th>'."\n" @@ -192,7 +192,13 @@ switch($type){ //prepare function case 'formProperties': - return sprintf($this->mType->getFormPropertyClass(), $this->getShow('name'), $this->getShow('name')); + if($this->get('field_type')==Tubsonp_FieldType::LATLNG){ + return sprintf($this->mType->getFormPropertyClass(), $this->getShow('name').'_lat', $this->getShow('name').'_lat')."\n" + .sprintf($this->mType->getFormPropertyClass(), $this->getShow('name').'_lng', $this->getShow('name').'_lng'); + } + else{ + return sprintf($this->mType->getFormPropertyClass(), $this->getShow('name'), $this->getShow('name')); + } break; case 'fieldProperties': @@ -253,7 +259,10 @@ { switch($type){ case 'listTitle': - return sprintf($this->mString['template']['listTitle'], strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name'))); + $ret = $this->mType->getTemplate('list', $this->getShow('name')); + if(isset($ret)){ + return sprintf($this->mString['template']['listTitle'], strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name')), strtoupper($this->getShow('name'))); + } break; case 'delete': case 'view': Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/DelegateFunctions.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -8,7 +8,7 @@ class {Modulename}_CoolUriDelegate { /** - * getCoolUri + * getNormalUri * * @param string $uri * @param string $dirname @@ -19,28 +19,53 @@ * * @return void */ - public function getCoolUri(/*** string ***/ &$uri, /*** string ***/ $dirname, /*** string ***/ $dataname, /*** int ***/ $data_id, /*** string ***/ $action=null, /*** string ***/ $query=null) + public function getNormalUri(/*** string ***/ &$uri, /*** string ***/ $dirname, /*** string ***/ $dataname=null, /*** int ***/ $data_id=0, /*** string ***/ $action=null, /*** string ***/ $query=null) { - $keyName = Legacy_Utils::getModuleHandler($dataname, $dirname)->mPrimary; - $root = XCube_Root::getSingleton(); - if($root->mContext->getAttribute('useCoolUri')==true){ - $uriString = $root->mContext->getAttribute('coolUri'); - if(isset($query)){ - $uri = sprintf($uriString, $this->mDirname, $query); + $sUri = '/%s/index.php?action=%s%s'; + $lUri = '/%s/index.php?action=%s%s&%s=%d'; + $table = isset($dataname) ? $dataname : '{{mainTable}}'; + + $key = $table.'_id'; + + if(isset($dataname)){ + if($data_id>0){ + if(isset($action)){ + $uri = sprintf($lUri, $dirname, ucfirst($dataname), ucfirst($action), $key, $data_id); + } + else{ + $uri = sprintf($lUri, $dirname, ucfirst($dataname), 'View', $key, $data_id); + } } else{ - $uri = (isset($action)) ? - sprintf($uriString, $dirname, $data_id). '/'.$action : - sprintf($uriString, $dirname, $data_id); + if(isset($action)){ + $uri = sprintf($sUri, $dirname, ucfirst($dataname), ucfirst($action)); + } + else{ + $uri = sprintf($sUri, $dirname, ucfirst($dataname), 'List'); + } } + $uri = isset($query) ? $uri.'&'.$query : $uri; } else{ - $action = (isset($action)) ? $action : 'View'; - if(isset($query)){ - $uri = sprintf('%s/%s/%s', XOOPS_MODULE_URL, $dirname, $query); + if($data_id>0){ + if(isset($action)){ + die(); + } + else{ + $handler = Legacy_Utils::getModuleHandler($table, $dirname); + $key = $handler->mPrimary; + $uri = sprintf($lUri, $dirname, ucfirst($table).'View', ucfirst($action), $key, $data_id); + } + $uri = isset($query) ? $uri.'&'.$query : $uri; } else{ - $uri = sprintf('%s/%s/index.php?action=%s%s&%s=%d', XOOPS_MODULE_URL, $dirname, ucfirst($dataname), ucfirst($action), $keyName, $data_id); + if(isset($action)){ + die(); + } + else{ + $uri = sprintf('/%s/', $dirname); + $uri = isset($query) ? $uri.'index.php?'.$query : $uri; + } } } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/preload/AssetPreload.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/preload/AssetPreload.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/preload/AssetPreload.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -7,12 +7,12 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } if(!defined('{MODULENAME}_TRUST_PATH')) { - define('{MODULENAME}_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/{modulename}'); + define('{MODULENAME}_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/{modulename}'); } require_once {MODULENAME}_TRUST_PATH . '/class/{Modulename}Utils.class.php'; @@ -22,101 +22,103 @@ **/ class {Modulename}_AssetPreloadBase extends XCube_ActionFilter { - /** - * prepare - * - * @param string $dirname - * - * @return void - **/ - public static function prepare(/*** string ***/ $dirname) - { - static $setupCompleted = false; - if(!$setupCompleted) - { - $setupCompleted = self::_setup(); - } - } + /** + * prepare + * + * @param string $dirname + * + * @return void + **/ + public static function prepare(/*** string ***/ $dirname) + { + static $setupCompleted = false; + if(!$setupCompleted) + { + $setupCompleted = self::_setup(); + } + } - /** - * _setup - * - * @param void - * - * @return bool - **/ - public static function _setup() - { - $root =& XCube_Root::getSingleton(); - $instance = new self($root->mController); - $root->mController->addActionFilter($instance); - return true; - } + /** + * _setup + * + * @param void + * + * @return bool + **/ + public static function _setup() + { + $root =& XCube_Root::getSingleton(); + $instance = new self($root->mController); + $root->mController->addActionFilter($instance); + return true; + } - /** - * preBlockFilter - * - * @param void - * - * @return void - **/ - public function preBlockFilter() - { - $this->mRoot->mDelegateManager->add('Module.{modulename}.Global.Event.GetAssetManager','{Modulename}_AssetPreloadBase::getManager'); - $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateModule','{Modulename}_AssetPreloadBase::getModule'); - $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateBlockProcedure','{Modulename}_AssetPreloadBase::getBlock'); - } + /** + * preBlockFilter + * + * @param void + * + * @return void + **/ + public function preBlockFilter() + { + $file = {MODULENAME}_TRUST_PATH . '/class/DelegateFunctions.class.php'; + $this->mRoot->mDelegateManager->add('Module.{modulename}.Global.Event.GetAssetManager','{Modulename}_AssetPreloadBase::getManager'); + $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateModule','{Modulename}_AssetPreloadBase::getModule'); + $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateBlockProcedure','{Modulename}_AssetPreloadBase::getBlock'); + $this->mRoot->mDelegateManager->add('Module.{modulename}.Global.Event.GetNormalUri','{Modulename}_CoolUriDelegate::getNormalUri', $file); + } - /** - * getManager - * - * @param {Modulename}_AssetManager &$obj - * @param string $dirname - * - * @return void - **/ - public static function getManager(/*** {Modulename}_AssetManager ***/ &$obj,/*** string ***/ $dirname) - { - require_once {MODULENAME}_TRUST_PATH . '/class/AssetManager.class.php'; - $obj = {Modulename}_AssetManager::getInstance($dirname); - } + /** + * getManager + * + * @param {Modulename}_AssetManager &$obj + * @param string $dirname + * + * @return void + **/ + public static function getManager(/*** {Modulename}_AssetManager ***/ &$obj,/*** string ***/ $dirname) + { + require_once {MODULENAME}_TRUST_PATH . '/class/AssetManager.class.php'; + $obj = {Modulename}_AssetManager::getInstance($dirname); + } - /** - * getModule - * - * @param Legacy_AbstractModule &$obj - * @param XoopsModule $module - * - * @return void - **/ - public static function getModule(/*** Legacy_AbstractModule ***/ &$obj,/*** XoopsModule ***/ $module) - { - if($module->getInfo('trust_dirname') == '{modulename}') - { - require_once {MODULENAME}_TRUST_PATH . '/class/Module.class.php'; - $obj = new {Modulename}_Module($module); - } - } + /** + * getModule + * + * @param Legacy_AbstractModule &$obj + * @param XoopsModule $module + * + * @return void + **/ + public static function getModule(/*** Legacy_AbstractModule ***/ &$obj,/*** XoopsModule ***/ $module) + { + if($module->getInfo('trust_dirname') == '{modulename}') + { + require_once {MODULENAME}_TRUST_PATH . '/class/Module.class.php'; + $obj = new {Modulename}_Module($module); + } + } - /** - * getBlock - * - * @param Legacy_AbstractBlockProcedure &$obj - * @param XoopsBlock $block - * - * @return void - **/ - public static function getBlock(/*** Legacy_AbstractBlockProcedure ***/ &$obj,/*** XoopsBlock ***/ $block) - { - $moduleHandler =& {Modulename}_Utils::getXoopsHandler('module'); - $module =& $moduleHandler->get($block->get('mid')); - if(is_object($module) && $module->getInfo('trust_dirname') == '{modulename}') - { - require_once {MODULENAME}_TRUST_PATH . '/blocks/' . $block->get('func_file'); - $className = '{Modulename}_' . substr($block->get('show_func'), 4); - $obj = new $className($block); - } - } + /** + * getBlock + * + * @param Legacy_AbstractBlockProcedure &$obj + * @param XoopsBlock $block + * + * @return void + **/ + public static function getBlock(/*** Legacy_AbstractBlockProcedure ***/ &$obj,/*** XoopsBlock ***/ $block) + { + $moduleHandler =& {Modulename}_Utils::getXoopsHandler('module'); + $module =& $moduleHandler->get($block->get('mid')); + if(is_object($module) && $module->getInfo('trust_dirname') == '{modulename}') + { + require_once {MODULENAME}_TRUST_PATH . '/blocks/' . $block->get('func_file'); + $className = '{Modulename}_' . substr($block->get('show_func'), 4); + $obj = new $className($block); + } + } } ?> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php 2010-05-11 14:16:42 UTC (rev 515) @@ -82,7 +82,8 @@ $render->setTemplateName($this->mAsset->mDirname . '_{tablename}_list.html'); #cubson::lazy_load_array('{tablename}', $this->mObjects); $render->setAttribute('objects', $this->mObjects); - $render->setAttribute('dirname', $this->_getHandler()->getDirname()); + $render->setAttribute('dirname', $this->mAsset->mDirname); + $render->setAttribute('dataname', '{tablename}'); $render->setAttribute('pageNavi', $this->mFilter->mNavi); {{render}} } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html 2010-05-02 12:06:04 UTC (rev 514) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html 2010-05-11 14:16:42 UTC (rev 515) @@ -1,7 +1,7 @@ <div id="{modulename}"> <h1><{$smarty.const._LIST}></h1> <ul class="toptab"> - <li><a href="<{xoops_coolurl dirname=$dirname dataname=$dataname action=edit}>"><{$smarty.const._MD_{MODULENAME}_LANG_ADD_A_NEW_{TABLENAME}}></a></li> + <li><a href="<{xoops_cooluri dirname=$dirname dataname=$dataname action=edit}>"><{$smarty.const._MD_{MODULENAME}_LANG_ADD_A_NEW_{TABLENAME}}></a></li> </ul> <{if count($objects) > 0}> @@ -18,9 +18,9 @@ <tr class="<{cycle values='odd,even'}>"> {{list_value}} <td> - <a href="<{xoops_coolurl dirname=$dirname dataname=$dataname id=$obj->getShow('{primary_key_id}') action=view}>"><{$smarty.const._VIEW}></a> - <a href="<{xoops_coolurl dirname=$dirname dataname=$dataname id=$obj->getShow('{primary_key_id}') action=edit}>"><{$smarty.const._EDIT}></a> - <a href="<{xoops_coolurl dirname=$dirname dataname=$dataname id=$obj->getShow('{primary_key_id}') action=delete}>"><{$smarty.const._DELETE}></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=$dataname data_id=$obj->getShow('{primary_key_id}') action=view}>"><{$smarty.const._VIEW}></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=$dataname data_id=$obj->getShow('{primary_key_id}') action=edit}>"><{$smarty.const._EDIT}></a> + <a href="<{xoops_cooluri dirname=$dirname dataname=$dataname data_id=$obj->getShow('{primary_key_id}') action=delete}>"><{$smarty.const._DELETE}></a> </td> </tr> <{/foreach}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-02 12:06:11
|
Revision: 514 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=514&view=rev Author: kilica Date: 2010-05-02 12:06:04 +0000 (Sun, 02 May 2010) Log Message: ----------- fix bugs about category Modified Paths: -------------- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/StatusString.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/CategoryManager.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/DeleteAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/EditAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ViewAction.class.php Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -133,7 +133,7 @@ if(! in_array($catName, $this->_mSimpleCategory)){ $this->_mSimpleCategory[] = $catName; } - $this->mObject->mTable->mSimpleCategory[] = $catName; + $this->mObject->mTable[$key]->mSimpleCategory[] = $catName; break; } } @@ -393,7 +393,7 @@ $this->_copyTableFile(ucfirst($act), $inFile, $outFile); $category = $table->mCategoryString->getString('action', $act); foreach(array_keys($category) as $keyC){ - $this->_addString('{{'.$keyC.'}}', $category[$keyC], sprintf($outFile, ucfirst($act))); + $this->_addString('{{'.$keyC.'}}', $category[$keyC], sprintf($outFile, ucfirst($act)));echo $act.':'.$keyC.':'.$category[$keyC].'|'; } $this->_replaceTableString($tablename, ucfirst($act), $outFile); } @@ -726,6 +726,7 @@ $file = str_replace('{MODULENAME}', strtoupper($modulename), $file); $file = str_replace('{{Delegate}}', '', $file); $file = str_replace('{{template}}', '', $file); + $file = str_replace('{{prepare}}', '', $file); $file = str_replace('{{table}}', '', $file); $file = str_replace('{{language}}', '', $file); $file = str_replace('{{config}}', '', $file); Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -40,7 +40,7 @@ if(isset($key3)){ return $this->mList[$key1][$key2][$key3]; } - elseif(isset($key2)){ + elseif(isset($key2)){//var_dump($this->mList['action']['edit']);echo 'aaaa:'.$key1.'|'.$key2; return $this->mList[$key1][$key2]; } else{ Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -77,7 +77,11 @@ $this->mList['action']['delete']['_getCatId'] = ''; $this->mList['action']['list']['_getCatId'] = ''; $this->mList['action']['view']['_getCatId'] = ''; - + $this->mList['action']['edit']['prepare'] = ''; + $this->mList['action']['delete']['prepare'] = ''; + $this->mList['action']['list']['prepare'] = ''; + $this->mList['action']['view']['prepare'] = ''; + $this->mList['action']['edit']['hasPermission'] = ' /** * hasPermission @@ -132,11 +136,8 @@ { if($this->mUse ===true){ $this->_setupModuleCategory(); + $this->_setupTableCategory(); } - else{ - var_dump($this->_mSimpleCat); - echo 'invalid category setting';die(); - } } /**----------------------------- @@ -168,12 +169,9 @@ --------------------------------**/ protected function _setupModuleCategory() { -/*-------------------------------------------------------- -Module Base ----------------------------------------------------------*/ $this->mList['xoops_version']['config'] = ' array( - \'name\' => \'cat_set_id\' , + \'name\' => \'cat_id\' , \'title\' => "_MI_{MODULENAME}_LANG_CAT_SET_ID" , \'description\' => "_MI_{MODULENAME}_DESC_CAT_SET_ID" , \'formtype\' => \'textbox\' , @@ -219,10 +217,6 @@ --------------------------------**/ protected function _setupTableCategory() { -/*-------------------------------------------------------- -Table Base ----------------------------------------------------------*/ - $this->mList['action']['edit']['_getCatId'] = ' /** * _getCatId @@ -294,12 +288,12 @@ if($catId>0){ //is Manager ? - $check = $this->mCategoryManager->check($catId, {Modulename}_CategoryManager::MANAGE); + $check = $this->mCategoryManager[\'cat_id\']->check($catId, {Modulename}_CategoryManager::MANAGE); if($check==true){ return true; } //is new post and has post permission ? - $check = $this->mCategoryManager->check($catId, {Modulename}_CategoryManager::POST); + $check = $this->mCategoryManager[\'cat_id\']->check($catId, {Modulename}_CategoryManager::POST); if($check==true && $this->mObject->isNew()){ return true; } @@ -310,7 +304,7 @@ } else{ $idList = array(); - $idList = $this->mCategoryManager->getPermittedIdList({Modulename}_CategoryManager::POST, $this->_getCatId()); + $idList = $this->mCategoryManager[\'cat_id\']->getPermittedIdList({Modulename}_CategoryManager::POST, $this->_getCatId()); if(count($idList)>0){ return true; } @@ -332,7 +326,7 @@ **/ public function hasPermission() { - return $this->mCategoryManager->check($this->_getCatId(), {Modulename}_CategoryManager::VIEW); + return $this->mCategoryManager[\'cat_id\']->check($this->_getCatId(), {Modulename}_CategoryManager::VIEW); } '; @@ -347,7 +341,7 @@ public function hasPermission() { if($this->_getCatId() > 0){ - return $this->mCategoryManager->check($this->_getCatId(), {Modulename}_CategoryManager::VIEW); + return $this->mCategoryManager[\'cat_id\']->check($this->_getCatId(), {Modulename}_CategoryManager::VIEW); } return true; } @@ -374,7 +368,7 @@ $catCriteria = new CriteriaCompo(); //get permitted categories to show - $idList = $this->mCategoryManager->getPermittedIdList({Modulename}_CategoryManager::VIEW, $this->_getCatId()); + $idList = $this->mCategoryManager[\'cat_id\']->getPermittedIdList({Modulename}_CategoryManager::VIEW, $this->_getCatId()); if(count($idList)==0) $idList = array(0); $catCriteria->add(new Criteria(\'cat_id\', $idList, \'IN\')); $criteria->add($catCriteria); @@ -387,13 +381,23 @@ $this->mList['action']['edit']['prepare_isNew'] = ' $this->mObject->set(\'cat_id\', $this->_getCatId());'; -$this->mList['action']['edit']['render'] = ' $render->setAttribute(\'catTree\',$this->mCategoryManager->getTree({Modulename}_CategoryManager::POST));'."\n"; +$this->mList['action']['edit']['prepare'] .= sprintf(' $this->mCategoryManager[\'%s\'] = new {Modulename}_CategoryManager($this->mAsset->mDirname, \'%s\');'."\n{{prepare}}", $catName, $catName); -$this->mList['action']['view']['render'] = ' $render->setAttribute(\'catTitle\', $this->mCategoryManager->getTitle($this->_getCatId()));'."\n"; +$this->mList['action']['view']['prepare'] .= sprintf(' $this->mCategoryManager[\'%s\'] = new {Modulename}_CategoryManager($this->mAsset->mDirname, \'%s\');'."\n{{prepare}}", $catName, $catName); -$this->mList['action']['delete']['render'] = ' $render->setAttribute(\'catTitle\', $this->mCategoryManager->getTitle($this->_getCatId()));'."\n"; -$this->mList['action']['list']['render'] = ' $render->setAttribute(\'catTitleList\', $this->mCategoryManager->getTitleList());'."\n"; +$this->mList['action']['delete']['prepare'] .= sprintf(' $this->mCategoryManager[\'%s\'] = new {Modulename}_CategoryManager($this->mAsset->mDirname, \'%s\');'."\n{{prepare}}", $catName, $catName); +$this->mList['action']['list']['prepare'] .= sprintf(' $this->mCategoryManager[\'%s\'] = new {Modulename}_CategoryManager($this->mAsset->mDirname, \'%s\');'."\n{{prepare}}", $catName, $catName); + + +$this->mList['action']['edit']['render'] = sprintf(' $render->setAttribute(\'%sTree\',$this->mCategoryManager[\'cat_id\']->getTree({Modulename}_CategoryManager::POST));'."\n", 'cat_id'); + +$this->mList['action']['view']['render'] = sprintf(' $render->setAttribute(\'%sTitle\', $this->mCategoryManager[\'cat_id\']->getTitle($this->_getCatId()));'."\n", 'cat_id'); + +$this->mList['action']['delete']['render'] = sprintf(' $render->setAttribute(\'%sTitle\', $this->mCategoryManager[\'cat_id\']->getTitle($this->_getCatId()));'."\n", 'cat_id'); + +$this->mList['action']['list']['render'] = sprintf(' $render->setAttribute(\'%sTitleList\', $this->mCategoryManager[\'cat_id\']->getTitleList());'."\n", 'cat_id'); + $this->mList['template']['edit'] = ' <select name="cat_id"> <{legacy_category_select tree=$catTree selectedValue=$actionForm->get(\'cat_id\')}> </select> @@ -412,7 +416,7 @@ --------------------------------**/ protected function _setupModuleSimpleCategory() { - $this->mList['AbstractAction']['require_once'] = 'require_once {MODULENAME}_TRUST_PATH . \'/class/CategoryManager.class.php\';'; +$this->mList['AbstractAction']['require_once'] = 'require_once {MODULENAME}_TRUST_PATH . \'/class/CategoryManager.class.php\';'; } @@ -426,20 +430,18 @@ protected function _setupTableSimpleCategory($catName) { $CATNAME = strtoupper($catName); -/*-------------------------------------------------------- -Module Base ----------------------------------------------------------*/ -$this->mList['xoops_version']['config'] .= ' + +$this->mList['xoops_version']['config'] .= sprintf(' array( - \'name\' => \'cat_set_id\' , - \'title\' => "_MI_{MODULENAME}_LANG_CAT_SET_ID" , - \'description\' => "_MI_{MODULENAME}_DESC_CAT_SET_ID" , + \'name\' => \'%s\' , + \'title\' => "_MI_{MODULENAME}_LANG_%s" , + \'description\' => "_MI_{MODULENAME}_DESC_%s" , \'formtype\' => \'textbox\' , \'valuetype\' => \'int\' , \'default\' => 0, \'options\' => array() ) , -'; +', $catName, $CATNAME, $CATNAME); $this->mList['language']['modinfo']['key'][] = sprintf('_MI_{MODULENAME}_LANG_SET_%s', $CATNAME); $this->mList['language']['modinfo']['key'][] = sprintf('_MI_{MODULENAME}_DESC_SET_%s', $CATNAME); @@ -447,18 +449,23 @@ $this->mList['language']['modinfo']['value'][] = sprintf('category set %s', $catName); $this->mList['language']['modinfo']['value'][] = sprintf('category set id for %s', $catName); -/*-------------------------------------------------------- -Table Base ----------------------------------------------------------*/ +$this->mList['action']['edit']['prepare'] .= sprintf(' $this->mCategoryManager[\'%s\'] = new {Modulename}_CategoryManager($this->mAsset->mDirname, \'%s\');'."\n{{prepare}}", $catName, $catName); -$this->mList['action']['edit']['render'] .= ' $render->setAttribute(\'catTree\',$this->mCategoryManager->getTree({Modulename}_CategoryManager::VIEW));'."\n"; +$this->mList['action']['view']['prepare'] .= sprintf(' $this->mCategoryManager[\'%s\'] = new {Modulename}_CategoryManager($this->mAsset->mDirname, \'%s\');'."\n{{prepare}}", $catName, $catName); -$this->mList['action']['view']['render'] .= sprintf(' $render->setAttribute(\'catTitle\', $this->mCategoryManager->getTitle($this->mObject->get(\'%s\')));'."\n", $catName); +$this->mList['action']['delete']['prepare'] .= sprintf(' $this->mCategoryManager[\'%s\'] = new {Modulename}_CategoryManager($this->mAsset->mDirname, \'%s\');'."\n{{prepare}}", $catName, $catName); -$this->mList['action']['delete']['render'] = sprintf(' $render->setAttribute(\'catTitle\', $this->mCategoryManager->getTitle($this->mObject->get(\'%s\')));'."\n", $catName); +$this->mList['action']['list']['prepare'] .= sprintf(' $this->mCategoryManager[\'%s\'] = new {Modulename}_CategoryManager($this->mAsset->mDirname, \'%s\');'."\n{{prepare}}", $catName, $catName); -$this->mList['action']['list']['render'] = ' $render->setAttribute(\'catTitleList\', $this->mCategoryManager->getTitleList());'."\n"; +$this->mList['action']['edit']['render'] .= sprintf(' $render->setAttribute(\'%sTree\',$this->mCategoryManager[\'%s\']->getTree({Modulename}_CategoryManager::VIEW));'."\n", ucfirst($catName), $catName); + +$this->mList['action']['view']['render'] .= sprintf(' $render->setAttribute(\'%sTitle\', $this->mCategoryManager[\'%s\']->getTitle($this->mObject->get(\'%s\')));'."\n", ucfirst($catName), $catName, $catName); + +$this->mList['action']['delete']['render'] .= sprintf(' $render->setAttribute(\'%sTitle\', $this->mCategoryManager[\'%s\']->getTitle($this->mObject->get(\'%s\')));'."\n", ucfirst($catName), $catName, $catName); + +$this->mList['action']['list']['render'] .= sprintf(' $render->setAttribute(\'%sTitleList\', $this->mCategoryManager[\'%s\']->getTitleList());'."\n", ucfirst($catName), $catName); + $this->mList['template']['edit'] = sprintf(' <select name="%s"> <{legacy_category_select tree=$catTree selectedValue=$actionForm->get(\'%s\')}> </select> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/StatusString.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/StatusString.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/StatusString.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -84,11 +84,11 @@ * @param string $dataname * @param int $id * @param string $id - * @param Legacy_Status $status + * @param Lenum_Status $status * * @return void */ - public function updateStatus(/*** string ***/ &$result, /*** string ***/ $dirname, /*** string ***/ $dataname, /*** int ***/ $id, /*** Legacy_Status ***/ $status) + public function updateStatus(/*** string ***/ &$result, /*** string ***/ $dirname, /*** string ***/ $dataname, /*** int ***/ $id, /*** Lenum_Status ***/ $status) { $dirnames = Legacy_Utils::getDirnameListByTrustDirname(\'{modulename}\'); foreach($dirnames as $xcckDirname){ Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-05-02 12:06:04 UTC (rev 514) @@ -205,10 +205,10 @@ $class = ($required) ? ' class=required' : ''; return sprintf( ' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> - <dd><select name="cat_id"> - <{legacy_category_select tree=$catTree selectedValue=$actionForm->get(\'cat_id\')}> + <dd><select name="%s"> + <{legacy_category_select tree=$%sTree selectedValue=$actionForm->get(\'%s\')}> </select></dd>'."\n", - $NAME); + $NAME, $name, ucfirst($name), $name); break; case 'view': case 'delete': Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -280,6 +280,7 @@ **/ public function getChildrenObjectString() { + $this->loadParent(); $tablename = $this->getShow('title'); $Tablename = ucfirst($tablename); @@ -295,11 +296,11 @@ { if ($this->_m%sLoadedFlag == false) { $handler = Legacy_Utils::getModuleHandler(\'%s\', $this->getDirname()); - $this->m%s =& $handler->getObjects(new Criteria(\'%s\', $this->get(%s))); + $this->m%s =& $handler->getObjects(new Criteria(\'%s\', $this->get(\'%s\'))); $this->_m%sLoadedFlag = true; } } -', $Tablename, $Tablename, $Tablename, $tablename, $Tablename, $this->getPrimaryKey(), $this->getPrimaryKey(), $Tablename); +', $Tablename, $Tablename, $Tablename, $tablename, $Tablename, $this->mParent->getPrimaryKey(), $this->mParent->getPrimaryKey(), $Tablename); return $string; } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/CategoryManager.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/CategoryManager.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/CategoryManager.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -30,7 +30,7 @@ * * @return void **/ - public function __construct($dirname, $catSetName='cat_set_id') + public function __construct($dirname, $catSetName='cat_id') { $this->_mDirname = $dirname; $this->_mSetId = XCube_Root::getSingleton()->mContext->mModuleConfig[$catSetName]; @@ -74,7 +74,8 @@ **/ public function getAuthType(/*** string ***/ $type) { - $authType = explode('|', XCube_Root::getSingleton()->mContext->mModuleConfig['auth_type']); + @$authSetting = XCube_Root::getSingleton()->mContext->mModuleConfig['auth_type']; + $type = isset($authSetting) ? explode('|', $authSetting) : array('viewer', 'editor', 'manager'); switch($type){ case self::VIEW: return $authType[0]; Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractAction.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/modulebase/xoops_trust_path/modules/modulename/class/AbstractAction.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -230,6 +230,24 @@ public function executeViewCancel(/*** XCube_RenderTarget ***/ &$render) { } + + /** + * _getNextUri + * + * @param void + * + * @return string + **/ + protected function _getNextUri($tableName, $actionName=null) + { + $handler = $this->_getHandler(); + if($this->mObject->get($handler->mPrimary)>0){ + return Legacy_Utils::renderUri($this->mAsset->mDirname, $tableName, $this->mObject->get($handler->mPrimary), $actionName); + } + else{ + return Legacy_Utils::renderUri($this->mAsset->mDirname, $tableName, 0, $actionName); + } + } } ?> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/DeleteAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/DeleteAction.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/DeleteAction.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -56,6 +56,20 @@ } {{hasPermission}} /** + * prepare + * + * @param void + * + * @return bool + **/ + public function prepare() + { + parent::prepare(); +{{prepare}} + return true; + } + + /** * executeViewInput * * @param XCube_RenderTarget &$render @@ -78,7 +92,7 @@ **/ public function executeViewSuccess(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeForward('./index.php?action={Tablename}List'); + $this->mRoot->mController->executeForward($this->_getNextUri('{tablename}', 'list')); {{render}} } /** @@ -90,7 +104,7 @@ **/ public function executeViewError(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeRedirect('./index.php?action={Tablename}List', 1, _MD_{MODULENAME}_ERROR_DBUPDATE_FAILED); + $this->mRoot->mController->executeRedirect($this->_getNextUri('{tablename}'), 1, _MD_{MODULENAME}_ERROR_DBUPDATE_FAILED); } /** @@ -102,7 +116,7 @@ **/ public function executeViewCancel(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeForward('./index.php?action={Tablename}List'); + $this->mRoot->mController->executeForward($this->_getNextUri('{tablename}')); } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/EditAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/EditAction.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/EditAction.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -68,7 +68,7 @@ if($this->mObject->isNew()){ {{action::isNew}}{{prepare_isNew}} } - return true; +{{prepare}} return true; } /** @@ -94,7 +94,7 @@ **/ public function executeViewSuccess(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeForward('./index.php?action={Tablename}List'); + $this->mRoot->mController->executeForward($this->_getNextUri('{tablename}')); } /** @@ -106,7 +106,7 @@ **/ public function executeViewError(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeRedirect('./index.php?action={Tablename}List', 1, _MD_{MODULENAME}_ERROR_DBUPDATE_FAILED); + $this->mRoot->mController->executeRedirect($this->_getNextUri('{tablename}'), 1, _MD_{MODULENAME}_ERROR_DBUPDATE_FAILED); } /** @@ -118,7 +118,7 @@ **/ public function executeViewCancel(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeForward('./index.php?action={Tablename}List'); + $this->mRoot->mController->executeForward($this->_getNextUri('{tablename}')); } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ListAction.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -57,6 +57,20 @@ } {{hasPermission}}{{getDefaultView}} /** + * prepare + * + * @param void + * + * @return bool + **/ + public function prepare() + { + parent::prepare(); +{{prepare}} + return true; + } + + /** * executeViewIndex * * @param XCube_RenderTarget &$render @@ -68,6 +82,7 @@ $render->setTemplateName($this->mAsset->mDirname . '_{tablename}_list.html'); #cubson::lazy_load_array('{tablename}', $this->mObjects); $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('dirname', $this->_getHandler()->getDirname()); $render->setAttribute('pageNavi', $this->mFilter->mNavi); {{render}} } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ViewAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ViewAction.class.php 2010-05-01 08:10:35 UTC (rev 513) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/actions/ViewAction.class.php 2010-05-02 12:06:04 UTC (rev 514) @@ -40,6 +40,20 @@ } {{hasPermission}} /** + * prepare + * + * @param void + * + * @return bool + **/ + public function prepare() + { + parent::prepare(); +{{prepare}} + return true; + } + + /** * executeViewSuccess * * @param XCube_RenderTarget &$render @@ -61,7 +75,7 @@ **/ public function executeViewError(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeRedirect('./index.php?action={Tablename}List', 1, _MD_{MODULENAME}_ERROR_CONTENT_IS_NOT_FOUND); + $this->mRoot->mController->executeRedirect($this->_getNextUri('{tablename}', 'list'), 1, _MD_{MODULENAME}_ERROR_CONTENT_IS_NOT_FOUND); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-01 08:10:42
|
Revision: 513 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=513&view=rev Author: kilica Date: 2010-05-01 08:10:35 +0000 (Sat, 01 May 2010) Log Message: ----------- Fix bugs Modified Paths: -------------- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php Removed Paths: ------------- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/modulebase/xoops_trust_path/modules/modulename/preload/language/ Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-05-01 00:56:19 UTC (rev 512) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-05-01 08:10:35 UTC (rev 513) @@ -117,7 +117,6 @@ //reset flags for each table $catFlag = false; - $sCatFlag = false; $statusFlag = false; foreach(array_keys($this->mObject->mTable[$key]->mField) as $keyF){ switch($this->mObject->mTable[$key]->mField[$keyF]->get('field_type')){ @@ -131,15 +130,14 @@ break; case Tubsonp_FieldType::SCATEGORY: $catName = $this->mObject->mTable[$key]->mField[$keyF]->get('name'); - if(! in_array($catName, $this->_mSimpleCategory){ + if(! in_array($catName, $this->_mSimpleCategory)){ $this->_mSimpleCategory[] = $catName; } $this->mObject->mTable->mSimpleCategory[] = $catName; - $sCatFlag = true; break; } } - $this->mObject->mTable[$key]->mCategoryString = new Tubsonp_CategoryString(catFlag, $sCatFlag); + $this->mObject->mTable[$key]->mCategoryString = new Tubsonp_CategoryString($catFlag, $this->mObject->mTable[$key]->mSimpleCategory); $this->mObject->mTable[$key]->mStatusString = new Tubsonp_StatusString($statusFlag); } @@ -322,7 +320,9 @@ /** * _copyTableFile * - * @param string $tablename + * @param string $action + * @param string $inFile + * @param string $outFile * * @return void **/ @@ -338,6 +338,8 @@ * _replaceTableString * * @param string $tablename + * @param string $action + * @param string $outFile * * @return void **/ @@ -355,7 +357,7 @@ /** * _copyTableBase * - * @param void + * @param Tubsonp_TableObject $table * * @return void **/ @@ -377,7 +379,7 @@ /** * _copyAction * - * @param string $Tablename + * @param Tubsonp_TableObject $table * * @return void **/ @@ -389,7 +391,7 @@ foreach(array('delete', 'edit', 'list', 'view') as $act){ $this->_copyTableFile(ucfirst($act), $inFile, $outFile); - $category = $table->mCategoryString->getTableString($tablename, 'action', $act); + $category = $table->mCategoryString->getString('action', $act); foreach(array_keys($category) as $keyC){ $this->_addString('{{'.$keyC.'}}', $category[$keyC], sprintf($outFile, ucfirst($act))); } @@ -400,7 +402,7 @@ /** * _copyObject * - * @param string $tablename + * @param Tubsonp_TableObject $table * * @return void **/ @@ -421,11 +423,11 @@ /** * _copyForm * - * @param string $tablename + * @param Tubsonp_TableObject $table * * @return void **/ - protected function _copyForm($tablename) + protected function _copyForm($table) { $tablename = $table->getShow('title'); $inFile = $this->mInPath .'/tablebase/forms/%sForm.class.php'; @@ -440,12 +442,11 @@ /** * _copyTemplate * - * @param Tubsonp_FieldObject $field - * @param string $tablename + * @param Tubsonp_TableObject $table * * @return void **/ - protected function _copyTemplate($tablename) + protected function _copyTemplate($table) { $tablename = $table->getShow('title'); $inFile = $this->mInPath .'/tablebase/templates/%s.html'; @@ -539,7 +540,7 @@ //mTable for parent table:xcl2.2 only if($table->mParent){ - $mRelatedTable .= sprintf(' public $m%s = null;'."\n".' protected $_m%sLoadedFlag = false;'."\n", ucfirst($table->getShow('title')), ucfirst($table->getShow('title'))); + $mRelatedTable .= sprintf(' public $m%s = null;'."\n".' protected $_m%sLoadedFlag = false;'."\n", ucfirst($table->getShow('title')), ucfirst($table->getShow('title'))); $loadTable .= $table->mParent->getParentObjectString(); } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php 2010-05-01 00:56:19 UTC (rev 512) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php 2010-05-01 08:10:35 UTC (rev 513) @@ -47,19 +47,5 @@ return $this->mList[$key1]; } } - - public function getTableString($tablename, $key1, $key2=null, $key3=null) - { - if(isset($key3)){ - return $this->mTableList[$table][$key1][$key2][$key3]; - } - elseif(isset($key2)){ - return $this->mTableList[$table][$key1][$key2]; - } - else{ - return $this->mTableList[$table][$key1]; - } - } - } ?> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php 2010-05-01 00:56:19 UTC (rev 512) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php 2010-05-01 08:10:35 UTC (rev 513) @@ -26,7 +26,7 @@ parent::__construct($use); $this->_mSimpleCat = ($sCats) ? $sCats : array(); if($this->_hasSimpleCat()===true){ - $this->_setupList(); + $this->_setupSimpleCategoryList(); } } @@ -41,27 +41,16 @@ } /**----------------------------- - * _setupModuleArray + * _setupArray * @param void * @return void --------------------------------**/ - protected function _setupModuleArray() + protected function _setupArray() { $this->mList = array( 'xoops_version'=>array(), 'AbstractAction'=>array(), - 'language'=>array() - ); - } - - /**----------------------------- - * _setupTableArray - * @param void - * @return void - --------------------------------**/ - protected function _setupTableArray() - { - $this->mList = array( + 'language'=>array('modinfo'=>array('key'=>array(), 'value'=>array())), 'action'=>array( 'edit'=>array(), 'delete'=>array(), @@ -79,7 +68,10 @@ --------------------------------**/ protected function _setupDefaultList() { - $this->_setupModuleArray(); + $this->_setupArray(); + //$this->_setupTableArray(); + $this->mList['xoops_version']['config'] = null; + $this->mList['AbstractAction']['require_once'] = null; $this->mList['action']['edit']['_getCatId'] = ''; $this->mList['action']['delete']['_getCatId'] = ''; @@ -138,11 +130,23 @@ --------------------------------**/ protected function _setupList() { - $this->_setupModuleArray(); if($this->mUse ===true){ $this->_setupModuleCategory(); } - elseif($this->_hasSimpleCat()===true){ + else{ + var_dump($this->_mSimpleCat); + echo 'invalid category setting';die(); + } + } + + /**----------------------------- + * _setupSimpleCategoryList + * @param void + * @return void + --------------------------------**/ + protected function _setupSimpleCategoryList() + { + if($this->_hasSimpleCat()===true){ $this->_setupDefaultList(); $this->_setupModuleSimpleCategory(); } @@ -152,10 +156,11 @@ } foreach($this->_mSimpleCat as $catName){ - $this->_setupEachSimpleCategory($catName); + $this->_setupTableSimpleCategory($catName); } } + /**----------------------------- * _setupModuleCategory * @param void Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-05-01 00:56:19 UTC (rev 512) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-05-01 08:10:35 UTC (rev 513) @@ -93,8 +93,14 @@ */ class Tubsonp_TypeInt implements Tubsonp_IFieldTypeHandler { + public $mPrimary = false; public $mTypeStr = Tubsonp_FieldType::INT; + public function __construct(/*** bool ***/ $primary= false) + { + $this->mPrimary = $primary; + } + public function getXObjType($name, $length) { return sprintf(' $this->initVar(\'%s\', XOBJ_DTYPE_INT, \'\', false);'."\n", $name); @@ -132,7 +138,9 @@ public function getFormUpdateString() { - return ' $obj->set(\'%s\', $this->get(\'%s\'));'."\n"; + if($this->mPrimary==false){ + return ' $obj->set(\'%s\', $this->get(\'%s\'));'."\n"; + } } public function getTemplate($action, $name, $length=0, $required=0) @@ -141,17 +149,27 @@ case 'edit': $NAME = strtoupper($name); $class = ($required) ? ' class=required' : ''; - return sprintf(' + if($this->mPrimary==true){ + return sprintf(' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> + <dd><{xoops_input type=hidden name=%s value=$actionForm->get(\'%s\')}></dd>'."\n", + $NAME, $name, $name, $class); + } + else{ + return sprintf(' + <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{xoops_input type=text name=%s value=$actionForm->get(\'%s\') size=10}></dd>'."\n", - $NAME, $name, $name, $class); + $NAME, $name, $name, $class); + } break; case 'view': case 'delete': - return sprintf( + if($this->mPrimary==true){ + return sprintf( ' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> <dd><{$object->getShow(\'%s\')%s}></dd>'."\n", - strtoupper($name), $name, $this->getShowModifier()); + strtoupper($name), $name, $this->getShowModifier()); + } break; case 'list': return sprintf( @@ -597,7 +615,7 @@ public function getCreateTableSQL($field) { - return sprintf(' `%s` decimal(4,14) signed NOT NULL,'."\n".' `%s` decimal(4,14) signed NOT NULL', $field->get('name'), $field->get('length')); + return sprintf(' `%s_lat` decimal(18,14) signed NOT NULL,'."\n".' `%s_lng` decimal(18,14) signed NOT NULL', $field->get('name'), $field->get('name')); } public function getFormLoadString() @@ -622,7 +640,7 @@ $class = ($required) ? ' class=required' : ''; return sprintf( ' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> - <dd><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.jp/maps?q=google+map&ll=<{$mactionForm->get(\'%s_lat\')}>,<{$mactionForm->get(\'%s_lng\')}>"></iframe> + <dd><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.jp/maps?q=google+map&ll=<{$actionForm->get(\'%s_lat\')}>,<{$actionForm->get(\'%s_lng\')}>"></iframe> <{xoops_input type=text name=%s_lat value=$actionForm->get(\'%s_lat\') size=10%s}> <{xoops_input type=text name=%s_lng value=$actionForm->get(\'%s_lng\') size=10%s}> </dd>'."\n", Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php 2010-05-01 00:56:19 UTC (rev 512) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Field.class.php 2010-05-01 08:10:35 UTC (rev 513) @@ -61,7 +61,12 @@ $type = Tubsonp_FieldType::getTypeString($this->get('field_type')); if(isset($type)){ $class = 'Tubsonp_Type'.ucfirst($type); - $this->mType = new $class(); + if($type==='int'){ + $this->mType = new $class($this->get('primary_key_id')); + } + else{ + $this->mType = new $class(); + } } } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php 2010-05-01 00:56:19 UTC (rev 512) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php 2010-05-01 08:10:35 UTC (rev 513) @@ -25,8 +25,8 @@ protected $_mChildrenLoadedFlag = false; public $mCategoryString = array(); - public $mStatusString = array(); - public $mSimpleCategory = array(); + public $mStatusString = null; + public $mSimpleCategory = null; /** * __construct This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2010-05-01 00:56:26
|
Revision: 512 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=512&view=rev Author: kilica Date: 2010-05-01 00:56:19 +0000 (Sat, 01 May 2010) Log Message: ----------- fix bugs : category string Modified Paths: -------------- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/Enum.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/StatusString.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Module.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/CategoryManager.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/forms/FieldEditForm.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/forms/TableEditForm.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/language/ja_utf8/main.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/templates/tubsonp_table_edit.html Removed Paths: ------------- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/DelegateFunctions.class.php modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/admin/class/LenoticeAdminRenderSystem.class.php Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/actions/ModuleWizardAction.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -29,6 +29,9 @@ 'main'=>array('key'=>array(), 'value'=>array()), 'modinfo'=>array('key'=>array(), 'value'=>array()) ); + protected $_mSimpleCategory = array(); + protected $_mUseCategory = false; + protected $_mUseStatus = false; /** * _getId @@ -111,25 +114,41 @@ $this->mObject->mTable[$key]->loadParent(); $this->mObject->mTable[$key]->loadChildren(); $this->mObject->mTable[$key]->loadField(true); + + //reset flags for each table + $catFlag = false; + $sCatFlag = false; + $statusFlag = false; foreach(array_keys($this->mObject->mTable[$key]->mField) as $keyF){ switch($this->mObject->mTable[$key]->mField[$keyF]->get('field_type')){ case Tubsonp_FieldType::STATUS: - $this->mObject->mUseStatus = true; + $this->_mUseStatus = true; + $statusFlag = true; break; case Tubsonp_FieldType::CATEGORY: - $this->mObject->mUseCategory = true; + $this->_mUseCategory = true; + $catFlag = true; break; + case Tubsonp_FieldType::SCATEGORY: + $catName = $this->mObject->mTable[$key]->mField[$keyF]->get('name'); + if(! in_array($catName, $this->_mSimpleCategory){ + $this->_mSimpleCategory[] = $catName; + } + $this->mObject->mTable->mSimpleCategory[] = $catName; + $sCatFlag = true; + break; } - } + $this->mObject->mTable[$key]->mCategoryString = new Tubsonp_CategoryString(catFlag, $sCatFlag); + $this->mObject->mTable[$key]->mStatusString = new Tubsonp_StatusString($statusFlag); } if($this->mObject->get('version')>=2){ if(! defined('_PHPDATEPICKSTRING')) define('PHPDATEPICKSTRING', 'Y-m-d'); } - $this->mCategoryString = new Tubsonp_CategoryString($this->mObject->mUseCategory); - $this->mStatusString = new Tubsonp_StatusString($this->mObject->mUseStatus); + $this->mCategoryString = new Tubsonp_CategoryString($this->_mUseCategory, $this->_mSimpleCategory); + $this->mStatusString = new Tubsonp_StatusString($this->_mUseStatus); return true; } @@ -164,7 +183,7 @@ $this->_writeModuleBase(); foreach($this->mObject->mTable as $table){ - $this->_copyTableBase($table->getShow('title')); + $this->_copyTableBase($table); $this->_writeCodeForField($table); $this->_setPrimaryKey($this->mOutPath,$table); } @@ -244,10 +263,10 @@ **/ protected function _setupCategoryModuleBase() { - if($this->mObject->mUseCategory===true){ + $string = ''; + if($this->_mUseCategory===true||count($this->_mSimpleCategory)>0){ copy($this->mInPath.'/extras/class/CategoryManager.class.php', $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->getShow('title').'/class/CategoryManager.class.php'); - $string = ($this->mObject->mUseCategory===true) ? ' $this->mCategoryManager = new {Modulename}_CategoryManager($this->mAsset->mDirname);'."\n" : null; - $this->_addString('{{setupCategoryManager}}', $string, $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->getShow('title').'/class/AbstractAction.class.php'); + $string = ' $this->mCategoryManager = new {Modulename}_CategoryManager($this->mAsset->mDirname);'."\n"; //set language $lang = $this->mCategoryString->getString('language'); @@ -259,6 +278,8 @@ $string = $this->mCategoryString->getString('AbstractAction', 'require_once')."{{require_once}}"; $this->_addString('{{require_once}}', $string, $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->getShow('title').'/class/AbstractAction.class.php'); } + + $this->_addString('{{setupCategoryManager}}', $string, $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->getShow('title').'/class/AbstractAction.class.php'); } /** @@ -270,13 +291,13 @@ **/ protected function _setupStatusModuleBase() { - if($this->mObject->mUseStatus===true){ - /* - //set language - $lang = $this->mStatusString->getString('language'); - $this->_addLanguage($lang); - */ + if($this->_mUseStatus===true){ } + $this->_addString( + '{{Delegate}}', + $this->mCategoryString->getString('delegate').'{{Delegate}}', + $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->getShow('title').'/class/DelegateFunctions.class.php' + ); } /** @@ -338,19 +359,19 @@ * * @return void **/ - protected function _copyTableBase($tablename) + protected function _copyTableBase($table) { //copy action - $this->_copyAction($tablename); + $this->_copyAction($table); //copy object class - $this->_copyObject($tablename); + $this->_copyObject($table); //copy form - $this->_copyForm($tablename); + $this->_copyForm($table); //copy template - $this->_copyTemplate($tablename); + $this->_copyTemplate($table); } /** @@ -360,14 +381,15 @@ * * @return void **/ - protected function _copyAction($tablename) + protected function _copyAction($table) { + $tablename = $table->getShow('title'); $inFile = $this->mInPath .'/tablebase/actions/%sAction.class.php'; $outFile = $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->getShow('title').'/actions/'.ucfirst($tablename).'%sAction.class.php'; foreach(array('delete', 'edit', 'list', 'view') as $act){ $this->_copyTableFile(ucfirst($act), $inFile, $outFile); - $category = $this->mCategoryString->getString('action', $act); + $category = $table->mCategoryString->getTableString($tablename, 'action', $act); foreach(array_keys($category) as $keyC){ $this->_addString('{{'.$keyC.'}}', $category[$keyC], sprintf($outFile, ucfirst($act))); } @@ -382,8 +404,9 @@ * * @return void **/ - protected function _copyObject($tablename) + protected function _copyObject($table) { + $tablename = $table->getShow('title'); $inFile = $this->mInPath .'/tablebase/class/handler/Object.class.php'; $outFile = $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->getShow('title').'/class/handler/'.ucfirst($tablename).'.class.php'; @@ -391,8 +414,8 @@ $this->_replaceTableString($tablename, null, $outFile); //getShowStatus function:xcl2.2 only - $string = $this->mStatusString->getString('object', 'getShowStatus'); - $this->_addString('{{getShowStatus}}', $string, $outFile); + $string = $table->mStatusString->getString('object', 'getShowStatus'); + $this->_addString('{{XoopsSimpleObject::getShowStatus}}', $string, $outFile); } /** @@ -404,6 +427,7 @@ **/ protected function _copyForm($tablename) { + $tablename = $table->getShow('title'); $inFile = $this->mInPath .'/tablebase/forms/%sForm.class.php'; $outFile = $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->getShow('title').'/forms/'.ucfirst($tablename).'%sForm.class.php'; @@ -423,6 +447,7 @@ **/ protected function _copyTemplate($tablename) { + $tablename = $table->getShow('title'); $inFile = $this->mInPath .'/tablebase/templates/%s.html'; $outFile = $this->mOutPath.'/xoops_trust_path/modules/'.$this->mObject->getShow('title').'/templates/'.$this->mObject->getShow('title').'_'.$tablename.'_%s.html'; @@ -698,6 +723,7 @@ $file = str_replace('{modulename}', $modulename, $file); $file = str_replace('{Modulename}', ucfirst($modulename), $file); $file = str_replace('{MODULENAME}', strtoupper($modulename), $file); + $file = str_replace('{{Delegate}}', '', $file); $file = str_replace('{{template}}', '', $file); $file = str_replace('{{table}}', '', $file); $file = str_replace('{{language}}', '', $file); Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/AbstractString.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -13,6 +13,7 @@ abstract class Tubsonp_AbstractString { public $mList = array(); + public $mTableList = array(); public $mUse = false; public function __construct($use) @@ -22,7 +23,7 @@ $this->_setupList(); } else{ - $this->_setupDefaultList; + $this->_setupDefaultList(); } } @@ -35,7 +36,7 @@ } public function getString($key1, $key2=null, $key3=null) - {//echo $key1.'|'.$key2.'|'.$key3.'||';var_dump($this->mList);die(); + { if(isset($key3)){ return $this->mList[$key1][$key2][$key3]; } @@ -46,5 +47,19 @@ return $this->mList[$key1]; } } + + public function getTableString($tablename, $key1, $key2=null, $key3=null) + { + if(isset($key3)){ + return $this->mTableList[$table][$key1][$key2][$key3]; + } + elseif(isset($key2)){ + return $this->mTableList[$table][$key1][$key2]; + } + else{ + return $this->mTableList[$table][$key1]; + } + } + } ?> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/CategoryString.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -13,12 +13,55 @@ require_once TUBSONP_TRUST_PATH . '/class/AbstractString.class.php'; class Tubsonp_CategoryString extends Tubsonp_AbstractString { - protected function _setupArray() + protected $_mSimpleCat = array(); + + /**----------------------------- + * _construct + * @param bool $use + * @param string[] $sCats + * @return void + --------------------------------**/ + public function __construct(/*** bool ***/ $use, /*** string[] ***/ $sCats) { + parent::__construct($use); + $this->_mSimpleCat = ($sCats) ? $sCats : array(); + if($this->_hasSimpleCat()===true){ + $this->_setupList(); + } + } + + /**----------------------------- + * _hasSimpleCat + * @param void + * @return bool + --------------------------------**/ + protected function _hasSimpleCat() + { + return count($this->_mSimpleCat)>0 ? true : false; + } + + /**----------------------------- + * _setupModuleArray + * @param void + * @return void + --------------------------------**/ + protected function _setupModuleArray() + { $this->mList = array( 'xoops_version'=>array(), 'AbstractAction'=>array(), - 'language'=>array(), + 'language'=>array() + ); + } + + /**----------------------------- + * _setupTableArray + * @param void + * @return void + --------------------------------**/ + protected function _setupTableArray() + { + $this->mList = array( 'action'=>array( 'edit'=>array(), 'delete'=>array(), @@ -29,9 +72,14 @@ ); } + /**----------------------------- + * _setupDefaultList + * @param void + * @return void + --------------------------------**/ protected function _setupDefaultList() { - $this->_setupArray(); + $this->_setupModuleArray(); $this->mList['action']['edit']['_getCatId'] = ''; $this->mList['action']['delete']['_getCatId'] = ''; @@ -83,10 +131,38 @@ } + /**----------------------------- + * _setupList + * @param void + * @return void + --------------------------------**/ protected function _setupList() { - $this->_setupArray(); + $this->_setupModuleArray(); + if($this->mUse ===true){ + $this->_setupModuleCategory(); + } + elseif($this->_hasSimpleCat()===true){ + $this->_setupDefaultList(); + $this->_setupModuleSimpleCategory(); + } + else{ + var_dump($this->_mSimpleCat); + echo 'invalid category setting';die(); + } + + foreach($this->_mSimpleCat as $catName){ + $this->_setupEachSimpleCategory($catName); + } + } + /**----------------------------- + * _setupModuleCategory + * @param void + * @return void + --------------------------------**/ + protected function _setupModuleCategory() + { /*-------------------------------------------------------- Module Base ---------------------------------------------------------*/ @@ -110,27 +186,34 @@ \'options\' => array() ) , '; + $this->mList['language']['modinfo']['key'] = array( '_MI_{MODULENAME}_LANG_CAT_SET_ID', '_MI_{MODULENAME}_DESC_CAT_SET_ID', '_MI_{MODULENAME}_LANG_AUTH_TYPE', '_MI_{MODULENAME}_DESC_AUTH_TYPE', - '_MI_{MODULENAME}_LANG_CAT_SET_ID', - '_MI_{MODULENAME}_DESC_CAT_SET_ID' ); + $this->mList['language']['modinfo']['value'] = array( 'category set id', 'category set id', 'Auth Type List', 'List of Auth type. Default Values: "viewer|editor|manager"', - 'category set id', - 'category set id' ); $this->mList['AbstractAction']['require_once'] = 'require_once {MODULENAME}_TRUST_PATH . \'/class/CategoryManager.class.php\';'; + } + + /**----------------------------- + * _setupTableCategory + * @param void + * @return void + --------------------------------**/ + protected function _setupTableCategory() + { /*-------------------------------------------------------- Table Base ---------------------------------------------------------*/ @@ -314,5 +397,70 @@ $this->mList['template']['delete'] = '<{$catTitle}>'."\n"; $this->mList['template']['list'] = '<{$catTitleList[`$obj->get(\'cat_id\')`]}>'."\n"; } + + + + /**----------------------------- + * _setupModuleSimpleCategory + * @param string $catName + * @return void + --------------------------------**/ + protected function _setupModuleSimpleCategory() + { + $this->mList['AbstractAction']['require_once'] = 'require_once {MODULENAME}_TRUST_PATH . \'/class/CategoryManager.class.php\';'; + } + + + + + /**----------------------------- + * _setupTableSimpleCategory + * @param string $catName + * @return void + --------------------------------**/ + protected function _setupTableSimpleCategory($catName) + { + $CATNAME = strtoupper($catName); +/*-------------------------------------------------------- +Module Base +---------------------------------------------------------*/ +$this->mList['xoops_version']['config'] .= ' + array( + \'name\' => \'cat_set_id\' , + \'title\' => "_MI_{MODULENAME}_LANG_CAT_SET_ID" , + \'description\' => "_MI_{MODULENAME}_DESC_CAT_SET_ID" , + \'formtype\' => \'textbox\' , + \'valuetype\' => \'int\' , + \'default\' => 0, + \'options\' => array() + ) , +'; + +$this->mList['language']['modinfo']['key'][] = sprintf('_MI_{MODULENAME}_LANG_SET_%s', $CATNAME); +$this->mList['language']['modinfo']['key'][] = sprintf('_MI_{MODULENAME}_DESC_SET_%s', $CATNAME); + +$this->mList['language']['modinfo']['value'][] = sprintf('category set %s', $catName); +$this->mList['language']['modinfo']['value'][] = sprintf('category set id for %s', $catName); + +/*-------------------------------------------------------- +Table Base +---------------------------------------------------------*/ + +$this->mList['action']['edit']['render'] .= ' $render->setAttribute(\'catTree\',$this->mCategoryManager->getTree({Modulename}_CategoryManager::VIEW));'."\n"; + +$this->mList['action']['view']['render'] .= sprintf(' $render->setAttribute(\'catTitle\', $this->mCategoryManager->getTitle($this->mObject->get(\'%s\')));'."\n", $catName); + +$this->mList['action']['delete']['render'] = sprintf(' $render->setAttribute(\'catTitle\', $this->mCategoryManager->getTitle($this->mObject->get(\'%s\')));'."\n", $catName); + +$this->mList['action']['list']['render'] = ' $render->setAttribute(\'catTitleList\', $this->mCategoryManager->getTitleList());'."\n"; + +$this->mList['template']['edit'] = sprintf(' <select name="%s"> + <{legacy_category_select tree=$catTree selectedValue=$actionForm->get(\'%s\')}> + </select> +'."\n", $catName, $catName); +$this->mList['template']['view'] = '<{$catTitle}>'."\n"; +$this->mList['template']['delete'] = '<{$catTitle}>'."\n"; +$this->mList['template']['list'] = sprintf('<{assign var=%s value=$obj->get(\'%s\')}><{$catTitleList.$%s}>'."\n", $catName, $catName, $catName); + } } ?> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/Enum.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/Enum.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/Enum.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -26,6 +26,7 @@ const CATEGORY = 9; const STATUS = 10; const LATLNG = 11; + const SCATEGORY = 12; /** * getTypeList @@ -37,17 +38,18 @@ public function getTypeList() { return array( - self::STRING=>_MD_TUBSONP_LANG_STRING, - self::TEXT=>_MD_TUBSONP_LANG_TEXT, - self::INT=>_MD_TUBSONP_LANG_INT, - self::FLOAT=>_MD_TUBSONP_LANG_FLOAT, - self::BOOL=>_MD_TUBSONP_LANG_BOOL, - self::DATE=>_MD_TUBSONP_LANG_DATE, - self::UNIXTIME=>_MD_TUBSONP_LANG_UNIXTIME, - self::UID=>_MD_TUBSONP_LANG_UID, - self::CATEGORY=>_MD_TUBSONP_LANG_CATEGORY, - self::STATUS=>_MD_TUBSONP_LANG_STATUS, - self::LATLNG=>_MD_TUBSONP_LANG_LATLNG + self::STRING=>_MD_TUBSONP_TYPE_STRING, + self::TEXT=>_MD_TUBSONP_TYPE_TEXT, + self::INT=>_MD_TUBSONP_TYPE_INT, + self::FLOAT=>_MD_TUBSONP_TYPE_FLOAT, + self::BOOL=>_MD_TUBSONP_TYPE_BOOL, + self::DATE=>_MD_TUBSONP_TYPE_DATE, + self::UNIXTIME=>_MD_TUBSONP_TYPE_UNIXTIME, + self::UID=>_MD_TUBSONP_TYPE_UID, + self::CATEGORY=>_MD_TUBSONP_TYPE_CATEGORY, + self::STATUS=>_MD_TUBSONP_TYPE_STATUS, + self::LATLNG=>_MD_TUBSONP_TYPE_LATLNG, + self::SCATEGORY=>_MD_TUBSONP_TYPE_SIMPLE_CATEGORY ); } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/StatusString.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/StatusString.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/StatusString.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -25,6 +25,8 @@ protected function _setupDefaultList() { $this->_setupArray(); + $this->mList['object']['getShowString'] = ''; + $this->mList['delegate'] = ''; } protected function _setupList() Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/field.interface.php 2010-05-01 00:56:19 UTC (rev 512) @@ -196,12 +196,12 @@ case 'delete': return sprintf( ' <dt><{$smarty.const._MD_{MODULENAME}_LANG_%s}></dt> - <dd><{$object->getShow(\'%s\')%s}></dd>'."\n", + <dd><{$catTitle%s}></dd>'."\n", strtoupper($name), $name, $this->getShowModifier()); break; case 'list': return sprintf( -' <td><{$obj->getShow(\'%s\')%s}></td>'."\n", +' <td><{assign var=catId value=$obj->getShow(\'%s\')}><{$catTitleList.$catId%s}></td>'."\n", strtoupper($name), $name, $this->getShowModifier()); break; } @@ -214,8 +214,16 @@ } +/** + * Simple Category + */ +class Tubsonp_TypeSimpleCategory extends Tubsonp_TypeCategory +{ + public $mTypeStr = Tubsonp_FieldType::SCATEGORY; +} + /** * Uid */ @@ -338,7 +346,7 @@ public function getFieldPropertyClass($name, $length) { - return sprintf(' $this->mFieldProperties[\'%s\'] = new XCube_FieldProperty($this)', $name); + return sprintf(' $this->mFieldProperties[\'%s\'] = new XCube_FieldProperty($this);', $name); } public function getFormLoadString() @@ -515,7 +523,7 @@ public function getCreateTableSQL($field) { - return sprintf(' `%s` decimal(%d.2) unsigned NOT NULL', $field->get('name'), $field->get('length')); + return sprintf(' `%s` decimal(%d,4) unsigned NOT NULL', $field->get('name'), $field->get('length')); } public function getFormPropertyClass() @@ -589,7 +597,7 @@ public function getCreateTableSQL($field) { - return sprintf(' `%s` decimal(4.14) signed NOT NULL,'."\n".' `%s` decimal(4.14) signed NOT NULL', $field->get('name'), $field->get('length')); + return sprintf(' `%s` decimal(4,14) signed NOT NULL,'."\n".' `%s` decimal(4,14) signed NOT NULL', $field->get('name'), $field->get('length')); } public function getFormLoadString() Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Module.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Module.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Module.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -18,8 +18,6 @@ public $mMainTableName = null; public $mTable = array(); protected $_mTableLoadedFlag = false; - public $mUseCategory = false; - public $mUseStatus = false; /** * __construct Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/class/handler/Table.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -24,6 +24,10 @@ public $mChildren = array(); protected $_mChildrenLoadedFlag = false; + public $mCategoryString = array(); + public $mStatusString = array(); + public $mSimpleCategory = array(); + /** * __construct * @@ -335,7 +339,7 @@ **/ public function delete($obj) { - $handler = $this->_getHandler('field'); + $handler = Legacy_Utils::getModuleHandler('field', $this->getDirname()); $handler->deleteAll(new Criteria('table_id', $obj->get('table_id'))); unset($handler); Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/CategoryManager.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/CategoryManager.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/CategoryManager.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -26,13 +26,14 @@ * * @param string $dirname * @param int $setId + * @param string $catSetName * * @return void **/ - public function __construct($dirname) + public function __construct($dirname, $catSetName='cat_set_id') { $this->_mDirname = $dirname; - $this->_mSetId = XCube_Root::getSingleton()->mContext->mModuleConfig['cat_set_id']; + $this->_mSetId = XCube_Root::getSingleton()->mContext->mModuleConfig[$catSetName]; } /** Deleted: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/DelegateFunctions.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/DelegateFunctions.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/extras/class/DelegateFunctions.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -1,52 +0,0 @@ -<?php -/** - * @package {modulename} - */ - -if (!defined('XOOPS_ROOT_PATH')) exit(); -require_once XOOPS_ROOT_PATH.'/modules/legacy/class/interface/AbstractProgressClientDelegate.class.php'; - -class {Modulename}_ProgressClientDelegate extends Legacy_AbstractProgressClientDelegate -{ - /** - * getModuleUsingProgress - * - * @param mixed[] &$list - * - * @return void - */ - public function getManagedModules(/*** array ***/ &$list) - { - $dirnames = Legacy_Utils::getDirnameListByTrustDirname('{modulename}'); - foreach($dirnames as $dirname){ - $list[] = array('dirname'=>$dirname, 'dataname'=>'{tablename}'); - } - } - - /** - * updateStatus - * - * @param string &$result - * @param string $dirname - * @param string $dataname - * @param int $id - * @param string $id - * @param Legacy_Status $status - * - * @return void - */ - public function updateStatus(/*** string ***/ &$result, /*** string ***/ $dirname, /*** string ***/ $dataname, /*** int ***/ $id, /*** Legacy_Status ***/ $status) - { - $dirnames = Legacy_Utils::getDirnameListByTrustDirname('{modulename}'); - foreach($dirnames as $xcckDirname){ - if($dirname == $xcckDirname && $dataname=='{tablename}'){ - $handler = Legacy_Utils::getModuleHandler('{tablename}', $dirname); - $obj = $handler->get($id); - $obj->set('status', $status); - $result = $handler->insert($obj); - } - } - } -} - -?> Deleted: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/admin/class/LenoticeAdminRenderSystem.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/admin/class/LenoticeAdminRenderSystem.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/admin/class/LenoticeAdminRenderSystem.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -1,304 +0,0 @@ -<?php -/** - * @file - * @package {modulename} - * @version $Id$ -**/ - -if(!defined('XOOPS_ROOT_PATH')) -{ - exit; -} - -define('{MODULENAME}_ADMIN_RENDER_TEMPLATE_DIRNAME','templates'); -define('{MODULENAME}_ADMIN_RENDER_FALLBACK_PATH',XOOPS_MODULE_PATH . '/legacy/admin/theme'); // TODO will be use other path -define('{MODULENAME}_ADMIN_RENDER_FALLBACK_URL',XOOPS_MODULE_URL . '/legacy/admin/theme'); // TODO will be use other url - -/** - * {Modulename}_AdminRenderSystem -**/ -class {Modulename}_AdminRenderSystem extends Legacy_AdminRenderSystem -{ - /** - * prepare - * - * @param XCube_Controller &$controller - * - * @return void - **/ - public function prepare(/*** XCube_Controller ***/ &$controller) - { - $this->mController =& $controller; - - $this->mSmarty = new Legacy_AdminSmarty(); // TODO will be use other class? - $this->mSmarty->register_modifier('theme',array($this,'modifierTheme')); - $this->mSmarty->register_function('stylesheet',array($this,'functionStylesheet')); - - $this->mSmarty->assign( - array( - 'xoops_url' => XOOPS_URL, - 'xoops_rootpath' => XOOPS_ROOT_PATH, - 'xoops_langcode' => _LANGCODE, - 'xoops_charset' => _CHARSET, - 'xoops_version' => XOOPS_VERSION, - 'xoops_upload_url' => XOOPS_UPLOAD_URL - ) - ); - - // TODO event name is this? - XCube_DelegateUtils::call('Legacy_RenderSystem.SetupXoopsTpl',new XCube_Ref($this->mSmarty)); - - $this->mSmarty->force_compile = ( - $controller->mRoot->mSiteConfig['Legacy_AdminRenderSystem']['ThemeDevelopmentMode'] || - $controller->mRoot->mContext->getXoopsConfig('theme_fromfile') - ); - } - - /** - * renderBlock - * - * @param XCube_RenderTarget &$target - * - * @return void - **/ - public function renderBlock(/*** XCube_RenderTarget ***/ &$target) - { - parent::renderBlock($target); // TODO will be use other method - } - - /** - * renderTheme - * - * @param XCube_RenderTarget &$target - * - * @return void - **/ - public function renderTheme(/*** XCube_RenderTarget ***/ &$target) - { - $module =& $this->mController->getVirtualCurrentModule(); - $context =& $this->mController->mRoot->getContext(); - $this->mSmarty->assign($target->getAttributes()); - $this->mSmarty->assign( - array( - 'stdout_buffer' => $this->_mStdoutBuffer, - 'currentModule' => $module, - 'legacy_sitename' => $context->getAttribute('legacy_sitename'), - 'legacy_pagetitle' => $context->getAttribute('legacy_pagetitle'), - 'legacy_slogan' => $context->getAttribute('legacy_slogan') - ) - ); - - $blocks = array(); - foreach($context->mAttributes['legacy_BlockContents'][0] as $block) - { - $blocks[$block['name']] = $block; - } - $this->mSmarty->assign('xoops_lblocks',$blocks); - - $info = {Modulename}_AdminRenderSystem::getOverrideFileInfo('admin_theme.html'); - $this->mSmarty->template_dir = ($info['file'] != null) ? - substr($file['path'],0,-15) : - {MODULENAME}_ADMIN_RENDER_FALLBACK_PATH; - $this->mSmarty->setModulePrefix(''); - - $target->setResult($this->mSmarty->fetch('file:admin_theme.html')); - } - - /** - * renderMain - * - * @param XCube_RenderTarget &$target - * - * @return void - **/ - public function renderMain(/*** XCube_RenderTarget ***/ &$target) - { - $info = {Modulename}_AdminRenderSystem::getOverrideFileInfo($target->getTemplateName()); - $this->mSmarty->compile_id = $info['dirname']; - $this->mSmarty->assign($target->getAttributes()); - $this->mSmarty->template_dir = substr($info['path'],0,-strlen($info['file'])); - - $res = $this->mSmarty->fetch('file:' . $info['file']); - $target->setResult($res); - $this->_mStdoutBuffer .= $target->getAttribute('stdout_buffer'); - - foreach($target->getAttributes() as $key => $val) - { - $this->mSmarty->clear_assign($key); - } - } - - /** - * getOverrideFileInfo - * - * @param string $file - * @param string $prefix - * @param bool $isSpDirName - * - * @return {string 'theme',string 'file',string 'dirname'} - **/ - public static function getOverrideFileInfo(/*** string ***/ $file,/*** string ***/ $prefix = null,/*** bool ***/ $isSpDirName = false) - { - $ret = array( - 'url' => null, - 'path' => null, - 'theme' => null, - 'dirname' => null, - 'file' => null - ); - if(strpos($file,'..') !== false || strpos($prefix,'..' !== false)) - { - return $ret; - } - $root =& XCube_Root::getSingleton(); - - $module =& $root->mContext->mXoopsModule; - $dirName = $root->mContext->mRequest->getRequest('dirname'); - if($isSpDirName && preg_match('/^\w+$/',$dirName)) - { - $handler =& {Modulename}_Utils::getXoopsHandler('module'); - $module =& $handler->getByDirname($dirName); - } - - $isModule = is_object($module); - $theme = $root->mSiteConfig['Legacy']['Theme']; - $ret['theme'] = $theme; - $dirName = $isModule ? $module->get('dirname') : null; - $trustDirName = $isModule ? $module->getInfo('trust_dirname') : null; - $ret['file'] = $file; - - $file = $prefix . $file; - - switch(true) - { - case $isModule && file_exists( - $path = sprintf( - '%s/modules/%s/%s', - XOOPS_THEME_PATH,$theme,$dirName,$file - ) - ): - $ret['url'] = sprintf( - '%s/%s/modules/%s/%s', - XOOPS_THEME_URL,$theme,$dirName,$file - ); - $ret['path'] = $path; - return $ret; - case $isModule && file_exists( - $path = sprintf( - '%s/themes/%s/modules/%s/%s', - XOOPS_TRUST_PATH,$theme,$trustDirName,$file - ) - ): - $ret['path'] = $path; - $ret['dirname'] = $trustDirName; - return $ret; - case file_exists( - $path = sprintf( - '%s/%s/%s', - XOOPS_THEME_PATH,$theme,$file - ) - ): - $ret['url'] = sprintf( - '%s/%s/%s', - XOOPS_THEME_URL,$theme,$file - ); - $ret['path'] = $path; - $ret['dirname'] = null; - return $ret; - case file_exists( - $path = sprintf( - '%s/themes/%s/%s', - XOOPS_TRUST_PATH,$theme,$file - ) - ): - $ret['path'] = $path; - $ret['dirname'] = null; - return $ret; - case $isModule && file_exists( - $path = sprintf( - '%s/%s/admin/templates/%s', - XOOPS_MODULE_PATH,$dirName,$file - ) - ): - $ret['url'] = sprintf( - '%s/%s/admin/templates/%s', - XOOPS_MODULE_URL,$dirName,$file - ); - $ret['path'] = $path; - $ret['theme'] = null; - return $ret; - case $isModule && file_exists( - $path = sprintf( - '%s/modules/%s/admin/templates/%s', - XOOPS_TRUST_PATH,$trustDirName,$file - ) - ): - $ret['path'] = $path; - $ret['theme'] = null; - $ret['dirname'] = $trustDirName; - return $ret; - case file_exists($path = {MODULENAME}_ADMIN_RENDER_FALLBACK_PATH . '/' .$file): - $ret['url'] = {MODULENAME}_ADMIN_RENDER_FALLBACK_URL . '/' . $file; - $ret['path'] = $path; - $ret['theme'] = null; - $ret['dirname'] = null; - return $ret; - default: - $ret['theme'] = null; - $ret['dirname'] = null; - $ret['file'] = null; - return $ret; - } - } - - /** - * modifierTheme - * - * @param string $str - * - * @return string - **/ - public static function modifierTheme(/*** string ***/ $str) - { - $info = {Modulename}_AdminRenderSystem::getOverrideFileInfo($str); - if($info['url'] != null) - { - return $info['url']; - } - return {MODULENAME}_ADMIN_RENDER_FALLBACK_URL . '/' . $str; - } - - /** - * functionStylesheet - * - * @param {string 'file',string 'media'} $param - * @param Smarty &$smarty - * - * @return void - **/ - public static function functionStylesheet(/*** {string 'file',string 'media'} ***/ $param,/*** Smarty ***/ &$smarty) - { - if(!isset($params['file']) || strpos($params['file'],'..') !== false) - { - return; - } - - $info = {Modulename}_AdminRenderSystem::getOverrideFileInfo($params['file'],'stylesheets/'); - if($info['file'] == null) - { - return; - } - - // TODO will be use other method - printf( - '<link rel="stylesheet" typw="text/css" media="%s" href="%s/legacy/admin/css.php?file=%s%s%s" />', - (isset($params['media']) ? $params['media'] : 'all'), - XOOPS_MODULE_URL, - $info['file'], - ($info['dirname'] != null ? '&dirname=' . $info['dirname'] : ''), - ($info['theme'] != null ? '&theme=' . $info['theme'] : '') - ); - } -} - -?> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/files/22/tablebase/templates/list.html 2010-05-01 00:56:19 UTC (rev 512) @@ -1,7 +1,7 @@ <div id="{modulename}"> <h1><{$smarty.const._LIST}></h1> <ul class="toptab"> - <li><a href="index.php?action={Tablename}Edit"><{$smarty.const._MD_{MODULENAME}_LANG_ADD_A_NEW_{TABLENAME}}></a></li> + <li><a href="<{xoops_coolurl dirname=$dirname dataname=$dataname action=edit}>"><{$smarty.const._MD_{MODULENAME}_LANG_ADD_A_NEW_{TABLENAME}}></a></li> </ul> <{if count($objects) > 0}> @@ -18,9 +18,9 @@ <tr class="<{cycle values='odd,even'}>"> {{list_value}} <td> - <a href="./index.php?action={Tablename}View&{primary_key_id}=<{$obj->getShow('{primary_key_id}')}>"><{$smarty.const._VIEW}></a> - <a href="./index.php?action={Tablename}Edit&{primary_key_id}=<{$obj->getShow('{primary_key_id}')}>"><{$smarty.const._EDIT}></a> - <a href="./index.php?action={Tablename}Delete&{primary_key_id}=<{$obj->getShow('{primary_key_id}')}>"><{$smarty.const._DELETE}></a> + <a href="<{xoops_coolurl dirname=$dirname dataname=$dataname id=$obj->getShow('{primary_key_id}') action=view}>"><{$smarty.const._VIEW}></a> + <a href="<{xoops_coolurl dirname=$dirname dataname=$dataname id=$obj->getShow('{primary_key_id}') action=edit}>"><{$smarty.const._EDIT}></a> + <a href="<{xoops_coolurl dirname=$dirname dataname=$dataname id=$obj->getShow('{primary_key_id}') action=delete}>"><{$smarty.const._DELETE}></a> </td> </tr> <{/foreach}> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/forms/FieldEditForm.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/forms/FieldEditForm.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/forms/FieldEditForm.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -127,7 +127,7 @@ $obj->set('length', $this->get('length')); $obj->set('sign', $this->get('sign')); $obj->set('primary_key_id', $this->get('primary_key_id')); - $obj->set('special', $this->get('special')); + $obj->set('special', intval($this->get('special'))); $obj->set('order', $this->get('order')); $obj->set('options', $this->get('options')); $obj->set('table_id', $this->get('table_id')); Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/forms/TableEditForm.class.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/forms/TableEditForm.class.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/forms/TableEditForm.class.php 2010-05-01 00:56:19 UTC (rev 512) @@ -97,10 +97,10 @@ $obj->set('title', $this->get('title')); $obj->set('module_id', $this->get('module_id')); $obj->set('parent', $this->get('parent')); - $obj->set('main_flag', $this->get('main_flag')); - $obj->set('uid_flag', $this->get('uid_flag')); - $obj->set('category_flag', $this->get('category_flag')); - $obj->set('status_flag', $this->get('status_flag')); + $obj->set('main_flag', intval($this->get('main_flag'))); + $obj->set('uid_flag', intval($this->get('uid_flag'))); + $obj->set('category_flag', intval($this->get('category_flag'))); + $obj->set('status_flag', intval($this->get('status_flag'))); } } Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/language/ja_utf8/main.php =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/language/ja_utf8/main.php 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/language/ja_utf8/main.php 2010-05-01 00:56:19 UTC (rev 512) @@ -73,7 +73,16 @@ define('_MD_TUBSONP_LANG_CATEGORY_FLAG', 'カテゴリを使う'); define('_MD_TUBSONP_LANG_STATUS_FLAG', 'ワークフローを使う'); define('_MD_TUBSONP_LANG_STATUS_ORDER', '順番'); -define('_MD_TUBSONP_LANG_CATEGORY', "category"); -define('_MD_TUBSONP_LANG_STATUS', "status"); -define('_MD_TUBSONP_LANG_LATLNG', "緯度経度"); +define('_MD_TUBSONP_TYPE_STRING', "string"); +define('_MD_TUBSONP_TYPE_TEXT', "text"); +define('_MD_TUBSONP_TYPE_INT', "int"); +define('_MD_TUBSONP_TYPE_FLOAT', "float"); +define('_MD_TUBSONP_TYPE_BOOL', "bool"); +define('_MD_TUBSONP_TYPE_UID', "UID"); +define('_MD_TUBSONP_TYPE_DATE', 'date'); +define('_MD_TUBSONP_TYPE_UNIXTIME', "unixtime"); +define('_MD_TUBSONP_TYPE_CATEGORY', "category"); +define('_MD_TUBSONP_TYPE_SIMPLE_CATEGORY', "SimpleCategory"); +define('_MD_TUBSONP_TYPE_STATUS', "status"); +define('_MD_TUBSONP_TYPE_LATLNG', "latlng"); ?> Modified: modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/templates/tubsonp_table_edit.html =================================================================== --- modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/templates/tubsonp_table_edit.html 2010-04-29 08:07:28 UTC (rev 511) +++ modules_tubsonp/trunk/xoops_trust_path/modules/tubsonp/templates/tubsonp_table_edit.html 2010-05-01 00:56:19 UTC (rev 512) @@ -34,7 +34,7 @@ <dd> <input type="checkbox" name="category_flag" value="1" <{if $actionForm->get('category_flag')==1}> checked="checked"<{/if}>}> </dd> - <dt><{$smarty.const._MD_TUBSONP_LANG_MAIN_FLAG}></dt> + <dt><{$smarty.const._MD_TUBSONP_LANG_STATUS_FLAG}></dt> <dd> <input type="checkbox" name="status_flag" value="1" <{if $actionForm->get('status_flag')==1}> checked="checked"<{/if}>}> </dd> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |