diff --git a/.htaccess b/.htaccess index 68a5d3209..4211d80b3 100644 --- a/.htaccess +++ b/.htaccess @@ -22,7 +22,9 @@ RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?vid=$1& # trackback RewriteRule ^([0-9]+)/(.+)/trackback$ ./index.php?document_srl=$1&key=$2&act=trackback [L] +RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?mid=$1&document_srl=$2&key=$3&act=trackback [L] RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&document_srl=$2&key=$3&act=trackback [L] +RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&mid=$2&document_srl=$3&key=$4&act=trackback [L] # administrator page RewriteRule ^admin/?$ ./index.php?module=admin [L] diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 3582c6198..b5986153f 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -235,16 +235,19 @@ class Context { $oMemberModel = &getModel('member'); $oMemberController = &getController('member'); - // if signed in, validate it. - if($oMemberModel->isLogged()) { - $oMemberController->setSessionInfo(); - } - elseif($_COOKIE['xeak']) { // check auto sign-in - $oMemberController->doAutologin(); - } + if($oMemberController && $oMemberModel) + { + // if signed in, validate it. + if($oMemberModel->isLogged()) { + $oMemberController->setSessionInfo(); + } + elseif($_COOKIE['xeak']) { // check auto sign-in + $oMemberController->doAutologin(); + } - $this->set('is_logged', $oMemberModel->isLogged() ); - $this->set('logged_info', $oMemberModel->getLoggedInfo() ); + $this->set('is_logged', $oMemberModel->isLogged() ); + $this->set('logged_info', $oMemberModel->getLoggedInfo() ); + } } // load common language file @@ -726,17 +729,49 @@ class Context { $flag = true; foreach($obj as $key=>$val) { if(!$val) continue; - if($val && iconv($charset,$charset,$val)!=$val) $flag = false; + if(!is_array($val) && iconv($charset,$charset,$val)!=$val) $flag = false; + else if(is_array($val)) + { + $userdata = array('charset1'=>$charset,'charset2'=>$charset,'useFlag'=>true); + Context::arrayConvWalkCallback($val,null,$userdata); + if($userdata['returnFlag'] === false) $flag = false; + } } if($flag) { if($charset == 'UTF-8') return $obj; - foreach($obj as $key => $val) $obj->{$key} = iconv($charset,'UTF-8',$val); + foreach($obj as $key => $val) + { + if(!is_array($val)) $obj->{$key} = iconv($charset,'UTF-8',$val); + else Context::arrayConvWalkCallback($val,null,array($charset,'UTF-8')); + } + return $obj; } } return $obj; } + /** + * Convert array type variables into UTF-8 + * + * @param mixed $val + * @param string $key + * @param mixed $userdata charset1 charset2 useFlag retrunFlag + * @see arrayConvWalkCallback will replaced array_walk_recursive in >=PHP5 + * @return object converted object + */ + function arrayConvWalkCallback(&$val, $key = null, &$userdata) + { + if (is_array($val)) array_walk($val,'Context::arrayConvWalkCallback',&$userdata); + else + { + if(!$userdata['useFlag']) $val = iconv($userdata['charset1'],$userdata['charset2'],$val); + else + { + if(iconv($charset,$charset,$val)!=$val) $userdata['returnFlag'] = (bool)false; + } + } + } /** * Convert strings into UTF-8 @@ -810,6 +845,13 @@ class Context { elseif($this->getRequestMethod()=='POST'&&isset($_POST[$key])) $set_to_vars = true; else $set_to_vars = false; + if($set_to_vars) + { + $val = preg_replace('/<\?/i', '', $val); + $val = preg_replace('/<\%/i', '', $val); + $val = preg_replace('//ism', '', $val); + } + $this->set($key, $val, $set_to_vars); } } @@ -1090,7 +1132,9 @@ class Context { 'act.mid' =>$is_feed?"$mid/$act":'', 'act.mid.vid'=>$is_feed?"$vid/$mid/$act":'', 'act.document_srl.key' =>($act=='trackback')?"$srl/$key/$act":'', - 'act.document_srl.key.vid'=>($act=='trackback')?"$vid/$srl/$key/$act":'' + 'act.document_srl.key.mid'=>($act=='trackback')?"$mid/$srl/$key/$act":'', + 'act.document_srl.key.vid'=>($act=='trackback')?"$vid/$srl/$key/$act":'', + 'act.document_srl.key.mid.vid'=>($act=='trackback')?"$vid/$mid/$srl/$key/$act":'' ); $query = $target_map[$target]; @@ -1102,7 +1146,7 @@ class Context { if(is_array($val) && count($val)) { foreach($val as $k => $v) $queries[] = $key.'['.$k.']='.urlencode($v); } else { - $queries[] = $key.'='.urlencode($val); + $queries[] = $key.'='.@urlencode($val); } } if(count($queries)) $query = 'index.php?'.implode('&', $queries); diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index d339947a1..5960af780 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -407,6 +407,7 @@ */ function executeQuery($query_id, $args = NULL, $arg_columns = NULL) { static $cache_file = array(); + if(!$query_id) return new Object(-1, 'msg_invalid_queryid'); if(!$this->db_type) return; @@ -414,7 +415,7 @@ $this->query_id = $query_id; - if(!isset($cache_file[$query_id])) { + if(!isset($cache_file[$query_id]) || !file_exists($cache_file[$query_id])) { $id_args = explode('.', $query_id); if(count($id_args) == 2) { $target = 'modules'; diff --git a/classes/db/DBCubrid.class.php b/classes/db/DBCubrid.class.php index b0dca092c..8debbbcd3 100644 --- a/classes/db/DBCubrid.class.php +++ b/classes/db/DBCubrid.class.php @@ -455,7 +455,7 @@ if ($notnull) $query .= "not null "; - $this->_query ($query); + return $this->_query ($query); } /** diff --git a/classes/db/DBMssql.class.php b/classes/db/DBMssql.class.php index 5482406ee..1d1668f7c 100644 --- a/classes/db/DBMssql.class.php +++ b/classes/db/DBMssql.class.php @@ -310,7 +310,7 @@ if($default) $query .= sprintf(" default '%s' ", $default); if($notnull) $query .= " not null "; - $this->_query($query); + return $this->_query($query); } /** diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index c4f5a6477..4166db827 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -256,7 +256,7 @@ class DBMysql extends DB { if($default) $query .= sprintf(" default '%s' ", $default); if($notnull) $query .= " not null "; - $this->_query($query); + return $this->_query($query); } /** diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php index 04759a276..afe3c791b 100644 --- a/classes/file/FileHandler.class.php +++ b/classes/file/FileHandler.class.php @@ -370,6 +370,32 @@ class FileHandler { * @return string If success, the content of the target file. Otherwise: none **/ function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array()) { + if(version_compare(PHP_VERSION, '5.0.0', '>=')) + { + return include _XE_PATH_ . 'classes/file/getRemoteResourcePHP5.php'; + } + else + { + return FileHandler::_getRemoteResource($url, $boyd, $timeout, $mehtod, $conent_type, $headers, $cookies, $post_data); + } + } + + /** + * Return remote file's content via HTTP + * + * If the target is moved (when return code is 300~399), this function follows the location specified response header. + * + * @param string $url The address of the target file + * @param string $body HTTP request body + * @param int $timeout Connection timeout + * @param string $method GET/POST + * @param string $content_type Content type header of HTTP request + * @param string[] $headers Headers key vaule array. + * @param string[] $cookies Cookies key value array. + * @param string $post_data Request arguments array for POST method + * @return string If success, the content of the target file. Otherwise: none + **/ + function _getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array()) { requirePear(); require_once('HTTP/Request.php'); diff --git a/classes/file/getRemoteResourcePHP5.php b/classes/file/getRemoteResourcePHP5.php new file mode 100644 index 000000000..74e007b54 --- /dev/null +++ b/classes/file/getRemoteResourcePHP5.php @@ -0,0 +1,9 @@ +fileName = $pathInfo['basename']; $file->filePath = $this->_getAbsFileUrl($pathInfo['dirname']); + $file->fileRealPath = FileHandler::getRealPath($pathInfo['dirname']); $file->fileExtension = strtolower($pathInfo['extension']); + $file->fileNameNoExt = preg_replace("/\.{$file->fileExtension}$/", '', $file->fileName); + + // Remove .min + $file->fileNameNoExt = preg_replace("/\.min$/", '', $file->fileNameNoExt); + $file->fileName = $file->keyName = "{$file->fileNameNoExt}.{$file->fileExtension}"; + + // if no debug mode load minified file + if(!__DEBUG__) + { + $tmp = "{$file->fileNameNoExt}.min.{$file->fileExtension}"; + if(file_exists("{$file->fileRealPath}/{$tmp}")) + { + $file->fileName = $tmp; + $file->useMin = TRUE; + } + } + + if(!$file->useMin && !file_exists("{$file->fileRealPath}/{$file->fileName}")) + { + $file->fileName = "{$file->fileNameNoExt}.min.{$file->fileExtension}"; + } if (strpos($file->filePath, '://') == false) { @@ -121,7 +143,7 @@ if (!$file->media) $file->media = 'all'; $map = &$this->cssMap; $mapIndex = &$this->cssMapIndex; - $key = $file->filePath . $file->fileName . "\t" . $file->targetIe . "\t" . $file->media; + $key = $file->filePath . $file->keyName . "\t" . $file->targetIe . "\t" . $file->media; $this->_arrangeCssIndex($pathInfo['dirname'], $file); } @@ -138,11 +160,11 @@ $map = &$this->jsHeadMap; $mapIndex = &$this->jsHeadMapIndex; } - $key = $file->filePath . $file->fileName . "\t" . $file->targetIe; + $key = $file->filePath . $file->keyName . "\t" . $file->targetIe; } (is_null($file->index))?$file->index=0:$file->index=$file->index; - if (!isset($map[$file->index][$key]) || $mapIndex[$key] != $file->index) + if (!isset($map[$file->index][$key]) || $mapIndex[$key] > $file->index) { $this->unloadFile($args[0], $args[2], $args[1]); $map[$file->index][$key] = $file; diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 53499195c..531091b31 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -373,6 +373,20 @@ { $oModule = &$this->getModuleInstance($forward->module, $type, $kind); } + + if(!is_object($oModule)) { + $type = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; + $oMessageObject = &ModuleHandler::getModuleInstance('message',$type); + $oMessageObject->setError(-1); + $oMessageObject->setMessage('msg_module_is_not_exists'); + $oMessageObject->dispMessage(); + if($this->httpStatusCode) + { + $oMessageObject->setHttpStatusCode($this->httpStatusCode); + } + return $oMessageObject; + } + $xml_info = $oModuleModel->getModuleActionXml($forward->module); $oMemberModel = &getModel('member'); @@ -698,6 +712,7 @@ if(__DEBUG__==3) $start_time = getMicroTime(); + $parent_module = $module; $kind = strtolower($kind); $type = strtolower($type); @@ -714,10 +729,13 @@ // if there is no instance of the module in global variable, create a new one if(!isset($GLOBALS['_loaded_module'][$module][$type][$kind])) { - $parent_module = $module; + ModuleHandler::_getModuleFilePath($module, $type, $kind, $class_path, $high_class_file, $class_file, $instance_name); - $class_path = ModuleHandler::getModulePath($module); - if(!is_dir(FileHandler::getRealPath($class_path))) return NULL; + if($extend_module && (!is_readable($high_class_file) || !is_readable($class_file))) + { + $module = $parent_module; + ModuleHandler::_getModuleFilePath($module, $type, $kind, $class_path, $high_class_file, $class_file, $instance_name); + } // Get base class name and load the file contains it if(!class_exists($module)) { @@ -726,23 +744,6 @@ require_once($high_class_file); } - // Get the object's name - $types = explode(' ', 'view controller model api wap mobile class'); - if(!in_array($type, $types)) $type = $types[0]; - if($type == 'class') { - $instance_name = '%s'; - $class_file = '%s%s.%s.php'; - } elseif($kind == 'admin' && array_search($type, $types) < 3) { - $instance_name = '%sAdmin%s'; - $class_file = '%s%s.admin.%s.php'; - } else{ - $instance_name = '%s%s'; - $class_file = '%s%s.%s.php'; - } - $instance_name = sprintf($instance_name, $module, ucfirst($type)); - $class_file = sprintf($class_file, $class_path, $module, $type); - $class_file = FileHandler::getRealPath($class_file); - // Get the name of the class file if(!is_readable($class_file)) return NULL; @@ -779,6 +780,31 @@ return $GLOBALS['_loaded_module'][$module][$type][$kind]; } + function _getModuleFilePath($module, $type, $kind, &$classPath, &$highClassFile, &$classFile, &$instanceName) + { + $classPath = ModuleHandler::getModulePath($module); + + $highClassFile = sprintf('%s%s%s.class.php', _XE_PATH_,$classPath, $module); + $highClassFile = FileHandler::getRealPath($highClassFile); + + $types = explode(' ', 'view controller model api wap mobile class'); + if(!in_array($type, $types)) $type = $types[0]; + if($type == 'class') { + $instanceName = '%s'; + $classFile = '%s%s.%s.php'; + } elseif($kind == 'admin' && array_search($type, $types) < 3) { + $instanceName = '%sAdmin%s'; + $classFile = '%s%s.admin.%s.php'; + } else{ + $instanceName = '%s%s'; + $classFile = '%s%s.%s.php'; + } + + $instanceName = sprintf($instanceName, $module, ucfirst($type)); + $classFile = sprintf($classFile, $classPath, $module, $type); + $classFile = FileHandler::getRealPath($classFile); + } + /** * call a trigger * @param string $trigger_name trigger's name to call diff --git a/classes/security/EmbedFilter.class.php b/classes/security/EmbedFilter.class.php index f17fe198e..afc98d291 100644 --- a/classes/security/EmbedFilter.class.php +++ b/classes/security/EmbedFilter.class.php @@ -1,5 +1,5 @@ article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}"; -c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a"); -var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a, -b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d",d.insertBefore(c.lastChild,d.firstChild)}function i(){var a=l.elements;return typeof a=="string"?a.split(" "):a}function j(a){var b={},c=a.createElement,f=a.createDocumentFragment,g=f();a.createElement=function(a){l.shivMethods||c(a);var f;return b[a]?f=b[a].cloneNode():e.test(a)?f=(b[a]=c(a)).cloneNode():f=c(a),f.canHaveChildren&&!d.test(a)?g.appendChild(f):f},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/\w+/g,function(a){return b[a]=c(a),g.createElement(a),'c("'+a+'")'})+");return n}")(l,g)}function k(a){var b;return a.documentShived?a:(l.shivCSS&&!f&&(b=!!h(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),g||(b=!j(a)),b&&(a.documentShived=b),a)}function p(a){var b,c=a.getElementsByTagName("*"),d=c.length,e=RegExp("^(?:"+i().join("|")+")$","i"),f=[];while(d--)b=c[d],e.test(b.nodeName)&&f.push(b.applyElement(q(b)));return f}function q(a){var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(n+":"+a.nodeName);while(d--)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function r(a){var b,c=a.split("{"),d=c.length,e=RegExp("(^|[\\s,>+~])("+i().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),f="$1"+n+"\\:$2";while(d--)b=c[d]=c[d].split("}"),b[b.length-1]=b[b.length-1].replace(e,f),c[d]=b.join("}");return c.join("{")}function s(a){var b=a.length;while(b--)a[b].removeNode()}function t(a){var b,c,d=a.namespaces,e=a.parentWindow;return!o||a.printShived?a:(typeof d[n]=="undefined"&&d.add(n),e.attachEvent("onbeforeprint",function(){var d,e,f,g=a.styleSheets,i=[],j=g.length,k=Array(j);while(j--)k[j]=g[j];while(f=k.pop())if(!f.disabled&&m.test(f.media)){for(d=f.imports,j=0,e=d.length;j",f="hidden"in c,f&&typeof injectElementWithStyles=="function"&&injectElementWithStyles("#modernizr{}",function(b){b.hidden=!0,f=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).display=="none"}),g=c.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var l={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:k};a.html5=l,k(b);var m=/^$|\b(?:all|print)\b/,n="html5shiv",o=!g&&function(){var c=b.documentElement;return typeof b.namespaces!="undefined"&&typeof b.parentWindow!="undefined"&&typeof c.applyElement!="undefined"&&typeof c.removeNode!="undefined"&&typeof a.attachEvent!="undefined"}();l.type+=" print",l.shivPrint=t,t(b)})(this,document) \ No newline at end of file diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html index a18cf965f..e73a3baf2 100644 --- a/common/tpl/common_layout.html +++ b/common/tpl/common_layout.html @@ -47,6 +47,7 @@ var default_url = "{Context::getDefaultUrl()}"; var http_port = {Context::get("_http_port")}; var https_port = {Context::get("_https_port")}; var enforce_ssl = true; +xe.current_lang = "{$lang_type}"; //]]> diff --git a/config/func.inc.php b/config/func.inc.php index 67ff1c780..9ed4d7a2c 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -788,7 +788,7 @@ **/ $content = preg_replace_callback('@<(/?)([a-z]+[0-9]?)((?>"[^"]*"|\'[^\']*\'|[^>])*?\b(?:on[a-z]+|data|style|background|href|(?:dyn|low)?src)\s*=[\s\S]*?)(/?)($|>|<)@i', 'removeSrcHack', $content); - // xmp tag 확인 및 추가 + // xmp tag ?인 ?추? $content = checkXmpTag($content); return $content; } @@ -819,7 +819,7 @@ function removeSrcHack($match) { $tag = strtolower($match[2]); - // xmp tag 정리 + // xmp tag ?리 if($tag=='xmp') return "<{$match[1]}xmp>"; if($match[1]) return $match[0]; if($match[4]) $match[4] = ' '.$match[4]; diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php index f561dc106..d1520d933 100644 --- a/modules/admin/admin.admin.controller.php +++ b/modules/admin/admin.admin.controller.php @@ -292,6 +292,54 @@ return $this->setRedirectUrl(Context::get('error_return_url'), $output); } + /** + * Cleanning favorite + * @return Object + */ + function cleanFavorite() + { + $oModel = getAdminModel('admin'); + $output = $oModel->getFavoriteList(); + if(!$output->toBool()) + { + return $output; + } + + $favoriteList = $output->get('favoriteList'); + if(!$favoriteList) + { + return new Object(); + } + + $deleteTargets = array(); + foreach($favoriteList as $favorite) + { + if($favorite->type == 'module') + { + $modulePath = './modules/' . $favorite->module; + $modulePath = FileHandler::getRealPath($modulePath); + if(!is_dir($modulePath)) + { + $deleteTargets[] = $favorite->admin_favorite_srl; + } + } + } + + if(!count($deleteTargets)) + { + return new Object(); + } + + $args->admin_favorite_srls = $deleteTargets; + $output = executeQuery('admin.deleteFavorites', $args); + if(!$output->toBool()) + { + return $output; + } + + return new Object(); + } + /** * Enviroment gathering agreement * @return void diff --git a/modules/admin/lang/lang.xml b/modules/admin/lang/lang.xml index c51bc6f6f..d4c0f9198 100644 --- a/modules/admin/lang/lang.xml +++ b/modules/admin/lang/lang.xml @@ -697,16 +697,16 @@ - '항상 사용'은 모든 서비스에 SSL을 사용 합니다.]]> - 'Always' to use SSL for all services.]]> - - - 選擇開啟時,所有的服務都會使用 SSL功能。]]> - - - - - Chỉ chọn 'Luôn luôn' khi Website của bạn đang chạy trên Server có hỗ trợ https.]]> + '항상 사용'은 모든 서비스에 SSL을 사용 합니다.
SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]>
+ 'Always' to use SSL for all services.
SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]>
+ SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]> + SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]> + 選擇開啟時,所有的服務都會使用 SSL功能。
SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]>
+ SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]> + SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]> + SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]> + SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]> + Chỉ chọn 'Luôn luôn' khi Website của bạn đang chạy trên Server có hỗ trợ https.
SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]>
@@ -1461,4 +1461,4 @@ - + \ No newline at end of file diff --git a/modules/admin/queries/deleteFavorites.xml b/modules/admin/queries/deleteFavorites.xml new file mode 100644 index 000000000..ad57007fb --- /dev/null +++ b/modules/admin/queries/deleteFavorites.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/modules/admin/tpl/js/sitemap.min.js b/modules/admin/tpl/js/sitemap.min.js index c8a93e41f..16c3a971f 100644 --- a/modules/admin/tpl/js/sitemap.min.js +++ b/modules/admin/tpl/js/sitemap.min.js @@ -1,5 +1,5 @@ -jQuery(function(c){function o(a,c){for(var b=0,g=0;a&&a!=c;)b+=a.offsetTop,g+=a.offsetLeft,a=a.offsetParent;return{top:b,left:g}}var l=!1,k=c('
  • ');c("form.siteMap").delegate("li:not(.placeholder)",{"mousedown.st":function(a){var d,b,g,h,n,p,i,m,j;if(!(c(a.target).is("a,input,label,textarea")||1!=a.which)){l=!0;b=c(this);p=b.height();n=b.width();g=b.parentsUntil(".siteMap").filter("ul");h=g.eq(-1);h.css("position","relative");d=a.pageY;i=o(this,h.get(0));$clone=b.clone(!0).attr("target", -!0);for(a=g.length-1;a;a--)$clone=$clone.wrap("
    • ").parent().parent();m=[];h.find("li").each(function(){if(b[0]===this||b.has(this).length)return!0;var a=o(this,h.get(0));m.push({top:a.top,bottom:a.top+32,item:this})});$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:0.6,width:n,height:p,left:i.left,top:i.top,zIndex:100}).appendTo(h.eq(0));k.css({position:"absolute",opacity:0.6,width:n,height:"5px",left:i.left,top:i.top,zIndex:99}).appendTo(h.eq(0)); +jQuery(function(c){function p(a,c){for(var b=0,g=0;a&&a!=c;)b+=a.offsetTop,g+=a.offsetLeft,a=a.offsetParent;return{top:b,left:g}}var l=!1,k=c('
    • ');c("form.siteMap").delegate("li:not(.placeholder)",{"mousedown.st":function(a){var d,b,g,h,n,q,i,m,j;if(!(c(a.target).is("a,input,label,textarea")||1!=a.which)){l=!0;b=c(this);q=b.height();n=b.width();g=b.parentsUntil(".siteMap").filter("ul");h=g.eq(-1);h.css("position","relative");d=a.pageY;i=p(this,h.get(0));$clone=b.clone(!0).attr("target", +!0);for(a=g.length-1;a;a--)$clone=$clone.wrap("
      • ").parent().parent();m=[];h.find("li").each(function(){if(b[0]===this||b.has(this).length)return!0;var a=p(this,h.get(0));m.push({top:a.top,bottom:a.top+32,item:this})});$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:0.6,width:n,height:q,left:i.left,top:i.top,zIndex:100}).appendTo(h.eq(0));k.css({position:"absolute",opacity:0.6,width:n,height:"5px",left:i.left,top:i.top,zIndex:99}).appendTo(h.eq(0)); b.css("opacity",0.6);c(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f;j=null;a=i.top-(d-a.pageY);b=0;for(c=m.length;be.bottom&&(f=e.bottom),e.top<=f&&e.bottom>=f){b=e.item;3>=Math.abs(e.top-f)?(k.css({top:e.top-3,height:"5px"}),f="before"):3>=Math.abs(e.bottom-f)?(k.css({top:e.bottom-3,height:"5px"}),f="after"):(k.css({top:e.top+3,height:"27px"}),f="prepend");j={element:b,state:f};break}$clone.css({top:a})}).bind("mouseup.st", function(){var a,d;l=!1;c(document).unbind("mousemove.st mouseup.st");b.css("opacity","");$clone.remove();k.remove();d=c("
      • ").height(b.height());if(j){a=c(j.element);b.before(d);if("prepend"==j.state)a.find(">ul").length||a.find(">.side").after("
          "),a.find(">ul").prepend(b.hide());else a[j.state](b.hide());b.slideDown(100,function(){b.removeClass("active")});d.slideUp(100,function(){var a=d.parent();d.remove();a.children("li").length||a.remove()});b.trigger("dropped.st")}});return!1}},"mouseover.st":function(){l|| c(this).addClass("active");return!1},"mouseout.st":function(){l||c(this).removeClass("active");return!1}}).find("li").prepend('').append('').find("input:text").focus(function(){var a=c(this),d=a.prev("label"),b=a.parent();a.width(b.width()-(parseInt(b.css("text-indent"))||0)-a.next(".side").width()-60).css("opacity","");d.hide()}).blur(function(){var a=c(this),d=a.prev("label"),b=a.val();a.width(0).css("opacity", diff --git a/modules/autoinstall/autoinstall.admin.controller.php b/modules/autoinstall/autoinstall.admin.controller.php index 672deb1ba..15449d94f 100644 --- a/modules/autoinstall/autoinstall.admin.controller.php +++ b/modules/autoinstall/autoinstall.admin.controller.php @@ -70,6 +70,9 @@ $this->updateCategory($xmlDoc); $this->updatePackages($xmlDoc); $this->checkInstalled(); + + $oAdminController = &getAdminController('admin'); + $output = $oAdminController->cleanFavorite(); } /** diff --git a/modules/autoinstall/autoinstall.admin.view.php b/modules/autoinstall/autoinstall.admin.view.php index 43ed6da0a..ffaa03483 100644 --- a/modules/autoinstall/autoinstall.admin.view.php +++ b/modules/autoinstall/autoinstall.admin.view.php @@ -260,10 +260,23 @@ $res = array(); foreach($package_list as $package_srl => $package) { - $res[] = $item_list[$package_srl]; + if($item_list[$package_srl]) + { + $res[] = $item_list[$package_srl]; + } } Context::set('item_list', $res); } + + if(count($package_list) != count($res)) + { + $localPackageSrls = array_keys($package_list); + $remotePackageSrls = array_keys($item_list); + $targetPackageSrls = array_diff($localPackageSrls, $remotePackageSrls); + $countDiff = count($targetPackageSrls); + $output->page_navigation->total_count -= $countDiff; + } + Context::set('page_navigation', $output->page_navigation); $this->setTemplateFile('index'); diff --git a/modules/autoinstall/autoinstall.lib.php b/modules/autoinstall/autoinstall.lib.php index e143ad602..6b6aa00d3 100644 --- a/modules/autoinstall/autoinstall.lib.php +++ b/modules/autoinstall/autoinstall.lib.php @@ -150,11 +150,14 @@ $schema_dir = sprintf('%s/schemas/', $this->package->path); $schema_files = FileHandler::readDir($schema_dir); $oDB =& DB::getInstance(); - foreach($schema_files as $file) + if(is_array($schema_files)) { - $filename_arr = explode(".", $file); - $filename = array_shift($filename_arr); - $oDB->dropTable($filename); + foreach($schema_files as $file) + { + $filename_arr = explode(".", $file); + $filename = array_shift($filename_arr); + $oDB->dropTable($filename); + } } return new Object(); } @@ -399,22 +402,25 @@ if(!$output->toBool()) return $output; $target_dir = $this->ftp_info->ftp_root_path.$this->target_path; - foreach($file_list as $k => $file){ - $org_file = $file; - if($this->package->path == ".") - { - $file = substr($file,3); - } - $path = FileHandler::getRealPath("./".$this->target_path."/".$file); - $pathname = dirname($target_dir."/".$file); + if(is_array($file_list)) + { + foreach($file_list as $k => $file){ + $org_file = $file; + if($this->package->path == ".") + { + $file = substr($file,3); + } + $path = FileHandler::getRealPath("./".$this->target_path."/".$file); + $pathname = dirname($target_dir."/".$file); - if(!file_exists(FileHandler::getRealPath($real_path))) - { - ssh2_sftp_mkdir($this->sftp, $pathname, 0755, true); - } + if(!file_exists(FileHandler::getRealPath($real_path))) + { + ssh2_sftp_mkdir($this->sftp, $pathname, 0755, true); + } - ssh2_scp_send($this->connection, FileHandler::getRealPath($this->download_path."/".$org_file), $target_dir."/".$file); - } + ssh2_scp_send($this->connection, FileHandler::getRealPath($this->download_path."/".$org_file), $target_dir."/".$file); + } + } return new Object(); } } @@ -550,54 +556,57 @@ } $target_dir = $this->ftp_info->ftp_root_path.$this->target_path; - foreach($file_list as $k => $file){ - if(!$file) continue; - $org_file = $file; - if($this->package->path == ".") - { - $file = substr($file,3); - } - $path = FileHandler::getRealPath("./".$this->target_path."/".$file); - $path_list = explode('/', dirname($this->target_path."/".$file)); + if(is_array($file_list)) + { + foreach($file_list as $k => $file){ + if(!$file) continue; + $org_file = $file; + if($this->package->path == ".") + { + $file = substr($file,3); + } + $path = FileHandler::getRealPath("./".$this->target_path."/".$file); + $path_list = explode('/', dirname($this->target_path."/".$file)); - $real_path = "./"; - $ftp_path = $this->ftp_info->ftp_root_path; + $real_path = "./"; + $ftp_path = $this->ftp_info->ftp_root_path; - for($i=0;$iconnection, $ftp_path)) - { - return new Object(-1, "msg_make_directory_failed"); - } + for($i=0;$iconnection, $ftp_path)) + { + return new Object(-1, "msg_make_directory_failed"); + } - if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') - { - if (function_exists('ftp_chmod')) { - if(!ftp_chmod($this->connection, 0755, $ftp_path)) - { - return new Object(-1, "msg_permission_adjust_failed"); - } - } - else - { - if(!ftp_site($this->connection, "CHMOD 755 ".$ftp_path)) - { - return new Object(-1, "msg_permission_adjust_failed"); - } - } - } - } - } - if(!ftp_put($this->connection, $target_dir .'/'. $file, FileHandler::getRealPath($this->download_path."/".$org_file), FTP_BINARY)) - { - return new Object(-1, "msg_ftp_upload_failed"); + if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') + { + if (function_exists('ftp_chmod')) { + if(!ftp_chmod($this->connection, 0755, $ftp_path)) + { + return new Object(-1, "msg_permission_adjust_failed"); + } + } + else + { + if(!ftp_site($this->connection, "CHMOD 755 ".$ftp_path)) + { + return new Object(-1, "msg_permission_adjust_failed"); + } + } + } + } + } + if(!ftp_put($this->connection, $target_dir .'/'. $file, FileHandler::getRealPath($this->download_path."/".$org_file), FTP_BINARY)) + { + return new Object(-1, "msg_ftp_upload_failed"); + } } - } + } $this->_close(); return new Object(); } @@ -718,31 +727,34 @@ $oFtp =& $this->oFtp; $target_dir = $this->ftp_info->ftp_root_path.$this->target_path; - foreach($file_list as $k => $file){ - $org_file = $file; - if($this->package->path == ".") - { - $file = substr($file,3); - } - $path = FileHandler::getRealPath("./".$this->target_path."/".$file); - $path_list = explode('/', dirname($this->target_path."/".$file)); + if(is_array($file_list)) + { + foreach($file_list as $k => $file){ + $org_file = $file; + if($this->package->path == ".") + { + $file = substr($file,3); + } + $path = FileHandler::getRealPath("./".$this->target_path."/".$file); + $path_list = explode('/', dirname($this->target_path."/".$file)); - $real_path = "./"; - $ftp_path = $this->ftp_info->ftp_root_path; + $real_path = "./"; + $ftp_path = $this->ftp_info->ftp_root_path; - for($i=0;$iftp_mkdir($ftp_path); - $oFtp->ftp_site("CHMOD 755 ".$ftp_path); - } - } - $oFtp->ftp_put($target_dir .'/'. $file, FileHandler::getRealPath($this->download_path."/".$org_file)); - } + for($i=0;$iftp_mkdir($ftp_path); + $oFtp->ftp_site("CHMOD 755 ".$ftp_path); + } + } + $oFtp->ftp_put($target_dir .'/'. $file, FileHandler::getRealPath($this->download_path."/".$org_file)); + } + } $this->_close(); diff --git a/modules/autoinstall/tpl/list.html b/modules/autoinstall/tpl/list.html index 9943ac1c7..5a5eea016 100644 --- a/modules/autoinstall/tpl/list.html +++ b/modules/autoinstall/tpl/list.html @@ -1,6 +1,6 @@ -
          +
  • - + @@ -43,7 +44,7 @@ {@ $target_url = $original_site."?mid=download&package_srl=".$item->package_srl; } - +
    {$current_category} @@ -28,11 +28,12 @@ {$lang->order_download} | {$lang->order_popular} +
    {$lang->category}{$lang->thumbnail}{$lang->thumbnail} {$lang->name} {$lang->distribute_version} {$lang->current_version}
    {$item->category}

    {htmlspecialchars($item->title)}

    {cut_str(htmlspecialchars($item->package_description),200)}

    diff --git a/modules/communication/communication.admin.controller.php b/modules/communication/communication.admin.controller.php index c544a5e2b..e2abc5dff 100644 --- a/modules/communication/communication.admin.controller.php +++ b/modules/communication/communication.admin.controller.php @@ -19,12 +19,13 @@ **/ function procCommunicationAdminInsertConfig() { // get the default information - $args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin'); + $args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin','layout_srl'); if(!$args->skin) $args->skin = 'default'; if(!$args->colorset) $args->colorset = 'white'; if(!$args->editor_skin) $args->editor_skin = 'default'; if(!$args->mskin) $args->mskin = 'default'; + if(!$args->layout_srl) $args->layout_srl = null; // create the module module Controller object $oModuleController = &getController('module'); diff --git a/modules/communication/communication.admin.view.php b/modules/communication/communication.admin.view.php index 75720f418..b80decfa5 100644 --- a/modules/communication/communication.admin.view.php +++ b/modules/communication/communication.admin.view.php @@ -17,13 +17,17 @@ * configuration to manage messages and friends * @return void **/ - function dispCommunicationAdminConfig() { + function dispCommunicationAdminConfig() + { // Creating an object $oEditorModel = &getModel('editor'); $oModuleModel = &getModel('module'); + $oLayoutModel = &getModel('layout'); $oCommunicationModel = &getModel('communication'); // get the configurations of communication module Context::set('communication_config', $oCommunicationModel->getConfig() ); + // get a list of layout + Context::set('layout_list', $oLayoutModel->getLayoutList() ); // get a list of editor skins Context::set('editor_skin_list', $oEditorModel->getEditorSkinList() ); // get a list of communication skins @@ -33,6 +37,7 @@ $security = new Security(); $security->encodeHTML('communication_config..'); + $security->encodeHTML('layout_list..'); $security->encodeHTML('editor_skin_list..'); $security->encodeHTML('communication_skin_list..title'); $security->encodeHTML('communication_mobile_skin_list..title'); diff --git a/modules/communication/communication.controller.php b/modules/communication/communication.controller.php index d9352b386..3362ef2cd 100644 --- a/modules/communication/communication.controller.php +++ b/modules/communication/communication.controller.php @@ -290,15 +290,27 @@ * Move a group of the friend * @return void|Object (success : void, fail : Object) **/ - function procCommunicationMoveFriend() { + function procCommunicationMoveFriend() + { // Check login information - if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); + if(!Context::get('is_logged')) + { + return new Object(-1, 'msg_not_logged'); + } + $logged_info = Context::get('logged_info'); // Check variables - $friend_srl_list = trim(Context::get('friend_srl_list')); - if(!$friend_srl_list) return new Object(-1, 'msg_cart_is_null'); + $friend_srl_list = Context::get('friend_srl_list'); + if(!$friend_srl_list) + { + return new Object(-1, 'msg_cart_is_null'); + } + + if(!is_array($friend_srl_list)) + { + $friend_srl_list = explode('|@|', $friend_srl_list); + } - $friend_srl_list = explode('|@|', $friend_srl_list); if(!count($friend_srl_list)) return new Object(-1, 'msg_cart_is_null'); $friend_count = count($friend_srl_list); diff --git a/modules/communication/communication.view.php b/modules/communication/communication.view.php index 5f309b442..92cbeb236 100644 --- a/modules/communication/communication.view.php +++ b/modules/communication/communication.view.php @@ -26,6 +26,14 @@ $tpl_path = sprintf('%sskins/%s', $this->module_path, $skin); } $this->setTemplatePath($tpl_path); + + $oLayoutModel = &getModel('layout'); + $layout_info = $oLayoutModel->getLayout($this->communication_config->layout_srl); + if($layout_info) + { + $this->module_info->layout_srl = $this->communication_config->layout_srl; + $this->setLayoutPath($layout_info->path); + } } /** @@ -81,6 +89,7 @@ * @return void|Object (void : success, Object : fail) **/ function dispCommunicationNewMessage() { + $this->setLayoutPath('./common/tpl/'); $this->setLayoutFile('popup_layout'); // Error appears if not logged-in if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); @@ -108,6 +117,7 @@ * @return void|Object (void : success, Object : fail) **/ function dispCommunicationSendMessage() { + $this->setLayoutPath('./common/tpl/'); $this->setLayoutFile("popup_layout"); $oCommunicationModel = &getModel('communication'); $oMemberModel = &getModel('member'); @@ -201,6 +211,7 @@ * @return void|Object (void : success, Object : fail) **/ function dispCommunicationAddFriend() { + $this->setLayoutPath('./common/tpl/'); $this->setLayoutFile("popup_layout"); // error appears if not logged-in if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); @@ -226,6 +237,7 @@ * @return void|Object (void : success, Object : fail) **/ function dispCommunicationAddFriendGroup() { + $this->setLayoutPath('./common/tpl/'); $this->setLayoutFile("popup_layout"); // error apprears if not logged-in if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); diff --git a/modules/communication/tpl/index.html b/modules/communication/tpl/index.html index ae0174774..164195a28 100644 --- a/modules/communication/tpl/index.html +++ b/modules/communication/tpl/index.html @@ -10,6 +10,15 @@
    + + + +
    {$lang->layout} + +
    {$lang->editor_skin} diff --git a/modules/document/document.admin.controller.php b/modules/document/document.admin.controller.php index 9dc64989d..d53bd1e19 100644 --- a/modules/document/document.admin.controller.php +++ b/modules/document/document.admin.controller.php @@ -267,7 +267,7 @@ } // Write a post - $output = $oDocumentController->insertDocument($obj, true); + $output = $oDocumentController->insertDocument($obj, true, true); if(!$output->toBool()) { $oDB->rollback(); return $output; @@ -710,7 +710,7 @@ $oDB->begin(); //DB restore - $output = $oDocumentController->insertDocument($originObject, false, true); + $output = $oDocumentController->insertDocument($originObject, false, true, false); if(!$output->toBool()) return new Object(-1, $output->getMessage()); //FILE restore diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index c78109892..b96617588 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -174,7 +174,7 @@ class documentController extends document { * @param bool $isRestore * @return object */ - function insertDocument($obj, $manual_inserted = false, $isRestore = false) { + function insertDocument($obj, $manual_inserted = false, $isRestore = false, $isLatest = true) { // begin transaction $oDB = &DB::getInstance(); $oDB->begin(); @@ -185,7 +185,7 @@ class documentController extends document { if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N'; if($obj->homepage && !preg_match('/^[a-z]+:\/\//i',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage; if($obj->notify_message != 'Y') $obj->notify_message = 'N'; - if(!$isRestore) $obj->ipaddress = $_SERVER['REMOTE_ADDR']; //board에서 form key값으로 ipaddress를 사용하면 엄한 ip가 등록됨. 필터와는 상관없슴 + if(!$isRestore) $obj->ipaddress = $_SERVER['REMOTE_ADDR']; //board?서 form key값으?ipaddress??용?면 ?한 ip가 ?록?? ?터??????슴 // Serialize the $extra_vars, check the extra_vars type, because duplicate serialized avoid if(!is_string($obj->extra_vars)) $obj->extra_vars = serialize($obj->extra_vars); @@ -212,7 +212,7 @@ class documentController extends document { } // Set the read counts and update order. if(!$obj->readed_count) $obj->readed_count = 0; - if(!$isRestore) $obj->update_order = $obj->list_order = getNextSequence() * -1; + if($isLatest) $obj->update_order = $obj->list_order = getNextSequence() * -1; else $obj->update_order = $obj->list_order; // Check the status of password hash for manually inserting. Apply md5 hashing for otherwise. if($obj->password && !$obj->password_is_hashed) $obj->password = md5($obj->password); @@ -745,6 +745,8 @@ class documentController extends document { $cache_key = 'object_document_item:'.$document_srl; $oCacheHandler->delete($cache_key); } + + return TRUE; } /** @@ -1616,6 +1618,7 @@ class documentController extends document { $xml_buff = sprintf( 'init(); '. diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 453d60ab0..567873db9 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -509,7 +509,7 @@ if(!$this->document_srl) return; // Generate a key to prevent spams $oTrackbackModel = &getModel('trackback'); - return $oTrackbackModel->getTrackbackUrl($this->document_srl); + return $oTrackbackModel->getTrackbackUrl($this->document_srl, $this->getDocumentMid()); } /** diff --git a/modules/editor/skins/dreditor/editor.html b/modules/editor/skins/dreditor/editor.html index 25d93f4bc..3caf71b25 100644 --- a/modules/editor/skins/dreditor/editor.html +++ b/modules/editor/skins/dreditor/editor.html @@ -660,6 +660,7 @@ '; + $script = ''; Context::addHtmlHeader($script); } diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php index ea93624b9..328463612 100644 --- a/modules/layout/layout.model.php +++ b/modules/layout/layout.model.php @@ -232,7 +232,7 @@ $searched_count = count($searched_list); if(!$searched_count) return; - natcasesort($searched_list); + // natcasesort($searched_list); // Return information for looping searched list of layouts $list = array(); for($i=0;$i<$searched_count;$i++) { @@ -241,6 +241,11 @@ // Get information of the layout $layout_info = $this->getLayoutInfo($layout, null, $layout_type); + if(!$layout_info) + { + continue; + } + if ($withAutoinstallInfo) { // get easyinstall remove url @@ -259,9 +264,37 @@ } $list[] = $layout_info; } + + usort($list, array($this, 'sortLayoutByTitle')); return $list; } + /** + * Sort layout by title + */ + function sortLayoutByTitle($a, $b) + { + if(!$a->title) + { + $a->title = $a->layout; + } + + if(!$b->title) + { + $b->title = $b->layout; + } + + $aTitle = strtolower($a->title); + $bTitle = strtolower($b->title); + + if($aTitle == $bTitle) + { + return 0; + } + + return ($aTitle < $bTitle) ? -1 : 1; + } + /** * Get a count of layout * @param string $layoutType (P : PC, M : Mobile) @@ -327,6 +360,7 @@ // Read the xml file for module skin information if(!$xml_file) $xml_file = sprintf("%sconf/info.xml", $layout_path); if(!file_exists($xml_file)) { + $layout_info->title = $layout; $layout_info->layout = $layout; $layout_info->path = $layout_path; $layout_info->layout_title = $layout_title; @@ -343,6 +377,7 @@ if(file_exists($cache_file)&&filemtime($cache_file)>filemtime($xml_file)) { @include($cache_file); + if($layout_info->extra_var && $vars) { foreach($vars as $key => $value) { if(!$layout_info->extra_var->{$key} && !$layout_info->{$key}) { @@ -350,6 +385,12 @@ } } } + + if(!$layout_info->title) + { + $layout_info->title = $layout; + } + return $layout_info; } // If no cache file exists, parse the xml and then return the variable. @@ -579,6 +620,12 @@ $buff = ''; FileHandler::writeFile($cache_file, $buff); if(file_exists($cache_file)) @include($cache_file); + + if(!$layout_info->title) + { + $layout_info->title = $layout; + } + return $layout_info; } diff --git a/modules/layout/layout.view.php b/modules/layout/layout.view.php index d6bb27482..7c16fcc44 100644 --- a/modules/layout/layout.view.php +++ b/modules/layout/layout.view.php @@ -146,9 +146,6 @@ $layout_srl = Context::get('layout_srl'); $code = Context::get('code'); - $code = preg_replace('/<\?.*(\?>)?/Usm', '', $code); - $code = preg_replace('/.*<\/script>/Usm', '', $code); - $code_css = Context::get('code_css'); if(!$layout_srl || !$code) return new Object(-1, 'msg_invalid_request'); // Get the layout information diff --git a/modules/layout/tpl/layout_modify.html b/modules/layout/tpl/layout_modify.html index 163c348ce..8e1c4ebbe 100644 --- a/modules/layout/tpl/layout_modify.html +++ b/modules/layout/tpl/layout_modify.html @@ -96,6 +96,12 @@ + + + + + + diff --git a/modules/member/lang/lang.xml b/modules/member/lang/lang.xml index 90d5c70ca..1c3807cfa 100644 --- a/modules/member/lang/lang.xml +++ b/modules/member/lang/lang.xml @@ -901,7 +901,7 @@ - + @@ -1580,6 +1580,7 @@ + diff --git a/modules/member/m.skins/default/css/member.css b/modules/member/m.skins/default/css/member.css new file mode 100644 index 000000000..a3f91da0a --- /dev/null +++ b/modules/member/m.skins/default/css/member.css @@ -0,0 +1,43 @@ +@charset "utf-8"; +/* Element Reset */ +.xm, +.xm table, +.xm input, +.xm textarea, +.xm select, +.xm button{font-family:Tahoma,Geneva,sans-serif;font-size:12px;color:#333} +.xm button, +.xm input[type=submit], +.xm input[type=reset], +.xm input[type=button]{cursor:pointer;overflow:visible} +.xm img{border:0} +.xm p{line-height:1.5} +/* Heading */ +.xm .h1, +.xm .h2, +.xm .h3, +.xm .h4{position:relative;zoom:1} +.xm .h1{font-size:24px} +.xm .h2{font-size:20px} +.xm .h3{font-size:16px} +.xm .h4{font-size:12px} +/* Table */ +.xm .table{margin:1em 0} +.xm .table table{width:100%;border:0;border-collapse:collapse;border-top:2px solid #ccc} +.xm .table caption{font-weight:bold;text-align:left;line-height:22px;padding:5px 0} +.xm .table caption:after{content:"";display:block;clear:both} +.xm .table caption a{font-weight:normal} +.xm .table caption em{float:right;margin-left:1em} +.xm .table caption strong{color:#e00} +.xm .table caption .side{float:right;font-weight:normal;margin-left:1em} +.xm .table th, +.xm .table td{border:0;padding:8px;vertical-align:top;text-align:left;border-bottom:1px solid #ddd;white-space:nowrap} +.xm .table th{background:#f8f8f8} +.xm .table thead th{border-bottom:1px solid #999} +.xm .table tfoot td{font-weight:bold;background:#f8f8f8} +.xm .table.even tbody tr:nth-of-type(even) td{background-color:#fafafa} +.xm .table td>input[type=text]{margin:-1px 0 -3px 0 !important;vertical-align:middle} +.xm .table img{vertical-align:middle} +.xm .table em{font-style:normal;font-weight:normal;color:#e00} +.xm .table .title, +.xm .table .text{white-space:normal} diff --git a/modules/member/m.skins/default/css/mlogin.css b/modules/member/m.skins/default/css/mlogin.css new file mode 100644 index 000000000..69cc0934e --- /dev/null +++ b/modules/member/m.skins/default/css/mlogin.css @@ -0,0 +1,48 @@ +/* Mobile XE Login (/modules/member/tpl/login_form.html) */ +body{margin:0;background:#fff;color:#000;word-wrap:break-word} +body,input,textarea,select,button,table{font-family:Tahoma,Geneva,sans-serif} +img{border:0} +em{font-style:normal} +form{margin:0;padding:0} +fieldset{margin:0;padding:0;border:0} +textarea{resize:vertical} +input[type=checkbox], +input[type=radio]{width:13px;height:13px;margin:0;padding:0} +/* Common */ +.fl{float:left} +.fr{float:right} +/* Body */ +.bd{background:#f8f8f8;padding:1px 0;border-bottom:1px solid #ccc8be} +.bd:after{content:"";margin:0;position:relative;top:3px;display:block;clear:both;height:1px;background:#fff} +/* Hx */ +.hx{position:relative;border-bottom:1px solid #ccc8be;padding:8px 10px;margin:0} +.hx:after{content:"";margin:0 -10px;position:relative;top:10px;display:block;clear:both;height:1px;background:#fff} +.hx.h2{background:#e5e5e5} +.hx h2{margin:0 10px 0 0;display:inline} +.hx h2{font-size:16px;line-height:1.4} +/* Form Field */ +.ff{margin:0;padding:10px 0} +.ff ul{margin:0 10px 10px 10px;padding:10px 0 0 0;list-style:none} +.ff li{margin:0 0 5px 0;padding:0} +.ff label+input[type=text], +.ff label+input[type=password], +.ff label+textarea, +.ff label+select{display:block;width:96%;font-size:14px;margin:0 0 5px 0} +.ff label+input[type=text], +.ff label+input[type=password], +.ff label+textarea{padding:5px} +/* Help */ +.hp{background:#eee;border-top:1px solid #ddd;padding:12px 10px !important;margin:10px 0px !important;} +.hp li{margin:0;display:inline;border-left:1px solid #ccc;padding:0 4px 0 8px;} +.hp li:first-child{border:0;} +.hp a{color:#333;text-decoration:none} +/* Button Area */ +.bna{text-align:center;padding:0 10px;margin:10px 0} +.bna:after{content:"";display:block;clear:both} +.bn{display:inline-block;line-height:26px !important;padding:0 10px;font-size:12px;font-weight:bold;border:1px solid;text-decoration:none;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;cursor:pointer;vertical-align:middle} +.bn[type=submit], +.bn[type=button]{height:28px} +.bn[href]{height:26px} +.bn.dark{border-color:#666;background:#777 -webkit-gradient(linear,0% 0%,0% 100%,from(#7e7c78),to(#5c5b58));background:#777 -moz-linear-gradient(top,#7e7c78,#5c5b58);background-color:#777;color:#fff;box-shadow:0 0 1px #fff inset;-moz-box-shadow:0 0 1px #fff inset;-webkit-box-shadow:0 0 1px #fff inset} +.bn.white{border-color:#b5b5b5;background:#1b1b1b -webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#f6f6f6),color-stop(0.5,#f0f0f0),color-stop(0.5,#e4e4e4));background:#1b1b1b -moz-linear-gradient(top,#fff,#e4e4e4);background-color:#fff;color:#000} +.message{border:1px solid #ddd;background:#f8f8f8;margin:1em 0;padding:0 1em;border-radius:5px;line-height:1.4;font-size:12px}.message p{margin:1em 0!important}.message em{font-style:normal;color:#e00}.message.info,.message.error,.message.update{padding-left:55px}.message.info{border-color:#e0e8ec;background:#edf9ff url(../../../../../common/img/msg.Info.png) no-repeat 1em .5em}.message.error{border-color:#efdcdc;background:#ffecec url(../../../../../../common/img/msg.error.png) no-repeat 1em .5em}.message.update{border-color:#eae9dc;background:#fffdef url(../../../../../common/img/msg.update.png) no-repeat 1em .5em} diff --git a/modules/member/m.skins/default/css/msignup.css b/modules/member/m.skins/default/css/msignup.css new file mode 100644 index 000000000..0f417c65d --- /dev/null +++ b/modules/member/m.skins/default/css/msignup.css @@ -0,0 +1,60 @@ +@charset "utf-8"; +/* Mobile XE (/modules/member/tpl/signup_form.html) */ +body{margin:0;background:#fff;color:#000;word-wrap:break-word} +body,input,textarea,select,button,table{font-family:Tahoma,Geneva,sans-serif} +img{border:0} +em{font-style:normal} +form{margin:0;padding:0} +fieldset{margin:0;padding:0;border:0} +textarea{resize:vertical} +input[type=checkbox], +input[type=radio]{width:13px;height:13px;margin:0;padding:0} +/* Body */ +.bd{background:#f8f8f8;padding:1px 0} +/* Hx */ +.hx{position:relative;border-bottom:1px solid #ccc8be;padding:8px 10px;margin:0} +.hx:after{content:"";margin:0 -10px;position:relative;top:10px;display:block;clear:both;height:1px;background:#fff} +.hx.h2{background:#e5e5e5;text-shadow:1px 1px 0 #fff} +.hx.h2 em{font-size:12px;color:#6352d2} +.hx.h3{background:#868686;color:#fff} +.hx.h3 em{font-size:12px} +.hx h2, .hx h3{margin:0 10px 0 0;display:inline} +.hx h2{font-size:16px;line-height:1.4} +.hx h3{font-size:14px} +.hx a{color:#000} +.hx .ex{font-size:12px} +.hx .tg{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;padding:0;overflow:visible;border:0;cursor:pointer;opacity:0;background:none} +.hx .ca{font-size:12px;text-decoration:underline;color:#333} +.hx .ca:after{content:"";display:inline-block;position:relative;left:4px;width:0;height:0;border:4px solid;border-color:transparent;border-left-color:#8d7de1;margin:0 -8px 0 0} +.hx .write{position:absolute;top:8px;right:10px;background-position:0 0;display:inline-block;width:28px;height:27px;font-size:0;overflow:hidden;text-indent:28px} +/* Form Field */ +.ff{margin:0;padding:10px 0} +.ff ul{margin:0 10px 10px 10px;padding:10px 0 0 0;list-style:none} +.ff li{margin:0 0 5px 0;padding:0} +.ff li p{color:#666} +.ff li>label:first-child{display:block;font-weight:bold} +.ff label+input[type=text], +.ff label+input[type=password], +.ff label+textarea, +.ff label+select, +.ff label+select+input[type=text], +.ff .inputText{display:block;width:96%;font-size:14px;margin:0 0 5px 0} +.ff label+input[type=text], +.ff label+input[type=password], +.ff label+textarea, +.ff label+select+input[type=text], +.ff .inputText, +.ff .tel input[type=text]{padding:5px} +.ff .krZip input[type=text]{width:77%;font-size:14px;margin:0 0 5px 0;padding:5px} +/* Button Area */ +.bna{text-align:center;padding:0 10px;margin:10px 0} +.bna:after{content:"";display:block;clear:both} +.bn{display:inline-block;line-height:26px !important;padding:0 10px;font-size:12px;font-weight:bold;border:1px solid;text-decoration:none;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;cursor:pointer;vertical-align:middle} +.bn[type=submit], +.bn[type=button]{height:28px} +.bn[href]{height:26px} +.bn.dark{border-color:#666;background:#777 -webkit-gradient(linear,0% 0%,0% 100%,from(#7e7c78),to(#5c5b58));background:#777 -moz-linear-gradient(top,#7e7c78,#5c5b58);background-color:#777;color:#fff;box-shadow:0 0 1px #fff inset;-moz-box-shadow:0 0 1px #fff inset;-webkit-box-shadow:0 0 1px #fff inset} +.bn.white{border-color:#b5b5b5;background:#1b1b1b -webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#f6f6f6),color-stop(0.5,#f0f0f0),color-stop(0.5,#e4e4e4));background:#1b1b1b -moz-linear-gradient(top,#fff,#e4e4e4);background-color:#fff;color:#000} +.message{border:1px solid #ddd;background:#f8f8f8;margin:1em 0;padding:0 1em;border-radius:5px;line-height:1.4;font-size:12px}.message p{margin:1em 0!important}.message em{font-style:normal;color:#e00}.message.info,.message.error,.message.update{padding-left:55px}.message.info{border-color:#e0e8ec;background:#edf9ff url(../../../../common/img/msg.Info.png) no-repeat 1em .5em}.message.error{border-color:#efdcdc;background:#ffecec url(../../../../common/img/msg.error.png) no-repeat 1em .5em}.message.update{border-color:#eae9dc;background:#fffdef url(../../../../common/img/msg.update.png) no-repeat 1em .5em} +.agreement .text{height:200px;overflow-y:auto;} +.bn a{text-decoration:none;} diff --git a/modules/member/tpl/find_member_account.html b/modules/member/m.skins/default/find_member_account.html similarity index 91% rename from modules/member/tpl/find_member_account.html rename to modules/member/m.skins/default/find_member_account.html index 4268b11ca..8150c436c 100644 --- a/modules/member/tpl/find_member_account.html +++ b/modules/member/m.skins/default/find_member_account.html @@ -1,5 +1,5 @@ - - + +

    {$XE_VALIDATOR_MESSAGE}

    diff --git a/modules/member/tpl/find_temp_password.html b/modules/member/m.skins/default/find_temp_password.html similarity index 100% rename from modules/member/tpl/find_temp_password.html rename to modules/member/m.skins/default/find_temp_password.html diff --git a/modules/member/m.skins/default/leave_form.html b/modules/member/m.skins/default/leave_form.html new file mode 100644 index 000000000..d4e6c4e75 --- /dev/null +++ b/modules/member/m.skins/default/leave_form.html @@ -0,0 +1,27 @@ + + + +

    {$member_title = $lang->msg_leave_member}

    +
    +

    {$XE_VALIDATOR_MESSAGE}

    +
    +
    + + + + + +
      +
    • + +

      {$formValue}

      +
    • +
    • + + +
    • +
    +
    + +
    +
    diff --git a/modules/member/m.skins/default/login_form.html b/modules/member/m.skins/default/login_form.html new file mode 100644 index 000000000..735500a86 --- /dev/null +++ b/modules/member/m.skins/default/login_form.html @@ -0,0 +1,44 @@ + + +
    +
    +

    {$XE_VALIDATOR_MESSAGE}

    +
    +
    +

    {$lang->cmd_login}

    +
    +
    + + + +
      +
    • +
    • +
    + +
    +
    +
    +
    + +
    +
    + + diff --git a/modules/member/m.skins/default/member_info.html b/modules/member/m.skins/default/member_info.html new file mode 100644 index 000000000..6ca6d58fd --- /dev/null +++ b/modules/member/m.skins/default/member_info.html @@ -0,0 +1,32 @@ + +
    +

    {$lang->member_info}

    +
    + + + + + + + + + + + + + + + + + + + +
    {$item->title} *{$item->value}
    {$lang->member_group}{implode(', ', $memberInfo['group_list'])}
    {$lang->signup_date}{zdate($memberInfo[regdate],"Y-m-d")}
    {$lang->last_login}{zdate($memberInfo[last_login],"Y-m-d")}
    +
    + +
    diff --git a/modules/member/m.skins/default/modify_email_address.html b/modules/member/m.skins/default/modify_email_address.html new file mode 100644 index 000000000..09e963dbc --- /dev/null +++ b/modules/member/m.skins/default/modify_email_address.html @@ -0,0 +1,22 @@ + + + +
    +

    {$XE_VALIDATOR_MESSAGE}

    +
    +
    + + + +

    {$lang->cmd_modify_member_email_address}

    +

    {$lang->about_modify_member_email_address}

    +
      +
    • + + +
    • +
    +
    + +
    +
    diff --git a/modules/member/m.skins/default/modify_info.html b/modules/member/m.skins/default/modify_info.html new file mode 100644 index 000000000..e7af7e97c --- /dev/null +++ b/modules/member/m.skins/default/modify_info.html @@ -0,0 +1,48 @@ +{@ Context::loadFile(array("./common/js/jquery.js", 'head', '', -100000), true) } +{@ Context::loadFile(array("./common/js/js_app.js", 'head', '', -100000), true) } +{@ Context::loadFile(array("./common/js/common.js", 'head', '', -100000), true) } +{@ Context::loadFile(array("./common/js/xml_handler.js", 'head', '', -100000), true) } +{@ Context::loadFile(array("./common/js/xml_js_filter.js", 'head', '', -100000), true) } + + + + + + +
    +

    {$XE_VALIDATOR_MESSAGE}

    +
    +
    +

    {$lang->msg_update_member}

    +
    + + + + + +
    +
      +
    • + + + +
    • +
    • + +
      {$formTag->inputTag}
      + + +
    • +
    • allow_mailing!='N')-->checked="checked" />

      {$lang->about_allow_mailing}

    • +
    +
    + +
    +
    diff --git a/modules/member/m.skins/default/modify_password.html b/modules/member/m.skins/default/modify_password.html new file mode 100644 index 000000000..c460adf45 --- /dev/null +++ b/modules/member/m.skins/default/modify_password.html @@ -0,0 +1,32 @@ + + + +

    {$member_title = $lang->cmd_modify_member_password}

    +
    + + + + + +
      +
    • + + +
    • +
    • + + +
    • +
    • + + {$lang->about_password} +
    • +
    • + + +
    • +
    +
    + +
    +
    diff --git a/modules/member/m.skins/default/rechecked_password.html b/modules/member/m.skins/default/rechecked_password.html new file mode 100644 index 000000000..218d8a53d --- /dev/null +++ b/modules/member/m.skins/default/rechecked_password.html @@ -0,0 +1,24 @@ + +

    {$lang->msg_rechecked_password}

    +
    +

    {$XE_VALIDATOR_MESSAGE}

    +
    +
    + + +
      +
    • + +

      {$identifierValue}

      +
    • +
    • + + +

      {$lang->about_rechecked_password}

      +
    • +
    + +
    diff --git a/modules/member/m.skins/default/signup_form.html b/modules/member/m.skins/default/signup_form.html new file mode 100644 index 000000000..0f43d777c --- /dev/null +++ b/modules/member/m.skins/default/signup_form.html @@ -0,0 +1,60 @@ + + + + +
    +
    +

    {$lang->cmd_signup}

    +
    +
    +

    {$XE_VALIDATOR_MESSAGE}

    +
    +
    + + + +
    +
    + {$member_config->agreement} +
    +
    + + +
    +
    + +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + +
      {$formTag->inputTag}
      + +
    • +
    • + + + +
    • +
    • + + + + +
    • +
    +
    + +
    +
    +
    diff --git a/modules/member/m.skins/default/skin.xml b/modules/member/m.skins/default/skin.xml new file mode 100644 index 000000000..5f0acf38e --- /dev/null +++ b/modules/member/m.skins/default/skin.xml @@ -0,0 +1,19 @@ + + + 회원 기본 모바일 스킨 + XE Basic Member Mobile Skin + + XE 기본 모바일 스킨 입니다. + NHN (developers@xpressengine.com) + + 0.1 + 2012-09-21 + + + NHN + NHN + NHN + NHN + + + diff --git a/modules/member/member.admin.controller.php b/modules/member/member.admin.controller.php index 1685efb99..45dee679c 100644 --- a/modules/member/member.admin.controller.php +++ b/modules/member/member.admin.controller.php @@ -26,7 +26,7 @@ $config = $oMemberModel->getMemberConfig (); $getVars = array(); if ($config->signupForm){ - foreach($config->signupForm as $formInfo){ + foreach($config->signupForm as $formInfo) { if($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired)){ $getVars[] = $formInfo->name; } @@ -146,6 +146,7 @@ 'layout_srl', 'skin', 'colorset', + 'mskin', 'profile_image', 'profile_image_max_width', 'profile_image_max_height', 'image_name', 'image_name_max_width', 'image_name_max_height', 'image_mark', 'image_mark_max_width', 'image_mark_max_height', @@ -178,14 +179,17 @@ if(!trim(strip_tags($args->after_logout_url))) $args->after_logout_url = null; if(!trim(strip_tags($args->redirect_url))) $args->redirect_url = null; - if(!$args->skin) $args->skin = "default"; - if(!$args->colorset) $args->colorset = "white"; + if(!$args->skin) $args->skin = 'default'; + if(!$args->colorset) $args->colorset = 'white'; + + if(!$args->mskin) $args->mskin = 'default'; $args->profile_image = $args->profile_image?'Y':'N'; $args->image_name = $args->image_name?'Y':'N'; $args->image_mark = $args->image_mark?'Y':'N'; if($args->signature!='Y') $args->signature = 'N'; $args->identifier = $all_args->identifier; + $args->layout_srl = $args->layout_srl ? $args->layout_srl : null; // set default $all_args->is_nick_name_public = 'Y'; diff --git a/modules/member/member.admin.view.php b/modules/member/member.admin.view.php index 52bd731d9..e03f7d784 100644 --- a/modules/member/member.admin.view.php +++ b/modules/member/member.admin.view.php @@ -119,6 +119,10 @@ $skin_list = $oModuleModel->getSkins($this->module_path); Context::set('skin_list', $skin_list); + // list of skins for member module + $mskin_list = $oModuleModel->getSkins($this->module_path, 'm.skins'); + Context::set('mskin_list', $mskin_list); + // retrieve skins of editor $oEditorModel = &getModel('editor'); Context::set('editor_skin_list', $oEditorModel->getEditorSkinList()); @@ -274,6 +278,7 @@ if($formInfo->isDefaultForm){ if($formInfo->imageType){ + $formTag->type = 'image'; if($formInfo->name == 'profile_image'){ $target = $memberInfo['profile_image']; $functionName = 'doDeleteProfileImage'; @@ -305,11 +310,13 @@ ,$member_config->{$formInfo->name.'_max_height'}); }//end imageType elseif($formInfo->name == 'birthday'){ + $formTag->type = 'date'; $inputTag = sprintf(' ' ,$memberInfo['birthday'] ,zdate($memberInfo['birthday'], 'Y-m-d', false) ,$lang->cmd_delete); }elseif($formInfo->name == 'find_account_question'){ + $formTag->type = 'select'; $inputTag = ''; $optionTag = array(); foreach($lang->find_account_question_items as $key=>$val){ @@ -323,6 +330,7 @@ $inputTag = sprintf($inputTag, implode('', $optionTag)); $inputTag .= ''; }else{ + $formTag->type = 'text'; $inputTag = sprintf('' ,$formInfo->name ,$memberInfo[$formInfo->name]); @@ -334,6 +342,7 @@ 'value' => $extendForm->value); $extentionReplace = array(); + $formTag->type = $extendForm->column_type; if($extendForm->column_type == 'text' || $extendForm->column_type == 'homepage' || $extendForm->column_type == 'email_address'){ $template = ''; }elseif($extendForm->column_type == 'tel'){ diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 355a4bf93..364c04ec9 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -388,7 +388,7 @@ $memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); $this->memberInfo->password = $memberInfo->password; } - // Verify the cuttent password + // Verify the current password if(!$oMemberModel->isValidPassword($this->memberInfo->password, $password)) { return new Object(-1, 'invalid_password'); @@ -396,7 +396,7 @@ $_SESSION['rechecked_password_step'] = 'VALIDATE_PASSWORD'; - $redirectUrl = getUrl('', 'act', 'dispMemberModifyInfo'); + $redirectUrl = getNotEncodedUrl('', 'act', 'dispMemberModifyInfo'); $this->setRedirectUrl($redirectUrl); } @@ -2047,6 +2047,10 @@ **/ function destroySessionInfo() { if(!$_SESSION || !is_array($_SESSION)) return; + + $memberInfo = Context::get('logged_info'); + $memberSrl = $memberInfo->member_srl; + foreach($_SESSION as $key => $val) { $_SESSION[$key] = ''; } @@ -2054,10 +2058,11 @@ setcookie(session_name(), '', time()-42000, '/'); setcookie('sso','',time()-42000, '/'); - if($_COOKIE['xeak']) { - $args->autologin_key = $_COOKIE['xeak']; - executeQuery('member.deleteAutologin', $args); - } + if($memberSrl) + { + $args->member_srl = $memberSrl; + $output = executeQuery('member.deleteAutologin', $args); + } } function _updatePointByGroup($memberSrl, $groupSrlList) diff --git a/modules/member/member.mobile.php b/modules/member/member.mobile.php index dfaedab05..cd3bb9e0c 100644 --- a/modules/member/member.mobile.php +++ b/modules/member/member.mobile.php @@ -1,223 +1,66 @@ member_config = $oModuleModel->getModuleConfig('member'); + function init() + { + // Get the member configuration + $oMemberModel = &getModel('member'); + $this->member_config = $oMemberModel->getMemberConfig(); + Context::set('member_config', $this->member_config); + + $mskin = $this->member_config->mskin; + // Set the template path + if(!$mskin) + { + $mskin = 'default'; + $template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin); + } + else + { + $template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin); + } // if member_srl exists, set memberInfo $member_srl = Context::get('member_srl'); - if($member_srl) { + if($member_srl) + { $oMemberModel = &getModel('member'); $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl); - if(!$this->memberInfo) Context::set('member_srl',''); - else Context::set('member_info',$this->memberInfo); + if(!$this->memberInfo) + { + Context::set('member_srl',''); + } + else + { + Context::set('member_info',$this->memberInfo); + } } - - Context::set('member_config', $this->member_config); - $this->setTemplatePath($this->module_path.'tpl'); - } + $this->setTemplatePath($template_path); - function dispMemberLoginForm() { - if(Context::get('is_logged')) { - Context::set('redirect_url', getUrl('act','')); - $this->setTemplatePath($this->module_path.'tpl'); - $this->setTemplateFile('redirect.html'); - return; - } - - // get member module configuration. - $oMemberModel = &getModel('member'); - $config = $oMemberModel->getMemberConfig(); - Context::set('identifier', $config->identifier); - - // Set a template file - Context::set('referer_url', htmlspecialchars($_SERVER['HTTP_REFERER'])); - $this->setTemplateFile('login_form'); - } - - function dispMemberSignUpForm(){ - $oMemberModel = &getModel('member'); - - if($oMemberModel->isLogged()) return $this->stop('msg_already_logged'); - - $trigger_output = ModuleHandler::triggerCall('member.dispMemberSignUpForm', 'before', $this->member_config); - if(!$trigger_output->toBool()) return $trigger_output; - - if ($this->member_config->enable_join != 'Y') return $this->stop('msg_signup_disabled'); - $oMemberAdminView = &getAdminView('member'); - $formTags = $oMemberAdminView->_getMemberInputTag($member_info); - Context::set('formTags', $formTags); - - $member_config = $oMemberModel->getMemberConfig(); - Context::set('member_config', $member_config); - - global $lang; - $identifierForm->title = $lang->{$member_config->identifier}; - $identifierForm->name = $member_config->identifier; - $identifierForm->value = $member_info->{$member_config->identifier}; - Context::set('identifierForm', $identifierForm); - // Set a template file - $this->setTemplateFile('signup_form'); - } - - function dispMemberInfo() { - $oMemberModel = &getModel('member'); - $logged_info = Context::get('logged_info'); - - // Don't display member info to non-logged user - if(!$logged_info->member_srl) return $this->stop('msg_not_permitted'); - $member_srl = Context::get('member_srl'); - if(!$member_srl && Context::get('is_logged')) { - $member_srl = $logged_info->member_srl; - } elseif(!$member_srl) { - return $this->dispMemberSignUpForm(); - } - - $site_module_info = Context::get('site_module_info'); - if(!$this->memberInfo) + $oLayoutModel = &getModel('layout'); + $layout_info = $oLayoutModel->getLayout($this->member_config->mlayout_srl); + if($layout_info) { - $columnList = array('user_name', 'nick_name', 'homepage', 'blog', 'birthday', 'regdate', 'last_login'); - $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl, $site_module_info->site_srl, $columnList); + $this->setLayoutPath($layout_info->path); } - unset($this->memberInfo->password); - unset($this->memberInfo->email_id); - unset($this->memberInfo->email_host); - unset($this->memberInfo->email_address); - - if(!$this->memberInfo->member_srl) return $this->dispMemberSignUpForm(); - - Context::set('member_info', $this->memberInfo); - Context::set('extend_form_list', $oMemberModel->getCombineJoinForm($this->memberInfo)); - $this->setTemplateFile('member_info_mobile'); - } + } - /** - * @brief Find user ID and password - **/ - function dispMemberFindAccount() { - if(Context::get('is_logged')) return $this->stop('already_logged'); - - $oMemberModel = &getModel('member'); - $config = $oMemberModel->getMemberConfig(); - Context::set('identifier', $config->identifier); - - $this->setTemplateFile('find_member_account'); + function dispMemberModifyInfo() + { + parent::dispMemberModifyInfo(); + + if($this->member_info) + { + Context::set('oMemberInfo', get_object_vars($this->member_info)); } - - /** - * @brief Generate a temporary password - **/ - function dispMemberGetTempPassword() { - if(Context::get('is_logged')) return $this->stop('already_logged'); - - $oMemberModel = &getModel('member'); - $config = $oMemberModel->getMemberConfig(); - Context::set('identifier', $config->identifier); - - $user_id = Context::get('user_id'); - $temp_password = $_SESSION['xe_temp_password_'.$user_id]; - unset($_SESSION['xe_temp_password_'.$user_id]); - - if(!$user_id||!$temp_password) return new Object(-1,'msg_invaild_request'); - Context::set('temp_password', $temp_password); - - $this->setTemplateFile('find_temp_password'); - } - - /** - * @brief Edit member profile - **/ - function dispMemberModifyInfo() { - $oMemberModel = &getModel('member'); - $oModuleModel = &getModel('module'); - $memberModuleConfig = $oModuleModel->getModuleConfig('member'); - - // A message appears if the user is not logged-in - if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged'); - - $logged_info = Context::get('logged_info'); - $member_srl = $logged_info->member_srl; - - if(!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl); - $this->memberInfo->signature = $oMemberModel->getSignature($member_srl); - Context::set('member_info',$this->memberInfo); - - // Receive a member join form - Context::set('extend_form_list', $oMemberModel->getCombineJoinForm($this->memberInfo)); - - // Call getEditor of the editor module and set it for signiture - if($this->memberInfo->member_srl) { - $oEditorModel = &getModel('editor'); - $option->primary_key_name = 'member_srl'; - $option->content_key_name = 'signature'; - $option->allow_fileupload = false; - $option->enable_autosave = false; - $option->enable_default_component = true; - $option->enable_component = false; - $option->resizable = false; - $option->disable_html = true; - $option->height = 200; - $option->skin = $this->member_config->editor_skin; - $option->colorset = $this->member_config->editor_colorset; - $editor = $oEditorModel->getEditor($this->memberInfo->member_srl, $option); - Context::set('editor', $editor); - } - - // Set a template file - $this->setTemplateFile('modify_info'); - } - - /** - * @brief Change the user password - **/ - function dispMemberModifyPassword() { - $oMemberModel = &getModel('member'); - - // A message appears if the user is not logged-in - if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged'); - - $config = $oMemberModel->getMemberConfig(); - Context::set('identifier', $config->identifier); - - $logged_info = Context::get('logged_info'); - $member_srl = $logged_info->member_srl; - - if(!$this->memberInfo) { - $columnList = array('member_srl', 'user_id'); - $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); - } - Context::set('member_info',$this->memberInfo); - - // Set a template file - $this->setTemplateFile('modify_password'); - } - - /** - * @brief Member withdrawl - **/ - function dispMemberLeave() { - $oMemberModel = &getModel('member'); - - // A message appears if the user is not logged-in - if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged'); - - $logged_info = Context::get('logged_info'); - $member_srl = $logged_info->member_srl; - - if(!$this->memberInfo) { - $columnList = array('member_srl', 'user_id'); - $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); - } - Context::set('member_info',$this->memberInfo); - - // Set a template file - $this->setTemplateFile('leave_form'); - } + } } ?> diff --git a/modules/member/member.model.php b/modules/member/member.model.php index 7f00a8eec..f92951399 100644 --- a/modules/member/member.model.php +++ b/modules/member/member.model.php @@ -21,7 +21,15 @@ /** * @brief Return member's configuration **/ - function getMemberConfig() { + function getMemberConfig() + { + static $member_config; + + if($member_config) + { + return $member_config; + } + // Get member configuration stored in the DB $oModuleModel = &getModel('module'); $config = $oModuleModel->getModuleConfig('member'); @@ -30,7 +38,7 @@ { foreach($config->signupForm AS $key=>$value) { - $config->signupForm[$key]->title = Context::getLang($value->title); + $config->signupForm[$key]->title = ($value->isDefaultForm) ? Context::getLang($value->name) : $value->title; if($config->signupForm[$key]->isPublic != 'N') $config->signupForm[$key]->isPublic = 'Y'; if($value->name == 'find_account_question') $config->signupForm[$key]->isPublic = 'N'; } @@ -55,16 +63,12 @@ if (!$config->max_error_count) $config->max_error_count = 10; if (!$config->max_error_count_time) $config->max_error_count_time = 300; - if (!$config->layout_srl) - { - $oModuleModel = &getModel('module'); - $defaultModuleInfo = $oModuleModel->getDefaultMid(); - $config->layout_srl = $defaultModuleInfo->layout_srl; - } if (!$config->signature_editor_skin || $config->signature_editor_skin == 'default') $config->signature_editor_skin = 'xpresseditor'; if (!$config->sel_editor_colorset) $config->sel_editor_colorset = 'white'; + $member_config = $config; + return $config; } diff --git a/modules/member/member.view.php b/modules/member/member.view.php index 691d20482..6de1a9823 100644 --- a/modules/member/member.view.php +++ b/modules/member/member.view.php @@ -98,6 +98,7 @@ function _getDisplayedMemberInfo($memberInfo, $extendFormInfo, $memberConfig) { + $logged_info = Context::get('logged_info'); $displayDatas = array(); foreach($memberConfig->signupForm as $no=>$formInfo) { @@ -270,6 +271,7 @@ $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); $member_info->signature = $oMemberModel->getSignature($member_srl); Context::set('member_info',$member_info); + // Get a list of extend join form Context::set('extend_form_list', $oMemberModel->getCombineJoinForm($member_info)); @@ -291,6 +293,8 @@ Context::set('editor', $editor); } + $this->member_info = $member_info; + $oMemberAdminView = &getAdminView('member'); $formTags = $oMemberAdminView->_getMemberInputTag($member_info); Context::set('formTags', $formTags); @@ -382,7 +386,7 @@ **/ function dispMemberLoginForm() { if(Context::get('is_logged')) { - Context::set('redirect_url', getUrl('act','')); + Context::set('redirect_url', getNotEncodedUrl('act','')); $this->setTemplatePath($this->module_path.'tpl'); $this->setTemplateFile('redirect.html'); return; @@ -542,7 +546,7 @@ } /** - * @brief 이메일 주소를 기본 로그인 계정 사용시 이메일 주소 변경을 위한 화면 추가 + * @brief ?메??주소?기본 로그??계정 ?용???메??주소 변경을 ?한 ?면 추? **/ function dispMemberModifyEmailAddress(){ if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); diff --git a/modules/member/queries/deleteAutologin.xml b/modules/member/queries/deleteAutologin.xml index 5919a4058..a26672edc 100644 --- a/modules/member/queries/deleteAutologin.xml +++ b/modules/member/queries/deleteAutologin.xml @@ -3,6 +3,7 @@ - + + diff --git a/modules/member/skins/default/rechecked_password.html b/modules/member/skins/default/rechecked_password.html index bb3fcf366..330862dfe 100644 --- a/modules/member/skins/default/rechecked_password.html +++ b/modules/member/skins/default/rechecked_password.html @@ -22,3 +22,4 @@ {$lang->cmd_cancel} + diff --git a/modules/member/tpl/leave_form.html b/modules/member/tpl/leave_form.html deleted file mode 100644 index c98fabddc..000000000 --- a/modules/member/tpl/leave_form.html +++ /dev/null @@ -1,28 +0,0 @@ -{@ Context::loadFile(array("./common/js/jquery.js", 'head', '', -100000), true) } -{@ Context::loadFile(array("./common/js/js_app.js", 'head', '', -100000), true) } -{@ Context::loadFile(array("./common/js/common.js", 'head', '', -100000), true) } -{@ Context::loadFile(array("./common/js/xml_handler.js", 'head', '', -100000), true) } -{@ Context::loadFile(array("./common/js/xml_js_filter.js", 'head', '', -100000), true) } - - - - -
    -

    {$member_title = $lang->msg_leave_member}

    -
    - - - -
    -
      -
    • {$member_info->user_id}
    • -
    • -
    -
    - - - -
    diff --git a/modules/member/tpl/member_config.html b/modules/member/tpl/member_config.html index 623625081..cd3e0a243 100644 --- a/modules/member/tpl/member_config.html +++ b/modules/member/tpl/member_config.html @@ -125,7 +125,7 @@
    -

    디자인 설정

    +

    diff --git a/modules/member/tpl/modify_info_mobile.html b/modules/member/tpl/modify_info_mobile.html deleted file mode 100644 index a14e9da4c..000000000 --- a/modules/member/tpl/modify_info_mobile.html +++ /dev/null @@ -1,185 +0,0 @@ -{@ Context::loadFile(array("./common/js/jquery.js", 'head', '', -100000), true) } -{@ Context::loadFile(array("./common/js/js_app.js", 'head', '', -100000), true) } -{@ Context::loadFile(array("./common/js/common.js", 'head', '', -100000), true) } -{@ Context::loadFile(array("./common/js/xml_handler.js", 'head', '', -100000), true) } -{@ Context::loadFile(array("./common/js/xml_js_filter.js", 'head', '', -100000), true) } - - - - - - - - - - - - - - - - - - - -
    -

    {$lang->msg_update_member}

    -

    {$lang->member_default_info}

    -
    profile_image == 'Y' || $member_config->image_name=='Y' || $member_config->image_mark=='Y')-->enctype="multipart/form-data" target="tmp_upload_iframe"> - - - - - - -
    -
      -
    • {htmlspecialchars($member_info->user_id)}
    • -
    • {$lang->about_user_name}

    • -
    • {$lang->about_nick_name}

    • -
    • {$lang->about_email_address}

    • - -
    • - -
      - profile_image - -
      - - -

      {$lang->profile_image_max_width} : {$member_config->profile_image_max_width}px, {$lang->profile_image_max_height} : {$member_config->profile_image_max_height}px

      -
    • - - -
    • - -
      -
      image_name
      - -
      - - -

      {$lang->image_name_max_width} : {$member_config->image_name_max_width}px, {$lang->image_name_max_height} : {$member_config->image_name_max_height}px

      -
    • - - -
    • - -
      - image_mark - -
      - - - -

      {$lang->image_mark_max_width} : {$member_config->image_mark_max_width}px, {$lang->image_mark_max_height} : {$member_config->image_mark_max_height}px

      -
    • - -
    • {$lang->about_homepage}

    • -
    • {$lang->about_blog_url}

    • -
    • {$lang->about_birthday}

    • - -
    • allow_mailing!='N')-->checked="checked" />

      {$lang->about_allow_mailing}

    • - -
    • - -
    -
    - -

    {$lang->member_extend_info}

    -
    -
      - -
    • - - - - - - - - - - - - - - - - - - - - - - value)&&in_array($v, $val->value))-->checked="checked"/> - - - - - - value)&&in_array($v, $val->value))-->checked="checked"/> - - - - - - - - - - - - - - - - - - -

      {$val->description}

      - -
    • - -
    -
    - - - -
    diff --git a/modules/menu/menu.admin.view.php b/modules/menu/menu.admin.view.php index fa68f539b..fa4b3986d 100644 --- a/modules/menu/menu.admin.view.php +++ b/modules/menu/menu.admin.view.php @@ -233,7 +233,7 @@ function _menuInfoSetting(&$menu) { $oModuleModel = &getModel('module'); - if(!preg_match('/^http/i', $menu['url'])) + if($menu['url'] && !preg_match('/^http/i', $menu['url'])) { unset($midInfo); unset($moduleInfo); diff --git a/modules/menu/tpl/sitemap.html b/modules/menu/tpl/sitemap.html index edef58cb7..5496037f7 100644 --- a/modules/menu/tpl/sitemap.html +++ b/modules/menu/tpl/sitemap.html @@ -111,14 +111,14 @@


    -
    +

    -
    +


    -
    -
    -
    +
    +
    +

    지원하는 다국어 목록은 [설정>일반]에서 편집 가능 @@ -206,14 +206,14 @@


    -
    +

    -
    +


    -
    -
    -
    +
    +
    +

    지원하는 다국어 목록은 [설정>일반]에서 편집 가능 diff --git a/modules/message/message.admin.controller.php b/modules/message/message.admin.controller.php index 3fb6bbe2c..e472b5621 100644 --- a/modules/message/message.admin.controller.php +++ b/modules/message/message.admin.controller.php @@ -18,7 +18,7 @@ **/ function procMessageAdminInsertConfig() { // Get information - $args->skin = Context::get('skin'); + $args = Context::gets('skin', 'mskin'); // Create a module Controller object $oModuleController = &getController('module'); $output = $oModuleController->insertModuleConfig('message',$args); diff --git a/modules/message/message.admin.view.php b/modules/message/message.admin.view.php index 6a3322db6..bf6893536 100644 --- a/modules/message/message.admin.view.php +++ b/modules/message/message.admin.view.php @@ -19,17 +19,24 @@ function dispMessageAdminConfig() { // Get a list of skins(themes) $oModuleModel = &getModel('module'); + $skin_list = $oModuleModel->getskins($this->module_path); Context::set('skin_list', $skin_list); + + $mskin_list = $oModuleModel->getSkins($this->module_path, "m.skins"); + Context::set('mskin_list', $mskin_list); + // Get configurations (using module model object) $config = $oModuleModel->getModuleConfig('message'); Context::set('config',$config); + // Set a template file $this->setTemplatePath($this->module_path.'tpl'); + //Security $security = new Security(); - $security->encodeHTML('skin_list..title'); + $security->encodeHTML('skin_list..title', 'mskin_list..title'); $this->setTemplateFile('config'); } diff --git a/modules/message/message.mobile.php b/modules/message/message.mobile.php index 31bb66869..afbdeb42a 100644 --- a/modules/message/message.mobile.php +++ b/modules/message/message.mobile.php @@ -16,9 +16,9 @@ // Get configurations (using module model object) $oModuleModel = &getModel('module'); $config = $oModuleModel->getModuleConfig('message'); - if(!$config->skin) $config->skin = 'default'; + if(!$config->mskin) $config->mskin = 'default'; // Set the template path - $template_path = sprintf('%sm.skins/%s', $this->module_path, $config->skin); + $template_path = sprintf('%sm.skins/%s', $this->module_path, $config->mskin); // Get the member configuration $oModuleModel = &getModel('module'); $member_config = $oModuleModel->getModuleConfig('member'); diff --git a/modules/message/tpl/config.html b/modules/message/tpl/config.html index e76a001e8..06e8e9332 100644 --- a/modules/message/tpl/config.html +++ b/modules/message/tpl/config.html @@ -3,7 +3,7 @@

    {$XE_VALIDATOR_MESSAGE}

    -
    +

    {$lang->about_skin}

    @@ -18,6 +18,16 @@

    +
  • +

    +

    + +

    +
  • diff --git a/modules/module/module.admin.controller.php b/modules/module/module.admin.controller.php index 89af08efd..608b95e80 100644 --- a/modules/module/module.admin.controller.php +++ b/modules/module/module.admin.controller.php @@ -643,6 +643,7 @@ // Variable setting for site keyword $site_keyword = Context::get('site_keyword'); $site_srl = Context::get('site_srl'); + $vid = Context::get('vid'); // If there is no site keyword, use as information of the current virtual site $args = null; $logged_info = Context::get('logged_info'); @@ -651,7 +652,7 @@ if(!$site_srl) { - if($logged_info->is_admin == 'Y' && !$site_keyword) $args->site_srl = 0; + if($logged_info->is_admin == 'Y' && !$site_keyword && !$vid) $args->site_srl = 0; else $args->site_srl = (int)$site_module_info->site_srl; } else $args->site_srl = $site_srl; diff --git a/modules/module/module.model.php b/modules/module/module.model.php index ef28d3dff..1ae9e3ff2 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -151,6 +151,11 @@ * @brief Get module information by mid **/ function getModuleInfoByMid($mid, $site_srl = 0, $columnList = array()) { + if(!$mid) + { + return; + } + $args->mid = $mid; $args->site_srl = (int)$site_srl; $oCacheHandler = &CacheHandler::getInstance('object'); diff --git a/modules/module/tpl/skin_config.html b/modules/module/tpl/skin_config.html index 22d7eb640..38285ace4 100644 --- a/modules/module/tpl/skin_config.html +++ b/modules/module/tpl/skin_config.html @@ -100,7 +100,7 @@

    - +

    diff --git a/modules/point/lang/lang.xml b/modules/point/lang/lang.xml index ea4cdcfd7..9243efe78 100644 --- a/modules/point/lang/lang.xml +++ b/modules/point/lang/lang.xml @@ -254,6 +254,10 @@ Sıfırlamadan sonra sadece, website aktiviteleri yapan üyeler, giriş puanı alacaklardır.
    Lütfen bu özelliği sadece veri taşıma veya cidden gerekliliği olduğu durumlarda kullanınız.]]>
    Chỉ có thể thiết lập lại điểm của những thành viên đã đăng kí là thành viên.
    Xin hãy chỉ sử dụng chức năng này khi bạn chuyển nội dung của Website qua một Website khác.]]>
    + + + + diff --git a/modules/point/point.admin.view.php b/modules/point/point.admin.view.php index 788ae5c30..1f53619a4 100644 --- a/modules/point/point.admin.view.php +++ b/modules/point/point.admin.view.php @@ -39,7 +39,6 @@ $selected_group_list = array(); if(count($group_list)) { foreach($group_list as $key => $val) { - if($val->is_admin == 'Y' || $val->is_default == 'Y') continue; $selected_group_list[$key] = $val; } } diff --git a/modules/point/point.controller.php b/modules/point/point.controller.php index a17cdcf86..b140484e1 100644 --- a/modules/point/point.controller.php +++ b/modules/point/point.controller.php @@ -332,7 +332,7 @@ $point = $module_config['download_file']; if(!isset($point)) $point = $config->download_file; // If points are less than 0, and if downloading a file is not allowed in this case, give an errors - if($cur_point + $point < 0 && $config->disable_download == 'Y') return new Object(-1,'msg_not_permitted_download'); + if($cur_point + $point < 0 && $config->disable_download == 'Y') return new Object(-1,'msg_cannot_download'); return new Object(); } @@ -533,8 +533,9 @@ } // Delete the group of a level which is higher than the current level foreach($point_group as $group_srl => $target_level) { - if($target_level > $level) $del_group_list[] = $group_srl; + if($target_level > $level) $del_group_list[] = $group_srl; } + $del_group_list[] = $default_group->group_srl; } // Grant a new group else { @@ -567,6 +568,17 @@ $cache_filename = sprintf('%s%d.cache.txt', $cache_path, $member_srl); FileHandler::writeFile($cache_filename, $point); + $oCacheHandler = &CacheHandler::getInstance('object'); + if($oCacheHandler->isSupport()) + { + $cache_key = 'object:'.$member_srl; + $GLOBALS['__member_info__'][$member_srl] = null; + $oCacheHandler->delete($cache_key); + + $gcache_key = 'object_member_groups:'.$member_srl.'_0'; + $oCacheHandler->delete($gcache_key); + } + return $output; } diff --git a/modules/point/tpl/config.html b/modules/point/tpl/config.html index 9b578a97d..63dc0953b 100644 --- a/modules/point/tpl/config.html +++ b/modules/point/tpl/config.html @@ -104,7 +104,8 @@
    - + +
    {$lang->default_group}
    diff --git a/modules/trackback/lang/lang.xml b/modules/trackback/lang/lang.xml index aff0a2870..ed0fe6ead 100644 --- a/modules/trackback/lang/lang.xml +++ b/modules/trackback/lang/lang.xml @@ -200,4 +200,8 @@ - \ No newline at end of file + + + + + diff --git a/modules/trackback/trackback.controller.php b/modules/trackback/trackback.controller.php index 1075109c0..8a08d0c3e 100644 --- a/modules/trackback/trackback.controller.php +++ b/modules/trackback/trackback.controller.php @@ -97,7 +97,7 @@ $document_srl = Context::get('target_srl'); $oDocumentModel = &getModel('document'); $oDocument = $oDocumentModel->getDocument($document_srl); - if(!$oDocument->isExists() || !$oDocument->getSummary()) return new Object(); + if(!$oDocument->isExists()) return new Object(); if($oDocument->getMemberSrl() != $logged_info->member_srl) return new Object(); // Add a link sent yeokingeul $oDocumentController = &getController('document'); @@ -278,22 +278,22 @@ */ function sendTrackback($oDocument, $trackback_url, $charset) { $oModuleController = &getController('module'); + // Information sent by $http = parse_url($trackback_url); + $obj->blog_name = str_replace(array('<','>','&','"'), array('<','>','&','"'), Context::getBrowserTitle()); $oModuleController->replaceDefinedLangCode($obj->blog_name); $obj->title = $oDocument->getTitleText(); $obj->excerpt = $oDocument->getSummary(200); $obj->url = getFullUrl('','document_srl',$oDocument->document_srl); + // blog_name, title, excerpt, url charset of the string to the requested change if($charset && function_exists('iconv')) { foreach($obj as $key=>$val) { $obj->{$key} = iconv('UTF-8',$charset,$val); } } - // written information sent to socket - if($http['query']) $http['query'].="&"; - if(!$http['port']) $http['port'] = 80; $content = sprintf( @@ -306,42 +306,27 @@ urlencode($obj->blog_name), urlencode($obj->excerpt) ); - if($http['query']) $content .= '&'.$http['query']; - $content_length = strlen($content); - // header by - $header = - sprintf( - "POST %s HTTP/1.1\r\n". - "Host: %s\r\n". - "Content-Type: %s\r\n". - "Content-Length: %s\r\n\r\n". - "%s\r\n", - $http['path'], - $http['host'], - "application/x-www-form-urlencoded", - $content_length, - $content - ); - if(!$http['host']||!$http['port']) return new Object(-1,'msg_trackback_url_is_invalid'); - // Opens a socket on the target server you want to send - $fp = @fsockopen($http['host'], $http['port'], $errno, $errstr, 5); - if(!$fp) return new Object(-1,'msg_trackback_url_is_invalid'); - // Header information sent by - fputs($fp, $header); - // Waiting for the results (in particular the server may not be falling EOF - while(!feof($fp)) { - $line = trim(fgets($fp, 4096)); - if(preg_match("/^/i",$line)){ - $error = preg_replace('/[^0-9]/','',$line); - break; - } - } - // Close socket - fclose($fp); - if($error == "0") return new Object(0, 'msg_trackback_send_success'); - - return new Object(-1, 'msg_trackback_send_failed'); + $buff = FileHandler::getRemoteResource($trackback_url, $content, 3, 'POST', 'application/x-www-form-urlencoded'); + + $oXmlParser = new XmlParser(); + $xmlDoc = $oXmlParser->parse($buff); + + if($xmlDoc->response->error->body == '0') + { + return new Object(0, 'msg_trackback_send_success'); + } + else + { + if($xmlDoc->response->message->body) + { + return new Object(-1, sprintf('%s: %s', Context::getLang('msg_trackback_send_failed'), $xmlDoc->response->message->body)); + } + else + { + return new Object(-1, 'msg_trackback_send_failed'); + } + } } /** diff --git a/modules/trackback/trackback.model.php b/modules/trackback/trackback.model.php index d644c0251..211da4abd 100644 --- a/modules/trackback/trackback.model.php +++ b/modules/trackback/trackback.model.php @@ -158,8 +158,8 @@ * @param int $document_srl * @return string */ - function getTrackbackUrl($document_srl) { - $url = getFullUrl('','document_srl',$document_srl,'act','trackback','key',$this->getTrackbackKey($document_srl)); + function getTrackbackUrl($document_srl, $mid = NULL) { + $url = getFullUrl('', 'mid', $mid, 'document_srl',$document_srl,'act','trackback','key',$this->getTrackbackKey($document_srl)); return $url; }