Skip to content

Commit

Permalink
refs #514 : Merged : merge with 1.8 tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
inureyes committed Apr 25, 2011
1 parent 4fb3617 commit 439ef77
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 35 deletions.
2 changes: 1 addition & 1 deletion framework/data/DBModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
1 change: 1 addition & 0 deletions framework/id/textcube/config.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Define basic signatures.
define('TEXTCUBE_NAME', 'Textcube');
define('TEXTCUBE_VERSION', '2.0 : Alpha 1');
define('TEXTCUBE_REVISION', 'root-main-branch2.0-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.9');
Expand Down
66 changes: 36 additions & 30 deletions framework/legacy/Needlworks.PHP.Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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','Page','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");
Expand All @@ -86,5 +91,6 @@ public static function load($name) {
}
}
}
spl_autoload_register(array('Autoload_Legacy', 'load'));
?>
$autoloadInstance_Legacy = new Autoload_Legacy();
spl_autoload_register(array($autoloadInstance_Legacy, 'load'));
?>
2 changes: 1 addition & 1 deletion library/model/blog.comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ function getComments($entry,$order = 'ASC') {
$pool->setQualifier('blogid','eq',$context->getProperty('blog.id'));
$pool->setQualifier('entry','eq',$entry);
$pool->setQualifier('parent','eq',NULL);
$pool->setQualifier('isfiltered','eq',0);
$pool->setQualifier('isfiltered','eq',0);
if ( $entry == 0 ) $pool->setOrder('written','desc');
else if ($order == 'DESC') {
$pool->setOrder('id','desc');
Expand Down
2 changes: 1 addition & 1 deletion library/preprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/// 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('ROOT', '.');
define('ROOT',dirname(__FILE__));
require_once(ROOT.'/framework/id/textcube/Dispatcher.php');
/** Dispatching Interface request via URI */
$dispatcher = Dispatcher::getInstance();
/** Interface Loading */
if (empty($service['debugmode'])) { @include_once $dispatcher->interfacePath;}
else {include_once $dispatcher->interfacePath;}
?>
?>
6 changes: 6 additions & 0 deletions skin/admin/canon/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ hr
border : 1px solid #444;
}

.return-box
{
margin-top : 20px;
text-align : right;
}

#message-box
{
background-color : rgba(242,242,242,0.7);
Expand Down
7 changes: 7 additions & 0 deletions skin/admin/whitedream/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ hr
vertical-align : middle;
}


.return-box
{
margin-top : 20px;
text-align : right;
}

#message-box
{
background-color : #F2F2F2;
Expand Down

0 comments on commit 439ef77

Please sign in to comment.