mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 21:29:58 +09:00
Merge branch 'develop' into pr/multidomain
This commit is contained in:
commit
210b6b4147
75 changed files with 2102 additions and 425 deletions
|
|
@ -385,126 +385,6 @@ class adminAdminModel extends admin
|
|||
$this->add('list', $list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameter arrange for send to XE collect server
|
||||
* @param string $type 'WORKING', 'INSTALL'
|
||||
* @return string
|
||||
*/
|
||||
function getEnv($type = 'WORKING')
|
||||
{
|
||||
$skip = array(
|
||||
'ext' => array('pcre', 'json', 'hash', 'dom', 'session', 'spl', 'standard', 'date', 'ctype', 'tokenizer', 'apache2handler', 'filter', 'posix', 'reflection', 'pdo')
|
||||
, 'module' => array('addon', 'admin', 'autoinstall', 'comment', 'communication', 'counter', 'document', 'editor', 'file', 'importer', 'install', 'integration_search', 'layout', 'member', 'menu', 'message', 'module', 'opage', 'page', 'point', 'poll', 'rss', 'session', 'spamfilter', 'tag', 'trackback', 'trash', 'widget')
|
||||
, 'addon' => array('autolink', 'blogapi', 'captcha', 'counter', 'member_communication', 'member_extra_info', 'mobile', 'openid_delegation_id', 'point_level_icon', 'resize_image')
|
||||
, 'layout' => array('default')
|
||||
, 'widget' => array('content', 'language_select', 'login_info','mcontent')
|
||||
, 'widgetstyle' => array(),
|
||||
);
|
||||
$info = array();
|
||||
|
||||
$info['type'] = ($type != 'INSTALL' ? 'WORKING' : 'INSTALL');
|
||||
$info['location'] = _XE_LOCATION_;
|
||||
$info['package'] = _XE_PACKAGE_;
|
||||
$info['host'] = $db_type->default_url ? $db_type->default_url : getFullUrl();
|
||||
$info['app'] = $_SERVER['SERVER_SOFTWARE'];
|
||||
$info['xe_version'] = __XE_VERSION__;
|
||||
$info['php'] = phpversion();
|
||||
|
||||
$info['db_type'] = Context::getDBType();
|
||||
$info['use_rewrite'] = config('use_rewrite') ? 'Y' : 'N';
|
||||
$info['use_db_session'] = config('session.use_db') ? 'Y' : 'N';
|
||||
$info['use_ssl'] = config('url.ssl') ?: 'none';
|
||||
|
||||
$info['phpext'] = '';
|
||||
foreach(get_loaded_extensions() as $ext)
|
||||
{
|
||||
$ext = strtolower($ext);
|
||||
if(in_array($ext, $skip['ext']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['phpext'] .= '|' . $ext;
|
||||
}
|
||||
$info['phpext'] = substr($info['phpext'], 1);
|
||||
|
||||
$info['module'] = '';
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
if($module_list) foreach($module_list as $module)
|
||||
{
|
||||
if(in_array($module->module, $skip['module']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['module'] .= '|' . $module->module;
|
||||
}
|
||||
$info['module'] = substr($info['module'], 1);
|
||||
|
||||
$info['addon'] = '';
|
||||
$oAddonAdminModel = getAdminModel('addon');
|
||||
$addon_list = $oAddonAdminModel->getAddonList();
|
||||
if($addon_list) foreach($addon_list as $addon)
|
||||
{
|
||||
if(in_array($addon->addon, $skip['addon']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['addon'] .= '|' . $addon->addon;
|
||||
}
|
||||
$info['addon'] = substr($info['addon'], 1);
|
||||
|
||||
$info['layout'] = "";
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_list = $oLayoutModel->getDownloadedLayoutList();
|
||||
if($layout_list) foreach($layout_list as $layout)
|
||||
{
|
||||
if(in_array($layout->layout, $skip['layout']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['layout'] .= '|' . $layout->layout;
|
||||
}
|
||||
$info['layout'] = substr($info['layout'], 1);
|
||||
|
||||
$info['widget'] = "";
|
||||
$oWidgetModel = getModel('widget');
|
||||
$widget_list = $oWidgetModel->getDownloadedWidgetList();
|
||||
if($widget_list) foreach($widget_list as $widget)
|
||||
{
|
||||
if(in_array($widget->widget, $skip['widget']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['widget'] .= '|' . $widget->widget;
|
||||
}
|
||||
$info['widget'] = substr($info['widget'], 1);
|
||||
|
||||
$info['widgetstyle'] = "";
|
||||
$oWidgetModel = getModel('widget');
|
||||
$widgetstyle_list = $oWidgetModel->getDownloadedWidgetStyleList();
|
||||
if($widgetstyle_list) foreach($widgetstyle_list as $widgetstyle)
|
||||
{
|
||||
if(in_array($widgetstyle->widgetStyle, $skip['widgetstyle']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['widgetstyle'] .= '|' . $widgetstyle->widgetStyle;
|
||||
}
|
||||
$info['widgetstyle'] = substr($info['widgetstyle'], 1);
|
||||
|
||||
$param = '';
|
||||
foreach($info as $k => $v)
|
||||
{
|
||||
if($v)
|
||||
{
|
||||
$param .= sprintf('&%s=%s', $k, urlencode($v));
|
||||
}
|
||||
}
|
||||
$param = substr($param, 1);
|
||||
|
||||
return $param;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return theme info list by theme directory list
|
||||
* @return array
|
||||
|
|
|
|||
|
|
@ -729,93 +729,181 @@ class adminAdminView extends admin
|
|||
function dispAdminViewServerEnv()
|
||||
{
|
||||
$info = array();
|
||||
|
||||
$oAdminModel = getAdminModel('admin');
|
||||
$envInfo = $oAdminModel->getEnv();
|
||||
$tmp = explode("&", $envInfo);
|
||||
$arrInfo = array();
|
||||
$xe_check_env = array();
|
||||
foreach($tmp as $value) {
|
||||
$arr = explode("=", $value);
|
||||
if($arr[0]=="type") {
|
||||
continue;
|
||||
}elseif($arr[0]=="phpext" ) {
|
||||
$str = urldecode($arr[1]);
|
||||
$xe_check_env[$arr[0]]= str_replace("|", ", ", $str);
|
||||
} elseif($arr[0]=="module" ) {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrModuleName = explode("|", $str);
|
||||
$oModuleModel = getModel("module");
|
||||
$mInfo = array();
|
||||
foreach($arrModuleName as $moduleName) {
|
||||
$moduleInfo = $oModuleModel->getModuleInfoXml($moduleName);
|
||||
$mInfo[] = "{$moduleName}({$moduleInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
} elseif($arr[0]=="addon") {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrAddonName = explode("|", $str);
|
||||
$oAddonModel = getAdminModel("addon");
|
||||
$mInfo = array();
|
||||
foreach($arrAddonName as $addonName) {
|
||||
$addonInfo = $oAddonModel->getAddonInfoXml($addonName);
|
||||
$mInfo[] = "{$addonName}({$addonInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
} elseif($arr[0]=="widget") {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrWidgetName = explode("|", $str);
|
||||
$oWidgetModel = getModel("widget");
|
||||
$mInfo = array();
|
||||
foreach($arrWidgetName as $widgetName) {
|
||||
$widgetInfo = $oWidgetModel->getWidgetInfo($widgetName);
|
||||
$mInfo[] = "{$widgetName}({$widgetInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
} elseif($arr[0]=="widgetstyle") {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrWidgetstyleName = explode("|", $str);
|
||||
$oWidgetModel = getModel("widget");
|
||||
$mInfo = array();
|
||||
foreach($arrWidgetstyleName as $widgetstyleName) {
|
||||
$widgetstyleInfo = $oWidgetModel->getWidgetStyleInfo($widgetstyleName);
|
||||
$mInfo[] = "{$widgetstyleName}({$widgetstyleInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
|
||||
} elseif($arr[0]=="layout") {
|
||||
$str = urldecode($arr[1]);
|
||||
$arrLayoutName = explode("|", $str);
|
||||
$oLayoutModel = getModel("layout");
|
||||
$mInfo = array();
|
||||
foreach($arrLayoutName as $layoutName) {
|
||||
$layoutInfo = $oLayoutModel->getLayoutInfo($layoutName);
|
||||
$mInfo[] = "{$layoutName}({$layoutInfo->version})";
|
||||
}
|
||||
$xe_check_env[$arr[0]]= join(", ", $mInfo);
|
||||
} else {
|
||||
$xe_check_env[$arr[0]] = urldecode($arr[1]);
|
||||
$skip = array(
|
||||
'phpext' => array('core', 'session', 'spl', 'standard', 'date', 'ctype', 'tokenizer', 'apache2handler', 'filter', 'reflection'),
|
||||
'module' => array('addon', 'admin', 'autoinstall', 'comment', 'communication', 'counter', 'document', 'editor', 'file', 'importer', 'install', 'integration_search', 'layout', 'member', 'menu', 'message', 'module', 'opage', 'page', 'point', 'poll', 'rss', 'session', 'spamfilter', 'tag', 'trackback', 'trash', 'widget'),
|
||||
'addon' => array('autolink', 'blogapi', 'captcha', 'counter', 'member_communication', 'member_extra_info', 'mobile', 'openid_delegation_id', 'point_level_icon', 'resize_image'),
|
||||
'layout' => array('default'),
|
||||
'widget' => array('content', 'language_select', 'login_info', 'mcontent'),
|
||||
'widgetstyle' => array(),
|
||||
);
|
||||
|
||||
// Basic environment
|
||||
$info[] = '[Basic Information]';
|
||||
$info['rhymix_version'] = RX_VERSION;
|
||||
$info['date'] = date('Y-m-d H:i:s O');
|
||||
$info['php'] = sprintf('%s (%d-bit)', phpversion(), PHP_INT_SIZE * 8);
|
||||
$info['server'] = $_SERVER['SERVER_SOFTWARE'];
|
||||
$info['os'] = sprintf('%s %s', php_uname('s'), php_uname('r'));
|
||||
$info['baseurl'] = Context::getRequestUri();
|
||||
$info['basedir'] = RX_BASEDIR;
|
||||
$info['owner'] = sprintf('%s (%d:%d)', get_current_user(), getmyuid(), getmygid());
|
||||
if (function_exists('posix_getpwuid') && function_exists('posix_geteuid') && $user = @posix_getpwuid(posix_geteuid()))
|
||||
{
|
||||
$info['user'] = sprintf('%s (%d:%d)', $user['name'], $user['uid'], $user['gid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$info['user'] = 'unknown';
|
||||
}
|
||||
$info['ssl'] = Context::get('site_module_info')->security ?: Context::getDbInfo()->use_ssl;
|
||||
$info[] = '';
|
||||
|
||||
// System settings
|
||||
$info[] = '[System Settings]';
|
||||
$info['db.type'] = config('db.master.type');
|
||||
$db_extra_info = array();
|
||||
if (config('db.master.engine')) $db_extra_info[] = config('db.master.engine');
|
||||
if (config('db.master.charset')) $db_extra_info[] = config('db.master.charset');
|
||||
if (count($db_extra_info))
|
||||
{
|
||||
$info['db.type'] .= ' (' . implode(', ', $db_extra_info) . ')';
|
||||
}
|
||||
$info['db.version'] = DB::getInstance()->db_version;
|
||||
if (preg_match('/\d+\.\d+\.\d+-MariaDB.*$/', $info['db.version'], $matches))
|
||||
{
|
||||
$info['db.version'] = $matches[0];
|
||||
}
|
||||
$info['cache.type'] = config('cache.type') ?: 'none';
|
||||
$info['locale.default_lang'] = config('locale.default_lang');
|
||||
$info['locale.default_timezone'] = config('locale.default_timezone');
|
||||
$info['locale.internal_timezone'] = config('locale.internal_timezone');
|
||||
$info['mobile.enabled'] = config('mobile.enabled') ? 'true' : 'false';
|
||||
$info['mobile.tablets'] = config('mobile.tablets') ? 'true' : 'false';
|
||||
$info['session.use_db'] = config('session.use_db') ? 'true' : 'false';
|
||||
$info['session.use_keys'] = config('session.use_keys') ? 'true' : 'false';
|
||||
$info['session.use_ssl'] = config('session.use_ssl') ? 'true' : 'false';
|
||||
$info['view.concat_scripts'] = config('view.concat_scripts');
|
||||
$info['view.minify_scripts'] = config('view.minify_scripts');
|
||||
$info['use_rewrite'] = config('use_rewrite') ? 'true' : 'false';
|
||||
$info['use_sso'] = config('use_sso') ? 'true' : 'false';
|
||||
$info[] = '';
|
||||
|
||||
// PHP settings
|
||||
$ini_info = ini_get_all();
|
||||
$info[] = '[PHP Settings]';
|
||||
$info['session.auto_start'] = $ini_info['session.auto_start']['local_value'];
|
||||
$info['max_file_uploads'] = $ini_info['max_file_uploads']['local_value'];
|
||||
$info['memory_limit'] = $ini_info['memory_limit']['local_value'];
|
||||
$info['post_max_size'] = $ini_info['post_max_size']['local_value'];
|
||||
$info['upload_max_filesize'] = $ini_info['upload_max_filesize']['local_value'];
|
||||
$info['extensions'] = array();
|
||||
foreach(get_loaded_extensions() as $ext)
|
||||
{
|
||||
$ext = strtolower($ext);
|
||||
if (!in_array($ext, $skip['phpext']))
|
||||
{
|
||||
$info['extensions'][] = $ext;
|
||||
}
|
||||
}
|
||||
$info['XE_Check_Evn'] = $xe_check_env;
|
||||
|
||||
$ini_info = ini_get_all();
|
||||
$php_core = array();
|
||||
$php_core['max_file_uploads'] = "{$ini_info['max_file_uploads']['local_value']}";
|
||||
$php_core['post_max_size'] = "{$ini_info['post_max_size']['local_value']}";
|
||||
$php_core['memory_limit'] = "{$ini_info['memory_limit']['local_value']}";
|
||||
$info['PHP_Core'] = $php_core;
|
||||
|
||||
$str_info = "[Rhymix Server Environment " . date("Y-m-d") . "]\n\n";
|
||||
$str_info .= "realpath : ".realpath('./')."\n";
|
||||
foreach( $info as $key=>$value )
|
||||
natcasesort($info['extensions']);
|
||||
$info[] = '';
|
||||
|
||||
// Modules
|
||||
$info[] = '[Modules]';
|
||||
$info['module'] = array();
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList() ?: array();
|
||||
foreach ($module_list as $module)
|
||||
{
|
||||
if( is_array( $value ) == false ) {
|
||||
$str_info .= "{$key} : {$value}\n";
|
||||
} else {
|
||||
//$str_info .= "\n{$key} \n";
|
||||
foreach( $value as $key2=>$value2 )
|
||||
$str_info .= "{$key2} : {$value2}\n";
|
||||
if (!in_array($module->module, $skip['module']))
|
||||
{
|
||||
$moduleInfo = $oModuleModel->getModuleInfoXml($module->module);
|
||||
$info['module'][] = sprintf('%s (%s)', $module->module, $moduleInfo->version);
|
||||
}
|
||||
}
|
||||
natcasesort($info['module']);
|
||||
$info[] = '';
|
||||
|
||||
// Addons
|
||||
$info[] = '[Addons]';
|
||||
$info['addon'] = array();
|
||||
$oAddonAdminModel = getAdminModel('addon');
|
||||
$addon_list = $oAddonAdminModel->getAddonList() ?: array();
|
||||
foreach ($addon_list as $addon)
|
||||
{
|
||||
if (!in_array($addon->addon, $skip['addon']))
|
||||
{
|
||||
$addonInfo = $oAddonAdminModel->getAddonInfoXml($addon->addon);
|
||||
$info['addon'][] = sprintf('%s (%s)', $addon->addon, $addonInfo->version);
|
||||
}
|
||||
}
|
||||
natcasesort($info['addon']);
|
||||
$info[] = '';
|
||||
|
||||
// Layouts
|
||||
$info[] = '[Layouts]';
|
||||
$info['layout'] = array();
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_list = $oLayoutModel->getDownloadedLayoutList() ?: array();
|
||||
foreach($layout_list as $layout)
|
||||
{
|
||||
if (!in_array($layout->layout, $skip['layout']))
|
||||
{
|
||||
$layoutInfo = $oLayoutModel->getLayoutInfo($layout->layout);
|
||||
$info['layout'][] = sprintf('%s (%s)', $layout->layout, $layoutInfo->version);
|
||||
}
|
||||
}
|
||||
natcasesort($info['layout']);
|
||||
$info[] = '';
|
||||
|
||||
// Widgets
|
||||
$info[] = '[Widgets]';
|
||||
$info['widget'] = "";
|
||||
$oWidgetModel = getModel('widget');
|
||||
$widget_list = $oWidgetModel->getDownloadedWidgetList() ?: array();
|
||||
foreach ($widget_list as $widget)
|
||||
{
|
||||
if (!in_array($widget->widget, $skip['widget']))
|
||||
{
|
||||
$widgetInfo = $oWidgetModel->getWidgetInfo($widget->widget);
|
||||
$info['widget'][] = sprintf('%s (%s)', $widget->widget, $widgetInfo->version);
|
||||
}
|
||||
}
|
||||
natcasesort($info['widget']);
|
||||
$info[] = '';
|
||||
|
||||
// Widgetstyles
|
||||
$info[] = '[Widgetstyles]';
|
||||
$info['widgetstyle'] = array();
|
||||
$oWidgetModel = getModel('widget');
|
||||
$widgetstyle_list = $oWidgetModel->getDownloadedWidgetStyleList() ?: array();
|
||||
foreach ($widgetstyle_list as $widgetstyle)
|
||||
{
|
||||
if (!in_array($widgetstyle->widgetStyle, $skip['widgetstyle']))
|
||||
{
|
||||
$widgetstyleInfo = $oWidgetModel->getWidgetStyleInfo($widgetstyle->widgetStyle);
|
||||
$info['widgetstyle'][] = sprintf('%s (%s)', $widgetstyle->widgetStyle, $widgetstyleInfo->version);
|
||||
}
|
||||
}
|
||||
natcasesort($info['widgetstyle']);
|
||||
$info[] = '';
|
||||
|
||||
// Convert to string.
|
||||
foreach ($info as $key => $value)
|
||||
{
|
||||
if (is_array($value))
|
||||
{
|
||||
$value = implode(', ', $value);
|
||||
}
|
||||
|
||||
if (is_int($key) || ctype_digit($key))
|
||||
{
|
||||
$str_info .= "$value\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$str_info .= "$key : $value\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,15 +107,15 @@ $lang->about_recompile_cache = 'Delete useless or invalid cache files?';
|
|||
$lang->confirm_run = 'It may take a long time. Do you want to run?';
|
||||
$lang->use_ssl = 'Use HTTPS';
|
||||
$lang->ssl_options['none'] = 'None';
|
||||
$lang->ssl_options['optional'] = 'Optional';
|
||||
$lang->ssl_options['always'] = 'Always';
|
||||
$lang->ssl_options['optional'] = 'Optional (not recommended)';
|
||||
$lang->ssl_options['always'] = 'Always (recommended)';
|
||||
$lang->cmd_http_port = 'HTTP Port';
|
||||
$lang->cmd_https_port = 'HTTPS Port';
|
||||
$lang->cmd_index_module_srl = 'Main Module';
|
||||
$lang->cmd_index_document_srl = 'Main Document';
|
||||
$lang->cmd_default_language = 'Default Language';
|
||||
$lang->cmd_new_domain = 'Add New Domain';
|
||||
$lang->about_use_ssl = 'Selecting \'Optional\' is to use SSL for the specified actions such as signing up and changing information. Selecting \'Always\' is to use SSL for all services. Please be careful because you may not be avaliable to access to the site if you use SSL where its environment is not set.';
|
||||
$lang->about_use_ssl = '<p>Selecting \'Optional\' is to use SSL for the specified actions such as signing up and changing information.<br />Selecting \'Always\' is to use SSL for the entire pages, generated by Rhymix.</p><p>Please be careful! You may not be able to access to the site, before installing SSL certificate.</p>';
|
||||
$lang->server_ports = 'Server Port';
|
||||
$lang->about_server_ports = 'If your web server does not use 80 for HTTP or 443 for HTTPS port, you should specify server ports.';
|
||||
$lang->use_db_session = 'Store Session in DB';
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ $lang->welcome_to_xe = 'Esta es la página del Administrador de Rhymix';
|
|||
$lang->about_lang_env = 'Para aplicar idioma seleccionado conjunto de los usuarios, como por defecto, haga clic en el botón [Guardar] el cambio.';
|
||||
$lang->xe_license = 'Rhymix está bajo la Licencia de GPL';
|
||||
$lang->ssl_options['none'] = 'Desactivar';
|
||||
$lang->ssl_options['optional'] = 'Opcionalmente el';
|
||||
$lang->ssl_options['always'] = 'Utilice siempre el';
|
||||
$lang->ssl_options['optional'] = 'Opcionalmente el (no recomendado)';
|
||||
$lang->ssl_options['always'] = 'Utilice siempre el (recomendado)';
|
||||
$lang->about_use_ssl = 'Opcionalmente, la composición de suscripción / editar la información y el uso de SSL especificada en la acción es siempre el uso de SSL para todos los servicios que se utilizarán.';
|
||||
$lang->server_ports = 'Especifique el puerto del servidor';
|
||||
$lang->about_server_ports = '80 de HTTP, HTTPS al puerto 443 si se utiliza otro que se especifique lo contrario, el puerto va a necesitar.';
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ $lang->welcome_to_xe = 'Bienvenue sur la Page d\'Administration du Rhymix';
|
|||
$lang->about_lang_env = 'Vous pouvez fixer la Langue Par Défaut par cliquer le boutton [Conserver] au-dessous. Les visiteurs vont voir tous les menus et les messages en langue que vous choisissez.';
|
||||
$lang->xe_license = 'Rhymix s\'applique la GPL';
|
||||
$lang->ssl_options['none'] = 'Ne Pas utiliser';
|
||||
$lang->ssl_options['optional'] = 'Optionnel';
|
||||
$lang->ssl_options['always'] = 'Toujours';
|
||||
$lang->ssl_options['optional'] = 'Optionnel (non recommandé)';
|
||||
$lang->ssl_options['always'] = 'Toujours (recommandé)';
|
||||
$lang->about_use_ssl = 'Si l\'on choisit \'Optionnel\' , on utilise protocole SSL seulement dans quelques services comme inscription ou modification. Si l\'on choisit \'Toujours\', on utilise protocole SSL dans tous les services.';
|
||||
$lang->server_ports = 'déclarer le port de serveur';
|
||||
$lang->about_server_ports = 'Si l\'on ne veut pas utiliser le port 80 pour HTTP mais un autre port, ou bien, si l\'on ne veut pas utiliser le port 443 pour HTTPS mais un autre port, on doit déclarer les ports.';
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ $lang->about_recompile_cache = '不要もしくは、無効なキャッシュフ
|
|||
$lang->confirm_run = '時間がかかる場合があります。実行しますか?';
|
||||
$lang->use_ssl = '<abbr title="Secure Sockets Layer">SSL</abbr>を使用';
|
||||
$lang->ssl_options['none'] = '使わない';
|
||||
$lang->ssl_options['optional'] = '部分的に使う';
|
||||
$lang->ssl_options['always'] = '常に使う';
|
||||
$lang->ssl_options['optional'] = '部分的に使う(推奨しない)';
|
||||
$lang->ssl_options['always'] = '常に使う(推奨)';
|
||||
$lang->about_use_ssl = '「部分的に使う」は、「会員登録/会員情報変更」など指定されたアクションでSSLを使います。「常に使う」は、すべてのサービスにSSLを使います。SSLサーバ証明書がインストールされてない場合での使用はお控えください。サイトへのアクセスができない場合があります。';
|
||||
$lang->server_ports = 'サーバーポート指定';
|
||||
$lang->about_server_ports = '一般的に使われているHTTPの80、HTTPSの443以外の他のポートを使うには、ポートを指定してください。';
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ $lang->about_recompile_cache = '쓸모 없어졌거나 잘못된 캐시파일들
|
|||
$lang->confirm_run = '오랜 시간이 걸릴 수 있습니다. 실행하시겠습니까?';
|
||||
$lang->use_ssl = 'HTTPS 사용';
|
||||
$lang->ssl_options['none'] = '사용 안함';
|
||||
$lang->ssl_options['optional'] = '선택적 사용';
|
||||
$lang->ssl_options['always'] = '항상 사용';
|
||||
$lang->ssl_options['optional'] = '선택적으로 (권장하지 않음)';
|
||||
$lang->ssl_options['always'] = '항상 사용 (권장)';
|
||||
$lang->cmd_http_port = 'HTTP 포트';
|
||||
$lang->cmd_https_port = 'HTTPS 포트';
|
||||
$lang->cmd_index_module_srl = '메인 모듈';
|
||||
|
|
@ -116,6 +116,7 @@ $lang->cmd_index_document_srl = '메인 문서';
|
|||
$lang->cmd_default_language = '기본 언어';
|
||||
$lang->cmd_new_domain = '새 도메인 추가';
|
||||
$lang->about_use_ssl = '\'선택적으로\'는 회원가입, 정보수정 등의 지정된 동작(action)에서 보안접속(SSL)을 사용합니다. \'항상 사용\'은 모든 서비스에 SSL을 사용 합니다. SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의 바랍니다.';
|
||||
$lang->about_use_ssl = '<p>\'선택적으로\'는 회원가입, 정보수정 등의 일부 동작에서만 선택적으로 보안접속(SSL)을 사용합니다.<br />\'항상 사용\'은 모든 서비스에 SSL을 사용 합니다.</p><p>SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우, 접속이 되지 않을 수 있습니다. SSL 인증서가 정상적으로 설치되었는지 반드시 확인하고 설정하시기 바랍니다.</p>';
|
||||
$lang->server_ports = '서버 포트 지정';
|
||||
$lang->about_server_ports = 'HTTP는 80, HTTPS는 443 이 아닌, 다른 포트를 사용할 경우에 포트를 지정해 주어야 합니다.';
|
||||
$lang->use_db_session = '인증 세션 DB 사용';
|
||||
|
|
@ -273,8 +274,8 @@ $lang->admin_menu_setup = '관리자 메뉴 설정';
|
|||
$lang->no_data = '등록된 데이터가 없습니다.';
|
||||
$lang->cmd_admin_menu_reset = '관리자 메뉴 초기화';
|
||||
$lang->confirm_reset_admin_menu = '관리자 메뉴를 초기화하시겠습니까?';
|
||||
$lang->cmd_view_server_env = '서버정보출력';
|
||||
$lang->server_env = '서버 정보';
|
||||
$lang->cmd_view_server_env = '서버 환경 표시';
|
||||
$lang->server_env = '서버 환경';
|
||||
$lang->ftp_form_title = 'FTP 계정 정보 입력';
|
||||
$lang->ftp = 'FTP';
|
||||
$lang->ftp_host = 'FTP 서버 주소';
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ $lang->about_recompile_cache = '清空cache缓存?';
|
|||
$lang->confirm_run = '此过程可能需要耗费一段时间,是否继续?';
|
||||
$lang->use_ssl = '是否使用<abbr title="Secure Sockets Layer">SSL</abbr>安全连接?';
|
||||
$lang->ssl_options['none'] = '不使用';
|
||||
$lang->ssl_options['optional'] = '选择性';
|
||||
$lang->ssl_options['always'] = '使用';
|
||||
$lang->about_use_ssl = '选择性使用选项应用于新用户注册/修改用户信息等已指定的action当中,使用选项应用于所有服务。 SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의 바랍니다.';
|
||||
$lang->ssl_options['optional'] = '可选(不推荐)';
|
||||
$lang->ssl_options['always'] = '始终(推荐)';
|
||||
$lang->about_use_ssl = '<p>选择“可选”是为指定的操作(例如注册和更改信息)使用SSL。<br />选择“总是”是为Rhymix生成的整个页面使用SSL。</p><p>请小心! 在安装SSL证书之前,您可能无法访问该网站。</p>';
|
||||
$lang->server_ports = '指定服务器端口';
|
||||
$lang->about_server_ports = '使用除HTTP(80), HTTPS(443)以外的端口时,必须得指定该服务器端口号。';
|
||||
$lang->use_db_session = 'DB储存认证会话';
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ $lang->xe_license = 'Rhymix遵循 GPL協議';
|
|||
$lang->yesterday = '昨天';
|
||||
$lang->today = '今天';
|
||||
$lang->ssl_options['none'] = '關閉';
|
||||
$lang->ssl_options['optional'] = '手動';
|
||||
$lang->ssl_options['always'] = '開啟';
|
||||
$lang->about_use_ssl = '選擇手動時,在會員註冊或修改資料等動作時才會使用 SSL功能。 選擇開啟時,所有的服務都會使用 SSL功能。 ';
|
||||
$lang->ssl_options['optional'] = '可選(不推薦)';
|
||||
$lang->ssl_options['always'] = '始終(推薦)';
|
||||
$lang->about_use_ssl = '<p>選擇“可選”是為指定的操作(例如註冊和更改信息)使用SSL。 <br />選擇“總是”是為Rhymix生成的整個頁面使用SSL。 </p><p>請小心!在安裝SSL證書之前,您可能無法訪問該網站。</p>';
|
||||
$lang->server_ports = '主機埠口';
|
||||
$lang->about_server_ports = 'HTTP、HTTPS預設埠口分別是『80』、『443』 如果想使用其他的埠口的話,請自行設定。';
|
||||
$lang->use_db_session = 'DB session認證';
|
||||
|
|
|
|||
|
|
@ -14,11 +14,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_ssl} <a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_config_general_ssl" target="_blank">{$lang->help}</a></label>
|
||||
<label class="x_control-label">{lang('admin.use_ssl')} <a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_config_general_ssl" target="_blank">{$lang->help}</a></label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($lang->ssl_options as $key => $val)-->
|
||||
<label for="ssl_{$key}" class="x_inline"><input type="radio" name="use_ssl" id="ssl_{$key}" value="{$key}" checked="checked"|cond="$use_ssl==$key" /> {$val}</label>
|
||||
<!--@endforeach-->
|
||||
<div class="x_help-block">{lang('admin.about_use_ssl')}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
|
|||
|
|
@ -2388,6 +2388,10 @@ html[lang="mn"] .x .g11n.active>[disabled],
|
|||
height: 1px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.server_env {
|
||||
white-space: pre-wrap;
|
||||
font-family: Consolas, Courier New, monospace;
|
||||
}
|
||||
|
||||
/* language specific styles */
|
||||
/* English admin_en.css */
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@
|
|||
</div>
|
||||
|
||||
<section class="section">
|
||||
<textarea style="width:96%;height:400px;">{$str_info}</textarea>
|
||||
<div class="server_env">{$str_info}</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ class autoinstallAdminView extends autoinstall
|
|||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('package.', 'package.depends..', 'item_list..');
|
||||
$security->encodeHTML('search_target', 'search_keyword');
|
||||
$security->encodeHTML('search_target', 'search_keyword', 'order_target', 'order_type');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -132,12 +132,12 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="x_clearfix" style="margin-top:-10px">
|
||||
{@
|
||||
$urlInfo = parse_url(getRequestUriByServerEnviroment());
|
||||
parse_str($urlInfo['query'], $param);
|
||||
}
|
||||
<form cond="$page_navigation" action="./" class="x_pagination x_pull-left" no-error-return-url="true">
|
||||
<input loop="$param => $key, $val" cond="!in_array($key, array('mid', 'vid', 'act'))" type="hidden" name="{$key}" value="{$val}" />
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="order_target" value="{$order_target}" />
|
||||
<input type="hidden" name="order_type" value="{$order_type}" />
|
||||
<input type="hidden" name="search_keyword" value="{$search_keyword}" />
|
||||
<ul>
|
||||
<li class="x_disabled"|cond="!$page || $page == 1"><a href="{getUrl('page', '')}">« {$lang->first_page}</a></li>
|
||||
<block cond="$page_navigation->first_page != 1 && $page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page - 1 && $page_navigation->page_count != $page_navigation->total_page">
|
||||
|
|
@ -168,8 +168,11 @@
|
|||
</ul>
|
||||
</form>
|
||||
<form action="./" class="search x_input-append x_pull-right" no-error-return-url="true" cond="$act!=dispAutoinstallAdminInstalledPackages">
|
||||
<input loop="$param => $key, $val" cond="!in_array($key, array('mid', 'vid', 'act', 'page'))" type="hidden" name="{$key}" value="{$val}" />
|
||||
<input type="search" name="search_keyword" required title="Search" value="{htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="order_target" value="{$order_target}" />
|
||||
<input type="hidden" name="order_type" value="{$order_type}" />
|
||||
<input type="search" name="search_keyword" required title="Search" value="{$search_keyword}" />
|
||||
<button class="x_btn x_btn-inverse" type="submit">{$lang->cmd_search}</button>
|
||||
<a href="{getUrl('page', '', 'search_keyword', '')}" class="x_btn">{$lang->cmd_cancel}</a>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ class commentItem extends Object
|
|||
{
|
||||
if(Context::getSessionStatus())
|
||||
{
|
||||
$_SESSION['accessibled_comment'][$this->comment_srl] = TRUE;
|
||||
$_SESSION['accessible'][$this->comment_srl] = $this->get('last_update');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -163,12 +163,12 @@ class commentItem extends Object
|
|||
|
||||
function isAccessible()
|
||||
{
|
||||
if($_SESSION['accessibled_comment'][$this->comment_srl])
|
||||
if (isset($_SESSION['accessible'][$this->comment_srl]) && $_SESSION['accessible'][$this->comment_srl] === $this->get('last_update'))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if($this->isGranted() || !$this->isSecret())
|
||||
if (!$this->isSecret() || $this->isGranted())
|
||||
{
|
||||
$this->setAccessible();
|
||||
return TRUE;
|
||||
|
|
@ -176,7 +176,7 @@ class commentItem extends Object
|
|||
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($this->get('document_srl'));
|
||||
if($oDocument->isGranted())
|
||||
if ($oDocument->isExists() && $oDocument->isGranted())
|
||||
{
|
||||
$this->setAccessible();
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<action name="procCommunicationSendMessage" type="controller" ruleset="sendMessage" standalone="true" />
|
||||
<action name="procCommunicationStoreMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteMessages" type="controller" method="GET|POST" standalone="true" />
|
||||
<action name="procCommunicationDeleteMessages" type="controller" standalone="true" />
|
||||
|
||||
<action name="procCommunicationAddFriend" type="controller" ruleset="addFriend" standalone="true" />
|
||||
<action name="procCommunicationMoveFriend" type="controller" ruleset="deleteCheckedFriend" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<button class="btn" type="button" onclick="doDeleteMessage('{$message->message_srl}');">{$lang->cmd_delete}</button>
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" id="fo_message_list">
|
||||
<form action="./" method="post" id="fo_message_list">
|
||||
<input type="hidden" name="module" value="communication" />
|
||||
<input type="hidden" name="act" value="procCommunicationDeleteMessages" />
|
||||
<input type="hidden" name="message_type" value="{$message_type}" />
|
||||
|
|
|
|||
|
|
@ -204,7 +204,55 @@ class documentItem extends Object
|
|||
|
||||
function isAccessible()
|
||||
{
|
||||
return $_SESSION['accessible'][$this->document_srl]==true?true:false;
|
||||
if (isset($_SESSION['accessible'][$this->document_srl]) && $_SESSION['accessible'][$this->document_srl] === $this->get('last_update'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->grant_cache === true)
|
||||
{
|
||||
$this->setAccessible();
|
||||
return true;
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if ($logged_info->is_admin == 'Y')
|
||||
{
|
||||
$this->setAccessible();
|
||||
return true;
|
||||
}
|
||||
|
||||
$status = $this->get('status');
|
||||
if (empty($status))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$configStatusList = getModel('document')->getStatusList();
|
||||
|
||||
if ($status == $configStatusList['public'] || $status == $configStatusList['publish'])
|
||||
{
|
||||
$this->setAccessible();
|
||||
return true;
|
||||
}
|
||||
elseif ($status == $configStatusList['private'] || $status == $configStatusList['secret'])
|
||||
{
|
||||
if ($this->get('member_srl') == $logged_info->member_srl)
|
||||
{
|
||||
$this->setAccessible();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function setAccessible()
|
||||
{
|
||||
if(Context::getSessionStatus())
|
||||
{
|
||||
$_SESSION['accessible'][$this->document_srl] = $this->get('last_update');
|
||||
}
|
||||
}
|
||||
|
||||
function allowComment()
|
||||
|
|
@ -444,7 +492,7 @@ class documentItem extends Object
|
|||
$result = $this->_checkAccessibleFromStatus();
|
||||
if($result && Context::getSessionStatus())
|
||||
{
|
||||
$_SESSION['accessible'][$this->document_srl] = true;
|
||||
$this->setAccessible();
|
||||
}
|
||||
|
||||
$content = $this->get('content');
|
||||
|
|
@ -506,9 +554,9 @@ class documentItem extends Object
|
|||
if($this->isSecret() && !$this->isGranted() && !$this->isAccessible()) return lang('msg_is_secret');
|
||||
|
||||
$result = $this->_checkAccessibleFromStatus();
|
||||
if($result && Context::getSessionStatus())
|
||||
if($result)
|
||||
{
|
||||
$_SESSION['accessible'][$this->document_srl] = true;
|
||||
$this->setAccessible();
|
||||
}
|
||||
|
||||
$content = $this->get('content');
|
||||
|
|
@ -1252,23 +1300,7 @@ class documentItem extends Object
|
|||
*/
|
||||
function _checkAccessibleFromStatus()
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') return true;
|
||||
|
||||
$status = $this->get('status');
|
||||
if(empty($status)) return false;
|
||||
|
||||
$oDocumentModel = getModel('document');
|
||||
$configStatusList = $oDocumentModel->getStatusList();
|
||||
|
||||
if($status == $configStatusList['public'] || $status == $configStatusList['publish'])
|
||||
return true;
|
||||
else if($status == $configStatusList['private'] || $status == $configStatusList['secret'])
|
||||
{
|
||||
if($this->get('member_srl') == $logged_info->member_srl)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return $this->isAccessible();
|
||||
}
|
||||
|
||||
function getTranslationLangCodes()
|
||||
|
|
|
|||
|
|
@ -7,6 +7,17 @@
|
|||
*/
|
||||
class editor extends ModuleObject
|
||||
{
|
||||
/**
|
||||
* @brief Default font config
|
||||
*/
|
||||
public $default_font_config = array(
|
||||
'default_font_family' => 'inherit',
|
||||
'default_font_size' => '13px',
|
||||
'default_line_height' => '160%',
|
||||
'default_paragraph_spacing' => '0',
|
||||
'default_word_break' => 'normal',
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Implement if additional tasks are necessary when installing
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -80,10 +80,30 @@ class editorController extends editor
|
|||
*/
|
||||
function procEditorInsertModuleConfig()
|
||||
{
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
// To configure many of modules at once
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
$target_module_srl = Context::get('target_module_srl');
|
||||
$target_module_srl = array_map('trim', explode(',', $target_module_srl));
|
||||
$logged_info = Context::get('logged_info');
|
||||
$module_srl = array();
|
||||
$oModuleModel = getModel('module');
|
||||
foreach ($target_module_srl as $srl)
|
||||
{
|
||||
if (!$srl) continue;
|
||||
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($srl);
|
||||
if (!$module_info->module_srl)
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
$module_grant = $oModuleModel->getGrant($module_info, $logged_info);
|
||||
if (!$module_grant->manager)
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
$module_srl[] = $srl;
|
||||
}
|
||||
|
||||
$editor_config = new stdClass;
|
||||
$editor_config->default_editor_settings = Context::get('default_editor_settings');
|
||||
|
|
@ -134,10 +154,8 @@ class editorController extends editor
|
|||
if($editor_config->enable_autosave != 'Y') $editor_config->enable_autosave = 'N';
|
||||
|
||||
$oModuleController = getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++)
|
||||
foreach ($module_srl as $srl)
|
||||
{
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$oModuleController->insertModulePartConfig('editor',$srl,$editor_config);
|
||||
}
|
||||
|
||||
|
|
@ -192,13 +210,13 @@ class editorController extends editor
|
|||
}
|
||||
}
|
||||
|
||||
Context::set('default_font_config', array(
|
||||
'default_font_family' => $editor_config->content_font ?: 'inherit',
|
||||
'default_font_size' => $editor_config->content_font_size ?: '13px',
|
||||
'default_line_height' => $editor_config->content_line_height ?: '160%',
|
||||
'default_paragraph_spacing' => $editor_config->content_paragraph_spacing ?: '0',
|
||||
'default_word_break' => $editor_config->content_word_break ?: 'normal',
|
||||
));
|
||||
$default_font_config = $this->default_font_config;
|
||||
if ($editor_config->content_font) $default_font_config['default_font_family'] = $editor_config->content_font;
|
||||
if ($editor_config->content_font_size) $default_font_config['default_font_size'] = $editor_config->content_font_size;
|
||||
if ($editor_config->content_line_height) $default_font_config['default_line_height'] = $editor_config->content_line_height;
|
||||
if ($editor_config->content_paragraph_spacing) $default_font_config['default_paragraph_spacing'] = $editor_config->content_paragraph_spacing;
|
||||
if ($editor_config->content_word_break) $default_font_config['default_word_break'] = $editor_config->content_word_break;
|
||||
Context::set('default_font_config', $default_font_config);
|
||||
|
||||
/*
|
||||
$buff = array();
|
||||
|
|
@ -231,13 +249,7 @@ class editorController extends editor
|
|||
}
|
||||
else
|
||||
{
|
||||
Context::set('default_font_config', array(
|
||||
'default_font_family' => 'inherit',
|
||||
'default_font_size' => '13px',
|
||||
'default_line_height' => '160%',
|
||||
'default_paragraph_spacing' => '0',
|
||||
'default_word_break' => 'normal',
|
||||
));
|
||||
Context::set('default_font_config', $this->default_font_config);
|
||||
}
|
||||
|
||||
$content = $this->transComponent($content);
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class fileAdminView extends file
|
|||
}
|
||||
}
|
||||
|
||||
if($file->upload_target_type)
|
||||
if($file->upload_target_type && is_array(${$file->upload_target_type.'_srls'}))
|
||||
{
|
||||
if(!in_array($file->upload_target_srl, ${$file->upload_target_type.'_srls'}))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -199,9 +199,22 @@ class memberController extends member
|
|||
|
||||
$document_srl = (int)Context::get('document_srl');
|
||||
if(!$document_srl) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if ($oDocument->get('member_srl') != $logged_info->member_srl)
|
||||
{
|
||||
return new Object(-1,'msg_invalid_request');
|
||||
}
|
||||
$configStatusList = $oDocumentModel->getStatusList();
|
||||
if ($oDocument->get('status') != $configStatusList['temp'])
|
||||
{
|
||||
return new Object(-1,'msg_invalid_request');
|
||||
}
|
||||
|
||||
// Variables
|
||||
$oDocumentController = getController('document');
|
||||
$oDocumentController->deleteDocument($document_srl, true);
|
||||
$oDocumentController->deleteDocument($document_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1706,8 +1719,15 @@ class memberController extends member
|
|||
$output->data = array_first($output->data);
|
||||
}
|
||||
|
||||
// Hash the security key, but allow raw keys for a limited time.
|
||||
$valid_security_keys = array(base64_encode(hash_hmac('sha256', $security_key, $autologin_key, true)));
|
||||
if (time() < 1489503600)
|
||||
{
|
||||
$valid_security_keys[] = $security_key;
|
||||
}
|
||||
|
||||
// Check the security key.
|
||||
if ($output->data->security_key !== $security_key || !$output->data->member_srl)
|
||||
if (!in_array($output->data->security_key, $valid_security_keys) || !$output->data->member_srl)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->autologin_key = $autologin_key;
|
||||
|
|
@ -1719,7 +1739,7 @@ class memberController extends member
|
|||
$new_security_key = Rhymix\Framework\Security::getRandom(24, 'alnum');
|
||||
$args = new stdClass;
|
||||
$args->autologin_key = $autologin_key;
|
||||
$args->security_key = $new_security_key;
|
||||
$args->security_key = base64_encode(hash_hmac('sha256', $security_key, $autologin_key, true));
|
||||
$update_output = executeQuery('member.updateAutologin', $args);
|
||||
if ($update_output->toBool())
|
||||
{
|
||||
|
|
@ -1892,7 +1912,7 @@ class memberController extends member
|
|||
$random_key = Rhymix\Framework\Security::getRandom(48, 'alnum');
|
||||
$autologin_args = new stdClass;
|
||||
$autologin_args->autologin_key = substr($random_key, 0, 24);
|
||||
$autologin_args->security_key = substr($random_key, 24, 24);
|
||||
$autologin_args->security_key = base64_encode(hash_hmac('sha256', substr($random_key, 24, 24), $autologin_args->autologin_key, true));
|
||||
$autologin_args->member_srl = $this->memberInfo->member_srl;
|
||||
$autologin_args->user_agent = json_encode(Rhymix\Framework\UA::getBrowserInfo());
|
||||
$autologin_output = executeQuery('member.insertAutologin', $autologin_args);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ class memberModel extends member
|
|||
$user_id = $member_info->user_id;
|
||||
$user_name = $member_info->user_name;
|
||||
|
||||
ModuleHandler::triggerCall('member.getMemberMenu', 'before', $null);
|
||||
ModuleHandler::triggerCall('member.getMemberMenu', 'before', new stdClass);
|
||||
|
||||
$oMemberController = getController('member');
|
||||
// Display member information (Don't display to non-logged user)
|
||||
|
|
@ -247,7 +247,7 @@ class memberModel extends member
|
|||
/**
|
||||
* @brief Return member information with user_id
|
||||
*/
|
||||
function getMemberInfoByUserID($user_id, $columnList = array())
|
||||
function getMemberInfoByUserID($user_id)
|
||||
{
|
||||
if(!$user_id) return;
|
||||
|
||||
|
|
@ -292,28 +292,27 @@ class memberModel extends member
|
|||
/**
|
||||
* @brief Return member information with member_srl
|
||||
*/
|
||||
function getMemberInfoByMemberSrl($member_srl, $site_srl = 0, $columnList = array())
|
||||
function getMemberInfoByMemberSrl($member_srl, $site_srl = 0)
|
||||
{
|
||||
if(!$member_srl) return new stdClass;
|
||||
|
||||
//columnList size zero... get full member info
|
||||
if(!$GLOBALS['__member_info__'][$member_srl] || count($columnList) == 0)
|
||||
if(!$GLOBALS['__member_info__'][$member_srl])
|
||||
{
|
||||
$cache_key = 'member:member_info:' . getNumberingPath($member_srl) . $member_srl;
|
||||
$cache_key = sprintf('member:member_info:%d', $member_srl);
|
||||
$GLOBALS['__member_info__'][$member_srl] = Rhymix\Framework\Cache::get($cache_key);
|
||||
if(!$GLOBALS['__member_info__'][$member_srl])
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->member_srl = $member_srl;
|
||||
$output = executeQuery('member.getMemberInfoByMemberSrl', $args, $columnList);
|
||||
$output = executeQuery('member.getMemberInfoByMemberSrl', $args);
|
||||
if(!$output->data)
|
||||
{
|
||||
Rhymix\Framework\Cache::set($cache_key, new stdClass);
|
||||
return new stdClass;
|
||||
}
|
||||
|
||||
$this->arrangeMemberInfo($output->data, $site_srl);
|
||||
Rhymix\Framework\Cache::set($cache_key, $GLOBALS['__member_info__'][$member_srl]);
|
||||
$member_info = $this->arrangeMemberInfo($output->data, $site_srl);
|
||||
Rhymix\Framework\Cache::set($cache_key, $member_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +455,7 @@ class memberModel extends member
|
|||
static $member_groups = array();
|
||||
|
||||
// cache controll
|
||||
$cache_key = 'member:member_groups:' . getNumberingPath($member_srl) . $member_srl . ':site:' . $site_srl;
|
||||
$cache_key = sprintf('member:member_groups:%d:site:%d', $member_srl, $site_srl);
|
||||
$group_list = Rhymix\Framework\Cache::get($cache_key);
|
||||
|
||||
if(!$member_groups[$member_srl][$site_srl] || $force_reload)
|
||||
|
|
@ -511,17 +510,18 @@ class memberModel extends member
|
|||
/**
|
||||
* @brief Get a default group
|
||||
*/
|
||||
function getDefaultGroup($site_srl = 0, $columnList = array())
|
||||
function getDefaultGroup($site_srl = 0)
|
||||
{
|
||||
$default_group = Rhymix\Framework\Cache::get("member:default_group:$site_srl");
|
||||
$cache_key = sprintf('member:default_group:site:%d', $site_srl);
|
||||
$default_group = Rhymix\Framework\Cache::get($cache_key);
|
||||
|
||||
if(!$default_group)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $site_srl;
|
||||
$output = executeQuery('member.getDefaultGroup', $args, $columnList);
|
||||
$output = executeQuery('member.getDefaultGroup', $args);
|
||||
$default_group = $output->data;
|
||||
Rhymix\Framework\Cache::set("member:default_group:$site_srl", $default_group, 0, true);
|
||||
Rhymix\Framework\Cache::set($cache_key, $default_group, 0, true);
|
||||
}
|
||||
|
||||
return $default_group;
|
||||
|
|
@ -532,6 +532,7 @@ class memberModel extends member
|
|||
*/
|
||||
function getAdminGroup($columnList = array())
|
||||
{
|
||||
$args = new stdClass;
|
||||
$output = executeQuery('member.getAdminGroup', $args, $columnList);
|
||||
return $output->data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@
|
|||
<block cond="$layout_info->extra_var->primary_color->type !== 'select' && $layout_info->extra_var->customized_primary_color->type !== 'colorpicker'">
|
||||
{@$layout_info->primary_color = 'blue';}
|
||||
</block>
|
||||
|
||||
<!--// Load styles -->
|
||||
{@$colorset = $material_colors[$member_config->colorset];}
|
||||
{@$skin_color = $material_colors[$layout_info->primary_color];}
|
||||
<block cond="!$skin_color">
|
||||
<!--@if(preg_match("/#([a-f0-9]{3}){1,2}/i", $layout_info->primary_color))-->
|
||||
|
|
@ -54,7 +54,10 @@
|
|||
{@$skin_color = '#f44336'}
|
||||
<!--@endif-->
|
||||
</block>
|
||||
{Context::set('simple_less_value', array('red' => hexdec(substr($skin_color, 1, 2)), 'green' => hexdec(substr($skin_color, 3, 2)), 'blue' => hexdec(substr($skin_color, 5, 2)) ))}
|
||||
<block cond="$colorset">
|
||||
{@$skin_color = $colorset}
|
||||
</block>
|
||||
{@Context::set('simple_less_value', array('red' => hexdec(substr($skin_color, 1, 2)), 'green' => hexdec(substr($skin_color, 3, 2)), 'blue' => hexdec(substr($skin_color, 5, 2)) ))}
|
||||
<load target="css/css.less" vars="$simple_less_value" />
|
||||
<section class="rx_simple_member">
|
||||
<div class="rx_simple_tab" cond="$is_logged && $logged_info->menu_list && (!$member_srl || $member_srl == $logged_info->member_srl)">
|
||||
|
|
|
|||
|
|
@ -188,9 +188,6 @@ script, style
|
|||
.rx_simple_member div.rx_simple_tab{
|
||||
background: #ffffff;
|
||||
margin: 5px 0;
|
||||
height: 52px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.16), 0 1px 2px rgba(0,0,0,0.23);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
|
@ -198,9 +195,7 @@ script, style
|
|||
list-style: outside none none;
|
||||
margin: 0;
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
padding: 6px 0px 100px;
|
||||
padding: 6px 0;
|
||||
text-decoration: none;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,18 +18,18 @@
|
|||
{lang('common.email_address')}
|
||||
</block>
|
||||
</label>
|
||||
<input type="text" cond="$identifier == 'user_id'" name="user_id" id="uid" required title="{lang('common.user_id')}" />
|
||||
<input type="email" cond="$identifier != 'user_id'" name="user_id" id="uid" required title="{lang('common.email_address')}" />
|
||||
<input type="text" cond="$identifier == 'user_id'" autocapitalize="off" autocorrect="off" autofocus="autofocus" name="user_id" id="uid" required="required" tabindex="1" title="{lang('common.user_id')}" />
|
||||
<input type="email" cond="$identifier != 'user_id'" autocapitalize="off" autocorrect="off" autofocus="autofocus" name="user_id" id="uid" required="required" tabindex="1" title="{lang('common.email_address')}" />
|
||||
<label for="upw">{lang('common.password')}<a class="pos-right" href="{getUrl('act','dispMemberFindAccount')}">{lang('member.cmd_find_member_account')}</a></label>
|
||||
<input type="password" name="password" id="upw" required title="{lang('common.password')}" />
|
||||
<input type="password" name="password" id="upw" required="required" tabindex="2" title="{lang('common.password')}" />
|
||||
<label for="keepid_opt">
|
||||
<input type="checkbox" name="keep_signed" id="keepid_opt" value="Y" />
|
||||
<input type="checkbox" name="keep_signed" id="keepid_opt" tabindex="3" value="Y" />
|
||||
{lang('member.keep_signed')}
|
||||
</label>
|
||||
<div id="rx_member-warning" class="rx_member-notice">
|
||||
{lang('member.about_keep_warning')}
|
||||
</div>
|
||||
<input type="submit" value="{lang('member.cmd_login')}" />
|
||||
<input type="submit" tabindex="4" value="{lang('member.cmd_login')}" />
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,94 @@
|
|||
<name xml:lang="en">misol</name>
|
||||
</author>
|
||||
|
||||
<colorset type="colorpicker">
|
||||
<colorset>
|
||||
<color name="theme">
|
||||
<title xml:lang="ko">사이트 테마 색</title>
|
||||
<title xml:lang="en">The site theme color</title>
|
||||
</color>
|
||||
<color name="red">
|
||||
<title xml:lang="ko">붉은 색</title>
|
||||
<title xml:lang="en">Red</title>
|
||||
</color>
|
||||
<color name="crimson">
|
||||
<title xml:lang="ko">크림슨</title>
|
||||
<title xml:lang="en">Crimson</title>
|
||||
</color>
|
||||
<color name="pink">
|
||||
<title xml:lang="ko">분홍</title>
|
||||
<title xml:lang="en">Pink</title>
|
||||
</color>
|
||||
<color name="purple">
|
||||
<title xml:lang="ko">보라</title>
|
||||
<title xml:lang="en">Purple</title>
|
||||
</color>
|
||||
<color name="deep-purple">
|
||||
<title xml:lang="ko">진보라</title>
|
||||
<title xml:lang="en">Deep Purple</title>
|
||||
</color>
|
||||
<color name="indigo">
|
||||
<title xml:lang="ko">인디고</title>
|
||||
<title xml:lang="en">Indigo</title>
|
||||
</color>
|
||||
<color name="deep-blue">
|
||||
<title xml:lang="ko">짙은 파랑</title>
|
||||
<title xml:lang="en">Deep Blue</title>
|
||||
</color>
|
||||
<color name="blue">
|
||||
<title xml:lang="ko">파랑</title>
|
||||
<title xml:lang="en">Blue</title>
|
||||
</color>
|
||||
<color name="light-blue">
|
||||
<title xml:lang="ko">밝은 파랑</title>
|
||||
<title xml:lang="en">Light Blue</title>
|
||||
</color>
|
||||
<color name="cyan">
|
||||
<title xml:lang="ko">시안</title>
|
||||
<title xml:lang="en">Cyan</title>
|
||||
</color>
|
||||
<color name="teal">
|
||||
<title xml:lang="ko">틸</title>
|
||||
<title xml:lang="en">Teal</title>
|
||||
</color>
|
||||
<color name="green">
|
||||
<title xml:lang="ko">초록</title>
|
||||
<title xml:lang="en">Green</title>
|
||||
</color>
|
||||
<color name="light-green">
|
||||
<title xml:lang="ko">연한 초록</title>
|
||||
<title xml:lang="en">Light Green</title>
|
||||
</color>
|
||||
<color name="lime">
|
||||
<title xml:lang="ko">라임</title>
|
||||
<title xml:lang="en">Lime</title>
|
||||
</color>
|
||||
<color name="yellow">
|
||||
<title xml:lang="ko">노랑</title>
|
||||
<title xml:lang="en">Yellow</title>
|
||||
</color>
|
||||
<color name="amber">
|
||||
<title xml:lang="ko">앰버</title>
|
||||
<title xml:lang="en">Amber</title>
|
||||
</color>
|
||||
<color name="orange">
|
||||
<title xml:lang="ko">주황</title>
|
||||
<title xml:lang="en">Orange</title>
|
||||
</color>
|
||||
<color name="deep-orange">
|
||||
<title xml:lang="ko">진한 주황</title>
|
||||
<title xml:lang="en">Deep Orange</title>
|
||||
</color>
|
||||
<color name="brown">
|
||||
<title xml:lang="ko">갈색</title>
|
||||
<title xml:lang="en">Brown</title>
|
||||
</color>
|
||||
<color name="grey">
|
||||
<title xml:lang="ko">회색</title>
|
||||
<title xml:lang="en">Grey</title>
|
||||
</color>
|
||||
<color name="blue-grey">
|
||||
<title xml:lang="ko">푸른 회색</title>
|
||||
<title xml:lang="en">Blue Grey</title>
|
||||
</color>
|
||||
</colorset>
|
||||
</skin>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class messageMobile extends messageView
|
|||
/**
|
||||
* @brief Message output
|
||||
**/
|
||||
function dispMessage()
|
||||
function dispMessage($detail = null)
|
||||
{
|
||||
// Get configurations (using module model object)
|
||||
$oModuleModel = getModel('module');
|
||||
|
|
@ -36,8 +36,8 @@ class messageMobile extends messageView
|
|||
if(strncasecmp('https://', Context::getRequestUri(), 8) === 0) $ssl_mode = true;
|
||||
}
|
||||
Context::set('ssl_mode',$ssl_mode);
|
||||
|
||||
Context::set('system_message', nl2br($this->getMessage()));
|
||||
Context::set('system_message_detail', nl2br($detail));
|
||||
|
||||
Context::set('act', 'procMemberLogin');
|
||||
Context::set('mid', '');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!--// responsible layout -->
|
||||
{Context::addMetaTag("viewport", "width=device-width, user-scalable=yes")}
|
||||
{@Context::addMetaTag("viewport", "width=device-width, user-scalable=yes")}
|
||||
|
||||
<!--// Check layout. If it is Simple World, select layout primary colors as a primary color of this skin -->
|
||||
{@
|
||||
|
|
@ -57,6 +57,6 @@
|
|||
{@$skin_color = '#f44336'}
|
||||
<!--@endif-->
|
||||
</block>
|
||||
{Context::set('simple_less_value', array('red' => hexdec(substr($skin_color, 1, 2)), 'green' => hexdec(substr($skin_color, 3, 2)), 'blue' => hexdec(substr($skin_color, 5, 2)) ))}
|
||||
{@Context::set('simple_less_value', array('red' => hexdec(substr($skin_color, 1, 2)), 'green' => hexdec(substr($skin_color, 3, 2)), 'blue' => hexdec(substr($skin_color, 5, 2)) ))}
|
||||
<load target="css/message.less" vars="$simple_less_value" />
|
||||
<section class="rx_simple_message">
|
||||
|
|
@ -19,18 +19,18 @@
|
|||
{lang('common.email_address')}
|
||||
</block>
|
||||
</label>
|
||||
<input type="text" cond="$member_config->identifier == 'user_id'" name="user_id" id="uid" required title="{lang('common.user_id')}" />
|
||||
<input type="email" cond="$member_config->identifier != 'user_id'" name="user_id" id="uid" required title="{lang('common.email_address')}" />
|
||||
<input type="text" cond="$member_config->identifier == 'user_id'" autocapitalize="off" autocorrect="off" autofocus="autofocus" name="user_id" id="uid" required="required" tabindex="1" title="{lang('common.user_id')}" />
|
||||
<input type="email" cond="$member_config->identifier != 'user_id'" autocapitalize="off" autocorrect="off" autofocus="autofocus" name="user_id" id="uid" required="required" tabindex="1" title="{lang('common.email_address')}" />
|
||||
<label for="upw">{lang('common.password')}<a class="pos-right" href="{getUrl('act','dispMemberFindAccount')}">{lang('member.cmd_find_member_account')}</a></label>
|
||||
<input type="password" name="password" id="upw" required title="{lang('common.password')}" />
|
||||
<input type="password" name="password" id="upw" required="required" tabindex="2" title="{lang('common.password')}" />
|
||||
<label for="keepid_opt">
|
||||
<input type="checkbox" name="keep_signed" id="keepid_opt" value="Y" />
|
||||
<input type="checkbox" name="keep_signed" id="keepid_opt" tabindex="3" value="Y" />
|
||||
{lang('member.keep_signed')}
|
||||
</label>
|
||||
<div id="rx_message-warning" class="rx_message-notice">
|
||||
{lang('member.about_keep_warning')}
|
||||
</div>
|
||||
<input type="submit" value="{$lang->cmd_login}" />
|
||||
<input type="submit" tabindex="4" value="{lang('member.cmd_login')}" />
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!--// META -->
|
||||
{Context::addHtmlHeader('<meta name="viewport" content="width=1240">')}
|
||||
{@Context::addHtmlHeader('<meta name="viewport" content="width=1240">')}
|
||||
<!--// CSS -->
|
||||
<style>
|
||||
.xedition-error {
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ class moduleModel extends module
|
|||
if(!$output->toBool()) return $output;
|
||||
$list = $output->data;
|
||||
|
||||
if(count($args) === 1 && isset($args->site_srl))
|
||||
if(count($args) === 1 && isset($args->site_srl) && !$columnList)
|
||||
{
|
||||
Rhymix\Framework\Cache::set('site_and_module:module:mid_list_' . $args->site_srl, $list, 0, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,14 +11,29 @@ class ncenterliteModel extends ncenterlite
|
|||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('ncenterlite');
|
||||
|
||||
|
||||
if(!$config)
|
||||
{
|
||||
$config = new stdClass();
|
||||
}
|
||||
if(!$config->use)
|
||||
|
||||
if(!is_array($config->use))
|
||||
{
|
||||
$config->use = array('message' => 1);
|
||||
if($config->use == 'Y')
|
||||
{
|
||||
$config->use = array(
|
||||
'mention' => array('web' => 1),
|
||||
'comment' => array('web' => 1),
|
||||
'comment_comment' => array('web' => 1),
|
||||
'vote' => array('web' => 1),
|
||||
'message' => array('web' => 1),
|
||||
'admin_content' => array('web' => 1),
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$config->use = array('message' => array('web' => 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -32,8 +47,8 @@ class ncenterliteModel extends ncenterlite
|
|||
getController('module')->insertModuleConfig('ncenterlite', $config);
|
||||
}
|
||||
}
|
||||
|
||||
if(!$config->display_use) $config->display_use = 'all';
|
||||
|
||||
if(!$config->mention_names) $config->mention_names = 'nick_name';
|
||||
if(!$config->mention_suffixes)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class pageMobile extends pageView
|
|||
if($mtime + $interval*60 > $_SERVER['REQUEST_TIME'])
|
||||
{
|
||||
$page_content = FileHandler::readFile($cache_file);
|
||||
$page_content = preg_replace('@<\!--#Meta:@', '<!--Meta:', $page_content);
|
||||
$page_content = str_replace('<!--#Meta:', '<!--Meta:', $page_content);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class pageView extends page
|
|||
if($mtime + $this->interval*60 > $_SERVER['REQUEST_TIME'])
|
||||
{
|
||||
$page_content = FileHandler::readFile($this->cache_file);
|
||||
$page_content = preg_replace('@<\!--#Meta:@', '<!--Meta:', $page_content);
|
||||
$page_content = str_replace('<!--#Meta:', '<!--Meta:', $page_content);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,9 +75,25 @@ class pointModel extends point
|
|||
function getMembersPointInfo()
|
||||
{
|
||||
$member_srls = Context::get('member_srls');
|
||||
$member_srls = explode(',',$member_srls);
|
||||
if(count($member_srls)==0) return;
|
||||
array_unique($member_srls);
|
||||
$member_srls = array_unique(explode(',', $member_srls));
|
||||
if (!count($member_srls))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if (!$logged_info->member_srl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!getModel('module')->isSiteAdmin($logged_info))
|
||||
{
|
||||
$member_srls = array_filter($member_srls, function($member_srl) use($logged_info) { return $member_srl == $logged_info->member_srl; });
|
||||
if (!count($member_srls))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ class widgetController extends widget
|
|||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($module_srl);
|
||||
if(!$layout_info || $layout_info->type != 'faceoff') $err++;
|
||||
|
||||
// Destination Information Wanted page module
|
||||
$oModuleModel = getModel('module');
|
||||
$columnList = array('module_srl', 'module');
|
||||
|
|
@ -112,20 +113,19 @@ class widgetController extends widget
|
|||
if(!$page_info->module_srl || $page_info->module != 'page') $err++;
|
||||
|
||||
if($err > 1) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// Check permissions
|
||||
$is_logged = Context::get('is_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
$user_group = $logged_info->group_list;
|
||||
$is_admin = false;
|
||||
if(count($user_group)&&count($page_info->grants['manager']))
|
||||
if (!$logged_info->member_srl)
|
||||
{
|
||||
$manager_group = $page_info->grants['manager'];
|
||||
foreach($user_group as $group_srl => $group_info)
|
||||
{
|
||||
if(in_array($group_srl, $manager_group)) $is_admin = true;
|
||||
}
|
||||
return new Object(-1,'msg_not_permitted');
|
||||
}
|
||||
if(!$is_admin && !$is_logged && $logged_info->is_admin != 'Y' && !$oModuleModel->isSiteAdmin($logged_info) && !(is_array($page_info->admin_id) && in_array($logged_info->user_id, $page_info->admin_id))) return new Object(-1,'msg_not_permitted');
|
||||
$module_grant = $oModuleModel->getGrant($page_info, $logged_info);
|
||||
if (!$module_grant->manager)
|
||||
{
|
||||
return new Object(-1,'msg_not_permitted');
|
||||
}
|
||||
|
||||
// Enter post
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocumentController = getController('document');
|
||||
|
|
@ -145,8 +145,10 @@ class widgetController extends widget
|
|||
$output = $oDocumentController->insertDocument($obj);
|
||||
$obj->document_srl = $output->get('document_srl');
|
||||
}
|
||||
|
||||
// Stop when an error occurs
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// Return results
|
||||
$this->add('document_srl', $obj->document_srl);
|
||||
}
|
||||
|
|
@ -166,28 +168,28 @@ class widgetController extends widget
|
|||
$oDocument = $oDocumentModel->getDocument($document_srl, true);
|
||||
if(!$oDocument->isExists()) return new Object(-1,'msg_invalid_request');
|
||||
$module_srl = $oDocument->get('module_srl');
|
||||
|
||||
// Destination Information Wanted page module
|
||||
$oModuleModel = getModel('module');
|
||||
$columnList = array('module_srl', 'module');
|
||||
$page_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
if(!$page_info->module_srl || $page_info->module != 'page') return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// Check permissions
|
||||
$is_logged = Context::get('is_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
$user_group = $logged_info->group_list;
|
||||
$is_admin = false;
|
||||
if(count($user_group)&&count($page_info->grants['manager']))
|
||||
if (!$logged_info->member_srl)
|
||||
{
|
||||
$manager_group = $page_info->grants['manager'];
|
||||
foreach($user_group as $group_srl => $group_info)
|
||||
{
|
||||
if(in_array($group_srl, $manager_group)) $is_admin = true;
|
||||
}
|
||||
return new Object(-1,'msg_not_permitted');
|
||||
}
|
||||
if(!$is_admin && !$is_logged && $logged_info->is_admin != 'Y' && !$oModuleModel->isSiteAdmin($logged_info) && !(is_array($page_info->admin_id) && in_array($logged_info->user_id, $page_info->admin_id))) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$module_grant = $oModuleModel->getGrant($page_info, $logged_info);
|
||||
if (!$module_grant->manager)
|
||||
{
|
||||
return new Object(-1,'msg_not_permitted');
|
||||
}
|
||||
|
||||
$output = $oDocumentAdminController->copyDocumentModule(array($oDocument->get('document_srl')), $oDocument->get('module_srl'),0);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// Return results
|
||||
$copied_srls = $output->get('copied_srls');
|
||||
$this->add('document_srl', $copied_srls[$oDocument->get('document_srl')]);
|
||||
|
|
@ -207,25 +209,24 @@ class widgetController extends widget
|
|||
$oDocument = $oDocumentModel->getDocument($document_srl, true);
|
||||
if(!$oDocument->isExists()) return new Object();
|
||||
$module_srl = $oDocument->get('module_srl');
|
||||
|
||||
// Destination Information Wanted page module
|
||||
$oModuleModel = getModel('module');
|
||||
$page_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
if(!$page_info->module_srl || $page_info->module != 'page') return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// Check permissions
|
||||
$is_logged = Context::get('is_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
$user_group = $logged_info->group_list;
|
||||
$is_admin = false;
|
||||
if(count($user_group)&&count($page_info->grants['manager']))
|
||||
if (!$logged_info->member_srl)
|
||||
{
|
||||
$manager_group = $page_info->grants['manager'];
|
||||
foreach($user_group as $group_srl => $group_info)
|
||||
{
|
||||
if(in_array($group_srl, $manager_group)) $is_admin = true;
|
||||
}
|
||||
return new Object(-1,'msg_not_permitted');
|
||||
}
|
||||
if(!$is_admin && !$is_logged && $logged_info->is_admin != 'Y' && !$oModuleModel->isSiteAdmin($logged_info) && !(is_array($page_info->admin_id) && in_array($logged_info->user_id, $page_info->admin_id))) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$module_grant = $oModuleModel->getGrant($page_info, $logged_info);
|
||||
if (!$module_grant->manager)
|
||||
{
|
||||
return new Object(-1,'msg_not_permitted');
|
||||
}
|
||||
|
||||
$output = $oDocumentController->deleteDocument($oDocument->get('document_srl'), true);
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
|
@ -395,7 +396,16 @@ class widgetController extends widget
|
|||
$cache_data = Rhymix\Framework\Cache::get('widget_cache:' . $widget_sequence);
|
||||
if ($cache_data)
|
||||
{
|
||||
return preg_replace('@<\!--#Meta:@', '<!--Meta:', $cache_data);
|
||||
// Load the variables, need to load the LESS or SCSS files.
|
||||
if(is_object($cache_data))
|
||||
{
|
||||
foreach ($cache_data->variables as $key => $value)
|
||||
{
|
||||
Context::set($key, $value);
|
||||
}
|
||||
$cache_data = $cache_data->content;
|
||||
}
|
||||
return str_replace('<!--#Meta:', '<!--Meta:', $cache_data);
|
||||
}
|
||||
|
||||
$oWidget = $this->getWidgetObject($widget);
|
||||
|
|
@ -404,9 +414,26 @@ class widgetController extends widget
|
|||
$widget_content = $oWidget->proc($args);
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->replaceDefinedLangCode($widget_content);
|
||||
|
||||
|
||||
Rhymix\Framework\Cache::set('widget_cache:' . $widget_sequence, $widget_content, $widget_cache, true);
|
||||
|
||||
// Keep the variables, need to load the LESS or SCSS files.
|
||||
if(preg_match_all('/<!--#Meta:([a-z0-9\_\-\/\.\@\:]+)(\?\$\_\_Context\-\>[a-z0-9\_\-\/\.\@\:]+)?-->/is', $widget_content, $widget_var_matches, PREG_SET_ORDER))
|
||||
{
|
||||
$cache_content = new stdClass();
|
||||
$cache_content->content = $widget_content;
|
||||
$cache_content->variables = new stdClass();
|
||||
foreach($widget_var_matches as $matches)
|
||||
{
|
||||
if($matches[2])
|
||||
{
|
||||
$key = str_replace('?$__Context->', '', $matches[2]);
|
||||
$cache_content->variables->{$key} = Context::get($key);
|
||||
}
|
||||
}
|
||||
Rhymix\Framework\Cache::set('widget_cache:' . $widget_sequence, $cache_content, $widget_cache, true);
|
||||
}
|
||||
|
||||
return $widget_content;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue