From minahito @ users.sourceforge.jp Thu Dec 1 00:58:32 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 00:58:32 +0900
Subject: [xoops-cvslog 1247] CVS update: xoops2jp/html/kernel
Message-ID: <20051130155832.8290F2AC048@users.sourceforge.jp>
Index: xoops2jp/html/kernel/module.php
diff -u xoops2jp/html/kernel/module.php:1.2.8.1 xoops2jp/html/kernel/module.php:1.2.8.2
--- xoops2jp/html/kernel/module.php:1.2.8.1 Wed Oct 19 02:21:03 2005
+++ xoops2jp/html/kernel/module.php Thu Dec 1 00:58:32 2005
@@ -1,5 +1,5 @@
getVar('version') / 100;
+ }
/**#@+
* For backward compatibility only!
From minahito @ users.sourceforge.jp Thu Dec 1 00:59:51 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 00:59:51 +0900
Subject: [xoops-cvslog 1248] CVS update: xoops2jp/html/modules/base
Message-ID: <20051130155951.62E322AC01A@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/xoops_version.php
diff -u xoops2jp/html/modules/base/xoops_version.php:1.1.2.10 xoops2jp/html/modules/base/xoops_version.php:1.1.2.11
--- xoops2jp/html/modules/base/xoops_version.php:1.1.2.10 Fri Nov 25 01:31:22 2005
+++ xoops2jp/html/modules/base/xoops_version.php Thu Dec 1 00:59:51 2005
@@ -1,5 +1,5 @@
Index: xoops2jp/html/modules/base/admin/menu.php
diff -u /dev/null xoops2jp/html/modules/base/admin/menu.php:1.1.2.1
--- /dev/null Thu Dec 1 01:00:24 2005
+++ xoops2jp/html/modules/base/admin/menu.php Thu Dec 1 01:00:24 2005
@@ -0,0 +1,12 @@
+
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Dec 1 01:02:16 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 01:02:16 +0900
Subject: [xoops-cvslog 1250] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20051130160216.D15212AC01A@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/LegacyActSearchAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/LegacyActSearchAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/LegacyActSearchAction.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/actions/LegacyActSearchAction.class.php:1.1.2.1 Wed Nov 16 19:09:24 2005
+++ xoops2jp/html/modules/base/admin/actions/LegacyActSearchAction.class.php Thu Dec 1 01:02:16 2005
@@ -68,9 +68,9 @@
var $mRecords=null;
var $mActionForm;
- function LegacyActSearchAction(&$controller,&$xoopsUser)
+ function prepare(&$controller,&$xoopsUser)
{
- parent::LegacyAdminAction(&$controller,&$xoopsUser);
+ parent::prepare(&$controller,&$xoopsUser);
$db=&$controller->getDB();
//
From minahito @ users.sourceforge.jp Thu Dec 1 01:02:24 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 01:02:24 +0900
Subject: [xoops-cvslog 1251] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20051130160224.D297A2AC01A@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/LegacyDefaultAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/LegacyDefaultAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/LegacyDefaultAction.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/actions/LegacyDefaultAction.class.php:1.1.2.1 Wed Nov 16 19:09:24 2005
+++ xoops2jp/html/modules/base/admin/actions/LegacyDefaultAction.class.php Thu Dec 1 01:02:24 2005
@@ -2,6 +2,10 @@
class LegacyDefaultAction extends LegacyAdminAction
{
+ function prepare(&$controller,&$xoopsUser)
+ {
+ }
+
function getDefaultView(&$controller,&$xoopsUser)
{
return LEGACY_ADMIN_FRAME_VIEW_NONE;
From minahito @ users.sourceforge.jp Thu Dec 1 01:17:37 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 01:17:37 +0900
Subject: [xoops-cvslog 1252] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20051130161737.92E702AC01A@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/LegacyModuleListAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/actions/LegacyModuleListAction.class.php:1.1.2.1
--- /dev/null Thu Dec 1 01:17:37 2005
+++ xoops2jp/html/modules/base/admin/actions/LegacyModuleListAction.class.php Thu Dec 1 01:17:37 2005
@@ -0,0 +1,56 @@
+mDB=&$controller->getDB();
+ }
+
+ function getDefaultView(&$controller,&$xoopsUser)
+ {
+ $this->mFilter=new ModuleListFilterForm();
+ $this->mFilter->fetch();
+
+ $moduleHandler=&xoops_gethandler('module');
+
+ // dmy
+ $criteria=new Criteria('mid',0,'>');
+ $criteria->setSort($this->mFilter->getSort());
+ $criteria->setOrder($this->mFilter->getOrder());
+
+ $this->mModuleObjects=&$moduleHandler->getObjects($criteria);
+
+ return LEGACY_ADMIN_FRAME_VIEW_INDEX;
+ }
+
+ function execute(&$controller,&$xoopsUser)
+ {
+ }
+
+ function executeViewIndex(&$controller,&$xoopsUser,&$renderer)
+ {
+ $renderer->setTemplateName("legacy_admin_modulelist_index.html");
+
+ //
+ // Load adminmenu before we assign these to template.
+ //
+ foreach(array_keys($this->mModuleObjects) as $key) {
+ $this->mModuleObjects[$key]->loadAdminMenu();
+ $this->mModuleObjects[$key]->loadInfo($this->mModuleObjects[$key]->getVar('dirname'));
+ }
+
+ $renderer->setAttribute('moduleObjects',$this->mModuleObjects);
+ }
+}
+
+?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Dec 1 01:18:22 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 01:18:22 +0900
Subject: [xoops-cvslog 1253] CVS update: xoops2jp/html/modules/base/admin/class
Message-ID: <20051130161822.DDEBF2AC01A@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/class/LegacyAdminActionFrame.class.php
diff -u xoops2jp/html/modules/base/admin/class/LegacyAdminActionFrame.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/class/LegacyAdminActionFrame.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/class/LegacyAdminActionFrame.class.php:1.1.2.1 Wed Nov 16 19:09:41 2005
+++ xoops2jp/html/modules/base/admin/class/LegacyAdminActionFrame.class.php Thu Dec 1 01:18:22 2005
@@ -1,5 +1,5 @@
mAction=new $className($controller,$controller->getXoopsUser());
-
+ $this->mAction=new $className();
+
+ $this->mAction->prepare($controller,$controller->getXoopsUser());
+
if(!is_object($this->mAction))
die(); // TODO
@@ -125,7 +127,11 @@
{
var $mConfig;
- function LegacyAdminAction(&$controller,&$xoopsUser)
+ function LegacyAdminAction()
+ {
+ }
+
+ function prepare(&$controller,&$xoopsUser)
{
$this->mConfig=$controller->mModuleController->getConfig();
}
From minahito @ users.sourceforge.jp Thu Dec 1 01:18:46 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 01:18:46 +0900
Subject: [xoops-cvslog 1254] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20051130161846.3DAE42AC01A@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php:1.1.2.1
--- /dev/null Thu Dec 1 01:18:46 2005
+++ xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php Thu Dec 1 01:18:46 2005
@@ -0,0 +1,70 @@
+ "id",
+ MODULE_SORT_KEY_MID => "mid",
+ MODULE_SORT_KEY_NAME => "name",
+ MODULE_SORT_KEY_VERSION => "version",
+ MODULE_SORT_KEY_LASTUPDATE => "last_update",
+ MODULE_SORT_KEY_WEIGHT => "weight",
+ MODULE_SORT_KEY_ISACTIVE => "isactive",
+ MODULE_SORT_KEY_DIRNAME => "dirname",
+ MODULE_SORT_KEY_HASMAIN => "hasmain",
+ MODULE_SORT_KEY_HASADMIN => "hasadmin",
+ MODULE_SORT_KEY_HASSEARCH => "hassearch",
+ MODULE_SORT_KEY_HASCONFIG => "hasconfig",
+ MODULE_SORT_KEY_HASCOMMENTS => "hascomments"
+ );
+
+ function fetch()
+ {
+ $this->mSpecial=isset($_REQUEST['special']) ? intval($_REQUEST['special']) : null;
+
+ $this->mSortKey=isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+
+ if($this->mSortKey>MODULE_SORT_KEY_MAXVALUE)
+ $this->mSortKey=0;
+ }
+
+ function getSort()
+ {
+ $sortkey=abs($this->mSortKey);
+ return $this->_mSortKeys[$sortkey];
+ }
+
+ function getOrder()
+ {
+ return ($this->mSortKey < 0) ? "DESC" : "ASC";
+ }
+}
+
+?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Dec 1 01:19:19 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 01:19:19 +0900
Subject: [xoops-cvslog 1255] CVS update:
xoops2jp/html/modules/base/admin/templates
Message-ID: <20051130161919.2F71F2AC01A@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html
diff -u /dev/null xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.1
--- /dev/null Thu Dec 1 01:19:19 2005
+++ xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html Thu Dec 1 01:19:18 2005
@@ -0,0 +1,56 @@
+
MODULE LIST
+
+
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Dec 1 01:22:08 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 01:22:08 +0900
Subject: [xoops-cvslog 1256] CVS update: xoops2jp/html/kernel
Message-ID: <20051130162208.D7AE72AC01A@users.sourceforge.jp>
Index: xoops2jp/html/kernel/module.php
diff -u xoops2jp/html/kernel/module.php:1.2.8.2 xoops2jp/html/kernel/module.php:1.2.8.3
--- xoops2jp/html/kernel/module.php:1.2.8.2 Thu Dec 1 00:58:32 2005
+++ xoops2jp/html/kernel/module.php Thu Dec 1 01:22:08 2005
@@ -1,5 +1,5 @@
db->prefix('modules');
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
$sql .= ' '.$criteria->renderWhere();
- $sql .= ' ORDER BY weight '.$criteria->getOrder().', mid ASC';
+
+ if($criteria->getSort()!=null) {
+ $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
+ }
+ else {
+ $sql .= ' ORDER BY weight '.$criteria->getOrder().', mid ASC';
+ }
+
$limit = $criteria->getLimit();
$start = $criteria->getStart();
}
From minahito @ users.sourceforge.jp Thu Dec 1 01:24:25 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 01:24:25 +0900
Subject: [xoops-cvslog 1257] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20051130162425.BF3402AC01A@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php:1.1.2.1 Thu Dec 1 01:18:46 2005
+++ xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php Thu Dec 1 01:24:25 2005
@@ -1,10 +1,10 @@
Index: xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html
diff -u xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.2
--- xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.1 Thu Dec 1 01:19:18 2005
+++ xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html Thu Dec 1 12:48:53 2005
@@ -42,11 +42,11 @@
<{$module->getVar('mid')}> |
|
- <{xoops_input type=text name=name[$module->getVar('mid')] value=$module->getVar('name')}> |
+ |
<{$module->getRenderedVersion()}> |
<{$module->getVar('last_update')|xoops_formattimestamp:l}> |
- <{xoops_input type=text size=4 maxlength=4 name=weight[$module->getVar('mid')] value=$module->getVar('weight')}> |
- getVar('isactive')}>checked<{/if}>> |
+ |
+ getVar('isactive')}>checked<{/if}>> |
<{/foreach}>
From minahito @ users.sourceforge.jp Thu Dec 1 12:50:09 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 12:50:09 +0900
Subject: [xoops-cvslog 1259] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20051201035009.F3F4F2AC022@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php:1.1.2.3
--- xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php:1.1.2.2 Thu Dec 1 01:24:25 2005
+++ xoops2jp/html/modules/base/admin/forms/ModuleListFilterForm.class.php Thu Dec 1 12:50:09 2005
@@ -1,10 +1,10 @@
"id",
+ MODULE_SORT_KEY_DEFAULT => "mid",
MODULE_SORT_KEY_MID => "mid",
MODULE_SORT_KEY_NAME => "name",
MODULE_SORT_KEY_VERSION => "version",
From minahito @ users.sourceforge.jp Thu Dec 1 14:16:33 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 14:16:33 +0900
Subject: [xoops-cvslog 1260] CVS update: xoops2jp/html/class
Message-ID: <20051201051633.006432AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/class/XCube_ActionForm.class.php
diff -u xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.11 xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.12
--- xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.11 Sun Nov 27 16:22:27 2005
+++ xoops2jp/html/class/XCube_ActionForm.class.php Thu Dec 1 14:16:33 2005
@@ -38,13 +38,25 @@
function setVar($key,$val)
{
+ //
+ // TODO Follow about array.
+ //
if(isset($this->mFormProperties[$key]))
$this->mFormProperties[$key]->setValue($val);
}
- function getVar($key)
+ function getVar($key,$index=null)
+ {
+ return isset($this->mFormProperties[$key]) ? $this->mFormProperties[$key]->getValue($index) : null;
+ }
+
+ /**
+ * Return form properties of this member property.
+ * @return XCube_AbstractProperty[]
+ */
+ function &getFormProperties()
{
- return isset($this->mFormProperties[$key]) ? $this->mFormProperties[$key]->getValue() : null;
+ return $this->mFormProperties;
}
function fetch()
@@ -209,7 +221,7 @@
$this->mValue=$val;
}
- function getValue()
+ function getValue($index=null)
{
return $this->mValue;
}
@@ -252,6 +264,15 @@
else
$this->mValue=array();
}
+
+ function getValue($index=null)
+ {
+ if($index==null)
+ return $this->mValue;
+
+ return $this->mValue[$index];
+ }
+
}
class XCube_IntProperty extends XCube_AbstractProperty
@@ -317,6 +338,21 @@
}
}
+class XCube_StringArrayProperty extends XCube_AbstractArrayProperty
+{
+ function fetch()
+ {
+ parent::fetch();
+ foreach(array_keys($this->mValue) as $key) {
+ if(preg_match_all("/[\\x00-\\x1f]/",$this->mValue[$key],$matches,PREG_PATTERN_ORDER)) {
+ foreach($matches[0] as $match) {
+ die("Get control code :" . ord($match));
+ }
+ }
+ }
+ }
+}
+
class XCube_TextProperty extends XCube_AbstractProperty
{
function fetch()
@@ -478,7 +514,7 @@
$flag = true;
foreach($val as $i) {
- $flag &= !empty($i);
+ $flag &= (strlen($i)!=0);
}
return $flag;
@@ -489,65 +525,135 @@
{
var $mName="minlength";
- function check($val,$vars)
+ function _check($val,$vars)
{
if(!empty($val))
return strlen($val)>=$vars['minlength'];
else
return true;
}
+
+ function _checkAsArray($val,$vars)
+ {
+ if(!count($val))
+ return false;
+
+ $flag = true;
+ foreach($val as $i) {
+ if(!empty($i))
+ $flag&=(strlen($i)>=$vars['minlength']);
+ }
+
+ return $flag;
+ }
}
class XCube_MaxlengthDepend extends XCube_AbstractDepend
{
var $mName="maxlength";
- function check($val,$vars)
+ function _check($val,$vars)
{
if(!empty($val))
return strlen($val)<=$vars['maxlength'];
else
return true;
}
+
+ function _checkAsArray($val,$vars)
+ {
+ if(!count($val))
+ return false;
+
+ $flag = true;
+ foreach($val as $i) {
+ if(!empty($i))
+ $flag&=(strlen($i)<=$vars['maxlength']);
+ }
+
+ return $flag;
+ }
}
class XCube_MinDepend extends XCube_AbstractDepend
{
var $mName="min";
- function check($val,$vars)
+ function _check($val,$vars)
{
if(!empty($val))
return $val>=$vars['min'];
else
return true;
}
+
+ function _checkAsArray($val,$vars)
+ {
+ if(!count($val))
+ return false;
+
+ $flag = true;
+ foreach($val as $i) {
+ if(!empty($i))
+ $flag&=($i>=$vars['min']);
+ }
+
+ return $flag;
+ }
}
class XCube_MaxDepend extends XCube_AbstractDepend
{
var $mName="max";
- function check($val,$vars)
+ function _check($val,$vars)
{
if(!empty($val))
return $val<=$vars['max'];
else
return true;
}
+
+ function _checkAsArray($val,$vars)
+ {
+ if(!count($val))
+ return false;
+
+ $flag = true;
+ foreach($val as $i) {
+ if(!empty($i))
+ $flag&=($i<=$vars['max']);
+ }
+
+ return $flag;
+ }
}
class XCube_IntRangeDepend extends XCube_AbstractDepend
{
var $mName="intRange";
- function check($val,$vars)
+ function _check($val,$vars)
{
if(!empty($val))
return ($val>=$vars['min'])&&($val<=$vars['max']);
else
return true;
}
+
+ function _checkAsArray($val,$vars)
+ {
+ if(!count($val))
+ return false;
+
+ $flag = true;
+ foreach($val as $i) {
+ if(!empty($i))
+ $flag&=(($i>=$vars['min'])&&($i<=$vars['max']));
+ }
+
+ return $flag;
+ }
}
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Dec 1 14:17:07 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 14:17:07 +0900
Subject: [xoops-cvslog 1261] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20051201051707.60CF82AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/LegacyModuleListAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/LegacyModuleListAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/LegacyModuleListAction.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/actions/LegacyModuleListAction.class.php:1.1.2.1 Thu Dec 1 01:17:37 2005
+++ xoops2jp/html/modules/base/admin/actions/LegacyModuleListAction.class.php Thu Dec 1 14:17:07 2005
@@ -1,15 +1,17 @@
getObjects();
+
+ $this->mForm=new ModuleSettingsForm();
+ $this->mForm->prepare();
+
+ $this->mForm->fetch();
+ $this->mForm->validate();
+
+ if($this->mForm->hasError() || !isset($_POST['dummy_ticket'])) {
+ return $this->_processConfirm($controller,$xoopsUser);
+ }
+ else {
+ return $this->_processSave($controller,$xoopsUser);
+ }
+
}
+ function _processConfirm(&$controller,&$xoopsUser)
+ {
+ $moduleHandler=&xoops_gethandler('module');
+ $objests=$moduleHandler->getObjects();
+
+ //
+ // Do mapping.
+ //
+ foreach($objests as $modObject) {
+ $this->mModuleObjects[$modObject->getVar('mid')]=&$modObject;
+ unset($modObject);
+ }
+
+ return LEGACY_ADMIN_FRAME_VIEW_INPUT;
+ }
+
+ function _processSave(&$controller,&$xoopsUser)
+ {
+ $moduleHandler=&xoops_gethandler('module');
+ $objects=$moduleHandler->getObjects();
+
+ $successFlag=true;
+ foreach($objects as $modObject) {
+ $mid=$modObject->getVar('mid');
+ $modObject->setVar('name',$this->mForm->getVar('name',$mid));
+ $modObject->setVar('weight',$this->mForm->getVar('weight',$mid));
+ $modObject->setVar('isactive',$this->mForm->getVar('isactive',$mid));
+
+ //
+ // Store.
+ //
+ $successFlag&=$moduleHandler->insert($modObject);
+ }
+
+ return $successFlag ? LEGACY_ADMIN_FRAME_VIEW_SUCCESS : LEGACY_ADMIN_FRAME_VIEW_ERROR;
+ }
+
+ /**
+ * To support a template writer, this send the list of mid that actionForm kept.
+ */
+ function executeViewInput(&$controller,&$xoopsUser,&$renderer)
+ {
+ $renderer->setTemplateName("legacy_admin_modulelist_confirm.html");
+ $renderer->setAttribute('moduleObjects',$this->mModuleObjects);
+ $renderer->setAttribute('actionForm',$this->mForm);
+
+ //
+ // To support a template writer, this send the list of mid that
+ // actionForm kept.
+ //
+ $tarray=&$this->mForm->getVar('name');
+ $renderer->setAttribute('mids',array_keys($tarray));
+ }
+
function executeViewIndex(&$controller,&$xoopsUser,&$renderer)
{
$renderer->setTemplateName("legacy_admin_modulelist_index.html");
@@ -51,6 +123,16 @@
$renderer->setAttribute('moduleObjects',$this->mModuleObjects);
}
+
+ function executeViewSuccess(&$controller,&$xoopsUser,&$renderer)
+ {
+ XCube_Utils::redirectHeader('./index.php?action=ModuleList',1,"*SUCCESS*");
+ }
+
+ function executeViewError(&$controller,&$xoopsUser,&$renderer)
+ {
+ XCube_Utils::redirectHeader('./index.php?action=ModuleList',1,"*ERROR*");
+ }
}
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Dec 1 14:17:19 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 14:17:19 +0900
Subject: [xoops-cvslog 1262] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20051201051719.9A83E2AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/ModuleSettingsForm.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ModuleSettingsForm.class.php:1.1.2.1
--- /dev/null Thu Dec 1 14:17:19 2005
+++ xoops2jp/html/modules/base/admin/forms/ModuleSettingsForm.class.php Thu Dec 1 14:17:19 2005
@@ -0,0 +1,39 @@
+mFormProperties['name']=new XCube_StringArrayProperty('name');
+ $this->mFormProperties['weight']=new XCube_IntArrayProperty('weight');
+ $this->mFormProperties['isactive']=new XCube_IntArrayProperty('isactive');
+
+ // set fields
+ $this->mFieldProperties['name']=new XCube_FieldProperty($this);
+ $this->mFieldProperties['name']->setDependsByArray(array('required','maxlength'));
+ $this->mFieldProperties['name']->addMessage("required",_MD_A_BASE_ERROR_REQUIRED,_MD_A_BASE_LANG_NAME,"140");
+ $this->mFieldProperties['name']->addMessage("maxlength",_MD_A_BASE_ERROR_MAXLENGTH,_MD_A_BASE_LANG_NAME,"140");
+ $this->mFieldProperties['name']->addVar("maxlength",140);
+
+ $this->mFieldProperties['weight']=new XCube_FieldProperty($this);
+ $this->mFieldProperties['weight']->setDependsByArray(array('required','min'));
+ $this->mFieldProperties['weight']->addMessage("min",_MD_A_BASE_ERROR_MIN,_MD_A_BASE_LANG_WEIGHT,"0");
+ $this->mFieldProperties['weight']->addVar("min",0);
+
+ $this->mFieldProperties['isactive']=new XCube_FieldProperty($this);
+ $this->mFieldProperties['isactive']->setDependsByArray(array('required','intRange'));
+ $this->mFieldProperties['isactive']->addMessage("min",_MD_A_BASE_ERROR_ABOUT_ISACTIVE);
+ $this->mFieldProperties['isactive']->addVar("min",0);
+ $this->mFieldProperties['isactive']->addVar("max",1);
+
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Thu Dec 1 14:18:19 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 14:18:19 +0900
Subject: [xoops-cvslog 1263] CVS update:
xoops2jp/html/modules/base/admin/templates
Message-ID: <20051201051819.ED52C2AC0AF@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html
diff -u xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.3
--- xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.2 Thu Dec 1 12:48:53 2005
+++ xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html Thu Dec 1 14:18:19 2005
@@ -1,6 +1,6 @@
MODULE LIST
-
From minahito @ users.sourceforge.jp Thu Dec 1 14:21:36 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 14:21:36 +0900
Subject: [xoops-cvslog 1265] CVS update:
xoops2jp/html/modules/base/language/japanese
Message-ID: <20051201052136.8EE432AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/language/japanese/admin.php
diff -u xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.1 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.2
--- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.1 Wed Nov 16 19:10:59 2005
+++ xoops2jp/html/modules/base/language/japanese/admin.php Thu Dec 1 14:21:36 2005
@@ -10,4 +10,13 @@
define("_MB_A_BASE_LANG_SEARCH","検索");
define("_MB_A_BASE_LANG_MENU","メニュー");
+define("_MD_A_BASE_LANG_NAME","名前");
+define("_MD_A_BASE_LANG_WEIGHT","表示優先度");
+define("_MD_A_BASE_LANG_ACTIVE","アクティブ");
+
+define("_MD_A_BASE_ERROR_REQUIRED","{0}は必ず入力して下さい");
+define("_MD_A_BASE_ERROR_MAXLENGTH","{0}は半角{1}文字以内で入力して下さい");
+define("_MD_A_BASE_ERROR_MIN","{0}は{1}以上の数値を指定して下さい");
+define("_MD_A_BASE_ERROR_ABOUT_ISACTIVE","ISACTIVEに指定した値が不正です");
+
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Dec 1 21:41:50 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 21:41:50 +0900
Subject: [xoops-cvslog 1266] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20051201124150.4DC792AC07B@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/LegacyModuleInfoAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/actions/LegacyModuleInfoAction.class.php:1.1.2.1
--- /dev/null Thu Dec 1 21:41:50 2005
+++ xoops2jp/html/modules/base/admin/actions/LegacyModuleInfoAction.class.php Thu Dec 1 21:41:50 2005
@@ -0,0 +1,64 @@
+mModuleObject=&$moduleHandler->getByDirname($dirname);
+
+ //
+ // If a module is installed, load modinfo and go to special displaying.
+ //
+ if(is_object($this->mModuleObject)) {
+ $this->mModuleObject->loadAdminMenu();
+ $this->mModuleObject->loadInfo($dirname);
+ return LEGACY_ADMIN_FRAME_VIEW_SUCCESS;
+ }
+
+ $this->mModuleObject=&$moduleHandler->create();
+ $this->mModuleObject->loadInfoAsVar($dirname);
+
+ return LEGACY_ADMIN_FRAME_VIEW_INPUT;
+ }
+
+ function executeViewSuccess(&$controller,&$xoopsUser,&$renderer)
+ {
+ $renderer->setTemplateName("legacy_admin_inst_moduleinfo.html");
+ $renderer->setAttribute('module',$this->mModuleObject);
+ }
+
+ function executeViewInput(&$controller,&$xoopsUser,&$renderer)
+ {
+ $renderer->setTemplateName("legacy_admin_uninst_moduleinfo.html");
+ $renderer->setAttribute('module',$this->mModuleObject);
+ }
+
+ function executeViewError(&$controller,&$xoopsUser,&$renderer)
+ {
+ XCube_Utils::redirectHeader('./index.php?action=ModuleList',1,"*ERROR*");
+ }
+}
+
+?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Dec 1 21:42:06 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 21:42:06 +0900
Subject: [xoops-cvslog 1267] CVS update:
xoops2jp/html/modules/base/admin/templates
Message-ID: <20051201124206.54D9A2AC082@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/templates/legacy_admin_inst_moduleinfo.html
diff -u /dev/null xoops2jp/html/modules/base/admin/templates/legacy_admin_inst_moduleinfo.html:1.1.2.1
--- /dev/null Thu Dec 1 21:42:06 2005
+++ xoops2jp/html/modules/base/admin/templates/legacy_admin_inst_moduleinfo.html Thu Dec 1 21:42:06 2005
@@ -0,0 +1,4 @@
+
+This template shows a module that is already installed.
+
+<{$module->getVar('name')}>
From minahito @ users.sourceforge.jp Thu Dec 1 21:42:15 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 1 Dec 2005 21:42:15 +0900
Subject: [xoops-cvslog 1268] CVS update:
xoops2jp/html/modules/base/admin/templates
Message-ID: <20051201124215.B453E2AC07B@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/templates/legacy_admin_uninst_moduleinfo.html
diff -u /dev/null xoops2jp/html/modules/base/admin/templates/legacy_admin_uninst_moduleinfo.html:1.1.2.1
--- /dev/null Thu Dec 1 21:42:15 2005
+++ xoops2jp/html/modules/base/admin/templates/legacy_admin_uninst_moduleinfo.html Thu Dec 1 21:42:15 2005
@@ -0,0 +1,7 @@
+
+This template shows a module that is not installed yet.
+
+<{$module->getVar('name')}>
+
+<{$module->modinfo.name|escape}>
+<{$module->modinfo.description|escape}>
From minahito @ users.sourceforge.jp Sat Dec 3 15:50:39 2005
From: minahito @ users.sourceforge.jp (Minahito)
Date: Sat, 3 Dec 2005 15:50:39 +0900
Subject: [xoops-cvslog 1269] CVS update:
xoops2jp/html/modules/base/admin/templates
Message-ID: <20051203065039.78CB42AC08B@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html
diff -u xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.3 xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.4
--- xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html:1.1.2.3 Thu Dec 1 14:18:19 2005
+++ xoops2jp/html/modules/base/admin/templates/legacy_admin_modulelist_index.html Sat Dec 3 15:50:39 2005
@@ -2,10 +2,10 @@