summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2010-05-04 13:42:12 +0000
committerChristian Fowler <spider@viovio.com>2010-05-04 13:42:12 +0000
commitdce40afb6b8dfc8aec5d2c04d31c008ff8aeccb8 (patch)
treeb28578b24a3a99caf59b6c9ab266efa853e800b7
parent1a4684e10a1678864b6085723b07f6639f2a657e (diff)
downloadfisheye-dce40afb6b8dfc8aec5d2c04d31c008ff8aeccb8.tar.gz
fisheye-dce40afb6b8dfc8aec5d2c04d31c008ff8aeccb8.tar.bz2
fisheye-dce40afb6b8dfc8aec5d2c04d31c008ff8aeccb8.zip
add AdvancedPostgres check in getTree
-rw-r--r--FisheyeGallery.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/FisheyeGallery.php b/FisheyeGallery.php
index e505d9b..db56e2d 100644
--- a/FisheyeGallery.php
+++ b/FisheyeGallery.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeGallery.php,v 1.103 2010/04/28 04:48:15 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeGallery.php,v 1.104 2010/05/04 13:42:12 spiderr Exp $
* @package fisheye
*/
@@ -662,12 +662,16 @@ class FisheyeGallery extends FisheyeBase {
$ret = array();
foreach( array_keys( $rootContent ) as $conId ) {
$splitVars = array();
- $query = "SELECT branch AS hash_key, * $selectSql
- FROM connectby('`".BIT_DB_PREFIX."fisheye_gallery_image_map`', '`item_content_id`', '`gallery_content_id`', ?, 0, '/') AS t(cb_item_content_id int,cb_gallery_content_id int, level int, branch text)
- INNER JOIN `".BIT_DB_PREFIX."fisheye_gallery` fg ON (fg.`content_id`=cb_item_content_id)
- INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON(lc.`content_id`=fg.`content_id`)
- $joinSql
- ORDER BY branch, lc.`title`";
+ if( $this->mDb->isAdvancedPostgresEnabled() ) {
+ $query = "SELECT branch AS hash_key, * $selectSql
+ FROM connectby('`".BIT_DB_PREFIX."fisheye_gallery_image_map`', '`item_content_id`', '`gallery_content_id`', ?, 0, '/') AS t(cb_item_content_id int,cb_gallery_content_id int, level int, branch text)
+ INNER JOIN `".BIT_DB_PREFIX."fisheye_gallery` fg ON (fg.`content_id`=cb_item_content_id)
+ INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON(lc.`content_id`=fg.`content_id`)
+ $joinSql
+ ORDER BY branch, lc.`title`";
+ } else {
+// NEED TO FIX for other databases
+ }
$splitVars[] = $conId;
if( !empty( $containVars ) ) {
$splitVars[] = $containVars[0];