Skip to content

Commit

Permalink
refs #514
Browse files Browse the repository at this point in the history
  * Synchronize with 1.8 branch
  • Loading branch information
inureyes committed Aug 19, 2010
1 parent f0f0973 commit 36bd6a9
Show file tree
Hide file tree
Showing 71 changed files with 1,717 additions and 1,127 deletions.
4 changes: 3 additions & 1 deletion documents/manual_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ $database['port'] = 3639; // Database port number
$database['dbms'] = 'MySQL'; // DBMS. (MySQL, MySQLi, PostgreSQL, Cubrid.)
$service['memcached'] = false; // Using memcache to handle session and cache
$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)
?>
14 changes: 8 additions & 6 deletions documents/manual_workflow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Dispatching +------+------+
+------+------+
|
rewrite.php
|
/framework/Dispatcher.php
| + /config.php
(Context / URL / configuration loading)
|
Expand All @@ -23,9 +25,11 @@ Dispatching +------+------+
|
-------------------------------------- library/preprocessor.php (Preprocessing) -----------------
|
Base components loading
Base components loading ( /framework/boot )
+ Environment Normalization (Unification)
+ Core component loading
+ Component / library autoload setting
+ Authenticating settings
|
Validation
+ Basic POST/GET value validation
Expand All @@ -44,22 +48,20 @@ Dispatching +------+------+
/library/include.php
| + /library/config.php
| + /config.php (override)
| + /library/component/~
| [Loading mandatory models / views]
| + /library/model/~
| + /library/view/~
------------ |
Initializing |
|
If database needed,
+------------------------------+--------------=====----------+
+------------------------------+-----------------------------+
| |
| Initializing database I/O |
| + /library/components/Needlworks.DBMS.XXX.php |
| + /framework/data/DBModel.php |
| |
| Loading memcache module (if use) |
| Creating Session (if requested) |
| + /library/components/Textcube.Data.Session.XXX.php |
| + /framework/legacy/Textcube.Data.Session.XXX.php |
+------------------------------+-----------------------------+
|
If initialization needed,
Expand Down
1 change: 0 additions & 1 deletion framework/boot/30-Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ function authorize( $domain, $userid ) {
$data->setQualifier('userid','equals',intval($userid));
$data->setAttribute('lastLogin',Timestamp::getUNIXtime());
$data->update();
// POD::execute("UPDATE {$this->context->getProperty('database.prefix')}Privileges SET lastLogin = ".Timestamp::getUNIXtime()." WHERE blogid = $blogid AND userid = $userid");
return;
}

Expand Down
2 changes: 0 additions & 2 deletions framework/legacy/Textcube.Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
/* This component contains 'User', 'Blog' and 'Transaction' class.
NOTE : Classes described below are actually not object. Usually they are static.*/

requireComponent('Textcube.Control.Auth');

// for Global Cache
global $__gCacheUserNames;
$__gCacheUserNames = array();
Expand Down
4 changes: 2 additions & 2 deletions framework/legacy/Textcube.Data.Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,13 @@ function updateRemoteResponses($id = null) {
return false;
$succeeded = true;
foreach ($posts as $id) {
$trackbacks = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}RemoteResponses WHERE blogid = ".$this->blogid." AND entry = $id AND isfiltered = 0 AND type = 'trackback'");
$trackbacks = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}RemoteResponses WHERE blogid = ".$this->blogid." AND entry = $id AND isfiltered = 0 AND responsetype = 'trackback'");
if (!is_null($trackbacks)) {
if (!POD::execute("UPDATE {$database['prefix']}Entries SET trackbacks = $trackbacks
WHERE blogid = ".$this->blogid." AND id = $id"))
$succeeded = false;
}
$pingbacks = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}RemoteResponses WHERE blogid = ".$this->blogid." AND entry = $id AND isFiltered = 0 AND type = 'pingback'");
$pingbacks = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}RemoteResponses WHERE blogid = ".$this->blogid." AND entry = $id AND isFiltered = 0 AND responsetype = 'pingback'");
if (!is_null($pingbacks)) {
if (!POD::execute("UPDATE {$database['prefix']}Entries SET pingbacks = $pingbacks
WHERE blogid = ".$this->blogid." AND id = $id"))
Expand Down
8 changes: 4 additions & 4 deletions framework/legacy/Textcube.Data.RemoteResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function open($filter = '', $fields = '*', $sort = 'written') {
if (!empty($sort))
$sort = 'ORDER BY ' . $sort;
$this->close();
$this->_result = POD::query("SELECT $fields FROM {$database['prefix']}RemoteResponses WHERE blogid = ".getBlogId()." AND type = 'trackback' $filter $sort");
$this->_result = POD::query("SELECT $fields FROM {$database['prefix']}RemoteResponses WHERE blogid = ".getBlogId()." AND responsetype = 'trackback' $filter $sort");
if ($this->_result) {
if ($this->_count = POD::num_rows($this->_result))
return $this->shift();
Expand Down Expand Up @@ -114,7 +114,7 @@ function _buildQuery() {
$query = DBModel::getInstance();
$query->reset('RemoteResponses');
$query->setQualifier('blogid', getBlogId());
$query->setQualifier('type', 'trackback');
$query->setQualifier('responsetype', 'trackback');
if (isset($this->id)) {
if (!Validator::number($this->id, 1))
return $this->_error('id');
Expand Down Expand Up @@ -196,7 +196,7 @@ function open($filter = '', $fields = '*', $sort = 'written') {
if (!empty($sort))
$sort = 'ORDER BY ' . $sort;
$this->close();
$this->_result = POD::query("SELECT $fields FROM {$database['prefix']}RemoteResponses WHERE blogid = ".getBlogId()." AND type = 'pingback' $filter $sort");
$this->_result = POD::query("SELECT $fields FROM {$database['prefix']}RemoteResponses WHERE blogid = ".getBlogId()." AND responsetype = 'pingback' $filter $sort");
if ($this->_result) {
if ($this->_count = POD::num_rows($this->_result))
return $this->shift();
Expand Down Expand Up @@ -282,7 +282,7 @@ function _buildQuery() {
$query = DBModel::getInstance();
$query->reset('RemoteResponses');
$query->setQualifier('blogid', getBlogId());
$query->setQualifier('type', 'pingback');
$query->setQualifier('responsetype', 'pingback');
if (isset($this->id)) {
if (!Validator::number($this->id, 1))
return $this->_error('id');
Expand Down
Loading

0 comments on commit 36bd6a9

Please sign in to comment.