Skip to content

Commit

Permalink
refs #514 : merging test
Browse files Browse the repository at this point in the history
  • Loading branch information
inureyes committed Mar 11, 2011
2 parents f225174 + 203b7b4 commit 48699db
Show file tree
Hide file tree
Showing 57 changed files with 271 additions and 6,979 deletions.
4 changes: 3 additions & 1 deletion documents/manual_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ $service['memcached'] = false; // Using memcache to handle session and cac
$memcached['server'] = 'localhost'; // Where memcache server is.
// From Textcube 1.8.4
$service['requirelogin'] = false; // Force log-in process to every blogs. (for private blog service)
?>
// From Textcube 2.0
$service['jqueryURL'] = ''; // Add URL if you want to use external jquery via CDN. e.g.) Microsoft's CDN: http://ajax.aspnetcdn.com/ajax/jQuery/
?>
2 changes: 1 addition & 1 deletion framework/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private function URIinterpreter() {
$interfacePath = 'interface/blog/'.$pathPart.'.php';
break;
case 'rss': case 'atom':
if(isset($uri['fragment'][1]) && in_array($uri['fragment'][1],array('category','tag','archive','search'))) {
if(isset($uri['fragment'][1]) && in_array($uri['fragment'][1],array('archive','author','category','comment','line','notifyComment','response','search','tag','trackback'))) {
$pathPart = $uri['fragment'][0].'/'.$uri['fragment'][1];
$interfacePath = 'interface/'.$pathPart.'/index.php';
}
Expand Down
5 changes: 3 additions & 2 deletions framework/id/textcube/config.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
define('CRLF', "\r\n");
define('TAB', " ");
define('INT_MAX',2147483647);
define('JQUERY_VERSION','1.4.4');
define('JQUERY_VERSION','1.5.1');
if( strstr( PHP_OS, "WIN") !== false ) {
define('DS', "\\");
} else {
Expand Down Expand Up @@ -50,7 +50,7 @@
$service['flashclipboardpoter'] = true;
$service['allowBlogVisibilitySetting'] = true;
$service['disableEolinSuggestion'] = false;
$service['interface'] = 'simple'; // 'simple' or 'detail'. Default is 'detail'
$service['interface'] = 'simple'; // 'simple' or 'detail'. Default is 'simple' from 2.0
$service['pagecache'] = true;
$service['codecache'] = false;
$service['skincache'] = true;
Expand All @@ -61,4 +61,5 @@
$service['debug_rewrite_module'] = false;
$service['useNumericURLonRSS'] = false;
$service['forceinstall'] = false;
$service['jqueryURL'] = null; // You can change this to use external CDNs. (microsoft / google, etc..)
?>
4 changes: 2 additions & 2 deletions framework/model/URIHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private function __URIParser() {
$this->context->useNamespace('service');

$url = $this->uri['fullpath'];
$defaultblogid = Setting::getServiceSetting("defaultBlogId",1,true);
$defaultblogid = $this->context->getProperty('defaultBlogId',1);
$this->suri = array('url' => $url, 'value' => '');
$this->blogid = null;
$this->uri['isStrictBlogURL'] = true;
Expand Down Expand Up @@ -115,7 +115,7 @@ private function __URIParser() {
}

private function __URIvariableParser() {
global $suri, $blog, $blogid, $skinSetting, $gCacheStorage;
global $suri, $blog, $blogid, $skinSetting, $gCacheStorage; // To support legacy for global variables.
$blogid = $this->blogid;
$gCacheStorage = new globalCacheStorage; // Initialize global cache

Expand Down
36 changes: 36 additions & 0 deletions interface/atom/author/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/// Copyright (c) 2004-2011, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('NO_SESSION', true);
define('__TEXTCUBE_CUSTOM_HEADER__', true);
define('__TEXTCUBE_LOGIN__',true);
require ROOT . '/library/preprocessor.php';
requireStrictBlogURL();
$context = Model_Context::getInstance();
$author = $suri['value'];
$authorId = User::getUserIdByName($author);
if(empty($authorId)) exit;
$blogid = getBlogId();

$cache = pageCache::getInstance();
$cache->reset('authorATOM-'.$authorId);
if(!$cache->load()) {
requireModel("blog.feed");
list($entries, $paging) = getEntriesWithPagingByAuthor($blogid, $author, 1, 1, 1);
if(empty($entries)) {
header ("Location: ".$context->getProperty('uri.host').$context->getProperty('uri.blog')."/atom");
exit;
}
$result = getFeedWithEntries($blogid,$entries,_textf('%1 의 글 목록',$author),'atom');
if($result !== false) {
$cache->reset('authorATOM-'.$authorId);
$cache->contents = $result;
$cache->update();
}
}
header('Content-Type: application/atom+xml; charset=utf-8');
fireEvent('FeedOBStart');
echo fireEvent('ViewAuthorATOM', $cache->contents);
fireEvent('FeedOBEnd');
?>
4 changes: 1 addition & 3 deletions interface/blog/author.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
require ROOT . '/library/preprocessor.php';
if (false) {
fetchConfigVal();
}

$cache = pageCache::getInstance();
$author = empty($suri['value']) ? '' : $suri['value'];
Expand All @@ -25,6 +22,7 @@
$listView = $cache->contents;
}
require ROOT . '/interface/common/blog/begin.php';
$listFeedURL = 'author/'.URL::encode($author);
require ROOT . '/interface/common/blog/list.php';
}

Expand Down
63 changes: 0 additions & 63 deletions interface/blog/sync.php

This file was deleted.

2 changes: 1 addition & 1 deletion interface/blog/trackback/send/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<title><?php echo _text('글걸기 시도');?></title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php echo $context->getProperty('service.path') . $context->getProperty('panel.skin');?>/popup-trackback.css" />
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/common2.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion interface/common/blog/end.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
$pluginData = $skin->sidebarStorage[$element];
$plugin = $pluginData['plugin'];
include_once (ROOT . "/plugins/{$plugin}/index.php");
$pluginURL = "{$context->getProperty('service.path')}/plugins/{$plugin}";
$pluginURL = $context->getProperty('service.path')."/plugins/{$plugin}";
$pluginPath = ROOT . "/plugins/{$plugin}";
if( !empty( $configMappings[$plugin]['config'] ) )
$configVal = getCurrentSetting($plugin);
Expand Down
1 change: 0 additions & 1 deletion interface/common/blog/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
dress('list_atom_url', $context->getProperty('uri.default').'/atom/'.$listFeedURL, $listView);
$listView = fireEvent('ViewList', $listView, $list);
if(empty($entries)) $listView = $listView.CRLF.'[##_paging_list_##]';

dress('list', $listView, $view);
if(isset($cache)) {
$cache->contents = $listView;
Expand Down
18 changes: 1 addition & 17 deletions interface/common/control/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,28 +353,12 @@
//]]>
</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/byTextcube.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/common2.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/owner.js"></script>
<?php
if(!in_array($blogMenu['contentMenu'],array('post','edit'))) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/mootools10.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/moodalbox/moodalbox.js"></script>
<link rel="stylesheet" href="<?php echo $context->getProperty('service.path');?>/resources/style/helper/moodalbox.css" type="text/css" media="screen" />
<?php
}
?>
<?php
if($context->getProperty('service.interface') == 'simple') {
if(!in_array($blogMenu['contentMenu'],array('post','edit'))) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/mootools.js"></script>
<?php
}
}
if( $context->getProperty('service.admin_script') !== null) {
if( is_array($context->getProperty('service.admin_script')) ) {
foreach( $context->getProperty('service.admin_script') as $src ) {
Expand Down
14 changes: 5 additions & 9 deletions interface/common/owner/header.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
//]]>
</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/byTextcube.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/common2.js"></script>
Expand All @@ -380,16 +380,9 @@
}
if (file_exists(ROOT . $context->getProperty('panel.skin')."/custom.js")) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/custom.js" />
<script type="text/javascript" src="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/custom.js"></script>
<?php
}
if($service['interface'] == 'simple') {
if(!in_array($blogMenu['contentMenu'],array('post','edit'))) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/mootools.js"></script>
<?php
}
}
if( isset($service['admin_script']) ) {
if( is_array($service['admin_script']) ) {
foreach( $service['admin_script'] as $src ) {
Expand Down Expand Up @@ -494,6 +487,9 @@
case -2:
$blogMenu['contentMenu'] = 'notice';
break;
case -3:
$blogMenu['contentMenu'] = 'page';
break;
case -4:
$blogMenu['contentMenu'] = 'template';
break;
Expand Down
2 changes: 1 addition & 1 deletion interface/common/owner/headerForPopupEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/locale/messages.php"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/byTextcube.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/common2.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion interface/i/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ul id="home" title="<?php echo htmlspecialchars(Utils_Unicode::lessenAsEm($context->getProperty('blog.title'),30));?>" selected="true">
<?php
$blogAuthor = User::getBlogOwnerName($blogid);
$blogLogo = !empty($context->getProperty('blog.logo')) ? printIphoneImageResizer($blogid, $context->getProperty('blog.logo'), 80) : "{$context->getProperty('service.path')}/resources/style/iphone/image/textcube_logo.png";
$blogLogo = !is_null($context->getProperty('blog.logo')) ? printIphoneImageResizer($blogid, $context->getProperty('blog.logo'), 80) : "{$context->getProperty('service.path')}/resources/style/iphone/image/textcube_logo.png";
$itemsView = '<li class="blog_info">'.CRLF;
$itemsView .= ' <div class="logo"><img src="' . $blogLogo . '" /></div>'.CRLF;
$itemsView .= ' <div class="blog_container">'.CRLF;
Expand Down
2 changes: 1 addition & 1 deletion interface/login/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<link rel="stylesheet" type="text/css" href="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/login.ie7.css" />
<![endif]-->
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/byTextcube.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.resourcepath');?>/script/common2.js"></script>
Expand Down
9 changes: 8 additions & 1 deletion interface/login/openid/guest/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)

define('__TEXTCUBE_ADMINPANEL__',true);

$IV = array(
'GET' => array(
'requestURI' => array('url', 'mandatory' => false )
)
);

require ROOT . '/library/preprocessor.php';

global $openid_session;
Expand All @@ -13,7 +20,7 @@
if( empty( $_GET['requestURI'] ) ) {
$requestURI = $context->getProperty('uri.blog');
} else {
$requestURI = $_GET['requestURI'];
$requestURI = filterJavaScript($_GET['requestURI']);
if( Acl::getIdentity( 'openid' ) ) {
header( "Location: $requestURI" );
exit;
Expand Down
2 changes: 1 addition & 1 deletion interface/owner/center/about/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<q xml:lang="la" title="<?php echo _t('모든 만물은 책이요 그림이요 또한 거울이니');?>">Omnis mundi creatura quasi liber et pictura nobis est, et speculum</q><br />
<cite><?php echo _t('움베르트 에코 -장미의 이름- 중');?></cite>
</p>
<div id="copyright"><?php echo _t('&copy; 2004 - 2010. 모든 저작권은 개발자 및 공헌자에게 있습니다.<br />텍스트큐브는 니들웍스/TNF에서 개발합니다.<br />텍스트큐브와 텍스트큐브 로고는 니들웍스의 상표입니다.');?></div>
<div id="copyright"><?php echo _t('&copy; 2004 - 2011. 모든 저작권은 개발자 및 공헌자에게 있습니다.<br />텍스트큐브는 니들웍스/TNF에서 개발합니다.<br />텍스트큐브와 텍스트큐브 로고는 니들웍스의 상표입니다.');?></div>
<div id="XHTML-ValidIcon">
<img src="http://www.w3.org/Icons/valid-xhtml11-blue" alt="Valid XHTML 1.1!" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion interface/owner/entry/attach/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/editor.css" />
<!--[if lte IE 6]><link rel="stylesheet" type="text/css" media="screen" href="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/editor.ie.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/editor.ie7.css" /><![endif]-->
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/jquery/jquery-<?php echo JQUERY_VERSION;?>.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.jqueryURL');?>jquery-<?php echo JQUERY_VERSION;?>.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/EAF4.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/common2.js"></script>
Expand Down
Loading

0 comments on commit 48699db

Please sign in to comment.