mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
Issue 2967 Variable name misspelled fix. Simplyfy member module SSLAction registration. Add a multi-SSL-Action registering method.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12758 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
32b2dd33b9
commit
008ef284c8
2 changed files with 61 additions and 25 deletions
|
|
@ -180,7 +180,7 @@ class Context
|
|||
$this->get_vars = new stdClass();
|
||||
|
||||
// include ssl action cache file
|
||||
$this->sslActionCacheFile = FileHandler::getRealPath($theInstance->sslActionCacheFile);
|
||||
$this->sslActionCacheFile = FileHandler::getRealPath($this->sslActionCacheFile);
|
||||
if(is_readable($this->sslActionCacheFile))
|
||||
{
|
||||
require_once($this->sslActionCacheFile);
|
||||
|
|
@ -1839,7 +1839,7 @@ class Context
|
|||
}
|
||||
|
||||
/**
|
||||
* Register if actions is to be encrypted by SSL. Those actions are sent to https in common/js/xml_handler.js
|
||||
* Register if an action is to be encrypted by SSL. Those actions are sent to https in common/js/xml_handler.js
|
||||
*
|
||||
* @param string $action act name
|
||||
* @return void
|
||||
|
|
@ -1861,6 +1861,51 @@ class Context
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register if actions are to be encrypted by SSL. Those actions are sent to https in common/js/xml_handler.js
|
||||
*
|
||||
* @param string $action act name
|
||||
* @return void
|
||||
*/
|
||||
function addSSLActions($action_array)
|
||||
{
|
||||
is_a($this, 'Context') ? $self = $this : $self = Context::getInstance();
|
||||
|
||||
if(!is_readable($self->sslActionCacheFile))
|
||||
{
|
||||
$buff = '<?php if(!defined("__XE__"))exit;';
|
||||
FileHandler::writeFile($self->sslActionCacheFile, $buff);
|
||||
}
|
||||
|
||||
foreach($action_array as $action)
|
||||
{
|
||||
if(!isset($self->ssl_actions[$action]))
|
||||
{
|
||||
$sslActionCacheString = sprintf('$sslActions[\'%s\'] = 1;', $action);
|
||||
FileHandler::writeFile($self->sslActionCacheFile, $sslActionCacheString, 'a');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete if action is registerd to be encrypted by SSL.
|
||||
*
|
||||
* @param string $action act name
|
||||
* @return void
|
||||
*/
|
||||
function subtractSSLAction($action)
|
||||
{
|
||||
is_a($this, 'Context') ? $self = $this : $self = Context::getInstance();
|
||||
|
||||
if($self->isExistsSSLAction($action))
|
||||
{
|
||||
$sslActionCacheString = sprintf('$sslActions[\'%s\'] = 1;', $action);
|
||||
$buff = FileHandler::readFile($self->sslActionCacheFile);
|
||||
$buff = str_replace($sslActionCacheString, '', $buff);
|
||||
FileHandler::writeFile($self->sslActionCacheFile, $buff);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get SSL Action
|
||||
*
|
||||
|
|
|
|||
|
|
@ -23,29 +23,7 @@ class member extends ModuleObject {
|
|||
|
||||
$oModuleModel = &getModel('module');
|
||||
$member_config = $oModuleModel->getModuleConfig('member');
|
||||
// Set to use SSL upon actions related member join/information/password and so on
|
||||
if(Context::get('_use_ssl') == 'optional')
|
||||
{
|
||||
Context::addSSLAction('dispMemberModifyPassword');
|
||||
Context::addSSLAction('dispMemberSignUpForm');
|
||||
Context::addSSLAction('dispMemberModifyInfo');
|
||||
Context::addSSLAction('dispMemberModifyEmailAddress');
|
||||
Context::addSSLAction('dispMemberGetTempPassword');
|
||||
Context::addSSLAction('dispMemberResendAuthMail');
|
||||
Context::addSSLAction('dispMemberLoginForm');
|
||||
Context::addSSLAction('dispMemberFindAccount');
|
||||
Context::addSSLAction('dispMemberLeave');
|
||||
Context::addSSLAction('procMemberLogin');
|
||||
Context::addSSLAction('procMemberModifyPassword');
|
||||
Context::addSSLAction('procMemberInsert');
|
||||
Context::addSSLAction('procMemberModifyInfo');
|
||||
Context::addSSLAction('procMemberFindAccount');
|
||||
Context::addSSLAction('procMemberModifyEmailAddress');
|
||||
Context::addSSLAction('procMemberUpdateAuthMail');
|
||||
Context::addSSLAction('procMemberResendAuthMail');
|
||||
Context::addSSLAction('procMemberLeave');
|
||||
//Context::addSSLAction('getMemberMenu');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -224,6 +202,12 @@ class member extends ModuleObject {
|
|||
if(!is_readable('./files/ruleset/login.xml')) return true;
|
||||
if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) return true;
|
||||
|
||||
// Set to use SSL upon actions related member join/information/password and so on. 2013.02.15
|
||||
if(!Context::isExistsSSLAction('getMemberMenu'))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -361,6 +345,13 @@ class member extends ModuleObject {
|
|||
if(!is_readable('./files/ruleset/find_member_account_by_question.xml'))
|
||||
$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
|
||||
|
||||
// Set to use SSL upon actions related member join/information/password and so on. 2013.02.15
|
||||
if(!Context::isExistsSSLAction('getMemberMenu'))
|
||||
{
|
||||
$ssl_actions = array('dispMemberModifyPassword', 'dispMemberSignUpForm', 'dispMemberModifyInfo', 'dispMemberModifyEmailAddress', 'dispMemberGetTempPassword', 'dispMemberResendAuthMail', 'dispMemberLoginForm', 'dispMemberFindAccount', 'dispMemberLeave', 'procMemberLogin', 'procMemberModifyPassword', 'procMemberInsert', 'procMemberModifyInfo', 'procMemberFindAccount', 'procMemberModifyEmailAddress', 'procMemberUpdateAuthMail', 'procMemberResendAuthMail', 'procMemberLeave', 'getMemberMenu');
|
||||
Context::addSSLActions($ssl_actions);
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue