mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
issue 46 file, communication module ruleset not committed.
comment Validator not committed. threfore this source commit git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8507 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b4f4afcc17
commit
6cd7c0e5ad
12 changed files with 101 additions and 11 deletions
|
|
@ -332,16 +332,21 @@
|
|||
Context::addHtmlFooter($footer);
|
||||
}
|
||||
|
||||
// execute the action, and if failed, set error
|
||||
if(!$oModule->proc())
|
||||
// if failed message exists in session, set context
|
||||
$this->_setInputErrorToContext();
|
||||
|
||||
$procResult = $oModule->proc();
|
||||
//if(!$oModule->proc())
|
||||
if(!$procResult)
|
||||
{
|
||||
$this->error = $oModule->getMessage();
|
||||
// case post, redirect page
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
|
||||
{
|
||||
$returnUrl = Context::get('error_return_url')?Context::get('error_return_url'):getUrl();
|
||||
$errorMsg = $oModule->getMessage() ? $oModule->getMessage() : 'module process error';
|
||||
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = $oModule->getMessage();
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = $errorMsg;
|
||||
$_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] = $returnUrl;
|
||||
$this->_setInputValueToSession();
|
||||
}
|
||||
|
|
@ -354,10 +359,18 @@
|
|||
$_SESSION['INPUT_ERROR'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $oModule;
|
||||
}
|
||||
|
||||
function _setInputErrorToContext()
|
||||
{
|
||||
if($_SESSION['XE_VALIDATOR_ERROR'] && !Context::get('XE_VALIDATOR_ERROR')) Context::set('XE_VALIDATOR_ERROR', $_SESSION['XE_VALIDATOR_ERROR']);
|
||||
if($_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] && !Context::get('XE_VALIDATOR_ERROR_RETURN_URL')) Context::set('XE_VALIDATOR_ERROR_RETURN_URL', $_SESSION['XE_VALIDATOR_ERROR_RETURN_URL']);
|
||||
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = '';
|
||||
$_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] = '';
|
||||
}
|
||||
|
||||
function _setInputValueToSession()
|
||||
{
|
||||
$requestVars = Context::getRequestVars();
|
||||
|
|
@ -459,15 +472,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
if($_SESSION['XE_VALIDATOR_ERROR'] && !Context::get('XE_VALIDATOR_ERROR')) Context::set('XE_VALIDATOR_ERROR', $_SESSION['XE_VALIDATOR_ERROR']);
|
||||
if($_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] && !Context::get('XE_VALIDATOR_ERROR_RETURN_URL')) Context::set('XE_VALIDATOR_ERROR_RETURN_URL', $_SESSION['XE_VALIDATOR_ERROR_RETURN_URL']);
|
||||
|
||||
// Display contents
|
||||
$oDisplayHandler = new DisplayHandler();
|
||||
$oDisplayHandler->printContent($oModule);
|
||||
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = '';
|
||||
$_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] = '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -616,6 +616,11 @@
|
|||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispBoardAdminContent');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function setCommentModuleConfig($srl, $comment_config){
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||
<form ruleset="insertCommentModuleConfig" action="./" method="post">
|
||||
<input type="hidden" name="act" value="procCommentInsertModuleConfig" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', $module, 'act', $act, 'module_srl', $module_srl)}" />
|
||||
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
|
||||
|
||||
<h4 class="xeAdmin">{$lang->comment}</h4>
|
||||
|
|
|
|||
7
modules/communication/ruleset/addFriend.xml
Normal file
7
modules/communication/ruleset/addFriend.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
</fields>
|
||||
</ruleset>
|
||||
8
modules/communication/ruleset/addFriendGroup.xml
Normal file
8
modules/communication/ruleset/addFriendGroup.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="title" required="true" length="1:240"/>
|
||||
</fields>
|
||||
</ruleset>
|
||||
8
modules/communication/ruleset/deleteCheckedFriend.xml
Normal file
8
modules/communication/ruleset/deleteCheckedFriend.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="friend_srl_list" required="true"/>
|
||||
</fields>
|
||||
</ruleset>
|
||||
7
modules/communication/ruleset/insertConfig.xml
Normal file
7
modules/communication/ruleset/insertConfig.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
</fields>
|
||||
</ruleset>
|
||||
8
modules/communication/ruleset/moveCheckedFriend.xml
Normal file
8
modules/communication/ruleset/moveCheckedFriend.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="friend_srl_list" required="true"/>
|
||||
</fields>
|
||||
</ruleset>
|
||||
9
modules/communication/ruleset/sendMessage.xml
Normal file
9
modules/communication/ruleset/sendMessage.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="title" required="true" length="1:240"/>
|
||||
<field name="content" required="true" length="1:"/>
|
||||
</fields>
|
||||
</ruleset>
|
||||
8
modules/file/ruleset/deleteChecked.xml
Normal file
8
modules/file/ruleset/deleteChecked.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="cart" required="true"/>
|
||||
</fields>
|
||||
</ruleset>
|
||||
12
modules/file/ruleset/fileModuleConfig.xml
Normal file
12
modules/file/ruleset/fileModuleConfig.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
<rule name="extension" type="regex" test="/^(?:\*\.\*|(\*\.\w+;\s*)*\*\.\w+;?)$/i" />
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="allowed_filesize" required="true" rule="number" default="2" />
|
||||
<field name="allowed_attach_size" required="true" rule="number" default="2" />
|
||||
<field name="allowed_filetypes" required="true" rule="extension" />
|
||||
<field name="download_grant" required="true" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
11
modules/file/ruleset/insertConfig.xml
Normal file
11
modules/file/ruleset/insertConfig.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
<rule name="extension" type="regex" test="/^(?:\*\.\*|(\*\.\w+;\s*)*\*\.\w+;?)$/i" />
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="allowed_filesize" required="true" rule="number" default="2" />
|
||||
<field name="allowed_attach_size" required="true" rule="number" default="2" />
|
||||
<field name="allowed_filetypes" required="true" rule="extension" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
Loading…
Add table
Add a link
Reference in a new issue