summaryrefslogtreecommitdiff
path: root/LibertySystem.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2006-01-25 15:40:26 +0000
committerChristian Fowler <spider@viovio.com>2006-01-25 15:40:26 +0000
commit934e8af6fda5409746ae5a72bb3b98b443b2234f (patch)
treea21b127ba6bdee070d2c0afac6cf507c7dac56c2 /LibertySystem.php
parent1f8dc935f0bbdf396a149f8f27f25d73bfe3acc9 (diff)
downloadliberty-934e8af6fda5409746ae5a72bb3b98b443b2234f.tar.gz
liberty-934e8af6fda5409746ae5a72bb3b98b443b2234f.tar.bz2
liberty-934e8af6fda5409746ae5a72bb3b98b443b2234f.zip
Added uspport for multiple database backend support. This necessitates removal of all use of ->EOF and ->fields on the result sets. Also, queries that snag a single row and then use $rs->fields should
revert to the simpler getRow() funciton in the BitDb classes. BitDb.php was broken into kernel/BitDbBase.php and kernel/BitDbAdodb.php. kernel/BitDbPear.php was added wiht functionality for Pear::DB Also, the bitweavercore cvs module now works. So you can install a total barebones bitweaver - even without the wiki package. The main fix was to insure pageExists was only executing if wiki package was active so it would not select from non-existant tables
Diffstat (limited to 'LibertySystem.php')
-rwxr-xr-xLibertySystem.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/LibertySystem.php b/LibertySystem.php
index 0b02a1f..45a4899 100755
--- a/LibertySystem.php
+++ b/LibertySystem.php
@@ -3,7 +3,7 @@
* System class for handling the liberty package
*
* @package liberty
-* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.11 2006/01/20 11:08:50 squareing Exp $
+* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.12 2006/01/25 15:40:25 spiderr Exp $
* @author spider <spider@steelsun.com>
*/
@@ -61,10 +61,10 @@ class LibertySystem extends LibertyBase {
}
function loadPlugins() {
- $rs = $this->mDb->query( "SELECT * FROM `".BIT_DB_PREFIX."tiki_plugins`", NULL, BIT_QUERY_DEFAULT, BIT_QUERY_DEFAULT );
- while( $rs && !$rs->EOF ) {
- $this->mPlugins[$rs->fields['plugin_guid']] = $rs->fields;
- $rs->MoveNext();
+ if( $rs = $this->mDb->query( "SELECT * FROM `".BIT_DB_PREFIX."tiki_plugins`", NULL, BIT_QUERY_DEFAULT, BIT_QUERY_DEFAULT ) ) {
+ while( $row = $rs->fetchRow() ) {
+ $this->mPlugins[$row['plugin_guid']] = $row;
+ }
}
}
@@ -102,10 +102,10 @@ class LibertySystem extends LibertyBase {
}
function loadContentTypes( $pCacheTime=BIT_QUERY_CACHE_TIME ) {
- $rs = $this->mDb->query( "SELECT * FROM `".BIT_DB_PREFIX."tiki_content_types`", NULL, BIT_QUERY_DEFAULT, BIT_QUERY_DEFAULT );
- while( $rs && !$rs->EOF ) {
- $this->mContentTypes[$rs->fields['content_type_guid']] = $rs->fields;
- $rs->MoveNext();
+ if( $rs = $this->mDb->query( "SELECT * FROM `".BIT_DB_PREFIX."tiki_content_types`", NULL, BIT_QUERY_DEFAULT, BIT_QUERY_DEFAULT ) ) {
+ while( $row = $rs->fetchRow() ) {
+ $this->mContentTypes[$row['content_type_guid']] = $row;
+ }
}
}