diff --git a/documents/changelog_ko.txt b/documents/changelog_ko.txt index 04a8d8948..f66c83c24 100644 --- a/documents/changelog_ko.txt +++ b/documents/changelog_ko.txt @@ -4,6 +4,7 @@ == v1.8.6 개발 관련 노트 == === 추가된 점 === * 스킨 : 댓글 다 보여주기 / 페이징 여부에 상관없이 댓글 정렬 순서를 스킨/스킨 상세 설정 에서 조정할 수 있도록 함.(#1570) + * 블로그 : 안드로이드에서 iPhone/iPod Touch와 동일한 UI 지원 (#1576) === 변경된 점 === * 일반 : jQuery 라이브러리의 버전 업데이트 (#1560) @@ -13,6 +14,8 @@ * 일반 : PHP 5.3 이상에서 DirectoryIterator가 더이상 순차적 파일 이름 정렬을 보장하지 않아 발생할 수 있는 라이브러리 로드 문제 수정 (#1564) * 리더 : 플래시를 통하여 악의적 공격이 가능할 수 있는 문제 수정 (#1107) * OpenID : 방문자 계정을 생성하여 XSS 삽입 방식의 공격이 가능할 수 있는 문제 수정 (#1558) + * Setup : 설치시 MySQL쿼리의 문법 오류 수정 (#1577) + * 스킨 : 스킨 편집시 마지막으로 편집한 탭의 내용이 저장되지 않는 문제 수정 (#1580) == v1.8.5 개발 관련 노트 == === 변경된 점 === diff --git a/framework/data/DBModel.php b/framework/data/DBModel.php index 3b35815ae..6d9fc99ee 100644 --- a/framework/data/DBModel.php +++ b/framework/data/DBModel.php @@ -384,7 +384,7 @@ protected function _capsulateFields($requestedFieldArray) { protected function getQualifierModel($name, $condition, $value = null, $escape = false, $autoquote = true) { //OR, setQualifier(string(name_condition_value), $escape = null) - Descriptive mode (NOT implemented) if (is_null($condition)) { - $qualifiers = null; + $qualifiers = $relations = null; } else { switch(strtolower($condition)) { case 'equals': diff --git a/framework/id/textcube/config.default.php b/framework/id/textcube/config.default.php index c4429295e..a3a2791a4 100644 --- a/framework/id/textcube/config.default.php +++ b/framework/id/textcube/config.default.php @@ -6,9 +6,10 @@ // Define basic signatures. define('TEXTCUBE_NAME', 'Textcube'); define('TEXTCUBE_VERSION', '1.8.7 : Beta 1'); +define('TEXTCUBE_REVISION', 'root-main-branch1.8-r29'); define('TEXTCUBE_COPYRIGHT', 'Copyright © 2004-2011. Needlworks / Tatter Network Foundation. All rights reserved. Licensed under the GPL.'); define('TEXTCUBE_HOMEPAGE', 'http://www.textcube.org/'); -define('TEXTCUBE_RESOURCE_URL', 'http://resources.textcube.org/1.8.4'); +define('TEXTCUBE_RESOURCE_URL', 'http://resources.textcube.org/1.8.6'); define('TEXTCUBE_NOTICE_URL','http://feeds.feedburner.com/textcube/'); define('CRLF', "\r\n"); define('TAB', " "); diff --git a/framework/legacy/Needlworks.PHP.Loader.php b/framework/legacy/Needlworks.PHP.Loader.php index 0270780fa..9a93841f8 100644 --- a/framework/legacy/Needlworks.PHP.Loader.php +++ b/framework/legacy/Needlworks.PHP.Loader.php @@ -39,43 +39,48 @@ function requireLibrary($name) { /** Autoload components */ class Autoload_Legacy { - private static $db = array( - 'POD','DBQuery'); - private static $data = array( - 'Attachment','BlogSetting','BlogStatistics','Category','Comment','CommentNotified', - 'CommentNotifiedSiteInfo','DailyStatistics','DataMaintenance','Feed', - 'Filter','GuestComment','Keyword','Link','LinkCategories','Notice','PluginSetting','Post', - 'RefererLog','RefererStatistics','ServiceSetting','SkinSetting','SubscriptionLog', - 'SubscriptionStatistics','Tag','Trackback','TrackbackLog','UserInfo','UserSetting' - ); - private static $model = array( - 'Message','Paging','PluginCustomConfig','Statistics','User' - ); - private static $base = array( - 'Base64Stream','HTTPRequest','OutputWriter','XMLRPC','XMLRPCFault', - 'XMLCustomType','XMLTree','Pop3','CommunicationFeed'); - private static $function = array( - 'Image','Setting','Respond','Misc'); - private static $openid = array( - 'OpenID', 'OpenIDSession', 'OpenIDConsumer'); - private static $control = array( - 'Session','RSS'); - public static function load($name) { + private function initialize() { + $this->db = array( + 'POD','DBQuery'); + $this->data = array( + 'Attachment','BlogSetting','BlogStatistics','Category','Comment','CommentNotified', + 'CommentNotifiedSiteInfo','DailyStatistics','DataMaintenance','Feed', + 'Filter','GuestComment','Keyword','Link','LinkCategories','Notice','PluginSetting','Post', + 'RefererLog','RefererStatistics','ServiceSetting','SkinSetting','SubscriptionLog', + 'SubscriptionStatistics','Tag','Trackback','TrackbackLog','UserInfo','UserSetting' + ); + $this->model = array( + 'Message','Paging','PluginCustomConfig','Statistics','User' + ); + $this->base = array( + 'Base64Stream','HTTPRequest','OutputWriter','XMLRPC','XMLRPCFault', + 'XMLCustomType','XMLTree','Pop3','CommunicationFeed'); + $this->function = array( + 'Image','Setting','Respond','Misc'); + $this->openid = array( + 'OpenID', 'OpenIDSession', 'OpenIDConsumer'); + $this->control = array( + 'Session','RSS'); + } + public function load($name) { global $service, $database; $name = ucfirst($name); - if(in_array($name,self::$data)) { + if(!isset($this->data)) { + $this->initialize(); + } + if(in_array($name,$this->data)) { require_once(ROOT . "/framework/legacy/Textcube.Data.".$name.".php"); - } else if (in_array($name,self::$model)) { + } else if (in_array($name,$this->model)) { require_once(ROOT . "/framework/legacy/Textcube.Model.".$name.".php"); - } else if (in_array($name,self::$base)) { + } else if (in_array($name,$this->base)) { if(in_array($name, array('XMLRPC','XMLRPCFault','XMLCustomType'))) require_once(ROOT . "/framework/legacy/Needlworks.PHP.XMLRPC.php"); else require_once(ROOT . "/framework/legacy/Needlworks.PHP.".$name.".php"); - } else if (in_array($name,self::$function)) { + } else if (in_array($name,$this->function)) { require_once(ROOT . "/framework/legacy/Textcube.Function.".$name.".php"); - } else if (in_array($name,self::$openid)) { + } else if (in_array($name,$this->openid)) { require_once(ROOT . "/framework/legacy/Textcube.Control.Openid.php"); - } else if (in_array($name,self::$control)) { + } else if (in_array($name,$this->control)) { if($name == 'Session' && isset($service['memcached']) && $service['memcached'] == true) require_once(ROOT . "/framework/legacy/Textcube.Control.".$name.".Memcached.php"); else require_once(ROOT . "/framework/legacy/Textcube.Control.".$name.".php"); @@ -86,5 +91,6 @@ public static function load($name) { } } } -spl_autoload_register(array('Autoload_Legacy', 'load')); -?> \ No newline at end of file +$autoloadInstance_Legacy = new Autoload_Legacy(); +spl_autoload_register(array($autoloadInstance_Legacy, 'load')); +?> diff --git a/framework/utils/Browser.php b/framework/utils/Browser.php index 6e201cf0b..025f4f62a 100644 --- a/framework/utils/Browser.php +++ b/framework/utils/Browser.php @@ -17,9 +17,9 @@ function __construct() { public function getBrowserName() { /// Blocking (is in development) $ctx = Model_Context::getInstance(); - if($ctx->getProperty('service.usemobileadmin',true) === false) { - return 'unknown'; - } +// if($ctx->getProperty('service.usemobileadmin',true) === false) { +// return 'unknown'; +// } if(!is_null($this->browserName)) return $this->browserName; if(isset($_SERVER['HTTP_USER_AGENT'])) { if(strpos($_SERVER['HTTP_USER_AGENT'],'iPhone') || diff --git a/interface/index.php b/interface/index.php index 384ed1ed0..2dff0471f 100644 --- a/interface/index.php +++ b/interface/index.php @@ -47,7 +47,8 @@ require ROOT . '/library/preprocessor.php'; // Redirect for ipod touch / iPhone -if(Setting::getBlogSettingGlobal('useiPhoneUI',true) && (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'],'iPod') || strpos($_SERVER['HTTP_USER_AGENT'],'iPhone')))){ +$browserUtil = Utils_Browser::getInstance(); +if(Setting::getBlogSettingGlobal('useiPhoneUI',true) && ($browserUtil->isMobile() == true)){ if(isset($suri['id'])) { $slogan = getSloganById($blogid, $suri['id']); if(!empty($slogan)) { diff --git a/interface/owner/skin/edit/download/index.php b/interface/owner/skin/edit/download/index.php index 7d39ca7c7..c82eba923 100644 --- a/interface/owner/skin/edit/download/index.php +++ b/interface/owner/skin/edit/download/index.php @@ -9,9 +9,6 @@ ); require ROOT . '/library/preprocessor.php'; -if (false) { - fetchConfigVal(); -} if (!file_exists(ROOT . "/skin/customize/".getBlogId()."/".$_GET['file'])) exit; diff --git a/interface/owner/skin/edit/index.php b/interface/owner/skin/edit/index.php index 0db513e57..33d3350be 100644 --- a/interface/owner/skin/edit/index.php +++ b/interface/owner/skin/edit/index.php @@ -49,40 +49,58 @@ function setSkin(mode) { if ((mode == 'skin' && skinHTMLSaved == false) || (mode == 'style' && skinStyleSaved == false)) { if(mode == 'skin' && currentTag != 'all') { skinData = skinCode; + currentCode = document.getElementById(mode).value; + var request = new HTTPRequest("POST", "/owner/skin/edit/crop/"); + request.onSuccess = function() { + skinData = this.getText("/response/skinCode"); + saveSkinCode(mode,skinData,file); + } + request.onError = function() { + if (this.getText("/response/msg")) + alert(this.getText("/response/msg")); + else + alert(''); + } + request.send('skinCode='+encodeURIComponent(skinCode) + +'¤tTag='+encodeURIComponent(currentTag) + +'¤tCode='+encodeURIComponent(currentCode) + +'&nextTag=all'); } else { skinData = skin.value; + saveSkinCode(mode,skinData,file); } - - var request = new HTTPRequest("POST", "/owner/skin/edit/skin/"); - request.onSuccess = function() { - PM.showMessage("", "center", "bottom"); - - if (mode == 'skin') { - skinHTMLSaved = true; - if(document.getElementById('skin-download').innerHTML == '') { - document.getElementById('skin-download').innerHTML = ''; - } - } else { - skinStyleSaved = true; + } + } + function saveSkinCode(mode,skinData,file) { + var request = new HTTPRequest("POST", "/owner/skin/edit/skin/"); + request.onSuccess = function() { + PM.showMessage("", "center", "bottom"); + + if (mode == 'skin') { + skinHTMLSaved = true; + if(document.getElementById('skin-download').innerHTML == '') { + document.getElementById('skin-download').innerHTML = ''; } + } else { + skinStyleSaved = true; } - request.onError = function() { - if (this.getText("/response/msg")) - alert(this.getText("/response/msg")); - else - alert(''); - } - request.send('mode='+mode+'&body='+encodeURIComponent(skinData)+'&file='+ file.value); } + request.onError = function() { + if (this.getText("/response/msg")) + alert(this.getText("/response/msg")); + else + alert(''); + } + request.send('mode='+mode+'&body='+encodeURIComponent(skinData)+'&file='+ file.value); } - var currentTag = 'all'; var currentCode = ''; + function changeTab(mode,tag) { currentCode = document.getElementById(mode).value; var request = new HTTPRequest("POST", "/owner/skin/edit/crop/"); request.onSuccess = function() { - PM.showMessage("", "center", "top"); + PM.showMessage("", "center", "bottom"); document.getElementById(mode).value = (this.getText("/response/code") ? this.getText("/response/code") : ''); skinCode = this.getText("/response/skinCode"); document.getElementById('skin-'+currentTag).className = ''; diff --git a/library/preprocessor.php b/library/preprocessor.php index 3fe800b8a..99f86feb3 100644 --- a/library/preprocessor.php +++ b/library/preprocessor.php @@ -12,7 +12,7 @@ */ $bootFiles = array(); // From PHP 5.3, DirectoryIterator does not gurantee the order. foreach (new DirectoryIterator(ROOT.'/framework/boot') as $fileInfo) { - if($fileInfo->isFile()) array_push($bootFiles, $fileInfo->getPathname()); + if($fileInfo->isFile() && substr($fileInfo->getBasename(),-3) == 'php') array_push($bootFiles, $fileInfo->getPathname()); } sort($bootFiles); foreach ($bootFiles as $bf) { diff --git a/resources/setup/initialize.MySQL.sql b/resources/setup/initialize.MySQL.sql index 44a5cbe61..7ffc74ee4 100644 --- a/resources/setup/initialize.MySQL.sql +++ b/resources/setup/initialize.MySQL.sql @@ -232,7 +232,7 @@ CREATE TABLE [##_dbPrefix_##]Lines ( root varchar(11) NOT NULL default 'default', category varchar(11) NOT NULL default 'public', author varchar(32) NOT NULL default '', - content mediumtext NOT NULL default '', + content mediumtext NOT NULL, permalink varchar(128) NOT NULL default '', created int(11) NOT NULL default 0, PRIMARY KEY (id), @@ -415,7 +415,7 @@ CREATE TABLE [##_dbPrefix_##]Widgets ( height int(11) DEFAULT NULL, scrolling int(1) default 0, feature varchar(32) default 'opensocial', - content text NOT NULL default '', + content text NOT NULL, PRIMARY KEY(id), KEY(blogid) ) [##_charset_##]; diff --git a/rewrite.php b/rewrite.php index d67b43caf..0a20c08e9 100644 --- a/rewrite.php +++ b/rewrite.php @@ -3,7 +3,7 @@ /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) -define('ROOT', '.'); +define('ROOT',dirname(__FILE__)); require_once(ROOT.'/framework/Dispatcher.php'); /** Dispatching Interface request via URI */ $dispatcher = Dispatcher::getInstance();