phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: sitemgr/inc class.Content_SO.inc.php,1.11,1.12


From: Michael Totschnig <address@hidden>
Subject: [Phpgroupware-cvs] CVS: sitemgr/inc class.Content_SO.inc.php,1.11,1.12
Date: Tue, 03 Jun 2003 12:01:43 -0400

Update of /cvsroot/phpgroupware/sitemgr/inc
In directory subversions:/tmp/cvs-serv16778

Modified Files:
        class.Content_SO.inc.php 
Log Message:
make GROUP BY clause SQL compliant (suggested by Ralf Becker)


Index: class.Content_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Content_SO.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.Content_SO.inc.php    1 Jun 2003 23:07:48 -0000       1.11
--- class.Content_SO.inc.php    3 Jun 2003 16:01:39 -0000       1.12
***************
*** 163,172 ****
                function getallblocks($cat_list,$states)
                {
!                       $sql = "SELECT COUNT(*) AS 
cnt,t1.block_id,area,cat_id,page_id,viewable,state FROM phpgw_sitemgr_blocks AS 
t1,phpgw_sitemgr_content as t2 WHERE t1.block_id=t2.block_id AND ((cat_id = " . 
CURRENT_SITE_ID  . ")";
!                       if ($cat_list)
!                       {
!                               $sql .= " OR (cat_id IN (" . 
implode(',',$cat_list) . "))";
!                       }
!                       $sql .= ") AND state IN (" . implode(',',$states) .") 
GROUP BY t1.block_id";
                        $block = CreateObject('sitemgr.Block_SO',True);
                        $result = array();
--- 163,170 ----
                function getallblocks($cat_list,$states)
                {
!                       $cat_list[] = CURRENT_SITE_ID;
!                       $sql = "SELECT COUNT(state) AS 
cnt,t1.block_id,area,cat_id,page_id,viewable,state FROM phpgw_sitemgr_blocks AS 
t1,phpgw_sitemgr_content as t2 WHERE t1.block_id=t2.block_id AND cat_id IN (" . 
implode(',',$cat_list) . ")";
!                       $sql .= " AND state IN (" . implode(',',$states) .") 
GROUP BY t1.block_id,area,cat_id,page_id,viewable";
! 
                        $block = CreateObject('sitemgr.Block_SO',True);
                        $result = array();





reply via email to

[Prev in Thread] Current Thread [Next in Thread]