mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 06:39:56 +09:00
Merge branch 'develop' of https://github.com/xpressengine/xe-core into develop
# By bnu (17) and khongchi (5)
# Via khongchi
* 'develop' of https://github.com/xpressengine/xe-core: (22 commits)
#270 비밀번호 보안수준 설정 기능 추가 (보완)
version update 1.7.4-beta.6
#270 비밀번호 보안수준 설정 기능 추가
#279 이메일을 체크할 때 항상 대소문자 구분 없이 체크하도록 변경
#278 getModuleExtraVars()의 잘못 된 처리 수정.
#278 25ca3e1 에서 query 호출 시점을 잘못 잡는 문제 수정.
#278 debug 환경 개선. - query 목록에 query id와 파일 및 메소드명 표시 - 실행 중 중단 시 중단 시점의 파일과 메소드명 표시
NOISSUE syntax error;;
#242 module_part_config 초기화 문제로 인해 되돌림.
Revert "NOISSUE point 모듈에서 modulePartConfig 변수를 잘못 사용하는 문제 수정."
#62 잘못 설정한 rule 제거.
NOISSUE 불필요 제거.
#242 캐시 사용 시 columnList 초기화.
NOISSUE point 모듈에서 modulePartConfig 변수를 잘못 사용하는 문제 수정.
#62 nick_name 글자 제한 추가.
#242 member_info 캐시 초기화 빠진 부분 추가.
#242 member_info 캐시는 file cache에서 제외.
NOISSUE php 버전 호환성 문제 고침.
#242 문서 사용자 정의 필드 설정이 갱신 안 되는 문제 수정.
NOISSUE cache/module_info 파일이 없을 때 문제 수정. include.
...
This commit is contained in:
commit
ca0c232448
24 changed files with 316 additions and 147 deletions
23
classes/cache/CacheHandler.class.php
vendored
23
classes/cache/CacheHandler.class.php
vendored
|
|
@ -125,6 +125,7 @@ class CacheHandler extends Handler
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,6 +138,7 @@ class CacheHandler extends Handler
|
||||||
function getCacheKey($key)
|
function getCacheKey($key)
|
||||||
{
|
{
|
||||||
$key = str_replace('/', ':', $key);
|
$key = str_replace('/', ':', $key);
|
||||||
|
|
||||||
return __XE_VERSION__ . ':' . $key;
|
return __XE_VERSION__ . ':' . $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -150,11 +152,13 @@ class CacheHandler extends Handler
|
||||||
*/
|
*/
|
||||||
function get($key, $modified_time = 0)
|
function get($key, $modified_time = 0)
|
||||||
{
|
{
|
||||||
$key = $this->getCacheKey($key);
|
|
||||||
if(!$this->handler)
|
if(!$this->handler)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$key = $this->getCacheKey($key);
|
||||||
|
|
||||||
return $this->handler->get($key, $modified_time);
|
return $this->handler->get($key, $modified_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -170,13 +174,13 @@ class CacheHandler extends Handler
|
||||||
*/
|
*/
|
||||||
function put($key, $obj, $valid_time = 0)
|
function put($key, $obj, $valid_time = 0)
|
||||||
{
|
{
|
||||||
if(!$key) return false;
|
if(!$this->handler && !$key)
|
||||||
|
|
||||||
$key = $this->getCacheKey($key);
|
|
||||||
if(!$this->handler)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$key = $this->getCacheKey($key);
|
||||||
|
|
||||||
return $this->handler->put($key, $obj, $valid_time);
|
return $this->handler->put($key, $obj, $valid_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -188,11 +192,13 @@ class CacheHandler extends Handler
|
||||||
*/
|
*/
|
||||||
function delete($key)
|
function delete($key)
|
||||||
{
|
{
|
||||||
$key = $this->getCacheKey($key);
|
|
||||||
if(!$this->handler)
|
if(!$this->handler)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$key = $this->getCacheKey($key);
|
||||||
|
|
||||||
return $this->handler->delete($key);
|
return $this->handler->delete($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -206,11 +212,13 @@ class CacheHandler extends Handler
|
||||||
*/
|
*/
|
||||||
function isValid($key, $modified_time)
|
function isValid($key, $modified_time)
|
||||||
{
|
{
|
||||||
$key = $this->getCacheKey($key);
|
|
||||||
if(!$this->handler)
|
if(!$this->handler)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$key = $this->getCacheKey($key);
|
||||||
|
|
||||||
return $this->handler->isValid($key, $modified_time);
|
return $this->handler->isValid($key, $modified_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -225,6 +233,7 @@ class CacheHandler extends Handler
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->handler->truncate();
|
return $this->handler->truncate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -437,18 +437,33 @@ class DB
|
||||||
$this->elapsed_time = $elapsed_time;
|
$this->elapsed_time = $elapsed_time;
|
||||||
$GLOBALS['__db_elapsed_time__'] += $elapsed_time;
|
$GLOBALS['__db_elapsed_time__'] += $elapsed_time;
|
||||||
|
|
||||||
|
$site_module_info = Context::get('site_module_info');
|
||||||
|
$log = array();
|
||||||
$log['query'] = $this->query;
|
$log['query'] = $this->query;
|
||||||
$log['elapsed_time'] = $elapsed_time;
|
$log['elapsed_time'] = $elapsed_time;
|
||||||
$log['connection'] = $this->connection;
|
$log['connection'] = $this->connection;
|
||||||
$log['query_id'] = $this->query_id;
|
$log['query_id'] = $this->query_id;
|
||||||
|
$log['module'] = $site_module_info->module;
|
||||||
|
$log['act'] = Context::get('act');
|
||||||
|
$log['time'] = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||||
|
foreach($bt as $no => $call)
|
||||||
|
{
|
||||||
|
if($call['function'] == 'executeQuery' || $call['function'] == 'executeQueryArray')
|
||||||
|
{
|
||||||
|
$call_no = $no;
|
||||||
|
$call_no++;
|
||||||
|
$log['called_file'] = $bt[$call_no]['file'].':'.$bt[$call_no]['line'];
|
||||||
|
$call_no++;
|
||||||
|
$log['called_method'] = $bt[$call_no]['class'].$bt[$call_no]['type'].$bt[$call_no]['function'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// leave error log if an error occured (if __DEBUG_DB_OUTPUT__ is defined)
|
// leave error log if an error occured (if __DEBUG_DB_OUTPUT__ is defined)
|
||||||
if($this->isError())
|
if($this->isError())
|
||||||
{
|
{
|
||||||
$site_module_info = Context::get('site_module_info');
|
|
||||||
$log['module'] = $site_module_info->module;
|
|
||||||
$log['act'] = Context::get('act');
|
|
||||||
$log['time'] = date('Y-m-d H:i:s');
|
|
||||||
$log['result'] = 'Failed';
|
$log['result'] = 'Failed';
|
||||||
$log['errno'] = $this->errno;
|
$log['errno'] = $this->errno;
|
||||||
$log['errstr'] = $this->errstr;
|
$log['errstr'] = $this->errstr;
|
||||||
|
|
|
||||||
|
|
@ -197,10 +197,10 @@ class DisplayHandler extends Handler
|
||||||
// display DB query history
|
// display DB query history
|
||||||
if((__DEBUG__ & 4) && $GLOBALS['__db_queries__'])
|
if((__DEBUG__ & 4) && $GLOBALS['__db_queries__'])
|
||||||
{
|
{
|
||||||
$queries_output = array(array('Result', 'Query ID', 'Query', 'Elapsed time'));
|
$queries_output = array(array('Result/'.PHP_EOL.'Elapsed time', 'Query ID', 'Query'));
|
||||||
foreach($GLOBALS['__db_queries__'] as $query)
|
foreach($GLOBALS['__db_queries__'] as $query)
|
||||||
{
|
{
|
||||||
$queries_output[] = array($query['result'], $query['query_id'], $query['query'], sprintf('%0.5f', $query['elapsed_time']));
|
$queries_output[] = array($query['result'] . PHP_EOL . sprintf('%0.5f', $query['elapsed_time']), str_replace(_XE_PATH_, '', $query['called_file']) . PHP_EOL . $query['called_method'] . '()' . PHP_EOL . $query['query_id'], $query['query']);
|
||||||
}
|
}
|
||||||
$firephp->fb(
|
$firephp->fb(
|
||||||
array(
|
array(
|
||||||
|
|
@ -215,7 +215,7 @@ class DisplayHandler extends Handler
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
$buff = "";
|
$buff = array();
|
||||||
// display total execution time and Request/Response info
|
// display total execution time and Request/Response info
|
||||||
if(__DEBUG__ & 2)
|
if(__DEBUG__ & 2)
|
||||||
{
|
{
|
||||||
|
|
@ -225,29 +225,29 @@ class DisplayHandler extends Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
// Request/Response information
|
// Request/Response information
|
||||||
$buff .= "\n- Request/ Response info\n";
|
$buff[] = "\n- Request/ Response info";
|
||||||
$buff .= sprintf("\tRequest URI \t\t\t: %s:%s%s%s%s\n", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING'] ? '?' : '', $_SERVER['QUERY_STRING']);
|
$buff[] = sprintf("\tRequest URI \t\t\t: %s:%s%s%s%s", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING'] ? '?' : '', $_SERVER['QUERY_STRING']);
|
||||||
$buff .= sprintf("\tRequest method \t\t\t: %s\n", $_SERVER['REQUEST_METHOD']);
|
$buff[] = sprintf("\tRequest method \t\t\t: %s", $_SERVER['REQUEST_METHOD']);
|
||||||
$buff .= sprintf("\tResponse method \t\t: %s\n", Context::getResponseMethod());
|
$buff[] = sprintf("\tResponse method \t\t: %s", Context::getResponseMethod());
|
||||||
$buff .= sprintf("\tResponse contents size\t\t: %d byte\n", $this->content_size);
|
$buff[] = sprintf("\tResponse contents size\t: %d byte", $this->content_size);
|
||||||
|
|
||||||
// total execution time
|
// total execution time
|
||||||
$buff .= sprintf("\n- Total elapsed time : %0.5f sec\n", $end - __StartTime__);
|
$buff[] = sprintf("\n- Total elapsed time : %0.5f sec", $end - __StartTime__);
|
||||||
|
|
||||||
$buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']);
|
$buff[] = sprintf("\tclass file load elapsed time \t: %0.5f sec", $GLOBALS['__elapsed_class_load__']);
|
||||||
$buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)\n", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']);
|
$buff[] = sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']);
|
||||||
$buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']);
|
$buff[] = sprintf("\tXmlParse compile elapsed time\t: %0.5f sec", $GLOBALS['__xmlparse_elapsed__']);
|
||||||
$buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end - __StartTime__ - $GLOBALS['__template_elapsed__'] - $GLOBALS['__xmlparse_elapsed__'] - $GLOBALS['__db_elapsed_time__'] - $GLOBALS['__elapsed_class_load__']);
|
$buff[] = sprintf("\tPHP elapsed time \t\t\t\t: %0.5f sec", $end - __StartTime__ - $GLOBALS['__template_elapsed__'] - $GLOBALS['__xmlparse_elapsed__'] - $GLOBALS['__db_elapsed_time__'] - $GLOBALS['__elapsed_class_load__']);
|
||||||
$buff .= sprintf("\tDB class elapsed time \t\t: %0.5f sec\n", $GLOBALS['__dbclass_elapsed_time__'] - $GLOBALS['__db_elapsed_time__']);
|
$buff[] = sprintf("\tDB class elapsed time \t\t\t: %0.5f sec", $GLOBALS['__dbclass_elapsed_time__'] - $GLOBALS['__db_elapsed_time__']);
|
||||||
|
|
||||||
// widget execution time
|
// widget execution time
|
||||||
$buff .= sprintf("\n\tWidgets elapsed time \t\t: %0.5f sec", $GLOBALS['__widget_excute_elapsed__']);
|
$buff[] = sprintf("\tWidgets elapsed time \t\t\t: %0.5f sec", $GLOBALS['__widget_excute_elapsed__']);
|
||||||
|
|
||||||
// layout execution time
|
// layout execution time
|
||||||
$buff .= sprintf("\n\tLayout compile elapsed time \t: %0.5f sec", $GLOBALS['__layout_compile_elapsed__']);
|
$buff[] = sprintf("\tLayout compile elapsed time \t: %0.5f sec", $GLOBALS['__layout_compile_elapsed__']);
|
||||||
|
|
||||||
// Widgets, the editor component replacement time
|
// Widgets, the editor component replacement time
|
||||||
$buff .= sprintf("\n\tTrans Content \t\t\t: %0.5f sec\n", $GLOBALS['__trans_content_elapsed__']);
|
$buff[] = sprintf("\tTrans Content \t\t\t\t\t: %0.5f sec", $GLOBALS['__trans_content_elapsed__']);
|
||||||
}
|
}
|
||||||
// DB Logging
|
// DB Logging
|
||||||
if(__DEBUG__ & 4)
|
if(__DEBUG__ & 4)
|
||||||
|
|
@ -259,21 +259,23 @@ class DisplayHandler extends Handler
|
||||||
|
|
||||||
if($GLOBALS['__db_queries__'])
|
if($GLOBALS['__db_queries__'])
|
||||||
{
|
{
|
||||||
$buff .= sprintf("\n- DB Queries : %d Queries. %0.5f sec\n", count($GLOBALS['__db_queries__']), $GLOBALS['__db_elapsed_time__']);
|
$buff[] = sprintf("\n- DB Queries : %d Queries. %0.5f sec", count($GLOBALS['__db_queries__']), $GLOBALS['__db_elapsed_time__']);
|
||||||
$num = 0;
|
$num = 0;
|
||||||
|
|
||||||
foreach($GLOBALS['__db_queries__'] as $query)
|
foreach($GLOBALS['__db_queries__'] as $query)
|
||||||
{
|
{
|
||||||
$buff .= sprintf("\t%02d. %s\n\t\t%0.6f sec. ", ++$num, $query['query'], $query['elapsed_time']);
|
|
||||||
if($query['result'] == 'Success')
|
if($query['result'] == 'Success')
|
||||||
{
|
{
|
||||||
$buff .= "Query Success\n";
|
$query_result = "Query Success";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$buff .= sprintf("Query $s : %d\n\t\t\t %s\n", $query['result'], $query['errno'], $query['errstr']);
|
$query_result = sprintf("Query $s : %d\n\t\t\t %s", $query['result'], $query['errno'], $query['errstr']);
|
||||||
}
|
}
|
||||||
$buff .= sprintf("\t\tConnection: %s\n", $query['connection']);
|
$buff[] = sprintf("\t%02d. %s\n\t\t%0.6f sec. %s.", ++$num, $query['query'], $query['elapsed_time'], $query_result);
|
||||||
|
$buff[] = sprintf("\t\tConnection: %s.", $query['connection']);
|
||||||
|
$buff[] = sprintf("\t\tQuery ID: %s", $query['query_id']);
|
||||||
|
$buff[] = sprintf("\t\tCalled: %s. %s()", str_replace(_XE_PATH_, '', $query['called_file']), $query['called_method']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -281,23 +283,25 @@ class DisplayHandler extends Handler
|
||||||
// Output in HTML comments
|
// Output in HTML comments
|
||||||
if($buff && __DEBUG_OUTPUT__ == 1 && Context::getResponseMethod() == 'HTML')
|
if($buff && __DEBUG_OUTPUT__ == 1 && Context::getResponseMethod() == 'HTML')
|
||||||
{
|
{
|
||||||
$buff = sprintf("[%s %s:%d]\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($buff, true));
|
$buff = implode("\r\n", $buff);
|
||||||
|
$buff = sprintf("[%s %s:%d]\r\n%s", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($buff, true));
|
||||||
|
|
||||||
if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR'])
|
if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR'])
|
||||||
{
|
{
|
||||||
$buff = 'The IP address is not allowed. Change the value of __DEBUG_PROTECT_IP__ into your IP address in config/config.user.inc.php or config/config.inc.php';
|
$buff = 'The IP address is not allowed. Change the value of __DEBUG_PROTECT_IP__ into your IP address in config/config.user.inc.php or config/config.inc.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
return "<!--\r\n" . $buff . "\r\n-->";
|
return "<!--\r\n" . implode("\r\n", $buff) . "\r\n-->";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output to a file
|
// Output to a file
|
||||||
if($buff && __DEBUG_OUTPUT__ == 0)
|
if($buff && __DEBUG_OUTPUT__ == 0)
|
||||||
{
|
{
|
||||||
$debug_file = _XE_PATH_ . 'files/_debug_message.php';
|
$debug_file = _XE_PATH_ . 'files/_debug_message.php';
|
||||||
$buff = sprintf("[%s %s:%d]\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($buff, true));
|
$buff = implode(PHP_EOL, $buff);
|
||||||
|
$buff = sprintf("[%s]\n%s", date('Y-m-d H:i:s'), print_r($buff, true));
|
||||||
|
|
||||||
$buff = str_repeat('=', 40) . "\n" . $buff . str_repeat('-', 40);
|
$buff = str_repeat('=', 80) . "\n" . $buff . "\n" . str_repeat('-', 80);
|
||||||
$buff = "\n<?php\n/*" . $buff . "*/\n?>\n";
|
$buff = "\n<?php\n/*" . $buff . "*/\n?>\n";
|
||||||
|
|
||||||
if (!@file_put_contents($debug_file, $buff, FILE_APPEND|LOCK_EX))
|
if (!@file_put_contents($debug_file, $buff, FILE_APPEND|LOCK_EX))
|
||||||
|
|
|
||||||
|
|
@ -674,6 +674,7 @@ class ModuleHandler extends Handler
|
||||||
$message = $oModule->getMessage();
|
$message = $oModule->getMessage();
|
||||||
$messageType = $oModule->getMessageType();
|
$messageType = $oModule->getMessageType();
|
||||||
$redirectUrl = $oModule->getRedirectUrl();
|
$redirectUrl = $oModule->getRedirectUrl();
|
||||||
|
if($messageType == 'error') debugPrint($message, 'ERROR');
|
||||||
|
|
||||||
if(!$procResult)
|
if(!$procResult)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -384,6 +384,7 @@ class ModuleObject extends Object
|
||||||
// pass if stop_proc is true
|
// pass if stop_proc is true
|
||||||
if($this->stop_proc)
|
if($this->stop_proc)
|
||||||
{
|
{
|
||||||
|
debugPrint($this->message, 'ERROR');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3423,20 +3423,6 @@
|
||||||
<value xml:lang="vi"><![CDATA[Ô chọn(Nhiều lựa chọn)]]></value>
|
<value xml:lang="vi"><![CDATA[Ô chọn(Nhiều lựa chọn)]]></value>
|
||||||
<value xml:lang="mn"><![CDATA[Олон сонголт хийх(checkbox)]]></value>
|
<value xml:lang="mn"><![CDATA[Олон сонголт хийх(checkbox)]]></value>
|
||||||
</item>
|
</item>
|
||||||
<item name="select_multiple">
|
|
||||||
<value xml:lang="ko"><![CDATA[다중 선택(multiple select)]]></value>
|
|
||||||
<value xml:lang="en"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
<value xml:lang="jp"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
<value xml:lang="zh-CN"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
<value xml:lang="zh-TW"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
<value xml:lang="fr"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
<value xml:lang="de"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
<value xml:lang="ru"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
<value xml:lang="es"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
<value xml:lang="tr"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
<value xml:lang="vi"><![CDATA[multiple select box(multiple selection))]]></value>
|
|
||||||
<value xml:lang="mn"><![CDATA[multiple select box(multiple selection)]]></value>
|
|
||||||
</item>
|
|
||||||
<item name="kr_zip">
|
<item name="kr_zip">
|
||||||
<value xml:lang="ko"><![CDATA[한국주소(zip)]]></value>
|
<value xml:lang="ko"><![CDATA[한국주소(zip)]]></value>
|
||||||
<value xml:lang="en"><![CDATA[zip code(Korean)]]></value>
|
<value xml:lang="en"><![CDATA[zip code(Korean)]]></value>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ define('__ZBXE__', __XE__);
|
||||||
/**
|
/**
|
||||||
* Display XE's full version.
|
* Display XE's full version.
|
||||||
*/
|
*/
|
||||||
define('__XE_VERSION__', '1.7.4-beta.5');
|
define('__XE_VERSION__', '1.7.4-beta.6');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead.
|
* @deprecated __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead.
|
||||||
|
|
|
||||||
|
|
@ -749,19 +749,24 @@ function getEncodeEmailAddress($email)
|
||||||
*/
|
*/
|
||||||
function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debug_message.php')
|
function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debug_message.php')
|
||||||
{
|
{
|
||||||
|
static $debug_file;
|
||||||
|
static $debug_file_exist;
|
||||||
|
|
||||||
if(!(__DEBUG__ & 1))
|
if(!(__DEBUG__ & 1))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static $firephp;
|
static $firephp;
|
||||||
$bt = debug_backtrace();
|
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||||
if(is_array($bt))
|
if(is_array($bt))
|
||||||
{
|
{
|
||||||
$first = array_shift($bt);
|
$bt_debug_print = array_shift($bt);
|
||||||
|
$bt_called_function = array_shift($bt);
|
||||||
}
|
}
|
||||||
$file_name = array_pop(explode(DIRECTORY_SEPARATOR, $first['file']));
|
$file_name = str_replace(_XE_PATH_, '', $bt_debug_print['file']);
|
||||||
$line_num = $first['line'];
|
$line_num = $bt_debug_print['line'];
|
||||||
|
$function = $bt_called_function['class'] . $bt_called_function['type'] . $bt_called_function['function'];
|
||||||
|
|
||||||
if(__DEBUG_OUTPUT__ == 2 && version_compare(PHP_VERSION, '6.0.0') === -1)
|
if(__DEBUG_OUTPUT__ == 2 && version_compare(PHP_VERSION, '6.0.0') === -1)
|
||||||
{
|
{
|
||||||
|
|
@ -769,14 +774,19 @@ function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debu
|
||||||
{
|
{
|
||||||
$firephp = FirePHP::getInstance(TRUE);
|
$firephp = FirePHP::getInstance(TRUE);
|
||||||
}
|
}
|
||||||
|
$type = FirePHP::INFO;
|
||||||
|
|
||||||
$label = sprintf('[%s:%d] (m:%s)', $file_name, $line_num, FileHandler::filesize(memory_get_usage()));
|
$label = sprintf('[%s:%d] %s() (m:%s)', $file_name, $line_num, $function, FileHandler::filesize(memory_get_usage()));
|
||||||
|
|
||||||
// Check a FirePHP option
|
// Check a FirePHP option
|
||||||
if($display_option === 'TABLE')
|
if($display_option === 'TABLE')
|
||||||
{
|
{
|
||||||
$label = $display_option;
|
$label = $display_option;
|
||||||
}
|
}
|
||||||
|
if($display_option === 'ERROR')
|
||||||
|
{
|
||||||
|
$type = $display_option;
|
||||||
|
}
|
||||||
// Check if the IP specified by __DEBUG_PROTECT__ option is same as the access IP.
|
// Check if the IP specified by __DEBUG_PROTECT__ option is same as the access IP.
|
||||||
if(__DEBUG_PROTECT__ === 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR'])
|
if(__DEBUG_PROTECT__ === 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR'])
|
||||||
{
|
{
|
||||||
|
|
@ -784,7 +794,7 @@ function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debu
|
||||||
$label = NULL;
|
$label = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$firephp->fb($debug_output, $label);
|
$firephp->fb($debug_output, $label, $type);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -792,16 +802,34 @@ function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debu
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$debug_file = _XE_PATH_ . 'files/' . $file;
|
|
||||||
$debug_output = sprintf("[%s %s:%d] - mem(%s)\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, FileHandler::filesize(memory_get_usage()), print_r($debug_output, TRUE));
|
|
||||||
|
|
||||||
if($display_option === TRUE)
|
$print = array();
|
||||||
|
if($debug_file_exist === NULL) $print[] = '<?php exit() ?>';
|
||||||
|
|
||||||
|
if(!$debug_file) $debug_file = _XE_PATH_ . 'files/' . $file;
|
||||||
|
if(!$debug_file_exist) $debug_file_exist = file_exists($debug_file);
|
||||||
|
|
||||||
|
if($display_option === TRUE || $display_option === 'ERROR')
|
||||||
{
|
{
|
||||||
$debug_output = str_repeat('=', 40) . "\n" . $debug_output . str_repeat('-', 40);
|
$print[] = str_repeat('=', 80);
|
||||||
}
|
}
|
||||||
$debug_output = "\n<?php\n/*" . $debug_output . "*/\n?>\n";
|
|
||||||
|
|
||||||
@file_put_contents($debug_file, $debug_output, FILE_APPEND|LOCK_EX);
|
$print[] = sprintf("[%s %s:%d] %s() - mem(%s)", date('Y-m-d H:i:s'), $file_name, $line_num, $function, FileHandler::filesize(memory_get_usage()));
|
||||||
|
|
||||||
|
$type = gettype($debug_output);
|
||||||
|
if(!in_array($type, array('array', 'object', 'resource')))
|
||||||
|
{
|
||||||
|
if($display_option === 'ERROR') $print[] = 'ERROR : ' . var_export($debug_output, TRUE);
|
||||||
|
else $print[] = $type . '(' . var_export($debug_output, TRUE) . ')';
|
||||||
|
$print[] = PHP_EOL.PHP_EOL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$print[] = print_r($debug_output, TRUE);
|
||||||
|
$print[] = PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@file_put_contents($debug_file, implode(PHP_EOL, $print), FILE_APPEND|LOCK_EX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -541,12 +541,12 @@ class documentAdminController extends document
|
||||||
$desc = Context::get('desc') ? Context::get('desc') : '';
|
$desc = Context::get('desc') ? Context::get('desc') : '';
|
||||||
$search = Context::get('search');
|
$search = Context::get('search');
|
||||||
$eid = Context::get('eid');
|
$eid = Context::get('eid');
|
||||||
|
$obj = new stdClass();
|
||||||
|
|
||||||
if(!$module_srl || !$name || !$eid) return new Object(-1,'msg_invalid_request');
|
if(!$module_srl || !$name || !$eid) return new Object(-1,'msg_invalid_request');
|
||||||
// set the max value if idx is not specified
|
// set the max value if idx is not specified
|
||||||
if(!$var_idx)
|
if(!$var_idx)
|
||||||
{
|
{
|
||||||
$obj = new stdClass();
|
|
||||||
$obj->module_srl = $module_srl;
|
$obj->module_srl = $module_srl;
|
||||||
$output = executeQuery('document.getDocumentMaxExtraKeyIdx', $obj);
|
$output = executeQuery('document.getDocumentMaxExtraKeyIdx', $obj);
|
||||||
$var_idx = $output->data->var_idx+1;
|
$var_idx = $output->data->var_idx+1;
|
||||||
|
|
@ -660,6 +660,14 @@ class documentAdminController extends document
|
||||||
$output = executeQuery('document.updateDocumentExtraVarIdx', $args);
|
$output = executeQuery('document.updateDocumentExtraVarIdx', $args);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||||
|
if($oCacheHandler->isSupport())
|
||||||
|
{
|
||||||
|
$object_key = 'module_document_extra_keys:'.$module_srl;
|
||||||
|
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||||
|
$oCacheHandler->delete($cache_key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -844,10 +844,24 @@ class documentController extends document
|
||||||
$obj->eid = $eid;
|
$obj->eid = $eid;
|
||||||
|
|
||||||
$output = executeQuery('document.getDocumentExtraKeys', $obj);
|
$output = executeQuery('document.getDocumentExtraKeys', $obj);
|
||||||
if(!$output->data) return executeQuery('document.insertDocumentExtraKey', $obj);
|
if(!$output->data)
|
||||||
$output = executeQuery('document.updateDocumentExtraKey', $obj);
|
{
|
||||||
// Update the extra var(eid)
|
$output = executeQuery('document.insertDocumentExtraKey', $obj);
|
||||||
$output = executeQuery('document.updateDocumentExtraVar', $obj);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$output = executeQuery('document.updateDocumentExtraKey', $obj);
|
||||||
|
// Update the extra var(eid)
|
||||||
|
$output = executeQuery('document.updateDocumentExtraVar', $obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||||
|
if($oCacheHandler->isSupport())
|
||||||
|
{
|
||||||
|
$object_key = 'module_document_extra_keys:'.$module_srl;
|
||||||
|
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||||
|
$oCacheHandler->delete($cache_key);
|
||||||
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
@ -904,10 +918,12 @@ class documentController extends document
|
||||||
|
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
|
|
||||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
$oCacheHandler->invalidateGroupKey('site_and_module');
|
$object_key = 'module_document_extra_keys:'.$module_srl;
|
||||||
|
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||||
|
$oCacheHandler->delete($cache_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Object();
|
return new Object();
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@ class documentModel extends document
|
||||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
$object_key = 'module_extra_keys:' . $module_srl;
|
$object_key = 'module_document_extra_keys:' . $module_srl;
|
||||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||||
$keys = $oCacheHandler->get($cache_key);
|
$keys = $oCacheHandler->get($cache_key);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -468,21 +468,27 @@ class layoutModel extends layout
|
||||||
$xml_file = sprintf('%sskin.xml', $layout_path);
|
$xml_file = sprintf('%sskin.xml', $layout_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a path of the requested module. Return if not exists.
|
// Get a path of the requested module. Return if not exists.
|
||||||
if(!$layout_path) $layout_path = $this->getLayoutPath($layout, $layout_type);
|
if(!$layout_path) $layout_path = $this->getLayoutPath($layout, $layout_type);
|
||||||
if(!is_dir($layout_path)) return;
|
if(!is_dir($layout_path)) return;
|
||||||
|
|
||||||
// Read the xml file for module skin information
|
// Read the xml file for module skin information
|
||||||
if(!$xml_file) $xml_file = sprintf("%sconf/info.xml", $layout_path);
|
if(!$xml_file) $xml_file = sprintf("%sconf/info.xml", $layout_path);
|
||||||
if(!file_exists($xml_file))
|
if(!file_exists($xml_file))
|
||||||
{
|
{
|
||||||
|
$layout_info = new stdClass;
|
||||||
$layout_info->title = $layout;
|
$layout_info->title = $layout;
|
||||||
$layout_info->layout = $layout;
|
$layout_info->layout = $layout;
|
||||||
$layout_info->path = $layout_path;
|
$layout_info->path = $layout_path;
|
||||||
$layout_info->layout_title = $layout_title;
|
$layout_info->layout_title = $layout_title;
|
||||||
if(!$layout_info->layout_type)
|
if(!$layout_info->layout_type)
|
||||||
|
{
|
||||||
$layout_info->layout_type = $layout_type;
|
$layout_info->layout_type = $layout_type;
|
||||||
|
}
|
||||||
return $layout_info;
|
return $layout_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include the cache file if it is valid and then return $layout_info variable
|
// Include the cache file if it is valid and then return $layout_info variable
|
||||||
if(!$layout_srl)
|
if(!$layout_srl)
|
||||||
{
|
{
|
||||||
|
|
@ -492,6 +498,7 @@ class layoutModel extends layout
|
||||||
{
|
{
|
||||||
$cache_file = $this->getUserLayoutCache($layout_srl, Context::getLangType());
|
$cache_file = $this->getUserLayoutCache($layout_srl, Context::getLangType());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(file_exists($cache_file)&&filemtime($cache_file)>filemtime($xml_file))
|
if(file_exists($cache_file)&&filemtime($cache_file)>filemtime($xml_file))
|
||||||
{
|
{
|
||||||
include($cache_file);
|
include($cache_file);
|
||||||
|
|
@ -517,6 +524,7 @@ class layoutModel extends layout
|
||||||
// If no cache file exists, parse the xml and then return the variable.
|
// If no cache file exists, parse the xml and then return the variable.
|
||||||
$oXmlParser = new XmlParser();
|
$oXmlParser = new XmlParser();
|
||||||
$tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file);
|
$tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file);
|
||||||
|
|
||||||
if($tmp_xml_obj->layout) $xml_obj = $tmp_xml_obj->layout;
|
if($tmp_xml_obj->layout) $xml_obj = $tmp_xml_obj->layout;
|
||||||
elseif($tmp_xml_obj->skin) $xml_obj = $tmp_xml_obj->skin;
|
elseif($tmp_xml_obj->skin) $xml_obj = $tmp_xml_obj->skin;
|
||||||
|
|
||||||
|
|
@ -544,6 +552,7 @@ class layoutModel extends layout
|
||||||
$buff[] = sprintf('$layout_info->license = "%s";', $xml_obj->license->body);
|
$buff[] = sprintf('$layout_info->license = "%s";', $xml_obj->license->body);
|
||||||
$buff[] = sprintf('$layout_info->license_link = "%s";', $xml_obj->license->attrs->link);
|
$buff[] = sprintf('$layout_info->license_link = "%s";', $xml_obj->license->attrs->link);
|
||||||
$buff[] = sprintf('$layout_info->layout_type = "%s";', $layout_type);
|
$buff[] = sprintf('$layout_info->layout_type = "%s";', $layout_type);
|
||||||
|
|
||||||
// Author information
|
// Author information
|
||||||
if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
|
if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
|
||||||
else $author_list = $xml_obj->author;
|
else $author_list = $xml_obj->author;
|
||||||
|
|
@ -556,6 +565,7 @@ class layoutModel extends layout
|
||||||
$buff[] = sprintf('$layout_info->author[%d]->email_address = "%s";', $i, $author_list[$i]->attrs->email_address);
|
$buff[] = sprintf('$layout_info->author[%d]->email_address = "%s";', $i, $author_list[$i]->attrs->email_address);
|
||||||
$buff[] = sprintf('$layout_info->author[%d]->homepage = "%s";', $i, $author_list[$i]->attrs->link);
|
$buff[] = sprintf('$layout_info->author[%d]->homepage = "%s";', $i, $author_list[$i]->attrs->link);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extra vars (user defined variables to use in a template)
|
// Extra vars (user defined variables to use in a template)
|
||||||
$extra_var_groups = $xml_obj->extra_vars->group;
|
$extra_var_groups = $xml_obj->extra_vars->group;
|
||||||
if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
|
if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ class layoutView extends layout
|
||||||
{
|
{
|
||||||
$menu->xml_file = str_replace('.xml.php', $homeMenuSrl . '.xml.php', $menu->xml_file);
|
$menu->xml_file = str_replace('.xml.php', $homeMenuSrl . '.xml.php', $menu->xml_file);
|
||||||
$menu->php_file = str_replace('.php', $homeMenuSrl . '.php', $menu->php_file);
|
$menu->php_file = str_replace('.php', $homeMenuSrl . '.php', $menu->php_file);
|
||||||
$layout_info->menu->{$menu_id}->menu_srl = $homeMenuSrl;
|
$layoutInfo->menu->{$menu_id}->menu_srl = $homeMenuSrl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1696,15 +1696,15 @@
|
||||||
|
|
||||||
<item name="about_password_strength" type="array">
|
<item name="about_password_strength" type="array">
|
||||||
<item name="low">
|
<item name="low">
|
||||||
<value xml:lang="ko"><![CDATA[비밀번호는 4~20자로 되어야 합니다.]]></value>
|
<value xml:lang="ko"><![CDATA[비밀번호는 4자 이상이어야 합니다.]]></value>
|
||||||
<value xml:lang="en"><![CDATA[the password must be at least 4]]></value>
|
<value xml:lang="en"><![CDATA[the password must be at least 4]]></value>
|
||||||
</item>
|
</item>
|
||||||
<item name="normal">
|
<item name="normal">
|
||||||
<value xml:lang="ko"><![CDATA[비밀번호는 6자리 이상이고, 영문과 숫자를 반드시 포함해야 합니다.]]></value>
|
<value xml:lang="ko"><![CDATA[비밀번호는 6자리 이상이어야 하며 영문과 숫자를 반드시 포함해야 합니다.]]></value>
|
||||||
<value xml:lang="en"><![CDATA[the password must be at least 6, and must have at least one alpha character and numeric characters]]></value>
|
<value xml:lang="en"><![CDATA[the password must be at least 6, and must have at least one alpha character and numeric characters]]></value>
|
||||||
</item>
|
</item>
|
||||||
<item name="high">
|
<item name="high">
|
||||||
<value xml:lang="ko"><![CDATA[비밀번호는 8자리 이상이고 영문과 숫자, 특수문자를 반드시 포함해야 합니다.]]></value>
|
<value xml:lang="ko"><![CDATA[비밀번호는 8자리 이상이어야 하며 영문과 숫자, 특수문자를 반드시 포함해야 합니다.]]></value>
|
||||||
<value xml:lang="en"><![CDATA[the password must be at least 8, and must have at least one alpha character, numeric character and special character ]]></value>
|
<value xml:lang="en"><![CDATA[the password must be at least 8, and must have at least one alpha character, numeric character and special character ]]></value>
|
||||||
</item>
|
</item>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
|
|
@ -487,6 +487,10 @@ class memberAdminController extends member
|
||||||
{
|
{
|
||||||
$fields[] = sprintf('<field name="%s" required="true" rule="userid" length="3:20" />', $formInfo->name);
|
$fields[] = sprintf('<field name="%s" required="true" rule="userid" length="3:20" />', $formInfo->name);
|
||||||
}
|
}
|
||||||
|
else if($formInfo->name == 'nick_name')
|
||||||
|
{
|
||||||
|
$fields[] = sprintf('<field name="%s" required="true" length="2:20" />', $formInfo->name);
|
||||||
|
}
|
||||||
else if(strpos($formInfo->name, 'image') !== false)
|
else if(strpos($formInfo->name, 'image') !== false)
|
||||||
{
|
{
|
||||||
$fields[] = sprintf('<field name="%s"><if test="$act != \'procMemberAdminInsert\' && $__%s_exist != \'true\'" attr="required" value="true" /></field>', $formInfo->name, $formInfo->name);
|
$fields[] = sprintf('<field name="%s"><if test="$act != \'procMemberAdminInsert\' && $__%s_exist != \'true\'" attr="required" value="true" /></field>', $formInfo->name, $formInfo->name);
|
||||||
|
|
@ -823,6 +827,7 @@ class memberAdminController extends member
|
||||||
{
|
{
|
||||||
$args->denied = $var->denied;
|
$args->denied = $var->denied;
|
||||||
$output = executeQuery('member.updateMemberDeniedInfo', $args);
|
$output = executeQuery('member.updateMemberDeniedInfo', $args);
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
if(!$output->toBool())
|
if(!$output->toBool())
|
||||||
{
|
{
|
||||||
$oDB->rollback();
|
$oDB->rollback();
|
||||||
|
|
@ -938,6 +943,9 @@ class memberAdminController extends member
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
|
|
||||||
|
$this->_deleteMemberGroupCache();
|
||||||
|
|
||||||
$this->setMessage('success_updated');
|
$this->setMessage('success_updated');
|
||||||
|
|
||||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
|
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,8 @@ class memberController extends member
|
||||||
if($config->after_logout_url)
|
if($config->after_logout_url)
|
||||||
$output->redirect_url = $config->after_logout_url;
|
$output->redirect_url = $config->after_logout_url;
|
||||||
|
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -248,7 +250,7 @@ class memberController extends member
|
||||||
{
|
{
|
||||||
if (Context::getRequestMethod () == "GET") return new Object (-1, "msg_invalid_request");
|
if (Context::getRequestMethod () == "GET") return new Object (-1, "msg_invalid_request");
|
||||||
$oMemberModel = &getModel ('member');
|
$oMemberModel = &getModel ('member');
|
||||||
$config = $oMemberModel->getMemberConfig ();
|
$config = $oMemberModel->getMemberConfig();
|
||||||
|
|
||||||
// call a trigger (before)
|
// call a trigger (before)
|
||||||
$trigger_output = ModuleHandler::triggerCall ('member.procMemberInsert', 'before', $config);
|
$trigger_output = ModuleHandler::triggerCall ('member.procMemberInsert', 'before', $config);
|
||||||
|
|
@ -286,6 +288,13 @@ class memberController extends member
|
||||||
|
|
||||||
if($args->password1) $args->password = $args->password1;
|
if($args->password1) $args->password = $args->password1;
|
||||||
|
|
||||||
|
// check password strength
|
||||||
|
if(!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength))
|
||||||
|
{
|
||||||
|
$message = Context::getLang('about_password_strength');
|
||||||
|
return new Object(-1, $message[$config->password_strength]);
|
||||||
|
}
|
||||||
|
|
||||||
// Remove some unnecessary variables from all the vars
|
// Remove some unnecessary variables from all the vars
|
||||||
$all_args = Context::getRequestVars();
|
$all_args = Context::getRequestVars();
|
||||||
unset($all_args->module);
|
unset($all_args->module);
|
||||||
|
|
@ -380,6 +389,8 @@ class memberController extends member
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
|
|
||||||
$this->setRedirectUrl($returnUrl);
|
$this->setRedirectUrl($returnUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -523,8 +534,12 @@ class memberController extends member
|
||||||
// Save Signature
|
// Save Signature
|
||||||
$signature = Context::get('signature');
|
$signature = Context::get('signature');
|
||||||
$this->putSignature($args->member_srl, $signature);
|
$this->putSignature($args->member_srl, $signature);
|
||||||
|
|
||||||
// Get user_id information
|
// Get user_id information
|
||||||
$this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
|
$this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
|
||||||
|
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
|
|
||||||
// Call a trigger after successfully log-in (after)
|
// Call a trigger after successfully log-in (after)
|
||||||
$trigger_output = ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo);
|
$trigger_output = ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo);
|
||||||
if(!$trigger_output->toBool()) return $trigger_output;
|
if(!$trigger_output->toBool()) return $trigger_output;
|
||||||
|
|
@ -556,16 +571,7 @@ class memberController extends member
|
||||||
$oMemberModel = getModel('member');
|
$oMemberModel = getModel('member');
|
||||||
// Get information of member_srl
|
// Get information of member_srl
|
||||||
$columnList = array('member_srl', 'password');
|
$columnList = array('member_srl', 'password');
|
||||||
|
|
||||||
// check password strength
|
|
||||||
$config = $oMemberModel->getMemberConfig();
|
|
||||||
if(!$oMemberModel->checkPasswordStrength($password, $config->password_strength))
|
|
||||||
{
|
|
||||||
$message = Context::getLang('about_password_strength');
|
|
||||||
return new Object(-1, $message[$config->password_strength]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList);
|
$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList);
|
||||||
// Verify the cuttent password
|
// Verify the cuttent password
|
||||||
if(!$oMemberModel->isValidPassword($member_info->password, $current_password, $member_srl)) return new Object(-1, 'invalid_password');
|
if(!$oMemberModel->isValidPassword($member_info->password, $current_password, $member_srl)) return new Object(-1, 'invalid_password');
|
||||||
|
|
@ -619,6 +625,8 @@ class memberController extends member
|
||||||
// Return success message
|
// Return success message
|
||||||
$this->setMessage('success_leaved');
|
$this->setMessage('success_leaved');
|
||||||
|
|
||||||
|
$this->_clearMemberCache($member_srl);
|
||||||
|
|
||||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
|
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
|
||||||
$this->setRedirectUrl($returnUrl);
|
$this->setRedirectUrl($returnUrl);
|
||||||
}
|
}
|
||||||
|
|
@ -1071,6 +1079,9 @@ class memberController extends member
|
||||||
if(!$output->toBool()) return $this->stop($output->getMessage());
|
if(!$output->toBool()) return $this->stop($output->getMessage());
|
||||||
// Remove all values having the member_srl from authentication table
|
// Remove all values having the member_srl from authentication table
|
||||||
executeQuery('member.deleteAuthMail',$args);
|
executeQuery('member.deleteAuthMail',$args);
|
||||||
|
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
|
|
||||||
// Notify the result
|
// Notify the result
|
||||||
Context::set('is_register', $is_register);
|
Context::set('is_register', $is_register);
|
||||||
$this->setTemplatePath($this->module_path.'tpl');
|
$this->setTemplatePath($this->module_path.'tpl');
|
||||||
|
|
@ -1251,6 +1262,7 @@ class memberController extends member
|
||||||
list($args->email_id, $args->email_host) = explode('@', $newEmail);
|
list($args->email_id, $args->email_host) = explode('@', $newEmail);
|
||||||
|
|
||||||
$output = executeQuery('member.updateMemberEmailAddress', $args);
|
$output = executeQuery('member.updateMemberEmailAddress', $args);
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
if(!$output->toBool())
|
if(!$output->toBool())
|
||||||
{
|
{
|
||||||
return $this->stop($output->getMessage());
|
return $this->stop($output->getMessage());
|
||||||
|
|
@ -1367,6 +1379,7 @@ class memberController extends member
|
||||||
$output = executeQuery('member.deleteMembersGroup', $args);
|
$output = executeQuery('member.deleteMembersGroup', $args);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
$this->setMessage('success_deleted');
|
$this->setMessage('success_deleted');
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1467,13 +1480,13 @@ class memberController extends member
|
||||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
$object_key = 'member_groups:' . getNumberingPath($args->member_srl) . $args->member_srl . '_'.$args->site_srl;
|
$oCacheHandler->invalidateGroupKey('member');
|
||||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
}
|
||||||
$oCacheHandler->delete($cache_key);
|
|
||||||
|
|
||||||
$object_key = 'member_info:' . getNumberingPath($args->member_srl) . $args->member_srl;
|
$oCacheHandler = CacheHandler::getInstance('object');
|
||||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
if($oCacheHandler->isSupport())
|
||||||
$oCacheHandler->delete($cache_key);
|
{
|
||||||
|
$oCacheHandler->invalidateGroupKey('member');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
|
|
@ -1514,20 +1527,9 @@ class memberController extends member
|
||||||
$output = executeQuery('member.addMemberToGroup', $obj);
|
$output = executeQuery('member.addMemberToGroup', $obj);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
$this->_clearMemberCache($args->member_srl);
|
||||||
if($oCacheHandler->isSupport())
|
|
||||||
{
|
|
||||||
$object_key = 'member_groups:' . getNumberingPath($args->member_srl) . $args->member_srl . '_' . $args->site_srl;
|
|
||||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
|
||||||
$oCacheHandler->delete($cache_key);
|
|
||||||
|
|
||||||
$object_key = 'member_info:' . getNumberingPath($args->member_srl) . $args->member_srl;
|
|
||||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
|
||||||
$oCacheHandler->delete($cache_key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1704,6 +1706,8 @@ class memberController extends member
|
||||||
$args->member_srl = $this->memberInfo->member_srl;
|
$args->member_srl = $this->memberInfo->member_srl;
|
||||||
$output = executeQuery('member.updateLastLogin', $args);
|
$output = executeQuery('member.updateLastLogin', $args);
|
||||||
|
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
|
|
||||||
// Check if there is recoding table.
|
// Check if there is recoding table.
|
||||||
$oDB = &DB::getInstance();
|
$oDB = &DB::getInstance();
|
||||||
if($oDB->isTableExists('member_count_history') && $config->enable_login_fail_report != 'N')
|
if($oDB->isTableExists('member_count_history') && $config->enable_login_fail_report != 'N')
|
||||||
|
|
@ -1901,7 +1905,19 @@ class memberController extends member
|
||||||
if($args->blog && !preg_match("/^[a-z]+:\/\//i",$args->blog)) $args->blog = 'http://'.$args->blog;
|
if($args->blog && !preg_match("/^[a-z]+:\/\//i",$args->blog)) $args->blog = 'http://'.$args->blog;
|
||||||
// Create a model object
|
// Create a model object
|
||||||
$oMemberModel = getModel('member');
|
$oMemberModel = getModel('member');
|
||||||
|
|
||||||
// ID check is prohibited
|
// ID check is prohibited
|
||||||
|
if($args->password && !$password_is_hashed)
|
||||||
|
{
|
||||||
|
// check password strength
|
||||||
|
if(!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength))
|
||||||
|
{
|
||||||
|
$message = Context::getLang('about_password_strength');
|
||||||
|
return new Object(-1, $message[$config->password_strength]);
|
||||||
|
}
|
||||||
|
$args->password = md5($args->password);
|
||||||
|
}
|
||||||
|
elseif(!$args->password) unset($args->password);
|
||||||
if($oMemberModel->isDeniedID($args->user_id)) return new Object(-1,'denied_user_id');
|
if($oMemberModel->isDeniedID($args->user_id)) return new Object(-1,'denied_user_id');
|
||||||
// ID, nickname, email address of the redundancy check
|
// ID, nickname, email address of the redundancy check
|
||||||
$member_srl = $oMemberModel->getMemberSrlByUserID($args->user_id);
|
$member_srl = $oMemberModel->getMemberSrlByUserID($args->user_id);
|
||||||
|
|
@ -1918,20 +1934,19 @@ class memberController extends member
|
||||||
$member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address);
|
$member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address);
|
||||||
if($member_srl) return new Object(-1,'msg_exists_email_address');
|
if($member_srl) return new Object(-1,'msg_exists_email_address');
|
||||||
|
|
||||||
$oDB = &DB::getInstance();
|
|
||||||
$oDB->begin();
|
|
||||||
// Insert data into the DB
|
// Insert data into the DB
|
||||||
$args->list_order = -1 * $args->member_srl;
|
$args->list_order = -1 * $args->member_srl;
|
||||||
$args->nick_name = htmlspecialchars($args->nick_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
$args->nick_name = htmlspecialchars($args->nick_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||||
$args->homepage = htmlspecialchars($args->homepage, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
$args->homepage = htmlspecialchars($args->homepage, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||||
$args->blog = htmlspecialchars($args->blog, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
$args->blog = htmlspecialchars($args->blog, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||||
|
|
||||||
if($args->password && !$password_is_hashed) $args->password = md5($args->password);
|
|
||||||
elseif(!$args->password) unset($args->password);
|
|
||||||
|
|
||||||
if(!$args->user_id) $args->user_id = 't'.$args->member_srl;
|
if(!$args->user_id) $args->user_id = 't'.$args->member_srl;
|
||||||
if(!$args->user_name) $args->user_name = $args->member_srl;
|
if(!$args->user_name) $args->user_name = $args->member_srl;
|
||||||
|
|
||||||
|
$oDB = &DB::getInstance();
|
||||||
|
$oDB->begin();
|
||||||
|
|
||||||
$output = executeQuery('member.insertMember', $args);
|
$output = executeQuery('member.insertMember', $args);
|
||||||
if(!$output->toBool())
|
if(!$output->toBool())
|
||||||
{
|
{
|
||||||
|
|
@ -2081,7 +2096,17 @@ class memberController extends member
|
||||||
$oDB->begin();
|
$oDB->begin();
|
||||||
// DB in the update
|
// DB in the update
|
||||||
|
|
||||||
if($args->password) $args->password = md5($args->password);
|
if($args->password)
|
||||||
|
{
|
||||||
|
// check password strength
|
||||||
|
if(!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength))
|
||||||
|
{
|
||||||
|
$message = Context::getLang('about_password_strength');
|
||||||
|
return new Object(-1, $message[$config->password_strength]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$args->password = md5($args->password);
|
||||||
|
}
|
||||||
else $args->password = $orgMemberInfo->password;
|
else $args->password = $orgMemberInfo->password;
|
||||||
if(!$args->user_name) $args->user_name = $orgMemberInfo->user_name;
|
if(!$args->user_name) $args->user_name = $orgMemberInfo->user_name;
|
||||||
if(!$args->user_id) $args->user_id = $orgMemberInfo->user_id;
|
if(!$args->user_id) $args->user_id = $orgMemberInfo->user_id;
|
||||||
|
|
@ -2090,6 +2115,7 @@ class memberController extends member
|
||||||
if(!$args->birthday) $args->birthday = '';
|
if(!$args->birthday) $args->birthday = '';
|
||||||
|
|
||||||
$output = executeQuery('member.updateMember', $args);
|
$output = executeQuery('member.updateMember', $args);
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
if(!$output->toBool())
|
if(!$output->toBool())
|
||||||
{
|
{
|
||||||
$oDB->rollback();
|
$oDB->rollback();
|
||||||
|
|
@ -2138,8 +2164,10 @@ class memberController extends member
|
||||||
|
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
|
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
|
|
||||||
//remove from cache
|
//remove from cache
|
||||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
$oCacheHandler = CacheHandler::getInstance('object');
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
$object_key = 'member_info:' . getNumberingPath($args->member_srl) . $args->member_srl;
|
$object_key = 'member_info:' . getNumberingPath($args->member_srl) . $args->member_srl;
|
||||||
|
|
@ -2161,17 +2189,20 @@ class memberController extends member
|
||||||
function updateMemberPassword($args)
|
function updateMemberPassword($args)
|
||||||
{
|
{
|
||||||
$output = executeQuery('member.updateChangePasswordDate', $args);
|
$output = executeQuery('member.updateChangePasswordDate', $args);
|
||||||
//remove from cache
|
|
||||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
|
||||||
if($oCacheHandler->isSupport())
|
|
||||||
{
|
|
||||||
$object_key = 'member_info:' . getNumberingPath($args->member_srl) . $args->member_srl;
|
|
||||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
|
||||||
$oCacheHandler->delete($cache_key);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($args->password)
|
if($args->password)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// check password strength
|
||||||
|
$oMemberModel = getModel('member');
|
||||||
|
$config = $oMemberModel->getMemberConfig();
|
||||||
|
|
||||||
|
if(!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength))
|
||||||
|
{
|
||||||
|
$message = Context::getLang('about_password_strength');
|
||||||
|
return new Object(-1, $message[$config->password_strength]);
|
||||||
|
}
|
||||||
|
|
||||||
if($this->useSha1)
|
if($this->useSha1)
|
||||||
{
|
{
|
||||||
$args->password = md5(sha1(md5($args->password)));
|
$args->password = md5(sha1(md5($args->password)));
|
||||||
|
|
@ -2186,7 +2217,11 @@ class memberController extends member
|
||||||
$args->password = $args->hashed_password;
|
$args->password = $args->hashed_password;
|
||||||
}
|
}
|
||||||
|
|
||||||
return executeQuery('member.updateMemberPassword', $args);
|
$output = executeQuery('member.updateMemberPassword', $args);;
|
||||||
|
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
|
|
||||||
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2568,7 +2603,11 @@ class memberController extends member
|
||||||
|
|
||||||
$args->description .= Context::getLang('cmd_spammer') . "[" . date("Y-m-d H:i:s") . " from:" . $logged_info->user_id . " info:" . $spam_description . " docuemnts count:" . $total_count . "]";
|
$args->description .= Context::getLang('cmd_spammer') . "[" . date("Y-m-d H:i:s") . " from:" . $logged_info->user_id . " info:" . $spam_description . " docuemnts count:" . $total_count . "]";
|
||||||
|
|
||||||
return $this->updateMember($args, true);
|
$output = $this->updateMember($args, true);
|
||||||
|
|
||||||
|
$this->_clearMemberCache($args->member_srl);
|
||||||
|
|
||||||
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2613,6 +2652,17 @@ class memberController extends member
|
||||||
|
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _clearMemberCache($member_srl)
|
||||||
|
{
|
||||||
|
$oCacheHandler = CacheHandler::getInstance('object');
|
||||||
|
if($oCacheHandler->isSupport())
|
||||||
|
{
|
||||||
|
$object_key = 'member_info:' . getNumberingPath($member_srl) . $member_srl;
|
||||||
|
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
||||||
|
$oCacheHandler->delete($cache_key);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* End of file member.controller.php */
|
/* End of file member.controller.php */
|
||||||
/* Location: ./modules/member/member.controller.php */
|
/* Location: ./modules/member/member.controller.php */
|
||||||
|
|
|
||||||
|
|
@ -265,8 +265,19 @@ class memberModel extends member
|
||||||
if(!$email_address) return;
|
if(!$email_address) return;
|
||||||
|
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->email_address = $email_address;
|
|
||||||
$output = executeQuery('member.getMemberInfoByEmailAddress', $args);
|
$db_info = Context::getDBInfo ();
|
||||||
|
if($db_info->master_db['db_type'] == "cubrid")
|
||||||
|
{
|
||||||
|
$args->email_address = strtolower($email_address);
|
||||||
|
$output = executeQuery('member.getMemberInfoByEmailAddressForCubrid', $args);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$args->email_address = $email_address;
|
||||||
|
$output = executeQuery('member.getMemberInfoByEmailAddress', $args);
|
||||||
|
}
|
||||||
|
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
if(!$output->data) return;
|
if(!$output->data) return;
|
||||||
|
|
||||||
|
|
@ -284,9 +295,10 @@ class memberModel extends member
|
||||||
//columnList size zero... get full member info
|
//columnList size zero... get full member info
|
||||||
if(!$GLOBALS['__member_info__'][$member_srl] || count($columnList) == 0)
|
if(!$GLOBALS['__member_info__'][$member_srl] || count($columnList) == 0)
|
||||||
{
|
{
|
||||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
$oCacheHandler = CacheHandler::getInstance('object');
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
|
$columnList = array();
|
||||||
$object_key = 'member_info:' . getNumberingPath($member_srl) . $member_srl;
|
$object_key = 'member_info:' . getNumberingPath($member_srl) . $member_srl;
|
||||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
||||||
$GLOBALS['__member_info__'][$member_srl] = $oCacheHandler->get($cache_key);
|
$GLOBALS['__member_info__'][$member_srl] = $oCacheHandler->get($cache_key);
|
||||||
|
|
@ -507,6 +519,7 @@ class memberModel extends member
|
||||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
|
$columnList = array();
|
||||||
$object_key = 'default_group_' . $site_srl;
|
$object_key = 'default_group_' . $site_srl;
|
||||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
||||||
$default_group = $oCacheHandler->get($cache_key);
|
$default_group = $oCacheHandler->get($cache_key);
|
||||||
|
|
@ -1037,17 +1050,20 @@ class memberModel extends member
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function checkPasswordStrength($password, $stength)
|
function checkPasswordStrength($password, $strength)
|
||||||
{
|
{
|
||||||
if($stength == NULL)
|
$logged_info = Context::get('logged_info');
|
||||||
|
if($logged_info->is_admin == 'Y') return true;
|
||||||
|
|
||||||
|
if($strength == NULL)
|
||||||
{
|
{
|
||||||
$config = $this->getMemberConfig();
|
$config = $this->getMemberConfig();
|
||||||
$stength = $config->password_strength?$config->password_strength:'normal';
|
$strength = $config->password_strength?$config->password_strength:'normal';
|
||||||
}
|
}
|
||||||
|
|
||||||
$length = strlen($password);
|
$length = strlen($password);
|
||||||
|
|
||||||
switch ($stength) {
|
switch ($strength) {
|
||||||
case 'high':
|
case 'high':
|
||||||
if($length < 8 || !preg_match('/[^a-zA-Z0-9]/', $password)) return false;
|
if($length < 8 || !preg_match('/[^a-zA-Z0-9]/', $password)) return false;
|
||||||
/* no break */
|
/* no break */
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,6 @@
|
||||||
<column name="*" />
|
<column name="*" />
|
||||||
</columns>
|
</columns>
|
||||||
<conditions>
|
<conditions>
|
||||||
<condition operation="like" column="email_address" var="email_address" notnull="notnull" />
|
<condition operation="equal" column="email_address" var="email_address" notnull="notnull" />
|
||||||
</conditions>
|
</conditions>
|
||||||
</query>
|
</query>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<query id="getMemberInfoByEmailAddress" action="select">
|
||||||
|
<tables>
|
||||||
|
<table name="member" />
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<column name="*" />
|
||||||
|
</columns>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="equal" column="lcase(email_address)" var="email_address" notnull="notnull" />
|
||||||
|
</conditions>
|
||||||
|
</query>
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
<load target="css/member.css" />
|
<load target="css/member.css" />
|
||||||
<load target="js/member.js" />
|
<load target="js/member.js" />
|
||||||
|
|
||||||
<div cond="$XE_VALIDATOR_MESSAGE && isset($validator_ids[$XE_VALIDATOR_ID])" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
|
||||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<section class="xm">
|
<section class="xm">
|
||||||
<ul class="nav nav-tabs" cond="$is_logged && $logged_info->menu_list && (!$member_srl || $member_srl == $logged_info->member_srl)">
|
<ul class="nav nav-tabs" cond="$is_logged && $logged_info->menu_list && (!$member_srl || $member_srl == $logged_info->member_srl)">
|
||||||
<li loop="$logged_info->menu_list=>$key,$val" class="active"|cond="$key==$act">
|
<li loop="$logged_info->menu_list=>$key,$val" class="active"|cond="$key==$act">
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,13 @@
|
||||||
<!--%load_js_plugin("ui.datepicker")-->
|
<!--%load_js_plugin("ui.datepicker")-->
|
||||||
<include target="./common_header.html" />
|
<include target="./common_header.html" />
|
||||||
<h1 style="border-bottom:1px solid #ccc">{$lang->cmd_signup}</h1>
|
<h1 style="border-bottom:1px solid #ccc">{$lang->cmd_signup}</h1>
|
||||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins/default/signup_form/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins/default/modify_info/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||||
</div>
|
</div>
|
||||||
<form ruleset="@insertMember" id="fo_insert_member" action="./" method="post" enctype="multipart/form-data" class="form-horizontal">
|
<form ruleset="@insertMember" id="fo_insert_member" action="./" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||||
<input type="hidden" name="act" value="procMemberInsert" />
|
<input type="hidden" name="act" value="procMemberInsert" />
|
||||||
<input type="hidden" name="xe_validator_id" value="modules/member/skins/default/signup_form/1" />
|
<input type="hidden" name="xe_validator_id" value="modules/member/skins/default/modify_info/1" />
|
||||||
|
<input type="hidden" name="success_return_url" value="{getUrl('act','dispMemberInfo')}" />
|
||||||
<div class="agreement" cond="$member_config->agreement">
|
<div class="agreement" cond="$member_config->agreement">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
{$member_config->agreement}
|
{$member_config->agreement}
|
||||||
|
|
@ -31,7 +32,7 @@
|
||||||
<label for="password" class="control-label"><em style="color:red">*</em> {$lang->password}</label>
|
<label for="password" class="control-label"><em style="color:red">*</em> {$lang->password}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="password" name="password" id="password" value="" required />
|
<input type="password" name="password" id="password" value="" required />
|
||||||
<p class="help-inline">{$lang->about_password}</p>
|
<p class="help-inline">{$lang->about_password_strength[$member_config->password_strength]}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
|
||||||
|
|
@ -530,6 +530,7 @@ class module extends ModuleObject
|
||||||
foreach($moduleInfos as $moduleInfo)
|
foreach($moduleInfos as $moduleInfo)
|
||||||
{
|
{
|
||||||
// search menu.
|
// search menu.
|
||||||
|
$args = new stdClass;
|
||||||
$args->url = $moduleInfo->mid;
|
$args->url = $moduleInfo->mid;
|
||||||
$args->site_srl = $moduleInfo->site_srl;
|
$args->site_srl = $moduleInfo->site_srl;
|
||||||
$args->is_shortcut = 'N';
|
$args->is_shortcut = 'N';
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ class moduleModel extends module
|
||||||
$site_info = $oCacheHandler->get($domain_cache_key);
|
$site_info = $oCacheHandler->get($domain_cache_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($site_info))
|
if(!$site_info)
|
||||||
{
|
{
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->domain = $domain;
|
$args->domain = $domain;
|
||||||
|
|
@ -132,6 +132,7 @@ class moduleModel extends module
|
||||||
$site_info = $output->data;
|
$site_info = $output->data;
|
||||||
if($oCacheHandler->isSupport()) $oCacheHandler->put($domain_cache_key, $site_info);
|
if($oCacheHandler->isSupport()) $oCacheHandler->put($domain_cache_key, $site_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($site_info && $vid)
|
if($site_info && $vid)
|
||||||
{
|
{
|
||||||
Context::set('vid', $site_info->domain, true);
|
Context::set('vid', $site_info->domain, true);
|
||||||
|
|
@ -218,7 +219,7 @@ class moduleModel extends module
|
||||||
$module_srl = $oCacheHandler->get($module_srl_cache_key);
|
$module_srl = $oCacheHandler->get($module_srl_cache_key);
|
||||||
if($module_srl)
|
if($module_srl)
|
||||||
{
|
{
|
||||||
$object_key = 'module_info:' . $module_srl;
|
$object_key = 'mid_info:' . $module_srl;
|
||||||
$module_info_cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
$module_info_cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||||
$module_info = $oCacheHandler->get($module_info_cache_key);
|
$module_info = $oCacheHandler->get($module_info_cache_key);
|
||||||
}
|
}
|
||||||
|
|
@ -232,7 +233,7 @@ class moduleModel extends module
|
||||||
{
|
{
|
||||||
$oCacheHandler->put($module_srl_cache_key, $module_info->module_srl);
|
$oCacheHandler->put($module_srl_cache_key, $module_info->module_srl);
|
||||||
|
|
||||||
$object_key = 'module_info:' . $module_info->module_srl;
|
$object_key = 'mid_info:' . $module_info->module_srl;
|
||||||
$module_info_cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
$module_info_cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||||
$oCacheHandler->put($module_info_cache_key, $module_info);
|
$oCacheHandler->put($module_info_cache_key, $module_info);
|
||||||
}
|
}
|
||||||
|
|
@ -316,7 +317,7 @@ class moduleModel extends module
|
||||||
$module_srl = $oCacheHandler->get($module_srl_cache_key);
|
$module_srl = $oCacheHandler->get($module_srl_cache_key);
|
||||||
if($module_srl)
|
if($module_srl)
|
||||||
{
|
{
|
||||||
$object_key = 'module_info:' . $module_srl;
|
$object_key = 'mid_info:' . $module_srl;
|
||||||
$module_info_cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
$module_info_cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||||
$coutput = $oCacheHandler->get($module_info_cache_key);
|
$coutput = $oCacheHandler->get($module_info_cache_key);
|
||||||
}
|
}
|
||||||
|
|
@ -325,7 +326,7 @@ class moduleModel extends module
|
||||||
{
|
{
|
||||||
$oCacheHandler->put($module_srl_cache_key, $output->data->module_srl);
|
$oCacheHandler->put($module_srl_cache_key, $output->data->module_srl);
|
||||||
|
|
||||||
$object_key = 'module_info:' . $output->data->module_srl;
|
$object_key = 'mid_info:' . $output->data->module_srl;
|
||||||
$module_info_cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
$module_info_cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||||
$oCacheHandler->put($module_info_cache_key, $moduleInfo);
|
$oCacheHandler->put($module_info_cache_key, $moduleInfo);
|
||||||
}
|
}
|
||||||
|
|
@ -359,7 +360,7 @@ class moduleModel extends module
|
||||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
$object_key = 'module_info:' . $module_srl;
|
$object_key = 'mid_info:' . $module_srl;
|
||||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||||
$mid_info = $oCacheHandler->get($cache_key);
|
$mid_info = $oCacheHandler->get($cache_key);
|
||||||
}
|
}
|
||||||
|
|
@ -792,7 +793,7 @@ class moduleModel extends module
|
||||||
$cache_file = sprintf(_XE_PATH_ . "files/cache/module_info/%s.%s.%s.php", $module, Context::getLangType(), __XE_VERSION__);
|
$cache_file = sprintf(_XE_PATH_ . "files/cache/module_info/%s.%s.%s.php", $module, Context::getLangType(), __XE_VERSION__);
|
||||||
|
|
||||||
// Update if no cache file exists or it is older than xml file
|
// Update if no cache file exists or it is older than xml file
|
||||||
if(!file_exists($cache_file) || filemtime($cache_file)<filemtime($xml_file))
|
if(!file_exists($cache_file) || filemtime($cache_file) < filemtime($xml_file) || $re_cache)
|
||||||
{
|
{
|
||||||
$info = new stdClass();
|
$info = new stdClass();
|
||||||
$buff = array(); // /< Set buff variable to use in the cache file
|
$buff = array(); // /< Set buff variable to use in the cache file
|
||||||
|
|
@ -1343,7 +1344,7 @@ class moduleModel extends module
|
||||||
$args->site_srl = $site_srl;
|
$args->site_srl = $site_srl;
|
||||||
$output = executeQuery('module.getModuleConfig', $args);
|
$output = executeQuery('module.getModuleConfig', $args);
|
||||||
$config = unserialize($output->data->config);
|
$config = unserialize($output->data->config);
|
||||||
if(!$config) $config = new stdClass;
|
|
||||||
//insert in cache
|
//insert in cache
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
|
|
@ -1380,7 +1381,7 @@ class moduleModel extends module
|
||||||
$args->module_srl = $module_srl;
|
$args->module_srl = $module_srl;
|
||||||
$output = executeQuery('module.getModulePartConfig', $args);
|
$output = executeQuery('module.getModulePartConfig', $args);
|
||||||
$config = unserialize($output->data->config);
|
$config = unserialize($output->data->config);
|
||||||
if(!$config) $config = new stdClass;
|
|
||||||
//insert in cache
|
//insert in cache
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
|
|
@ -1700,12 +1701,17 @@ class moduleModel extends module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$get_module_srls = $list_module_srl;
|
||||||
|
}
|
||||||
|
|
||||||
if(count($get_module_srls))
|
if(count($get_module_srls))
|
||||||
{
|
{
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->module_srl = implode(',', $get_module_srls);
|
$args->module_srl = implode(',', $get_module_srls);
|
||||||
$output = executeQueryArray('module.getModuleExtraVars', $args);
|
$output = executeQueryArray('module.getModuleExtraVars', $args);
|
||||||
|
|
||||||
if(!$output->toBool())
|
if(!$output->toBool())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
@ -1718,7 +1724,6 @@ class moduleModel extends module
|
||||||
$extra_vars[$module_srl] = new stdClass;
|
$extra_vars[$module_srl] = new stdClass;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($output->data as $key => $val)
|
foreach($output->data as $key => $val)
|
||||||
{
|
{
|
||||||
if(in_array($val->name, array('mid','module')) || $val->value == 'Array') continue;
|
if(in_array($val->name, array('mid','module')) || $val->value == 'Array') continue;
|
||||||
|
|
|
||||||
|
|
@ -647,7 +647,11 @@ class pointController extends point
|
||||||
$object_key = 'member_groups:' . getNumberingPath($member_srl) . $member_srl . '_0';
|
$object_key = 'member_groups:' . getNumberingPath($member_srl) . $member_srl . '_0';
|
||||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
||||||
$oCacheHandler->delete($cache_key);
|
$oCacheHandler->delete($cache_key);
|
||||||
|
}
|
||||||
|
|
||||||
|
$oCacheHandler = CacheHandler::getInstance('object');
|
||||||
|
if($oCacheHandler->isSupport())
|
||||||
|
{
|
||||||
$object_key = 'member_info:' . getNumberingPath($member_srl) . $member_srl;
|
$object_key = 'member_info:' . getNumberingPath($member_srl) . $member_srl;
|
||||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
||||||
$oCacheHandler->delete($cache_key);
|
$oCacheHandler->delete($cache_key);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue