mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Merge branch 'develop' into pr/session-class
This commit is contained in:
commit
a1618c236f
60 changed files with 1564 additions and 195 deletions
|
|
@ -37,10 +37,11 @@ class Limit
|
|||
* constructor
|
||||
* @param int $list_count
|
||||
* @param int $page
|
||||
* @param int $page_count
|
||||
* @param int $page_count
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
function __construct($list_count, $page = NULL, $page_count = NULL)
|
||||
function __construct($list_count, $page = NULL, $page_count = NULL, $offset = NULL)
|
||||
{
|
||||
$this->list_count = $list_count;
|
||||
if($page)
|
||||
|
|
@ -50,6 +51,10 @@ class Limit
|
|||
$this->start = ($page_value - 1) * $list_count_value;
|
||||
$this->page_count = $page_count;
|
||||
$this->page = $page;
|
||||
}
|
||||
elseif($offset)
|
||||
{
|
||||
$this->start = $offset->getValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +86,7 @@ class Limit
|
|||
|
||||
function toString()
|
||||
{
|
||||
if($this->page)
|
||||
if($this->page || $this->start)
|
||||
{
|
||||
return $this->start . ' , ' . $this->list_count->getValue();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class FrontEndFileHandler extends Handler
|
|||
if(!is_array($args))
|
||||
{
|
||||
$args = array($args);
|
||||
}
|
||||
}
|
||||
$args[0] = preg_replace(array_keys(HTMLDisplayHandler::$replacements), array_values(HTMLDisplayHandler::$replacements), $args[0]);
|
||||
$isCommon = preg_match(HTMLDisplayHandler::$reservedCSS, $args[0]) || preg_match(HTMLDisplayHandler::$reservedJS, $args[0]);
|
||||
if($args[3] > -1500000 && $isCommon)
|
||||
|
|
@ -155,7 +155,8 @@ class FrontEndFileHandler extends Handler
|
|||
return $existsInfo[$existsKey];
|
||||
}
|
||||
|
||||
$pathInfo = pathinfo($fileName);
|
||||
$pathInfo = pathinfo($fileName);
|
||||
|
||||
$file = new stdClass();
|
||||
$file->fileName = $pathInfo['basename'];
|
||||
$file->filePath = $this->_getAbsFileUrl($pathInfo['dirname']);
|
||||
|
|
@ -172,7 +173,11 @@ class FrontEndFileHandler extends Handler
|
|||
$file->fileNameNoExt = $pathInfo['filename'];
|
||||
$file->isMinified = false;
|
||||
}
|
||||
$file->isExternalURL = preg_match('@^(https?:)?//@i', $file->filePath) ? true : false;
|
||||
$file->isExternalURL = preg_match('@^(https?:)?//@i', $file->filePath) ? true : false;
|
||||
if ($file->isExternalURL && !$file->fileExtension)
|
||||
{
|
||||
$file->fileExtension = preg_match('/[\.\/](css|js)\b/', $fileName, $matches) ? $matches[1] : null;
|
||||
}
|
||||
$file->isCachedScript = !$file->isExternalURL && strpos($file->filePath, 'files/cache/') !== false;
|
||||
$file->isCommon = $isCommon;
|
||||
$file->keyName = $file->fileNameNoExt . '.' . $file->fileExtension;
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ class ModuleHandler extends Handler
|
|||
}
|
||||
|
||||
// redirect, if site start module
|
||||
if(isset($_GET['mid']) && $_GET['mid'] === $site_module_info->mid && count($_GET) === 1)
|
||||
if(Context::getRequestMethod() === 'GET' && isset($_GET['mid']) && $_GET['mid'] === $site_module_info->mid && count($_GET) === 1)
|
||||
{
|
||||
Context::setCacheControl(0);
|
||||
header('location: ' . getNotEncodedSiteUrl($site_module_info->domain), true, 301);
|
||||
|
|
|
|||
|
|
@ -11,11 +11,9 @@
|
|||
*/
|
||||
class TemplateHandler
|
||||
{
|
||||
private $compiled_path = 'files/cache/template_compiled/'; ///< path of compiled caches files
|
||||
private $path = NULL; ///< target directory
|
||||
private $filename = NULL; ///< target filename
|
||||
private $file = NULL; ///< target file (fullpath)
|
||||
private $xe_path = NULL; ///< XpressEngine base path
|
||||
private $web_path = NULL; ///< tpl file web path
|
||||
private $compiled_file = NULL; ///< tpl file web path
|
||||
private $config = NULL;
|
||||
|
|
@ -29,9 +27,8 @@ class TemplateHandler
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->xe_path = rtrim(preg_replace('/([^\.^\/]+)\.php$/i', '', $_SERVER['SCRIPT_NAME']), '/');
|
||||
$this->compiled_path = _XE_PATH_ . $this->compiled_path;
|
||||
$this->config = new stdClass();
|
||||
$this->config = new stdClass;
|
||||
$this->handler_mtime = filemtime(__FILE__);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -93,16 +90,12 @@ class TemplateHandler
|
|||
$this->filename = $tpl_filename;
|
||||
$this->file = $tpl_file;
|
||||
|
||||
$this->web_path = $this->xe_path . '/' . ltrim(preg_replace('@^' . preg_quote(_XE_PATH_, '@') . '|\./@', '', $this->path), '/');
|
||||
// set absolute URL of template path
|
||||
$this->web_path = \RX_BASEURL . ltrim(preg_replace('@^' . preg_quote(\RX_BASEDIR, '@') . '|\./@', '', $this->path), '/');
|
||||
|
||||
// get compiled file name
|
||||
$hash = md5($this->file . __XE_VERSION__);
|
||||
$this->compiled_file = "{$this->compiled_path}{$hash}.compiled.php";
|
||||
|
||||
// compare various file's modified time for check changed
|
||||
$this->handler_mtime = filemtime(__FILE__);
|
||||
|
||||
$skip = array('');
|
||||
// set compiled file name
|
||||
$converted_path = str_replace(array('\\', '..'), array('/', 'dotdot'), ltrim($this->file, './'));
|
||||
$this->compiled_file = \RX_BASEDIR . 'files/cache/template/' . $converted_path . '.php';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -123,7 +116,9 @@ class TemplateHandler
|
|||
// if target file does not exist exit
|
||||
if(!$this->file || !file_exists($this->file))
|
||||
{
|
||||
return "Err : '{$this->file}' template file does not exists.";
|
||||
$error_message = "Template not found: ${tpl_path}${tpl_filename}" . ($tpl_file ? " (${tpl_file})" : '');
|
||||
trigger_error($error_message, \E_USER_WARNING);
|
||||
return escape($error_message);
|
||||
}
|
||||
|
||||
// for backward compatibility
|
||||
|
|
@ -132,8 +127,7 @@ class TemplateHandler
|
|||
self::$rootTpl = $this->file;
|
||||
}
|
||||
|
||||
$source_template_mtime = filemtime($this->file);
|
||||
$latest_mtime = $source_template_mtime > $this->handler_mtime ? $source_template_mtime : $this->handler_mtime;
|
||||
$latest_mtime = max(filemtime($this->file), $this->handler_mtime);
|
||||
|
||||
// make compiled file
|
||||
if(!file_exists($this->compiled_file) || filemtime($this->compiled_file) < $latest_mtime)
|
||||
|
|
@ -184,8 +178,9 @@ class TemplateHandler
|
|||
// if target file does not exist exit
|
||||
if(!$this->file || !file_exists($this->file))
|
||||
{
|
||||
Context::close();
|
||||
exit("Cannot find the template file: '{$this->file}'");
|
||||
$error_message = "Template not found: ${tpl_path}${tpl_filename}";
|
||||
trigger_error($error_message, \E_USER_WARNING);
|
||||
return escape($error_message);
|
||||
}
|
||||
|
||||
return $this->parse();
|
||||
|
|
@ -232,7 +227,7 @@ class TemplateHandler
|
|||
$buff = $this->_parseInline($buff);
|
||||
|
||||
// include, unload/load, import
|
||||
$buff = preg_replace_callback('/{(@[\s\S]+?|(?=\$\w+|_{1,2}[A-Z]+|[!\(+-]|\w+(?:\(|::)|\d+|[\'"].*?[\'"]).+?)}|<(!--[#%])?(include|import|(un)?load(?(4)|(?:_js_plugin)?)|config)(?(2)\(["\']([^"\']+)["\'])(.*?)(?(2)\)--|\/)>|<!--(@[a-z@]*)([\s\S]*?)-->(\s*)/', array($this, '_parseResource'), $buff);
|
||||
$buff = preg_replace_callback('/{(@[\s\S]+?|(?=[\$\\\\]\w+|_{1,2}[A-Z]+|[!\(+-]|\w+(?:\(|::)|\d+|[\'"].*?[\'"]).+?)}|<(!--[#%])?(include|import|(un)?load(?(4)|(?:_js_plugin)?)|config)(?(2)\(["\']([^"\']+)["\'])(.*?)(?(2)\)--|\/)>|<!--(@[a-z@]*)([\s\S]*?)-->(\s*)/', array($this, '_parseResource'), $buff);
|
||||
|
||||
// remove block which is a virtual tag
|
||||
$buff = preg_replace('@</?block\s*>@is', '', $buff);
|
||||
|
|
@ -805,7 +800,7 @@ class TemplateHandler
|
|||
}
|
||||
}
|
||||
|
||||
$path = preg_replace('/^' . preg_quote(_XE_PATH_, '/') . '/', '', $path);
|
||||
$path = preg_replace('/^' . preg_quote(\RX_BASEDIR, '/') . '/', '', $path);
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
|
@ -821,7 +816,17 @@ class TemplateHandler
|
|||
{
|
||||
return '';
|
||||
}
|
||||
return preg_replace('@(?<!::|\\\\|(?<!eval\()\')\$([a-z]|_[a-z0-9])@i', '\$__Context->$1', $php);
|
||||
|
||||
return preg_replace_callback('@(?<!::|\\\\|(?<!eval\()\')\$([a-z_][a-z0-9_]*)@i', function($matches) {
|
||||
if (preg_match('/^(?:GLOBALS|_SERVER|_COOKIE|_GET|_POST|_REQUEST|__Context)$/', $matches[1]))
|
||||
{
|
||||
return '$' . $matches[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
return '$__Context->' . $matches[1];
|
||||
}
|
||||
}, $php);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ class LimitTag
|
|||
*/
|
||||
var $list_count;
|
||||
|
||||
/**
|
||||
* QueryArgument object
|
||||
* @var QueryArgument
|
||||
*/
|
||||
var $offset;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
* @param object $index
|
||||
|
|
@ -58,6 +64,12 @@ class LimitTag
|
|||
$index->list_count->attrs->default = 0;
|
||||
$this->list_count = new QueryArgument($index->list_count);
|
||||
$this->arguments[] = $this->list_count;
|
||||
|
||||
if(isset($index->offset) && isset($index->offset->attrs))
|
||||
{
|
||||
$this->offset = new QueryArgument($index->offset);
|
||||
$this->arguments[] = $this->offset;
|
||||
}
|
||||
}
|
||||
|
||||
function toString()
|
||||
|
|
@ -66,6 +78,10 @@ class LimitTag
|
|||
{
|
||||
return sprintf('new Limit(${\'%s_argument\'}, ${\'%s_argument\'}, ${\'%s_argument\'})', $this->list_count->getArgumentName(), $this->page->getArgumentName(), $this->page_count->getArgumentName());
|
||||
}
|
||||
elseif($this->offset)
|
||||
{
|
||||
return sprintf('new Limit(${\'%s_argument\'}, NULL, NULL, ${\'%s_argument\'})', $this->list_count->getArgumentName(), $this->offset->getArgumentName());
|
||||
}
|
||||
else
|
||||
{
|
||||
return sprintf('new Limit(${\'%s_argument\'})', $this->list_count->getArgumentName());
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* RX_VERSION is the version number of the Rhymix CMS.
|
||||
*/
|
||||
define('RX_VERSION', '1.8.24');
|
||||
define('RX_VERSION', '1.8.25');
|
||||
|
||||
/**
|
||||
* RX_MICROTIME is the startup time of the current script, in microseconds since the Unix epoch.
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ return array(
|
|||
'display_type' => 'comment',
|
||||
'display_content' => array(),
|
||||
'display_to' => 'admin',
|
||||
'write_error_log' => 'fatal',
|
||||
'allow' => array(),
|
||||
),
|
||||
'seo' => array(
|
||||
|
|
|
|||
|
|
@ -22,11 +22,6 @@ class Debug
|
|||
protected static $_remote_requests = array();
|
||||
protected static $_slow_remote_requests = array();
|
||||
|
||||
/**
|
||||
* Also write to error log.
|
||||
*/
|
||||
public static $write_to_error_log = true;
|
||||
|
||||
/**
|
||||
* Get all entries.
|
||||
*
|
||||
|
|
@ -166,7 +161,7 @@ class Debug
|
|||
self::$_entries[] = $entry;
|
||||
|
||||
// Add the entry to the error log.
|
||||
if (self::$write_to_error_log && self::isEnabledForCurrentUser())
|
||||
if (config('debug.write_error_log') === 'all' && self::isEnabledForCurrentUser())
|
||||
{
|
||||
$log_entry = str_replace("\0", '', sprintf('Rhymix Debug: %s in %s on line %d',
|
||||
var_export($message, true), $entry->file, $entry->line));
|
||||
|
|
@ -215,7 +210,7 @@ class Debug
|
|||
);
|
||||
|
||||
// Add the entry to the error log.
|
||||
if (self::$write_to_error_log)
|
||||
if (config('debug.write_error_log') === 'all')
|
||||
{
|
||||
$log_entry = strtr(sprintf('PHP %s: %s in %s on line %d', $errinfo->type, $errstr, $errfile, intval($errline)), "\0\r\n\t\v\e\f", ' ');
|
||||
error_log($log_entry . \PHP_EOL . self::formatBacktrace($backtrace));
|
||||
|
|
@ -371,7 +366,10 @@ class Debug
|
|||
$log_entry = str_replace("\0", '', sprintf('%s #%d "%s" in %s on line %d',
|
||||
get_class($e), $e->getCode(), $e->getMessage(), $errfile, $e->getLine()));
|
||||
}
|
||||
error_log('PHP Exception: ' . $log_entry . \PHP_EOL . self::formatBacktrace($e->getTrace()));
|
||||
if (config('debug.write_error_log') !== 'none')
|
||||
{
|
||||
error_log('PHP Exception: ' . $log_entry . \PHP_EOL . self::formatBacktrace($e->getTrace()));
|
||||
}
|
||||
|
||||
// Display the error screen.
|
||||
self::displayErrorScreen($log_entry);
|
||||
|
|
@ -398,7 +396,10 @@ class Debug
|
|||
// Add the entry to the error log.
|
||||
$message = sprintf('%s in %s on line %d', $errinfo['message'], $errinfo['file'], intval($errinfo['line']));
|
||||
$log_entry = str_replace("\0", '', 'PHP ' . self::getErrorType($errinfo['type']) . ': ' . $message);
|
||||
error_log($log_entry);
|
||||
if (config('debug.write_error_log') !== 'none')
|
||||
{
|
||||
error_log($log_entry);
|
||||
}
|
||||
|
||||
// Display the error screen.
|
||||
self::displayErrorScreen($log_entry);
|
||||
|
|
|
|||
|
|
@ -307,11 +307,6 @@ class Security
|
|||
*/
|
||||
public static function checkCSRF($referer = null)
|
||||
{
|
||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$referer)
|
||||
{
|
||||
$referer = strval($_SERVER['HTTP_REFERER']);
|
||||
|
|
|
|||
171
layouts/simple_world/conf/info.xml
Normal file
171
layouts/simple_world/conf/info.xml
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<layout version="0.2">
|
||||
<title xml:lang="ko">네모의 꿈</title>
|
||||
<title xml:lang="en">Rectangular World</title>
|
||||
<description xml:lang="ko">깔끔한 면과 그림자 레이아웃</description>
|
||||
<description xml:lang="en">Simple rectangular planes and shadows</description>
|
||||
<version>1.0.1</version>
|
||||
<date>2016-09-25</date>
|
||||
<author email_address="misol.kr@gmail.com" link="https://github.com/misol">
|
||||
<name xml:lang="ko">misol</name>
|
||||
<name xml:lang="en">misol</name>
|
||||
</author>
|
||||
<menus>
|
||||
<menu name="GNB" maxdepth="2" default="true">
|
||||
<title xml:lang="ko">상단 메뉴</title>
|
||||
<title xml:lang="en">Global Navigation Menu</title>
|
||||
</menu>
|
||||
<menu name="FNB" maxdepth="1">
|
||||
<title xml:lang="ko">하단 메뉴</title>
|
||||
<title xml:lang="en">Footer Navigation Menu</title>
|
||||
</menu>
|
||||
</menus>
|
||||
<extra_vars>
|
||||
<var name="menu_position" type="select">
|
||||
<title xml:lang="ko">모바일 메뉴 버튼 위치</title>
|
||||
<title xml:lang="en">Mobile hamburger menu button position</title>
|
||||
<description xml:lang="ko">작은 화면에서 나타나는 메뉴 버튼의 위치를 선택할 수 있습니다.</description>
|
||||
<description xml:lang="en">The hamburger menu button, displayed on small screens, will be displayed at the selected position.</description>
|
||||
<options value="top_right">
|
||||
<title xml:lang="ko">오른쪽 위</title>
|
||||
<title xml:lang="en">Top right</title>
|
||||
</options>
|
||||
<options value="left_right">
|
||||
<title xml:lang="ko">왼쪽 위</title>
|
||||
<title xml:lang="en">Top left</title>
|
||||
</options>
|
||||
</var>
|
||||
<var name="LOGO_IMG" type="image">
|
||||
<title xml:lang="ko">사이트 로고 이미지</title>
|
||||
<title xml:lang="en">Site logo image</title>
|
||||
</var>
|
||||
<var name="LOGO_TEXT" type="text">
|
||||
<title xml:lang="ko">사이트 로고 문자</title>
|
||||
<title xml:lang="en">Site logo text</title>
|
||||
</var>
|
||||
<var name="logo_url" type="text">
|
||||
<title xml:lang="ko">사이트 로고 링크 주소</title>
|
||||
<title xml:lang="en">Site logo link URL</title>
|
||||
</var>
|
||||
<var name="before_content" type="textarea">
|
||||
<title xml:lang="ko">사이트 본문 상단 내용</title>
|
||||
<title xml:lang="en">Before the content area content</title>
|
||||
<description xml:lang="ko">사이트 본문 영역 상단에 내용을 입력할 수 있습니다.</description>
|
||||
</var>
|
||||
<var name="after_content" type="textarea">
|
||||
<title xml:lang="ko">사이트 본문 하단 내용</title>
|
||||
<title xml:lang="en">After the content area content</title>
|
||||
<description xml:lang="ko">사이트 본문 영역 하단에 내용을 입력할 수 있습니다.</description>
|
||||
</var>
|
||||
<var name="FOOTER" type="text">
|
||||
<title xml:lang="ko">사이트 하단 문자</title>
|
||||
<title xml:lang="en">Site footer text</title>
|
||||
</var>
|
||||
<var name="primary_color" type="select">
|
||||
<title xml:lang="ko">중심 색상</title>
|
||||
<title xml:lang="en">Primary color</title>
|
||||
<description xml:lang="ko">분위기를 형성하는데 사용되는 중심 색상입니다.</description>
|
||||
<description xml:lang="en">Please select the mood color you want.</description>
|
||||
<options value="red">
|
||||
<title xml:lang="ko">붉은 색</title>
|
||||
<title xml:lang="en">Red</title>
|
||||
</options>
|
||||
<options value="crimson">
|
||||
<title xml:lang="ko">크림슨</title>
|
||||
<title xml:lang="en">Crimson</title>
|
||||
</options>
|
||||
<options value="pink">
|
||||
<title xml:lang="ko">분홍</title>
|
||||
<title xml:lang="en">Pink</title>
|
||||
</options>
|
||||
<options value="purple">
|
||||
<title xml:lang="ko">보라</title>
|
||||
<title xml:lang="en">Purple</title>
|
||||
</options>
|
||||
<options value="deep-purple">
|
||||
<title xml:lang="ko">진보라</title>
|
||||
<title xml:lang="en">Deep Purple</title>
|
||||
</options>
|
||||
<options value="indigo">
|
||||
<title xml:lang="ko">인디고</title>
|
||||
<title xml:lang="en">Indigo</title>
|
||||
</options>
|
||||
<options value="deep-blue">
|
||||
<title xml:lang="ko">짙은 파랑</title>
|
||||
<title xml:lang="en">Deep Blue</title>
|
||||
</options>
|
||||
<options value="blue">
|
||||
<title xml:lang="ko">파랑</title>
|
||||
<title xml:lang="en">Blue</title>
|
||||
</options>
|
||||
<options value="light-blue">
|
||||
<title xml:lang="ko">밝은 파랑</title>
|
||||
<title xml:lang="en">Light Blue</title>
|
||||
</options>
|
||||
<options value="cyan">
|
||||
<title xml:lang="ko">시안</title>
|
||||
<title xml:lang="en">Cyan</title>
|
||||
</options>
|
||||
<options value="teal">
|
||||
<title xml:lang="ko">틸</title>
|
||||
<title xml:lang="en">Teal</title>
|
||||
</options>
|
||||
<options value="green">
|
||||
<title xml:lang="ko">초록</title>
|
||||
<title xml:lang="en">Green</title>
|
||||
</options>
|
||||
<options value="light-green">
|
||||
<title xml:lang="ko">연한 초록</title>
|
||||
<title xml:lang="en">Light Green</title>
|
||||
</options>
|
||||
<options value="lime">
|
||||
<title xml:lang="ko">라임</title>
|
||||
<title xml:lang="en">Lime</title>
|
||||
</options>
|
||||
<options value="yellow">
|
||||
<title xml:lang="ko">노랑</title>
|
||||
<title xml:lang="en">Yellow</title>
|
||||
</options>
|
||||
<options value="amber">
|
||||
<title xml:lang="ko">앰버</title>
|
||||
<title xml:lang="en">Amber</title>
|
||||
</options>
|
||||
<options value="orange">
|
||||
<title xml:lang="ko">주황</title>
|
||||
<title xml:lang="en">Orange</title>
|
||||
</options>
|
||||
<options value="deep-orange">
|
||||
<title xml:lang="ko">진한 주황</title>
|
||||
<title xml:lang="en">Deep Orange</title>
|
||||
</options>
|
||||
<options value="brown">
|
||||
<title xml:lang="ko">갈색</title>
|
||||
<title xml:lang="en">Brown</title>
|
||||
</options>
|
||||
<options value="grey">
|
||||
<title xml:lang="ko">회색</title>
|
||||
<title xml:lang="en">Grey</title>
|
||||
</options>
|
||||
<options value="blue-grey">
|
||||
<title xml:lang="ko">푸른 회색</title>
|
||||
<title xml:lang="en">Blue Grey</title>
|
||||
</options>
|
||||
<options value="customized">
|
||||
<title xml:lang="ko">커스텀</title>
|
||||
<title xml:lang="en">Customized</title>
|
||||
</options>
|
||||
</var>
|
||||
<var name="customized_primary_color" type="colorpicker">
|
||||
<title xml:lang="ko">커스텀 중심 색상</title>
|
||||
<title xml:lang="en">Customized primary color</title>
|
||||
<description xml:lang="ko">분위기를 형성하는데 사용되는 중심 색상을 위에서 선택하지 않고 Hex 코드로 직접 입력 합니다. (기본 값: #f44336) 위 항목에서 '커스텀' 항목을 선택해야 적용됩니다.</description>
|
||||
<description xml:lang="en">Please type the mood color you want, if there is no choice before. Insert your color in hex code. (dafault value: #f44336) To use this option, you have to select 'Customized' for the options before.</description>
|
||||
</var>
|
||||
<var name="content_color" type="colorpicker">
|
||||
<title xml:lang="ko">본문 영역 색상</title>
|
||||
<title xml:lang="en">Content area color</title>
|
||||
<description xml:lang="ko">레이아웃 본문 영역 색상을 지정합니다. 기본 색상은 흰색입니다.</description>
|
||||
<description xml:lang="en">Set content area color. The default color is white.</description>
|
||||
</var>
|
||||
</extra_vars>
|
||||
</layout>
|
||||
15
layouts/simple_world/lang/lang.xml
Normal file
15
layouts/simple_world/lang/lang.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<lang>
|
||||
<item name="simple_guest">
|
||||
<value xml:lang="ko"><![CDATA[방문자]]></value>
|
||||
<value xml:lang="en"><![CDATA[guest]]></value>
|
||||
<value xml:lang="jp"><![CDATA[訪問者]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[游客]]></value>
|
||||
</item>
|
||||
<item name="simple_hello">
|
||||
<value xml:lang="ko"><![CDATA[%s님 안녕하세요!]]></value>
|
||||
<value xml:lang="en"><![CDATA[Hello %s!]]></value>
|
||||
<value xml:lang="jp"><![CDATA[%s様、こんにちは!]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[%s, 你好!]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
149
layouts/simple_world/layout.html
Normal file
149
layouts/simple_world/layout.html
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
<!--// responsible layout -->
|
||||
{Context::addMetaTag("viewport", "width=device-width, user-scalable=yes")}
|
||||
|
||||
<load target="./lang" />
|
||||
|
||||
{@
|
||||
if(!$layout_info->primary_color)
|
||||
$layout_info->primary_color = 'red';
|
||||
if(!$layout_info->customized_primary_color)
|
||||
$layout_info->customized_primary_color = '#f44336';
|
||||
if(!$layout_info->content_color)
|
||||
$layout_info->content_color = '#ffffff';
|
||||
|
||||
$material_colors = array(
|
||||
'red' => '#f44336',
|
||||
'crimson' => '#66001f',
|
||||
'pink' => '#e91e63',
|
||||
'purple' => '#9c27b0',
|
||||
'deep-purple' => '#673ab7',
|
||||
'indigo' => '#3f51b5',
|
||||
'deep-blue' => '#00397f',
|
||||
'blue' => '#2196f3',
|
||||
'light-blue' => '#03a9f4',
|
||||
'cyan' => '#00bcd4',
|
||||
'teal' => '#009688',
|
||||
'green' => '#4caf50',
|
||||
'light-green' => '#8bc34a',
|
||||
'lime' => '#cddc39',
|
||||
'yellow' => '#ffeb3b',
|
||||
'amber' => '#ffc107',
|
||||
'orange' => '#ff9800',
|
||||
'deep-orange' => '#ff5722',
|
||||
'brown' => '#795548',
|
||||
'grey' => '#9e9e9e',
|
||||
'blue-grey' => '#607d8b',
|
||||
'black' => '#000000',
|
||||
'white' => '#ffffff',
|
||||
'customized' => $layout_info->customized_primary_color,
|
||||
);
|
||||
|
||||
$oMemberModel = getModel('member');
|
||||
$member_config = $oMemberModel->getMemberConfig();
|
||||
|
||||
}
|
||||
|
||||
|
||||
<!--// theme-color for mobile chrome browser -->
|
||||
{Context::addMetaTag("theme-color", $material_colors[$layout_info->primary_color])}
|
||||
|
||||
<!--// Load styles -->
|
||||
{Context::set('layout_scss_value', array('grey' => $material_colors['grey'], 'primary_color' => $material_colors[$layout_info->primary_color], 'menu_position' => $layout_info->menu_position, 'content_color' => $layout_info->content_color))}
|
||||
<load target="layout.scss" vars="$layout_scss_value" />
|
||||
<load target="layout.js" />
|
||||
|
||||
<div class="skip"><a href="#content">{$lang->skip_to_content}</a></div>
|
||||
<header class="layout_frame">
|
||||
<div class="layout_header layout_canvas">
|
||||
<h1>
|
||||
<a href="<!--@if($layout_info->logo_url)-->{$layout_info->logo_url}<!--@elseif(Context::getDefaultUrl())-->{Context::getDefaultUrl()}<!--@else-->{getUrl('')}<!--@end-->" id="siteTitle">
|
||||
<block cond="!Context::getSiteTitle() && !$layout_info->LOGO_IMG && !$layout_info->LOGO_TEXT">Rhymix</block>
|
||||
<block cond="Context::getSiteTitle() && !$layout_info->LOGO_IMG && !$layout_info->LOGO_TEXT">{Context::getSiteTitle()}</block>
|
||||
<img src="{$layout_info->LOGO_IMG}" alt="{$layout_info->LOGO_TEXT}" cond="$layout_info->LOGO_IMG">
|
||||
<block cond="!$layout_info->LOGO_IMG && $layout_info->LOGO_TEXT">{$layout_info->LOGO_TEXT}</block>
|
||||
</a>
|
||||
</h1>
|
||||
<div id="layout_menu_toggle">
|
||||
<button class="layout_mobile_menu layout_mobile_menu--htx" data-target="layout_gnb">
|
||||
<span>{$lang->menu}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="hside layout_pc">
|
||||
<div class="side">
|
||||
<!--// Search -->
|
||||
<form action="{getUrl()}" method="get" class="layout_search">
|
||||
<input type="hidden" name="vid" value="{$vid}" />
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="act" value="IS" />
|
||||
<input type="text" name="is_keyword" value="{$is_keyword}" required placeholder="{$lang->cmd_search}" title="{$lang->cmd_search}" />
|
||||
<input type="submit" value="{$lang->cmd_search}" />
|
||||
</form>
|
||||
<!--// Search -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--// Menu -->
|
||||
<nav class="layout_frame layout_menu" id="layout_gnb">
|
||||
<ul>
|
||||
<li class="layout_dropdown">
|
||||
<a href="{getUrl('act', 'dispMemberLoginForm')}" cond="!$is_logged">{sprintf($lang->simple_hello, $lang->simple_guest)}</a>
|
||||
<ul class="layout_dropdown-content" cond="!$is_logged">
|
||||
<li><a href="{getUrl('act', 'dispMemberLoginForm')}">{$lang->cmd_login}...</a></li>
|
||||
<li><a href="{getUrl('act', 'dispMemberSignUpForm')}" cond="$member_config->enable_join === 'Y'">{$lang->cmd_signup}...</a></li>
|
||||
</ul>
|
||||
<a href="{getUrl('act', 'dispMemberInfo')}" cond="$is_logged">{sprintf($lang->simple_hello, $logged_info->nick_name)}</a>
|
||||
<ul class="layout_dropdown-content" cond="$is_logged">
|
||||
<li><a href="{getUrl('act', 'dispMemberInfo')}">{$lang->cmd_view_member_info}</a></li>
|
||||
<li cond="$logged_info->is_admin == 'Y'">
|
||||
<a href="{getUrl('', 'module','admin')}">{$lang->cmd_management}</a>
|
||||
</li>
|
||||
<li><a href="{getUrl('act', 'dispMemberLogout')}">{$lang->cmd_logout}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li loop="$GNB->list=>$key1,$val1" class="<!--@if($val1['selected'])-->active <!--@endif--><!--@if($val1['list'])-->layout_dropdown<!--@endif-->">
|
||||
<a href="{$val1['href']}" target="_blank"|cond="$val1['open_window']=='Y'"><span>{$val1['link']}</span></a>
|
||||
<ul cond="$val1['list']" class="layout_dropdown-content">
|
||||
<li loop="$val1['list']=>$key2,$val2" class="active"|cond="$val2['selected']"><a href="{$val2['href']}" target="_blank"|cond="$val2['open_window']=='Y'">{$val2['link']}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li id="layout_search_link">
|
||||
<a href="{getUrl('vid', $vid, 'mid', $mid, 'act', 'IS')}"><span>{$lang->cmd_search}</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!--// Menu -->
|
||||
</header>
|
||||
<div class="layout_frame layout_body">
|
||||
<!--// VISUAL -->
|
||||
<div class="layout_body layout_canvas">
|
||||
<!--// CONTENT -->
|
||||
<div class="layout_content" id="content">
|
||||
{$layout_info->before_content}
|
||||
{$content}
|
||||
{$layout_info->after_content}
|
||||
</div>
|
||||
<!--// CONTENT -->
|
||||
</div>
|
||||
</div>
|
||||
<footer class="layout_frame layout_footer">
|
||||
<div class="layout_footer layout_canvas">
|
||||
<!--// Footer Menu -->
|
||||
<nav class="layout_menu" id="layout_fnb" cond="count($FNB->list) > 0">
|
||||
<ul>
|
||||
<li loop="$FNB->list=>$key1,$val1" class="footer_menu">
|
||||
<a href="{$val1['href']}" target="_blank"|cond="$val1['open_window']=='Y'"><span>{$val1['link']}</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!--// Footer Menu -->
|
||||
<!--// Language -->
|
||||
<div class="layout_language" cond="count($lang_supported) > 1">
|
||||
<button type="button" class="toggle">Language: {$lang_supported[$lang_type]}</button>
|
||||
<ul class="selectLang">
|
||||
<li loop="$lang_supported=>$key,$val" cond="$key!= $lang_type"><button type="button" onclick="doChangeLangType('{$key}');return false;">{$val}</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p cond="!$layout_info->FOOTER">Powered by <a href="https://www.rhymix.org/">Rhymix</a>.</p>
|
||||
<p cond="$layout_info->FOOTER">{$layout_info->FOOTER}</p>
|
||||
</div>
|
||||
</footer>
|
||||
68
layouts/simple_world/layout.js
Normal file
68
layouts/simple_world/layout.js
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
$(function() {
|
||||
"use strict";
|
||||
|
||||
/* adjust the width of the right member menu */
|
||||
var menu_width = function() {
|
||||
if($('#layout_gnb>ul>li:first-child').width() > 50) {
|
||||
$('#layout_gnb>ul>li:first-child .layout_dropdown-content, #layout_gnb>ul>li:first-child .layout_dropdown-content a').css('width', $('#layout_gnb>ul>li:first-child').width()).css('min-width', $('#layout_gnb>ul>li:first-child').width());
|
||||
}
|
||||
}
|
||||
|
||||
$( window ).resize(function() {
|
||||
if($('#layout_gnb>ul>li:first-child').width() > 50) {
|
||||
menu_width();
|
||||
}
|
||||
});
|
||||
|
||||
menu_width();
|
||||
|
||||
/* mobile hamburger menu toggle */
|
||||
$(".layout_mobile_menu").each(function() {
|
||||
$( this ).click(function( event ) {
|
||||
event.preventDefault();
|
||||
layout_toggleMenuOpener( $( this ).get(0) );
|
||||
});
|
||||
});
|
||||
|
||||
/* keyboard accessibility for dropdown menu */
|
||||
$(".layout_dropdown").each(function() {
|
||||
$( this ).focusin( function( event ) {
|
||||
$( this ).addClass('layout_focus');
|
||||
$( this ).find("ul.layout_dropdown-content").css('display', 'block').attr('data-dropdown', 'active');
|
||||
});
|
||||
});
|
||||
|
||||
$('body').focusin(function( event ) {
|
||||
if (!$(event.target).parents('.layout_dropdown').is('.layout_dropdown')) {
|
||||
$('*[data-dropdown="active"]').css('display', '').attr('data-dropdown', '').parents('li.layout_dropdown').removeClass('layout_focus');
|
||||
}
|
||||
});
|
||||
/* keyboard accessibility for dropdown menu END */
|
||||
|
||||
function layout_toggleMenuOpener(obj) {
|
||||
if(obj.classList.contains("is-active") === true){
|
||||
var targetMenu = $(obj).attr('data-target');
|
||||
$('#' + targetMenu).slideUp('300', function() {
|
||||
$(this).css('display', '');
|
||||
});
|
||||
|
||||
obj.classList.remove("is-active");
|
||||
}
|
||||
else {
|
||||
var targetMenu = $(obj).attr('data-target');
|
||||
if(targetMenu == 'layout_gnb')
|
||||
{
|
||||
$('#layout_gnb>ul>li:first-child .layout_dropdown-content, #layout_gnb>ul>li:first-child .layout_dropdown-content a').css('width', '').css('min-width', '');
|
||||
$('html,body').animate({scrollTop:0}, 200);
|
||||
}
|
||||
$('#' + targetMenu).slideDown('300');
|
||||
|
||||
obj.classList.add("is-active");
|
||||
}
|
||||
}
|
||||
|
||||
// Language Select
|
||||
$('.layout_language>.toggle').click(function(){
|
||||
$('.selectLang').toggle();
|
||||
});
|
||||
});
|
||||
601
layouts/simple_world/layout.scss
Normal file
601
layouts/simple_world/layout.scss
Normal file
|
|
@ -0,0 +1,601 @@
|
|||
@charset "UTF-8";
|
||||
@function layoutGrayContrast($color, $ratio) {
|
||||
$grayColor: grayscale($color);
|
||||
$grayValue: red($grayColor);
|
||||
|
||||
@if $grayValue > ($ratio * 255) {
|
||||
$return: 0;
|
||||
} @else {
|
||||
$return: 255;
|
||||
}
|
||||
|
||||
@return rgb($return, $return, $return);
|
||||
}
|
||||
|
||||
body {
|
||||
margin:0;
|
||||
padding:0;
|
||||
background-color: darken($grey, 35%);
|
||||
}
|
||||
/* Skin to content */
|
||||
.skip {
|
||||
background-color: lighten($grey, 35%);
|
||||
position: relative;
|
||||
margin:0
|
||||
}
|
||||
|
||||
.skip>a {
|
||||
display: block;
|
||||
text-align: center;
|
||||
line-height:28px;
|
||||
height:0px;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
.skip>a:focus {
|
||||
height: auto
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
.layout_canvas {
|
||||
position: relative;
|
||||
max-width:960px;
|
||||
width:100%;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
.layout_header {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.layout_header>.hside {
|
||||
position: absolute;
|
||||
right:5px;
|
||||
top: 25px
|
||||
}
|
||||
|
||||
.layout_body.layout_frame {
|
||||
background-color: $content_color;
|
||||
}
|
||||
.layout_body {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.layout_header:after,
|
||||
.layout_body:after {
|
||||
content:"";
|
||||
display: block;
|
||||
clear: both
|
||||
}
|
||||
|
||||
.layout_content {
|
||||
overflow: auto;
|
||||
padding:10px 0px;
|
||||
}
|
||||
|
||||
.layout_content>*:first-child {
|
||||
margin-top:0
|
||||
}
|
||||
|
||||
.layout_content img {
|
||||
max-width:100%;
|
||||
height: auto
|
||||
}
|
||||
|
||||
/* Header */
|
||||
header.layout_frame {
|
||||
position:relative;
|
||||
background-color: lighten($primary-color, 10%);
|
||||
z-index: 1;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
.layout_header>h1 {
|
||||
margin:0 auto;
|
||||
padding:20px 5px;
|
||||
box-sizing: border-box;
|
||||
color: layoutGrayContrast(lighten($primary-color, 10%), 0.710);
|
||||
}
|
||||
|
||||
.layout_header>h1>a {
|
||||
font-size:32px;
|
||||
text-decoration: none;
|
||||
color: layoutGrayContrast(lighten($primary-color, 10%), 0.710);
|
||||
padding:0 5px;
|
||||
}
|
||||
|
||||
#layout_menu_toggle {
|
||||
width:90px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* .layout_footer */
|
||||
.layout_footer {
|
||||
box-sizing: border-box;
|
||||
padding: 13px 7px;
|
||||
background-color: darken($grey, 35%);
|
||||
color: lighten($grey, 30%);
|
||||
}
|
||||
|
||||
.layout_footer p {
|
||||
font-size:12px
|
||||
}
|
||||
|
||||
.layout_footer a {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
color: lighten($primary_color, 31%);
|
||||
}
|
||||
|
||||
.layout_footer a:hover,
|
||||
.layout_footer a:focus {
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
/* Search */
|
||||
.layout_header .layout_search {
|
||||
display: inline-block;
|
||||
vertical-align: bottom;
|
||||
margin:0
|
||||
}
|
||||
|
||||
.layout_header .layout_search>input {
|
||||
font-size:12px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.layout_header .layout_search>input[type="text"] {
|
||||
width: 126px;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
padding: 8px 8px 6px 8px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
outline: none;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
background: lighten($primary-color, 20%);
|
||||
color: layoutGrayContrast(lighten($primary-color, 20%), 0.710);
|
||||
}
|
||||
|
||||
.layout_header .layout_search>input[type="text"]:hover,
|
||||
.layout_header .layout_search>input[type="text"]:focus {
|
||||
background: lighten($primary-color, 50%);
|
||||
color: layoutGrayContrast(lighten($primary-color, 50%), 0.710);
|
||||
}
|
||||
|
||||
.layout_header .layout_search>input[type="submit"] {
|
||||
vertical-align: bottom;
|
||||
background: lighten($primary-color,15%);
|
||||
color: layoutGrayContrast(lighten($primary-color, 15%), 0.710);
|
||||
border: none;
|
||||
height:32px;
|
||||
padding:0 15px;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.layout_header .layout_search>input[type="submit"]:hover,
|
||||
.layout_header .layout_search>input[type="submit"]:focus {
|
||||
background:$primary-color;
|
||||
color: layoutGrayContrast($primary-color, 0.710);
|
||||
}
|
||||
|
||||
/* GNB */
|
||||
.layout_menu {
|
||||
background-color: lighten($grey, 31%);
|
||||
}
|
||||
.layout_menu ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
max-width:960px;
|
||||
margin:0 auto;
|
||||
}
|
||||
.layout_menu>ul{
|
||||
width:100%;
|
||||
}
|
||||
.layout_menu>ul>li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#layout_gnb>ul>li:first-child {
|
||||
float: right;
|
||||
|
||||
}
|
||||
|
||||
.layout_menu li a, .dropbtn {
|
||||
display: inline-block;
|
||||
color: black;
|
||||
text-align: center;
|
||||
padding: 14px 16px;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.layout_menu li.active>a {
|
||||
background-color: lighten($primary-color, 15%);
|
||||
color: layoutGrayContrast(lighten($primary-color, 15%), 0.710);
|
||||
}
|
||||
header .layout_menu li:hover,
|
||||
header .layout_menu li:focus,
|
||||
header .layout_menu li:active,
|
||||
header .layout_menu .layout_focus {
|
||||
background-color: lighten($grey, 40%);
|
||||
}
|
||||
.layout_menu li a:hover,
|
||||
.layout_menu li a:focus,
|
||||
.layout_menu li a:active,
|
||||
.layout_dropdown:hover .dropbtn,
|
||||
.layout_dropdown:focus .dropbtn,
|
||||
.layout_dropdown:active .dropbtn,
|
||||
.layout_language li:hover button,
|
||||
.layout_language li:focus button,
|
||||
.layout_language li:active button {
|
||||
background-color: $primary-color;
|
||||
color: layoutGrayContrast($primary-color, 0.710);
|
||||
}
|
||||
|
||||
.layout_menu li.layout_dropdown {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layout_menu .layout_dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: lighten($grey, 40%);
|
||||
z-index: 1000;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.layout_menu .layout_dropdown-content a {
|
||||
color: black;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
min-width: 160px;
|
||||
display: block;
|
||||
text-align: left;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.
|
||||
.layout_menu .layout_dropdown-content a:hover,
|
||||
.layout_menu .layout_dropdown-content a:active,
|
||||
.layout_menu .layout_dropdown-content a:focus {
|
||||
display: block;
|
||||
background-color: lighten($primary-color, 10%);
|
||||
color: layoutGrayContrast(lighten($primary-color, 10%), 0.710);
|
||||
}
|
||||
|
||||
.layout_menu .layout_dropdown:hover .layout_dropdown-content,
|
||||
.layout_menu .layout_dropdown:active .layout_dropdown-content,
|
||||
.layout_menu .layout_dropdown:focus .layout_dropdown-content,
|
||||
.layout_menu .layout_dropdown a:hover ~ .layout_dropdown-content,
|
||||
.layout_menu .layout_dropdown a:active ~ .layout_dropdown-content,
|
||||
.layout_menu .layout_dropdown a:focus ~ .layout_dropdown-content,
|
||||
.layout_menu .layout_dropdown layout_dropdown-content:hover,
|
||||
.layout_menu .layout_dropdown layout_dropdown-content:active,
|
||||
.layout_menu .layout_dropdown layout_dropdown-content:focus/* ,
|
||||
.layout_menu .layout_dropdown .layout_dropdown-content:has(> a:hover),
|
||||
.layout_menu .layout_dropdown .layout_dropdown-content:has(> a:focus) */ {
|
||||
display: block;
|
||||
}
|
||||
#layout_fnb{
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.layout_footer .layout_menu li a, .layout_footer .dropbtn {
|
||||
color: lighten($grey, 10%);
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
padding: 14px 0px;
|
||||
}
|
||||
.layout_footer .layout_menu li a>span {
|
||||
padding: 0px 16px;
|
||||
border-right: 1px solid lighten($grey, 10%);
|
||||
}
|
||||
.layout_footer .layout_menu li:first-child{
|
||||
margin-left:-16px;
|
||||
}
|
||||
.layout_footer .layout_menu li:last-child a>span {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.layout_footer .layout_menu li a:hover,
|
||||
.layout_footer .layout_menu li a:focus,
|
||||
.layout_footer .layout_menu li a:active{
|
||||
background-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Language */
|
||||
.layout_language{
|
||||
display: absolute;
|
||||
right: 0;
|
||||
top: 15px;
|
||||
}
|
||||
.layout_language button {
|
||||
outline: none;
|
||||
}
|
||||
.layout_language ul::before {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.layout_language ul {
|
||||
display: none;
|
||||
float:right;
|
||||
width:120px;
|
||||
clear:both;
|
||||
margin: 0px 0px 10px;
|
||||
padding: 0;
|
||||
z-index: 1000;
|
||||
box-shadow: 0px 8px 16px 0px rgba(255,255,255,0.2);
|
||||
}
|
||||
.layout_language .toggle{
|
||||
background:none;
|
||||
display: block;
|
||||
float: right;
|
||||
width:120px;
|
||||
border:0;
|
||||
color:#fff;
|
||||
cursor:pointer;
|
||||
vertical-align:top;
|
||||
text-align:right;
|
||||
padding:0;
|
||||
height:45px;
|
||||
}
|
||||
|
||||
.layout_language li{
|
||||
list-style:none;
|
||||
background: lighten($grey, 40%);
|
||||
}
|
||||
.layout_language li button {
|
||||
display:block;
|
||||
color: black;
|
||||
background: lighten($grey, 40%);
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
display: block;
|
||||
text-align: left;
|
||||
box-sizing: border-box;
|
||||
border:0;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
/* Hamberger menu http://callmenick.com/post/animating-css-only-hamburger-menu-icons Licensed under the MIT license, http://www.opensource.org/licenses/mit-license.php Copyright 2014, Call Me Nick http://callmenick.com */
|
||||
.layout_mobile_menu {
|
||||
display: block;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
font-size: 0;
|
||||
text-indent: -9999px;
|
||||
appearance: none;
|
||||
box-shadow: none;
|
||||
border-radius: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
}
|
||||
|
||||
.layout_mobile_menu:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.layout_mobile_menu span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 41px;
|
||||
left: 17px;
|
||||
right: 17px;
|
||||
height: 8px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.layout_mobile_menu span::before,
|
||||
.layout_mobile_menu span::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 8px;
|
||||
background-color: #fff;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.layout_mobile_menu span::before {
|
||||
top: -19px;
|
||||
}
|
||||
|
||||
.layout_mobile_menu span::after {
|
||||
bottom: -19px;
|
||||
}
|
||||
|
||||
.layout_mobile_menu--htx {
|
||||
background-color: $primary-color;
|
||||
}
|
||||
|
||||
.layout_mobile_menu--htx span {
|
||||
transition: background 0s 0.3s;
|
||||
}
|
||||
|
||||
.layout_mobile_menu--htx span::before,
|
||||
.layout_mobile_menu--htx span::after {
|
||||
transition-duration: 0.3s, 0.3s;
|
||||
transition-delay: 0.3s, 0s;
|
||||
}
|
||||
|
||||
.layout_mobile_menu--htx span::before {
|
||||
transition-property: top, transform;
|
||||
}
|
||||
|
||||
.layout_mobile_menu--htx span::after {
|
||||
transition-property: bottom, transform;
|
||||
}
|
||||
|
||||
/* active state, i.e. menu open */
|
||||
.layout_mobile_menu--htx.is-active {
|
||||
background-color: darken( $primary-color, 10% );
|
||||
}
|
||||
|
||||
.layout_mobile_menu--htx.is-active span {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.layout_mobile_menu--htx.is-active span::before {
|
||||
top: 0;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.layout_mobile_menu--htx.is-active span::after {
|
||||
bottom: 0;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.layout_mobile_menu--htx.is-active span::before,
|
||||
.layout_mobile_menu--htx.is-active span::after {
|
||||
transition-delay: 0s, 0.3s;
|
||||
}
|
||||
#layout_search_link {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 750px) {
|
||||
#layout_menu_toggle, #layout_search_link {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layout_header>h1 {
|
||||
/* Menu position option */
|
||||
@if $menu_position == 'left_right' {
|
||||
padding:20px 5px 20px 95px;
|
||||
} @else {
|
||||
padding:20px 95px 20px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.layout_header>h1>a {
|
||||
color: layoutGrayContrast(lighten($primary-color, 10%), 0.710);
|
||||
}
|
||||
|
||||
#layout_menu_toggle {
|
||||
position: fixed;
|
||||
top:0;
|
||||
|
||||
/* Menu position option */
|
||||
@if $menu_position == 'left_right' {
|
||||
left:0;
|
||||
} @else {
|
||||
right:0;
|
||||
}
|
||||
|
||||
z-index:1001;
|
||||
opacity: 0.9;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* GNB */
|
||||
.layout_menu {
|
||||
display: none;
|
||||
font-size:15px;
|
||||
width:100%;
|
||||
height: auto;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.layout_menu ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.layout_menu>ul>li, #layout_gnb>ul>li:first-child {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.layout_menu li a, .dropbtn {
|
||||
display: block;
|
||||
color: #000;
|
||||
text-align: left;
|
||||
padding: 15px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.layout_menu li.active>a {
|
||||
background-color: lighten($primary-color, 15%);
|
||||
color: layoutGrayContrast(lighten($primary-color, 15%), 0.710);
|
||||
}
|
||||
|
||||
.layout_menu li a:hover, .layout_dropdown:hover .dropbtn,
|
||||
.layout_menu li a:focus, .layout_dropdown:focus .dropbtn {
|
||||
background-color: $primary-color;
|
||||
color: layoutGrayContrast($primary-color, 10%, 0.710);
|
||||
}
|
||||
|
||||
.layout_menu li.layout_dropdown {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layout_menu .layout_dropdown-content {
|
||||
display: block;
|
||||
position: relative;
|
||||
background-color: lighten($grey, 35%);
|
||||
color: layoutGrayContrast(lighten($grey, 35%), 0.710);
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
box-shadow: none;
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
.layout_menu .layout_dropdown-content a {
|
||||
background-color: lighten($grey, 35%);
|
||||
color: layoutGrayContrast(lighten($grey, 35%), 0.710);
|
||||
padding: 15px 30px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.layout_footer .layout_menu {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.layout_footer .layout_menu li a>span {
|
||||
border-right: none;
|
||||
}
|
||||
.layout_footer .layout_menu li:first-child{
|
||||
margin-left:0px;
|
||||
}
|
||||
|
||||
.layout_footer .layout_menu ul {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.layout_language {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.layout_language ul {
|
||||
display: none;
|
||||
float:none;
|
||||
width:100%;
|
||||
}
|
||||
.layout_language .toggle{
|
||||
display: block;
|
||||
float: none;
|
||||
width:100%;
|
||||
}
|
||||
/* PC only */
|
||||
.layout_pc {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
BIN
layouts/simple_world/thumbnail.png
Normal file
BIN
layouts/simple_world/thumbnail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
|
|
@ -713,7 +713,7 @@ class adminAdminController extends admin
|
|||
Rhymix\Framework\Config::set('view.minify_scripts', $vars->minify_scripts ?: 'common');
|
||||
Rhymix\Framework\Config::set('view.concat_scripts', $vars->concat_scripts ?: 'none');
|
||||
Rhymix\Framework\Config::set('view.server_push', $vars->use_server_push === 'Y');
|
||||
Rhymix\Framework\Config::set('view.gzip', $vars->use_gzip === 'Y');
|
||||
Rhymix\Framework\Config::set('view.use_gzip', $vars->use_gzip === 'Y');
|
||||
|
||||
// Save
|
||||
Rhymix\Framework\Config::save();
|
||||
|
|
@ -737,6 +737,7 @@ class adminAdminController extends admin
|
|||
Rhymix\Framework\Config::set('debug.log_slow_remote_requests', max(0, floatval($vars->debug_log_slow_remote_requests)));
|
||||
Rhymix\Framework\Config::set('debug.display_type', strval($vars->debug_display_type) ?: 'comment');
|
||||
Rhymix\Framework\Config::set('debug.display_to', strval($vars->debug_display_to) ?: 'admin');
|
||||
Rhymix\Framework\Config::set('debug.write_error_log', strval($vars->debug_write_error_log) ?: 'fatal');
|
||||
|
||||
// Debug content
|
||||
$debug_content = array_values($vars->debug_display_content);
|
||||
|
|
|
|||
|
|
@ -538,7 +538,7 @@ class adminAdminView extends admin
|
|||
Context::set('minify_scripts', Rhymix\Framework\Config::get('view.minify_scripts'));
|
||||
Context::set('concat_scripts', Rhymix\Framework\Config::get('view.concat_scripts'));
|
||||
Context::set('use_server_push', Rhymix\Framework\Config::get('view.server_push'));
|
||||
Context::set('use_gzip', Rhymix\Framework\Config::get('view.gzip'));
|
||||
Context::set('use_gzip', Rhymix\Framework\Config::get('view.use_gzip'));
|
||||
|
||||
$this->setTemplateFile('config_advanced');
|
||||
}
|
||||
|
|
@ -559,6 +559,7 @@ class adminAdminView extends admin
|
|||
Context::set('debug_display_type', Rhymix\Framework\Config::get('debug.display_type'));
|
||||
Context::set('debug_display_content', Rhymix\Framework\Config::get('debug.display_content'));
|
||||
Context::set('debug_display_to', Rhymix\Framework\Config::get('debug.display_to'));
|
||||
Context::set('debug_write_error_log', Rhymix\Framework\Config::get('debug.write_error_log'));
|
||||
|
||||
// IP access control
|
||||
$allowed_ip = Rhymix\Framework\Config::get('debug.allow');
|
||||
|
|
|
|||
|
|
@ -160,6 +160,10 @@ $lang->debug_display_to_admin = 'Administrator only';
|
|||
$lang->debug_display_to_ip = 'Visitors from IP adresses listed below';
|
||||
$lang->debug_display_to_everyone = 'Everyone';
|
||||
$lang->debug_log_filename = 'Log filename';
|
||||
$lang->debug_write_error_log = 'Write to Error Log';
|
||||
$lang->debug_write_error_log_all = 'All errors';
|
||||
$lang->debug_write_error_log_fatal = 'Fatal errors only';
|
||||
$lang->debug_write_error_log_none = 'None';
|
||||
$lang->about_debug_log_filename = 'YYYYMMDD in the filename will be replaced with the current date.<br>It is recommended to split the log file by date to prevent it from getting too large.';
|
||||
$lang->msg_debug_log_filename_not_writable = 'Rhymix cannot write log files in the specified path.';
|
||||
$lang->debug_allowed_ip = 'Allowed IP addresses';
|
||||
|
|
|
|||
|
|
@ -155,6 +155,10 @@ $lang->debug_display_to_admin = '관리자에게만 표시';
|
|||
$lang->debug_display_to_ip = '아래 IP의 방문자에게만 표시';
|
||||
$lang->debug_display_to_everyone = '모두에게 표시';
|
||||
$lang->debug_log_filename = '디버그 정보 기록 파일';
|
||||
$lang->debug_write_error_log = '에러 로그에 기록';
|
||||
$lang->debug_write_error_log_all = '모든 에러를 기록';
|
||||
$lang->debug_write_error_log_fatal = '치명적인 에러만 기록';
|
||||
$lang->debug_write_error_log_none = '기록하지 않음';
|
||||
$lang->about_debug_log_filename = '파일명에 YYYYMMDD가 포함된 경우 날짜별로 파일을 분리하여 기록합니다.<br>파일을 분리하지 않으면 용량이 매우 커질 수 있으니 주의하십시오.';
|
||||
$lang->msg_debug_log_filename_not_writable = '지정한 경로에 로그 파일을 작성할 수 없습니다.';
|
||||
$lang->debug_allowed_ip = '디버그 허용 IP';
|
||||
|
|
|
|||
|
|
@ -84,6 +84,14 @@
|
|||
<textarea name="debug_allowed_ip" id="debug_allowed_ip" rows="4" cols="42" placeholder="{$remote_addr} ({$lang->local_ip_address})" style="margin-right:10px">{$debug_allowed_ip}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="debug_log_slow_widgets">{$lang->debug_write_error_log}</label>
|
||||
<div class="x_controls">
|
||||
<label for="debug_write_error_log_all" class="x_inline"><input type="radio" name="debug_write_error_log" id="debug_write_error_log_all" value="all" checked="checked"|cond="$debug_write_error_log=='all'" /> {$lang->debug_write_error_log_all}</label>
|
||||
<label for="debug_write_error_log_fatal" class="x_inline"><input type="radio" name="debug_write_error_log" id="debug_write_error_log_fatal" value="fatal" checked="checked"|cond="$debug_write_error_log=='fatal' || !$debug_write_error_log" /> {$lang->debug_write_error_log_fatal}</label>
|
||||
<label for="debug_write_error_log_none" class="x_inline"><input type="radio" name="debug_write_error_log" id="debug_write_error_log_none" value="none" checked="checked"|cond="$debug_write_error_log=='none'" /> {$lang->debug_write_error_log_none}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<label for="default_lang" class="x_control-label">{$lang->default_lang}</label>
|
||||
<div class="x_controls">
|
||||
<select name="default_lang" id="default_lang">
|
||||
<option value="{$key}" loop="$enabled_lang=>$key" selected="selected"|cond="$key==$default_lang">{$supported_lang[$key]}</option>
|
||||
<option value="{$key}" loop="$enabled_lang=>$key" selected="selected"|cond="$key==$default_lang">{$supported_lang[$key]['name']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ class board extends ModuleObject
|
|||
$ssl_actions = array('dispBoardWrite', 'dispBoardWriteComment', 'dispBoardReplyComment', 'dispBoardModifyComment', 'dispBoardDelete', 'dispBoardDeleteComment', 'procBoardInsertDocument', 'procBoardDeleteDocument', 'procBoardInsertComment', 'procBoardDeleteComment', 'procBoardVerificationPassword');
|
||||
Context::addSSLActions($ssl_actions);
|
||||
}
|
||||
if(!Context::isExistsSSLAction('dispTempSavedList') && Context::getSslStatus() == 'optional')
|
||||
{
|
||||
Context::addSSLAction('dispTempSavedList');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -297,10 +297,13 @@ class boardController extends board
|
|||
if($this->module_info->trash_use == 'Y')
|
||||
{
|
||||
// move the trash
|
||||
$output = $oDocumentController->moveDocumentToTrash($oDocument);
|
||||
if(!$output->toBool())
|
||||
if($oDocument->isGranted() === true)
|
||||
{
|
||||
return $output;
|
||||
$output = $oDocumentController->moveDocumentToTrash($oDocument);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class boardMobile extends boardView
|
|||
if($this->module_info->list_count) $this->list_count = $this->module_info->list_count;
|
||||
if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count;
|
||||
if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count;
|
||||
if($this->module_info->mobile_search_list_count) $this->list_count = $this->module_info->mobile_search_list_count;
|
||||
if($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count;
|
||||
if($this->module_info->page_count) $this->page_count = $this->module_info->page_count;
|
||||
if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count;
|
||||
$this->except_notice = $this->module_info->except_notice == 'N' ? false : true;
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ class boardView extends board
|
|||
Context::setBrowserTitle($seo_title, array(
|
||||
'site_title' => Context::getSiteTitle(),
|
||||
'site_subtitle' => Context::getSiteSubtitle(),
|
||||
'subpage_title' => $module_info->browser_title,
|
||||
'subpage_title' => $this->module_info->browser_title,
|
||||
'document_title' => $oDocument->getTitleText(),
|
||||
'page' => Context::get('page') ?: 1,
|
||||
));
|
||||
|
|
|
|||
|
|
@ -1272,7 +1272,7 @@ class commentController extends comment
|
|||
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
||||
|
||||
// session registered if the author information matches to the current logged-in user's.
|
||||
if($member_srl && $member_srl == $oComment->get('member_srl'))
|
||||
if($member_srl && $member_srl == abs($oComment->get('member_srl')))
|
||||
{
|
||||
$_SESSION['voted_comment'][$comment_srl] = false;
|
||||
return new Object(-1, $failed_voted);
|
||||
|
|
@ -1405,7 +1405,7 @@ class commentController extends comment
|
|||
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
||||
|
||||
// session registered if the author information matches to the current logged-in user's.
|
||||
if($member_srl && $member_srl == $oComment->get('member_srl'))
|
||||
if($member_srl && $member_srl == abs($oComment->get('member_srl')))
|
||||
{
|
||||
$_SESSION['declared_comment'][$comment_srl] = TRUE;
|
||||
return new Object(-1, 'failed_declared');
|
||||
|
|
|
|||
|
|
@ -211,10 +211,6 @@ class commentModel extends comment
|
|||
$oComment = NULL;
|
||||
$oComment = new commentItem();
|
||||
$oComment->setAttribute($attribute);
|
||||
if($is_admin)
|
||||
{
|
||||
$oComment->setGrant();
|
||||
}
|
||||
|
||||
$result[$attribute->comment_srl] = $oComment;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -951,7 +951,6 @@ class documentController extends document
|
|||
return new Object(-1, 'msg_admin_document_no_move_to_trash');
|
||||
}
|
||||
|
||||
|
||||
$trash_args->module_srl = $oDocument->get('module_srl');
|
||||
$obj->module_srl = $oDocument->get('module_srl');
|
||||
// Cannot throw data from the trash to the trash
|
||||
|
|
@ -1300,7 +1299,7 @@ class documentController extends document
|
|||
if($oDocument->get('member_srl'))
|
||||
{
|
||||
// Pass after registering a session if author's information is same as the currently logged-in user's.
|
||||
if($member_srl && $member_srl == $oDocument->get('member_srl'))
|
||||
if($member_srl && $member_srl == abs($oDocument->get('member_srl')))
|
||||
{
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
return new Object(-1, $failed_voted);
|
||||
|
|
@ -1437,7 +1436,7 @@ class documentController extends document
|
|||
$oMemberModel = getModel('member');
|
||||
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
||||
// Pass after registering a session if author's information is same as the currently logged-in user's.
|
||||
if($member_srl && $member_srl == $oDocument->get('member_srl'))
|
||||
if($member_srl && $member_srl == abs($oDocument->get('member_srl')))
|
||||
{
|
||||
$_SESSION['declared_document'][$document_srl] = true;
|
||||
return new Object(-1, 'failed_declared');
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ class documentItem extends Object
|
|||
* @var string
|
||||
*/
|
||||
var $lang_code = null;
|
||||
/**
|
||||
* grant
|
||||
* @var bool
|
||||
*/
|
||||
var $grant_cache = null;
|
||||
/**
|
||||
* Status of allow trackback
|
||||
* @var bool
|
||||
|
|
@ -157,25 +162,44 @@ class documentItem extends Object
|
|||
|
||||
function isGranted()
|
||||
{
|
||||
if($_SESSION['own_document'][$this->document_srl]) return true;
|
||||
|
||||
if(!Context::get('is_logged')) return false;
|
||||
|
||||
if ($_SESSION['own_document'][$this->document_srl])
|
||||
{
|
||||
return $this->grant_cache = true;
|
||||
}
|
||||
|
||||
if ($this->grant_cache !== null)
|
||||
{
|
||||
return $this->grant_cache;
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') return true;
|
||||
if (!$logged_info->member_srl)
|
||||
{
|
||||
return $this->grant_cache = false;
|
||||
}
|
||||
if ($logged_info->is_admin == 'Y')
|
||||
{
|
||||
return $this->grant_cache = true;
|
||||
}
|
||||
if ($this->get('member_srl') && abs($this->get('member_srl')) == $logged_info->member_srl)
|
||||
{
|
||||
return $this->grant_cache = true;
|
||||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$grant = $oModuleModel->getGrant($oModuleModel->getModuleInfoByModuleSrl($this->get('module_srl')), $logged_info);
|
||||
if($grant->manager) return true;
|
||||
if ($grant->manager)
|
||||
{
|
||||
return $this->grant_cache = true;
|
||||
}
|
||||
|
||||
if($this->get('member_srl') && ($this->get('member_srl') == $logged_info->member_srl || $this->get('member_srl')*-1 == $logged_info->member_srl)) return true;
|
||||
|
||||
return false;
|
||||
return $this->grant_cache = false;
|
||||
}
|
||||
|
||||
function setGrant()
|
||||
{
|
||||
$_SESSION['own_document'][$this->document_srl] = true;
|
||||
$this->grant_cache = true;
|
||||
}
|
||||
|
||||
function isAccessible()
|
||||
|
|
@ -914,7 +938,7 @@ class documentItem extends Object
|
|||
$source_file = null;
|
||||
$is_tmp_file = false;
|
||||
|
||||
// Find an iamge file among attached files if exists
|
||||
// Find an image file among attached files if exists
|
||||
if($this->hasUploadedFiles())
|
||||
{
|
||||
$file_list = $this->getUploadedFiles();
|
||||
|
|
|
|||
|
|
@ -221,10 +221,29 @@ class documentModel extends document
|
|||
$sort_check = $this->_setSortIndex($obj, $load_extra_vars);
|
||||
$obj->sort_index = $sort_check->sort_index;
|
||||
$obj->isExtraVars = $sort_check->isExtraVars;
|
||||
unset($obj->use_alternate_output);
|
||||
|
||||
$this->_setSearchOption($obj, $args, $query_id, $use_division);
|
||||
// Call trigger (before)
|
||||
// This trigger can be used to set an alternative output using a different search method
|
||||
$output = ModuleHandler::triggerCall('document.getDocumentList', 'before', $obj);
|
||||
if($output instanceof Object && !$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
if ($sort_check->isExtraVars && substr_count($obj->search_target,'extra_vars'))
|
||||
// If an alternate output is set, use it instead of running the default queries
|
||||
$use_alternate_otuput = (isset($obj->use_alternate_output) && $obj->use_alternate_output instanceof Object);
|
||||
if (!$use_alternate_otuput)
|
||||
{
|
||||
$this->_setSearchOption($obj, $args, $query_id, $use_division);
|
||||
}
|
||||
|
||||
if ($use_alternate_otuput)
|
||||
{
|
||||
$output = $obj->use_alternate_output;
|
||||
unset($obj->use_alternate_output);
|
||||
}
|
||||
elseif ($sort_check->isExtraVars && substr_count($obj->search_target,'extra_vars'))
|
||||
{
|
||||
$query_id = 'document.getDocumentListWithinExtraVarsExtraSort';
|
||||
$args->sort_index = str_replace('documents.','',$args->sort_index);
|
||||
|
|
@ -319,6 +338,9 @@ class documentModel extends document
|
|||
}
|
||||
}
|
||||
|
||||
// Call trigger (after)
|
||||
// This trigger can be used to modify search results
|
||||
ModuleHandler::triggerCall('document.getDocumentList', 'after', $output);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -164,6 +164,18 @@ class editorAdminController extends editor
|
|||
$config->font_defined = $configVars->font_defined = 'N';
|
||||
$config->content_font = $configVars->content_font;
|
||||
}
|
||||
|
||||
if ($configVars->additional_css)
|
||||
{
|
||||
$additional_css = array_map('trim', explode("\n", $configVars->additional_css));
|
||||
$additional_css = array_filter($additional_css, function($str) { return !empty($str); });
|
||||
$config->additional_css = $additional_css;
|
||||
}
|
||||
else
|
||||
{
|
||||
$config->additional_css = array();
|
||||
}
|
||||
|
||||
$config->content_font_size = trim($configVars->content_font_size);
|
||||
$config->content_font_size = ctype_digit($config->content_font_size) ? ($config->content_font_size . 'px') : $config->content_font_size;
|
||||
$config->content_line_height = trim($configVars->content_line_height);
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ class editorAdminView extends editor
|
|||
$option->content_line_height = $config->content_line_height;
|
||||
$option->content_paragraph_spacing = $config->content_paragraph_spacing;
|
||||
$option->content_word_break = $config->content_word_break;
|
||||
$option->additional_css = $config->additional_css ?: array();
|
||||
$option->enable_autosave = false;
|
||||
$option->enable_default_component = true;
|
||||
$option->enable_component = true;
|
||||
|
|
@ -108,6 +109,7 @@ class editorAdminView extends editor
|
|||
$option_com->content_line_height = $config->content_line_height;
|
||||
$option_com->content_paragraph_spacing = $config->content_paragraph_spacing;
|
||||
$option_com->content_word_break = $config->content_word_break;
|
||||
$option_com->additional_css = $config->additional_css ?: array();
|
||||
$option_com->enable_autosave = false;
|
||||
$option_com->enable_default_component = true;
|
||||
$option_com->enable_component = true;
|
||||
|
|
@ -130,6 +132,11 @@ class editorAdminView extends editor
|
|||
Context::set('component_list', $component_list);
|
||||
Context::set('component_count', $component_count);
|
||||
Context::set('editor_config_default', $editor_config_default);
|
||||
|
||||
foreach ($config->additional_css as $additional_css_url)
|
||||
{
|
||||
Context::loadFile(array($additional_css_url));
|
||||
}
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('component_list....');
|
||||
|
|
|
|||
|
|
@ -107,6 +107,10 @@ class editorModel extends editor
|
|||
{
|
||||
$editor_config->comment_content_style = ($editor_default_config->comment_content_style) ? $editor_default_config->comment_content_style : 'ckeditor_light';
|
||||
}
|
||||
if((!$editor_config->additional_css && $editor_default_config->additional_css) || $editor_config->default_editor_settings === 'Y')
|
||||
{
|
||||
$editor_config->additional_css = $editor_default_config->additional_css ?: array();
|
||||
}
|
||||
|
||||
return $editor_config;
|
||||
}
|
||||
|
|
@ -235,6 +239,7 @@ class editorModel extends editor
|
|||
Context::set('content_line_height', $option->content_line_height);
|
||||
Context::set('content_paragraph_spacing', $option->content_paragraph_spacing);
|
||||
Context::set('content_word_break', $option->content_word_break);
|
||||
Context::set('editor_additional_css', $option->additional_css);
|
||||
|
||||
// Option setting to allow auto-save
|
||||
if(!$option->enable_autosave) $enable_autosave = false;
|
||||
|
|
@ -404,6 +409,7 @@ class editorModel extends editor
|
|||
$config->enable_html_grant = $editor_config->enable_html_grant;
|
||||
$config->editor_height = $editor_config->editor_height;
|
||||
$config->enable_autosave = $editor_config->enable_autosave;
|
||||
$config->additional_css = $editor_config->additional_css;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -421,6 +427,7 @@ class editorModel extends editor
|
|||
$config->enable_html_grant = $editor_config->enable_comment_html_grant;
|
||||
$config->editor_height = $editor_config->comment_editor_height;
|
||||
$config->enable_autosave = 'N';
|
||||
$config->additional_css = $editor_config->additional_css;
|
||||
}
|
||||
// Check a group_list of the currently logged-in user for permission check
|
||||
if(Context::get('is_logged'))
|
||||
|
|
@ -442,6 +449,7 @@ class editorModel extends editor
|
|||
$option->content_line_height = $config->content_line_height;
|
||||
$option->content_paragraph_spacing = $config->content_paragraph_spacing;
|
||||
$option->content_word_break = $config->content_word_break;
|
||||
$option->additional_css = $config->additional_css;
|
||||
$option->colorset = $config->sel_editor_colorset;
|
||||
// Permission check for file upload
|
||||
$option->allow_fileupload = false;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ $lang->guide_choose_main_editor = 'Main editor';
|
|||
$lang->guide_set_height_main_editor = 'Main editor height';
|
||||
$lang->guide_choose_comment_editor = 'Comment editor';
|
||||
$lang->guide_set_height_comment_editor = 'Comment editor height';
|
||||
$lang->guide_additional_css = 'Additional CSS Files';
|
||||
$lang->about_additional_css = 'To load additional CSS files inside the editor, such as web fonts, please enter one URL per line.';
|
||||
$lang->guide_choose_text_formatting = 'Text formatting style';
|
||||
$lang->guide_choose_font_preview = 'Preview';
|
||||
$lang->guide_choose_font_body = 'Default font';
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ $lang->guide_choose_main_editor = '본문 에디터';
|
|||
$lang->guide_set_height_main_editor = '본문 에디터 높이';
|
||||
$lang->guide_choose_comment_editor = '댓글 에디터';
|
||||
$lang->guide_set_height_comment_editor = '댓글 에디터 높이';
|
||||
$lang->guide_additional_css = 'CSS 파일 추가';
|
||||
$lang->about_additional_css = '웹폰트 등의 CSS를 에디터 내부에서 추가로 로딩하려면 한 줄에 하나씩 URL을 입력해 주십시오.';
|
||||
$lang->guide_choose_text_formatting = '본문 서식';
|
||||
$lang->guide_choose_font_preview = '미리보기';
|
||||
$lang->guide_choose_font_body = '본문 글꼴';
|
||||
|
|
|
|||
13
modules/editor/skins/ckeditor/editor.html
Executable file → Normal file
13
modules/editor/skins/ckeditor/editor.html
Executable file → Normal file
|
|
@ -12,6 +12,11 @@
|
|||
var auto_saved_msg = "{$lang->msg_auto_saved}";
|
||||
</script>
|
||||
|
||||
{@ $css_file_list = array(Context::getRequestUri() . $content_style_path . '/editor.css?' . date("YmdHis", @filemtime($content_style_path."/editor.css")))}
|
||||
<!--@foreach($editor_additional_css as $additional_css_url)-->
|
||||
{@ $css_file_list[] = $additional_css_url}
|
||||
<!--@endforeach-->
|
||||
|
||||
{@ $css_content = null }
|
||||
<!--@if($content_font || $content_font_size)-->
|
||||
{@ $css_content .= ' .xe_content.editable { '}
|
||||
|
|
@ -31,7 +36,7 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
|
|||
<input type="hidden" name="_saved_doc_message" value="{$lang->msg_load_saved_doc}" />
|
||||
<!--@end-->
|
||||
|
||||
<div id="ckeditor_instance_{$editor_sequence}" data-editor-sequence="{$editor_sequence}" data-editor-primary-key-name="{$editor_primary_key_name}" data-editor-content-key-name="{$editor_content_key_name}" style="min-height:{$editor_height}px;"></div>
|
||||
<div id="ckeditor_instance_{$editor_sequence}" data-editor-sequence="{$editor_sequence}" data-editor-primary-key-name="{$editor_primary_key_name}" data-editor-content-key-name="{$editor_content_key_name}" style="min-height:{$m ? 160 : $editor_height}px;"></div>
|
||||
|
||||
<p cond="$enable_autosave" class="editor_autosaved_message autosave_message" id="editor_autosaved_message_{$editor_sequence}"> </p>
|
||||
|
||||
|
|
@ -86,9 +91,9 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
|
|||
|
||||
var settings = {
|
||||
ckeconfig: {
|
||||
height: '{$editor_height}',
|
||||
height: '{$m ? 160 : $editor_height}',
|
||||
skin: '{$colorset}',
|
||||
contentsCss: '{$content_style_path}/editor.css?{date("YmdHis", @filemtime($content_style_path."/editor.css"))}',
|
||||
contentsCss: {json_encode($css_file_list)},
|
||||
xe_editor_sequence: {$editor_sequence},
|
||||
font_defaultLabel: default_font_name,
|
||||
font_names: font_list,
|
||||
|
|
@ -121,7 +126,7 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
|
|||
settings.loadXeComponent = false;
|
||||
<!--@endif-->
|
||||
|
||||
<!--@if($module_type === 'comment'||Mobile::isMobileCheckByAgent())-->
|
||||
<!--@if($module_type === 'comment' || $m)-->
|
||||
settings.ckeconfig.toolbarStartupExpanded = false;
|
||||
<!--@endif-->
|
||||
|
||||
|
|
|
|||
|
|
@ -113,6 +113,13 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->guide_additional_css}</label>
|
||||
<div class="x_controls">
|
||||
<textarea id="additional_css" name="additional_css" style="width:90%" rows="4" cols="42">{escape(implode("\n", $editor_config->additional_css ?: array()))}</textarea>
|
||||
<p class="x_help-block">{$lang->about_additional_css}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="font_size">{$lang->guide_choose_font_size_body}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -175,7 +175,12 @@ class fileModel extends file
|
|||
if(!$config->allow_outlink) $config->allow_outlink = 'Y';
|
||||
if(!$config->download_grant) $config->download_grant = array();
|
||||
|
||||
$size = preg_replace('/[a-z]/is', '', ini_get('upload_max_filesize'));
|
||||
$size = ini_get('upload_max_filesize');
|
||||
$unit = strtolower($size[strlen($size) - 1]);
|
||||
$size = (float)$size;
|
||||
if($unit == 'g') $size *= 1024;
|
||||
if($unit == 'k') $size /= 1024;
|
||||
|
||||
if($config->allowed_filesize > $size)
|
||||
{
|
||||
$config->allowed_filesize = $size;
|
||||
|
|
|
|||
|
|
@ -948,6 +948,7 @@ class memberModel extends member
|
|||
if(file_exists($image_mark_file))
|
||||
{
|
||||
list($width, $height, $type, $attrs) = getimagesize($image_mark_file);
|
||||
$info = new stdClass;
|
||||
$info->width = $width;
|
||||
$info->height = $height;
|
||||
$info->src = Context::getRequestUri().$image_mark_file . '?' . date('YmdHis', filemtime($image_mark_file));
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
<!--@end-->
|
||||
</select>
|
||||
<select name="search_target" style="margin-right:4px" title="{$lang->search_target}">
|
||||
{@$lang->search_target_list = array_merge($usedIdentifiers, $lang->search_target_list->getArrayCopy())}
|
||||
{@ $lang->search_target_list = array_merge($usedIdentifiers, lang('member.search_target_list')->getArrayCopy())}
|
||||
<option value="{$key}" loop="$lang->search_target_list=>$key,$val" selected="selected"|cond="$search_target==$key">{$val}</option>
|
||||
</select>
|
||||
<input type="search" name="search_keyword" value="{htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" style="width:140px">
|
||||
|
|
|
|||
|
|
@ -1601,25 +1601,23 @@ class menuAdminController extends menu
|
|||
$oModuleModel = getModel('module');
|
||||
//$info = $oModuleModel->getModuleInfoXml($moduleName);
|
||||
$info = $oModuleModel->getModuleActionXml($moduleName);
|
||||
|
||||
$url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->menu->{$menuName}->index);
|
||||
if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->admin_index_act);
|
||||
if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin');
|
||||
|
||||
|
||||
$args = new stdClass();
|
||||
$args->url = 'index.php?module=admin';
|
||||
|
||||
if($info->menu->{$menuName}->index)
|
||||
{
|
||||
$args->url .= '&act=' . $info->menu->{$menuName}->index;
|
||||
}
|
||||
else if($info->admin_index_act)
|
||||
{
|
||||
$args->url .= '&act=' . $info->admin_index_act;
|
||||
}
|
||||
|
||||
$args->menu_item_srl = (!$requestArgs->menu_item_srl) ? getNextSequence() : $requestArgs->menu_item_srl;
|
||||
$args->parent_srl = $requestArgs->parent_srl;
|
||||
$args->menu_srl = $requestArgs->menu_srl;
|
||||
$args->name = sprintf('{$lang->menu_gnb_sub[\'%s\']}', $menuName);
|
||||
//if now page is https...
|
||||
if(strpos($url, 'https') !== false)
|
||||
{
|
||||
$args->url = str_replace('https'.substr(Context::getDefaultUrl(), 4), '', $url);
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->url = str_replace(Context::getDefaultUrl(), '', $url);
|
||||
}
|
||||
$args->open_window = 'N';
|
||||
$args->expand = 'N';
|
||||
$args->normal_btn = '';
|
||||
|
|
|
|||
|
|
@ -352,6 +352,8 @@ class moduleAdminController extends module
|
|||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
}
|
||||
|
||||
Rhymix\Framework\Cache::delete("site_and_module:module_grants:$module_srl");
|
||||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
||||
|
|
@ -632,7 +634,10 @@ class moduleAdminController extends module
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rhymix\Framework\Cache::delete("site_and_module:module_grants:$module_srl");
|
||||
$this->setMessage('success_registed');
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
|
||||
{
|
||||
if(Context::get('success_return_url'))
|
||||
|
|
|
|||
|
|
@ -827,6 +827,7 @@ class moduleController extends module
|
|||
$output = executeQueryArray('module.insertSiteAdmin', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
Rhymix\Framework\Cache::delete("site_and_module:site_admins:$site_srl");
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -842,8 +843,11 @@ class moduleController extends module
|
|||
$member_info = $oMemberModel->getMemberInfoByEmailAddress($admin_id);
|
||||
else
|
||||
$member_info = $oMemberModel->getMemberInfoByUserID($admin_id);
|
||||
|
||||
|
||||
if(!$member_info->member_srl) return;
|
||||
|
||||
Rhymix\Framework\Cache::delete("site_and_module:module_admins:$module_srl");
|
||||
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->member_srl = $member_info->member_srl;
|
||||
|
|
@ -864,6 +868,9 @@ class moduleController extends module
|
|||
$member_info = $oMemberModel->getMemberInfoByUserID($admin_id);
|
||||
if($member_info->member_srl) $args->member_srl = $member_info->member_srl;
|
||||
}
|
||||
|
||||
Rhymix\Framework\Cache::delete("site_and_module:module_admins:$module_srl");
|
||||
|
||||
return executeQuery('module.deleteAdminId', $args);
|
||||
}
|
||||
|
||||
|
|
@ -1046,6 +1053,8 @@ class moduleController extends module
|
|||
executeQuery('module.insertModuleGrant', $args);
|
||||
}
|
||||
}
|
||||
|
||||
Rhymix\Framework\Cache::delete("site_and_module:module_grants:$module_srl");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1055,7 +1064,10 @@ class moduleController extends module
|
|||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
return executeQuery('module.deleteModuleGrants', $args);
|
||||
$output = executeQuery('module.deleteModuleGrants', $args);
|
||||
|
||||
Rhymix\Framework\Cache::delete("site_and_module:module_grants:$module_srl");
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1594,25 +1594,36 @@ class moduleModel extends module
|
|||
*/
|
||||
function isSiteAdmin($member_info, $site_srl = null)
|
||||
{
|
||||
if(!$member_info->member_srl) return false;
|
||||
if($member_info->is_admin == 'Y') return true;
|
||||
|
||||
$args = new stdClass();
|
||||
if(!isset($site_srl))
|
||||
if (!$member_info || !$member_info->member_srl)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ($member_info->is_admin == 'Y')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if ($site_srl === null)
|
||||
{
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
if(!$site_module_info) return;
|
||||
$args->site_srl = $site_module_info->site_srl;
|
||||
if(!$site_module_info) return false;
|
||||
$site_srl = $site_module_info->site_srl;
|
||||
}
|
||||
else
|
||||
|
||||
$site_srl = $site_srl ?: 0;
|
||||
$site_admins = Rhymix\Framework\Cache::get("site_and_module:site_admins:$site_srl");
|
||||
if ($site_admins === null)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->site_srl = $site_srl;
|
||||
$output = executeQueryArray('module.isSiteAdmin', $args);
|
||||
$site_admins = array();
|
||||
foreach ($output->data as $site_admin)
|
||||
{
|
||||
$site_admins[$site_admin->member_srl] = true;
|
||||
}
|
||||
Rhymix\Framework\Cache::set("site_and_module:site_admins:$site_srl", $site_admins, 0, true);
|
||||
}
|
||||
|
||||
$args->member_srl = $member_info->member_srl;
|
||||
$output = executeQuery('module.isSiteAdmin', $args);
|
||||
if($output->data->member_srl == $args->member_srl) return true;
|
||||
return false;
|
||||
return isset($site_admins[$member_info->member_srl]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1626,6 +1637,43 @@ class moduleModel extends module
|
|||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if a member is a module administrator
|
||||
*/
|
||||
function isModuleAdmin($member_info, $module_srl = null)
|
||||
{
|
||||
if (!$member_info || !$member_info->member_srl)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ($member_info->is_admin == 'Y')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if ($module_srl === null)
|
||||
{
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
if(!$site_module_info) return false;
|
||||
$module_srl = $site_module_info->module_srl;
|
||||
}
|
||||
|
||||
$module_srl = $module_srl ?: 0;
|
||||
$module_admins = Rhymix\Framework\Cache::get("site_and_module:module_admins:$module_srl");
|
||||
if ($module_admins === null)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('module.getModuleAdmin', $args);
|
||||
$module_admins = array();
|
||||
foreach ($output->data as $module_admin)
|
||||
{
|
||||
$module_admins[$module_admin->member_srl] = true;
|
||||
}
|
||||
Rhymix\Framework\Cache::set("site_and_module:module_admins:$module_srl", $module_admins, 0, true);
|
||||
}
|
||||
return isset($module_admins[$member_info->member_srl]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get admin ID of the module
|
||||
*/
|
||||
|
|
@ -1862,13 +1910,18 @@ class moduleModel extends module
|
|||
*/
|
||||
function getGrant($module_info, $member_info, $xml_info = '')
|
||||
{
|
||||
if (!$xml_info && isset($GLOBALS['__MODULE_GRANT__'][intval($module_info->module_srl)][intval($member_info->member_srl)]))
|
||||
{
|
||||
return $GLOBALS['__MODULE_GRANT__'][intval($module_info->module_srl)][intval($member_info->member_srl)];
|
||||
}
|
||||
|
||||
$grant = new stdClass();
|
||||
|
||||
if(!$xml_info)
|
||||
{
|
||||
$module = $module_info->module;
|
||||
$xml_info = $this->getModuleActionXml($module);
|
||||
}
|
||||
|
||||
// Set variables to grant group permission
|
||||
$module_srl = $module_info->module_srl;
|
||||
$grant_info = $xml_info->grant;
|
||||
|
|
@ -1898,15 +1951,13 @@ class moduleModel extends module
|
|||
// Get a type of granted permission
|
||||
$grant->access = $grant->manager = $grant->is_site_admin = ($member_info->is_admin=='Y'||$this->isSiteAdmin($member_info, $module_info->site_srl))?true:false;
|
||||
$grant->is_admin = ($member_info->is_admin == 'Y') ? true : false;
|
||||
|
||||
// If a just logged-in member is, check if the member is a module administrator
|
||||
if(!$grant->manager && $member_info->member_srl)
|
||||
if (!$grant->manager && $member_info->member_srl && $this->isModuleAdmin($member_info, $module_srl))
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->member_srl = $member_info->member_srl;
|
||||
$output = executeQuery('module.getModuleAdmin',$args);
|
||||
if($output->data && $output->data->member_srl == $member_info->member_srl) $grant->manager = true;
|
||||
$grant->manager = true;
|
||||
}
|
||||
|
||||
// If not an administrator, get information from the DB and grant manager privilege.
|
||||
if(!$grant->manager)
|
||||
{
|
||||
|
|
@ -1918,9 +1969,7 @@ class moduleModel extends module
|
|||
}
|
||||
else
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('module.getModuleGrants', $args);
|
||||
$output = $this->getModuleGrants($module_srl);
|
||||
}
|
||||
|
||||
$grant_exists = $granted = array();
|
||||
|
|
@ -2014,9 +2063,28 @@ class moduleModel extends module
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['__MODULE_GRANT__'][intval($module_info->module_srl)][intval($member_info->member_srl)] = $grant;
|
||||
|
||||
return $grant;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get module grants
|
||||
*/
|
||||
function getModuleGrants($module_srl)
|
||||
{
|
||||
$output = Rhymix\Framework\Cache::get("site_and_module:module_grants:$module_srl");
|
||||
if ($output === null)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('module.getModuleGrants', $args);
|
||||
Rhymix\Framework\Cache::set("site_and_module:module_grants:$module_srl", $output, 0, true);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
function getModuleFileBox($module_filebox_srl)
|
||||
{
|
||||
$args = new stdClass();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<table name="module_admins" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" notnull="notnull" filter="number" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -12,4 +12,11 @@
|
|||
<condition operation="equal" column="called_method" var="called_method" pipe="and" />
|
||||
<condition operation="equal" column="called_position" var="called_position" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index default="trigger_name" order="asc" />
|
||||
<index default="called_position" order="asc" />
|
||||
<index default="module" order="asc" />
|
||||
<index default="type" order="asc" />
|
||||
<index default="called_method" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -9,4 +9,11 @@
|
|||
<condition operation="equal" column="trigger_name" var="trigger_name" />
|
||||
<condition operation="equal" column="called_position" var="called_position" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index default="trigger_name" order="asc" />
|
||||
<index default="called_position" order="asc" />
|
||||
<index default="module" order="asc" />
|
||||
<index default="type" order="asc" />
|
||||
<index default="called_method" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<column name="member_srl" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="site_srl" var="site_srl" filter="number" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
<title xml:lang="en">Notification Center Lite</title>
|
||||
<description xml:lang="ko">사이트 사용자간의 커뮤니케이션에 대한 정보를 알려주는 모듈입니다.</description>
|
||||
<description xml:lang="en">This module notify users of information about new documents, comments and/or messages that call them. This module will enhance communication beween site users.</description>
|
||||
<version>3.0.0</version>
|
||||
<date>2016-04-17</date>
|
||||
<version>3.1</version>
|
||||
<date>2016-09-10</date>
|
||||
<category>content</category>
|
||||
<author link="http://github.com/xe-public">
|
||||
<name xml:lang="ko">XE Public</name>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@ class ncenterliteController extends ncenterlite
|
|||
{
|
||||
return $output;
|
||||
}
|
||||
else
|
||||
{
|
||||
self::removeFlagFile($args->member_srl);
|
||||
}
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -411,9 +415,30 @@ class ncenterliteController extends ncenterlite
|
|||
return new Object();
|
||||
}
|
||||
|
||||
$notify_list = $oNcenterliteModel->getNotifyMemberSrlByCommentSrl($obj->comment_srl);
|
||||
|
||||
// 대댓글의 대댓글일 경우 혹은 중복적으로 받는 경우 comment_srl 당 2개이상 notify가 생성될 수 있다.
|
||||
$member_srls = array();
|
||||
foreach($notify_list as $value)
|
||||
{
|
||||
if(!in_array($value->member_srl, $member_srls))
|
||||
{
|
||||
$member_srls[] = $value->member_srl;
|
||||
}
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->srl = $obj->comment_srl;
|
||||
$output = executeQuery('ncenterlite.deleteNotifyBySrl', $args);
|
||||
if($output->toBool())
|
||||
{
|
||||
foreach($member_srls as $member_srl)
|
||||
{
|
||||
//Remove flag files
|
||||
self::removeFlagFile($member_srl);
|
||||
}
|
||||
}
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -429,12 +454,27 @@ class ncenterliteController extends ncenterlite
|
|||
$args = new stdClass();
|
||||
$args->srl = $obj->document_srl;
|
||||
$output = executeQuery('ncenterlite.deleteNotifyBySrl', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
return new Object();
|
||||
}
|
||||
|
||||
function triggerAfterMoveToTrash(&$obj)
|
||||
{
|
||||
$oNcenterliteModel = getModel('ncenterlite');
|
||||
$notify_list = $oNcenterliteModel->getNotifyListByDocumentSrl($obj->document_srl);
|
||||
|
||||
$member_srls = array();
|
||||
foreach($notify_list as $value)
|
||||
{
|
||||
if(!in_array($value->member_srl, $member_srls))
|
||||
{
|
||||
$member_srls[] = $value->member_srl;
|
||||
}
|
||||
}
|
||||
|
||||
$config = $oNcenterliteModel->getConfig();
|
||||
|
||||
if(empty($config->use))
|
||||
|
|
@ -445,6 +485,14 @@ class ncenterliteController extends ncenterlite
|
|||
$args = new stdClass();
|
||||
$args->srl = $obj->document_srl;
|
||||
$output = executeQuery('ncenterlite.deleteNotifyBySrl', $args);
|
||||
if($output->toBool())
|
||||
{
|
||||
foreach($member_srls as $member_srl)
|
||||
{
|
||||
//Remove flag files
|
||||
self::removeFlagFile($member_srl);
|
||||
}
|
||||
}
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -489,6 +537,11 @@ class ncenterliteController extends ncenterlite
|
|||
$args->target_srl = $comment_srl;
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$output_update = executeQuery('ncenterlite.updateNotifyReadedByTargetSrl', $args);
|
||||
if($output_update->toBool())
|
||||
{
|
||||
//Remove flag files
|
||||
self::removeFlagFile($args->member_srl);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if($oModule->act == 'dispBoardContent')
|
||||
|
|
@ -498,11 +551,20 @@ class ncenterliteController extends ncenterlite
|
|||
$oDocument = Context::get('oDocument');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
if($document_srl && $logged_info && $config->document_read == 'Y')
|
||||
if($document_srl && Context::get('is_logged') && $config->document_read == 'Y')
|
||||
{
|
||||
$args->srl = $document_srl;
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$outputs = executeQuery('ncenterlite.updateNotifyReadedBySrl', $args);
|
||||
$notify_count = getModel('ncenterlite')->_getNewCount();
|
||||
if($notify_count)
|
||||
{
|
||||
$args->srl = $document_srl;
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$outputs = executeQuery('ncenterlite.updateNotifyReadedBySrl', $args);
|
||||
if($outputs->toBool())
|
||||
{
|
||||
//Remove flag files
|
||||
self::removeFlagFile($args->member_srl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($comment_srl && $document_srl && $oDocument)
|
||||
|
|
@ -513,7 +575,6 @@ class ncenterliteController extends ncenterlite
|
|||
if(array_key_exists($comment_srl, $_comment_list))
|
||||
{
|
||||
$url = getNotEncodedUrl('_comment_srl', '') . '#comment_' . $comment_srl;
|
||||
$need_check_socialxe = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -521,7 +582,6 @@ class ncenterliteController extends ncenterlite
|
|||
if($cpage > 1)
|
||||
{
|
||||
$url = getNotEncodedUrl('cpage', $cpage - 1) . '#comment_' . $comment_srl;
|
||||
$need_check_socialxe = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -529,35 +589,6 @@ class ncenterliteController extends ncenterlite
|
|||
}
|
||||
}
|
||||
|
||||
if($need_check_socialxe)
|
||||
{
|
||||
$oDB = &DB::getInstance();
|
||||
if($oDB->isTableExists('socialxe'))
|
||||
{
|
||||
$args = new stdClass();
|
||||
$oModuleModel = getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl);
|
||||
$args->module_srl = $module_info->module_srl;
|
||||
$output = executeQuery('ncenterlite.getSocialxeCount', $args);
|
||||
if($output->data->cnt)
|
||||
{
|
||||
$socialxe_comment_srl = $comment_srl;
|
||||
|
||||
$args = new stdClass();
|
||||
$args->comment_srl = $comment_srl;
|
||||
$oCommentModel = getModel('comment');
|
||||
$oComment = $oCommentModel->getComment($comment_srl);
|
||||
$parent_srl = $oComment->get('parent_srl');
|
||||
if($parent_srl)
|
||||
{
|
||||
$socialxe_comment_srl = $parent_srl;
|
||||
}
|
||||
|
||||
$url = getNotEncodedUrl('_comment_srl', '', 'cpage', '', 'comment_srl', $socialxe_comment_srl) . '#comment_' . $comment_srl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$url = str_replace('&', '&', $url);
|
||||
header('location: ' . $url);
|
||||
Context::close();
|
||||
|
|
@ -574,7 +605,12 @@ class ncenterliteController extends ncenterlite
|
|||
$args = new stdClass();
|
||||
$args->target_srl = $message_srl;
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
executeQuery('ncenterlite.updateNotifyReadedByTargetSrl', $args);
|
||||
$update_output = executeQuery('ncenterlite.updateNotifyReadedByTargetSrl', $args);
|
||||
if($update_output->toBool())
|
||||
{
|
||||
//Remove flag files
|
||||
self::removeFlagFile($args->member_srl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -631,6 +667,11 @@ class ncenterliteController extends ncenterlite
|
|||
$args->srl = $vars->document_srl;
|
||||
$args->type = $this->_TYPE_DOCUMENT;
|
||||
$output = executeQuery('ncenterlite.updateNotifyReadedBySrl', $args);
|
||||
if($output->toBool())
|
||||
{
|
||||
//Remove flag files
|
||||
self::removeFlagFile($args->member_srl);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if($oModule->act == 'getKinComments')
|
||||
|
|
@ -640,6 +681,11 @@ class ncenterliteController extends ncenterlite
|
|||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->target_srl = $vars->parent_srl;
|
||||
$output = executeQuery('ncenterlite.updateNotifyReadedByTargetSrl', $args);
|
||||
if($output->toBool())
|
||||
{
|
||||
//Remove flag files
|
||||
self::removeFlagFile($args->member_srl);
|
||||
}
|
||||
}
|
||||
|
||||
return new Object();
|
||||
|
|
@ -869,11 +915,7 @@ class ncenterliteController extends ncenterlite
|
|||
//$output = executeQuery('ncenterlite.deleteNotify', $args);
|
||||
|
||||
//Remove flag files
|
||||
$flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php';
|
||||
if(file_exists($flag_path))
|
||||
{
|
||||
FileHandler::removeFile($flag_path);
|
||||
}
|
||||
self::removeFlagFile($args->member_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -886,11 +928,7 @@ class ncenterliteController extends ncenterlite
|
|||
//$output = executeQuery('ncenterlite.deleteNotifyByTargetSrl', $args);
|
||||
|
||||
//Remove flag files
|
||||
$flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php';
|
||||
if(file_exists($flag_path))
|
||||
{
|
||||
FileHandler::removeFile($flag_path);
|
||||
}
|
||||
self::removeFlagFile($args->member_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -902,11 +940,7 @@ class ncenterliteController extends ncenterlite
|
|||
//$output = executeQuery('ncenterlite.deleteNotifyByMemberSrl', $args);
|
||||
|
||||
//Remove flag files
|
||||
$flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php';
|
||||
if(file_exists($flag_path))
|
||||
{
|
||||
FileHandler::removeFile($flag_path);
|
||||
}
|
||||
self::removeFlagFile($args->member_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -1051,12 +1085,7 @@ class ncenterliteController extends ncenterlite
|
|||
}
|
||||
}
|
||||
|
||||
$flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($args->member_srl) . $args->member_srl . '.php';
|
||||
if(file_exists($flag_path))
|
||||
{
|
||||
//remove flag files
|
||||
FileHandler::removeFile($flag_path);
|
||||
}
|
||||
self::removeFlagFile($args->member_srl);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -1078,6 +1107,19 @@ class ncenterliteController extends ncenterlite
|
|||
FileHandler::writeFile($flag_path, $buff);
|
||||
}
|
||||
|
||||
public static function removeFlagFile($member_srl = null)
|
||||
{
|
||||
if($member_srl === null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$flag_path = \RX_BASEDIR . 'files/cache/ncenterlite/new_notify/' . getNumberingPath($member_srl) . $member_srl . '.php';
|
||||
if(file_exists($flag_path))
|
||||
{
|
||||
FileHandler::removeFile($flag_path);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 노티 ID 반환
|
||||
|
|
|
|||
|
|
@ -457,4 +457,38 @@ class ncenterliteModel extends ncenterlite
|
|||
|
||||
return zdate($datetime, 'Y-m-d');
|
||||
}
|
||||
|
||||
function getNotifyListByDocumentSrl($document_srl = null)
|
||||
{
|
||||
if($document_srl === null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQueryArray('ncenterlite.getNotifyListByDocumentSrl', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
function getNotifyMemberSrlByCommentSrl($comment_srl)
|
||||
{
|
||||
if(!$comment_srl === null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$args = new stdClass();
|
||||
$args->srl = $comment_srl;
|
||||
$output = executeQueryArray('ncenterlite.getNotifyMemberSrlByCommentSrl', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
return $output->data;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
11
modules/ncenterlite/queries/getNotifyListByDocumentSrl.xml
Normal file
11
modules/ncenterlite/queries/getNotifyListByDocumentSrl.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getNotifyListByDocumentSrl" action="select">
|
||||
<tables>
|
||||
<table name="ncenterlite_notify" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getNotifyMemberSrlBySrl" action="select">
|
||||
<tables>
|
||||
<table name="ncenterlite_notify" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="member_srl" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="srl" var="srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="target_srl" var="srl" filter="number" notnull="notnull" pipe="or" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
<query id="getTrashList" action="select">
|
||||
<tables>
|
||||
<table name="trash" alias="T" />
|
||||
<table name="member" alias="M" />
|
||||
<table name="member" alias="M" type="left join">
|
||||
<conditions>
|
||||
<condition operation="equal" column="T.remover_srl" default="M.member_srl" />
|
||||
</conditions>
|
||||
</table>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="T.*" />
|
||||
|
|
@ -9,8 +13,7 @@
|
|||
<column name="M.nick_name" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="T.remover_srl" default="M.member_srl" notnull="notnull" />
|
||||
<condition operation="in" column="trash_srl" var="trashSrl" filter="number" pipe="and" />
|
||||
<condition operation="in" column="trash_srl" var="trashSrl" filter="number" />
|
||||
<condition operation="in" column="origin_module" var="originModule" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="T.title" var="s_title" />
|
||||
|
|
|
|||
|
|
@ -17,11 +17,6 @@ class trashAdminController extends trash
|
|||
*/
|
||||
function insertTrash($obj)
|
||||
{
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$oTrashVO = new TrashVO();
|
||||
|
|
|
|||
|
|
@ -275,6 +275,31 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
|
|||
array(
|
||||
'<input>asdf src="../img/img.gif" asdf</input>',
|
||||
'?><input>asdf src="../img/img.gif" asdf</input>'
|
||||
),
|
||||
// Rhymix improvements (PR #604)
|
||||
array(
|
||||
'<span>{$_SERVER["REMOTE_ADDR"]}</span>',
|
||||
'?><span><?php echo $_SERVER["REMOTE_ADDR"] ?></span>'
|
||||
),
|
||||
array(
|
||||
'<span>{escape($_COOKIE[$var], false)}</span>',
|
||||
'?><span><?php echo escape($_COOKIE[$__Context->var], false) ?></span>'
|
||||
),
|
||||
array(
|
||||
'<span>{$GLOBALS[$__Context->rhymix->rules]}</span>',
|
||||
'?><span><?php echo $GLOBALS[$__Context->rhymix->rules] ?></span>'
|
||||
),
|
||||
array(
|
||||
'<span>{$FOOBAR}</span>',
|
||||
'?><span><?php echo $__Context->FOOBAR ?></span>'
|
||||
),
|
||||
array(
|
||||
'<span>{RX_BASEDIR}</span>',
|
||||
'?><span>{RX_BASEDIR}</span>'
|
||||
),
|
||||
array(
|
||||
'<span>{\RX_BASEDIR}</span>',
|
||||
'?><span><?php echo \RX_BASEDIR ?></span>'
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ class DebugTest extends \Codeception\TestCase\Test
|
|||
public function testDebugEntry()
|
||||
{
|
||||
$file = __FILE__;
|
||||
$line = __LINE__ + 2;
|
||||
Rhymix\Framework\Debug::$write_to_error_log = false;
|
||||
$line = __LINE__ + 1;
|
||||
Rhymix\Framework\Debug::addEntry('foobar entry');
|
||||
$entries = Rhymix\Framework\Debug::getEntries();
|
||||
$this->assertEquals(1, count($entries));
|
||||
|
|
@ -18,8 +17,7 @@ class DebugTest extends \Codeception\TestCase\Test
|
|||
public function testDebugError()
|
||||
{
|
||||
$file = __FILE__;
|
||||
$line = __LINE__ + 2;
|
||||
Rhymix\Framework\Debug::$write_to_error_log = false;
|
||||
$line = __LINE__ + 1;
|
||||
Rhymix\Framework\Debug::addError(~0, 'Rhymix', $file, $line, null);
|
||||
$errors = Rhymix\Framework\Debug::getErrors();
|
||||
$this->assertGreaterThanOrEqual(1, count($errors));
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class SecurityTest extends \Codeception\TestCase\Test
|
|||
{
|
||||
$_SERVER['REQUEST_METHOD'] = 'GET';
|
||||
$_SERVER['HTTP_REFERER'] = '';
|
||||
$this->assertFalse(Rhymix\Framework\Security::checkCSRF());
|
||||
$this->assertTrue(Rhymix\Framework\Security::checkCSRF());
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
$this->assertTrue(Rhymix\Framework\Security::checkCSRF());
|
||||
|
|
|
|||
|
|
@ -700,6 +700,11 @@
|
|||
<name xml:lang="zh-TW">最新發表</name>
|
||||
<name xml:lang="tr">En yeni gönderim sırası</name>
|
||||
</options>
|
||||
<options>
|
||||
<value>list_order</value>
|
||||
<name xml:lang="ko">문서번호 순</name>
|
||||
<name xml:lang="en">Article No. Order</name>
|
||||
</options>
|
||||
<options>
|
||||
<value>update_order</value>
|
||||
<name xml:lang="ko">최근 변경순</name>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class content extends WidgetHandler
|
|||
function proc($args)
|
||||
{
|
||||
// Targets to sort
|
||||
if(!in_array($args->order_target, array('regdate','update_order'))) $args->order_target = 'regdate';
|
||||
if(!in_array($args->order_target, array('regdate', 'list_order', 'update_order'))) $args->order_target = 'regdate';
|
||||
// Sort order
|
||||
if(!in_array($args->order_type, array('asc','desc'))) $args->order_type = 'asc';
|
||||
// Pages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue