[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: sitemgr/inc class.Categories_SO.inc.php,1.12,1.1
From: |
Michael Totschnig <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: sitemgr/inc class.Categories_SO.inc.php,1.12,1.13 class.Content_SO.inc.php,1.1,1.2 class.Modules_SO.inc.php,1.1,1.2 class.Pages_SO.inc.php,1.11,1.12 |
Date: |
Tue, 28 Jan 2003 15:00:02 -0500 |
Update of /cvsroot/phpgroupware/sitemgr/inc
In directory subversions:/tmp/cvs-serv32375/inc
Modified Files:
class.Categories_SO.inc.php class.Content_SO.inc.php
class.Modules_SO.inc.php class.Pages_SO.inc.php
Log Message:
SQL changes with respect to errors on MsSQL (reported by Sigurd Nes)
Index: class.Categories_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Categories_SO.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.Categories_SO.inc.php 17 Jan 2003 03:37:52 -0000 1.12
--- class.Categories_SO.inc.php 28 Jan 2003 20:00:00 -0000 1.13
***************
*** 15,23 ****
if ($parent)
{
! $cats =
$this->cats->return_array('all','',False,'','','cat_data',False,$parent);
}
else
{
! $cats =
$this->cats->return_array('mains','',False,'','','cat_data',False, 0);
}
while (list(,$subs) = @each($cats))
--- 15,23 ----
if ($parent)
{
! $cats =
$this->cats->return_array('all','',False,'','','',False,$parent);
}
else
{
! $cats =
$this->cats->return_array('mains','',False,'','','',False, 0);
}
while (list(,$subs) = @each($cats))
***************
*** 33,37 ****
function getFullCategoryIDList()
{
! $cats =
$this->cats->return_array('all','',False,'','','cat_data',False);
while (list(,$cat) = @each($cats))
--- 33,37 ----
function getFullCategoryIDList()
{
! $cats =
$this->cats->return_array('all','',False,'','','',False);
while (list(,$cat) = @each($cats))
Index: class.Content_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Content_SO.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.Content_SO.inc.php 17 Jan 2003 03:37:52 -0000 1.1
--- class.Content_SO.inc.php 28 Jan 2003 20:00:00 -0000 1.2
***************
*** 20,24 ****
$block->page__id = 0;
}
! $sql = "INSERT INTO phpgw_sitemgr_content
(area,module_id,page_id,cat_id,sort_order,view,actif) VALUES ('" .
$block->area . "'," . $block->module_id . "," .
$block->page_id . "," . $block->cat_id . ",0,0,0)";
return $this->db->query($sql,__LINE__,__FILE__);
--- 20,24 ----
$block->page__id = 0;
}
! $sql = "INSERT INTO phpgw_sitemgr_content
(area,module_id,page_id,cat_id,sort_order,viewable,actif) VALUES ('" .
$block->area . "'," . $block->module_id . "," .
$block->page_id . "," . $block->cat_id . ",0,0,0)";
return $this->db->query($sql,__LINE__,__FILE__);
***************
*** 61,65 ****
function getallblocksforarea($area,$cat_list,$page_id,$lang)
{
! $sql = "SELECT
t1.block_id,area,cat_id,page_id,t1.module_id,app_name,module_name,arguments,arguments_lang,sort_order,title,view,actif
FROM phpgw_sitemgr_content AS t1,phpgw_sitemgr_modules AS t2 LEFT JOIN
phpgw_sitemgr_content_lang as t3 ON (t1.block_id=t3.block_id AND lang='$lang')
WHERE t1.module_id = t2.module_id AND area = '$area' AND ((page_id = 0 and
cat_id = 0)";
if ($cat_list)
{
--- 61,65 ----
function getallblocksforarea($area,$cat_list,$page_id,$lang)
{
! $sql = "SELECT
t1.block_id,area,cat_id,page_id,t1.module_id,app_name,module_name,arguments,arguments_lang,sort_order,title,viewable,actif
FROM phpgw_sitemgr_content AS t1,phpgw_sitemgr_modules AS t2 LEFT JOIN
phpgw_sitemgr_content_lang as t3 ON (t1.block_id=t3.block_id AND lang='$lang')
WHERE t1.module_id = t2.module_id AND area = '$area' AND ((page_id = 0 and
cat_id = 0)";
if ($cat_list)
{
***************
*** 92,96 ****
$block->sort_order = $this->db->f('sort_order');
$block->title =
stripslashes($this->db->f('title'));
! $block->view = $this->db->f('view');
$block->actif = $this->db->f('actif');
$result[$id] = $block;
--- 92,96 ----
$block->sort_order = $this->db->f('sort_order');
$block->title =
stripslashes($this->db->f('title'));
! $block->view = $this->db->f('viewable');
$block->actif = $this->db->f('actif');
$result[$id] = $block;
***************
*** 101,105 ****
function getvisibleblockdefsforarea($area,$cat_list,$page_id)
{
! $sql = "SELECT
t1.block_id,area,cat_id,page_id,t1.module_id,app_name,module_name,view FROM
phpgw_sitemgr_content AS t1,phpgw_sitemgr_modules AS t2 WHERE t1.module_id =
t2.module_id AND area = '$area' AND ((page_id = 0 and cat_id = 0)";
if ($cat_list)
{
--- 101,105 ----
function getvisibleblockdefsforarea($area,$cat_list,$page_id)
{
! $sql = "SELECT
t1.block_id,area,cat_id,page_id,t1.module_id,app_name,module_name,viewable FROM
phpgw_sitemgr_content AS t1,phpgw_sitemgr_modules AS t2 WHERE t1.module_id =
t2.module_id AND area = '$area' AND ((page_id = 0 and cat_id = 0)";
if ($cat_list)
{
***************
*** 126,130 ****
$block->app_name = $this->db->f('app_name');
$block->module_name =
$this->db->f('module_name');
! $block->view = $this->db->f('view');
$result[$id] = $block;
}
--- 126,130 ----
$block->app_name = $this->db->f('app_name');
$block->module_name =
$this->db->f('module_name');
! $block->view = $this->db->f('viewable');
$result[$id] = $block;
}
***************
*** 165,169 ****
function getblock($block_id,$lang)
{
! $sql = "SELECT
t1.block_id,cat_id,page_id,area,t1.module_id,app_name,module_name,arguments,arguments_lang,sort_order,title,view,actif
FROM phpgw_sitemgr_content AS t1,phpgw_sitemgr_modules AS t2 LEFT JOIN
phpgw_sitemgr_content_lang as t3 ON (t1.block_id=t3.block_id AND lang='$lang')
WHERE t1.module_id = t2.module_id AND t1.block_id = $block_id";
$this->db->query($sql,__LINE__,__FILE__);
if ($this->db->next_record())
--- 165,169 ----
function getblock($block_id,$lang)
{
! $sql = "SELECT
t1.block_id,cat_id,page_id,area,t1.module_id,app_name,module_name,arguments,arguments_lang,sort_order,title,viewable,actif
FROM phpgw_sitemgr_content AS t1,phpgw_sitemgr_modules AS t2 LEFT JOIN
phpgw_sitemgr_content_lang as t3 ON (t1.block_id=t3.block_id AND lang='$lang')
WHERE t1.module_id = t2.module_id AND t1.block_id = $block_id";
$this->db->query($sql,__LINE__,__FILE__);
if ($this->db->next_record())
***************
*** 183,187 ****
$block->sort_order = $this->db->f('sort_order');
$block->title =
stripslashes($this->db->f('title'));
! $block->view = $this->db->f('view');
$block->actif = $this->db->f('actif');
return $block;
--- 183,187 ----
$block->sort_order = $this->db->f('sort_order');
$block->title =
stripslashes($this->db->f('title'));
! $block->view = $this->db->f('viewable');
$block->actif = $this->db->f('actif');
return $block;
***************
*** 220,226 ****
//this is necessary because double slashed data breaks
while serialized
$this->remove_magic_quotes($data);
! $s = addslashes(serialize($data));
$sql = "UPDATE phpgw_sitemgr_content SET arguments =
'$s', sort_order = " . (int)$block->sort_order .
! ", view = " . $block->view . ", actif = " .
$block->actif . " WHERE block_id = " . $block->id;
return $this->db->query($sql,__LINE__,__FILE__);
}
--- 220,226 ----
//this is necessary because double slashed data breaks
while serialized
$this->remove_magic_quotes($data);
! $s = $this->db->db_addslashes(serialize($data));
$sql = "UPDATE phpgw_sitemgr_content SET arguments =
'$s', sort_order = " . (int)$block->sort_order .
! ", viewable = " . $block->view . ", actif = " .
$block->actif . " WHERE block_id = " . $block->id;
return $this->db->query($sql,__LINE__,__FILE__);
}
***************
*** 230,235 ****
//this is necessary because double slashed data breaks
while serialized
$this->remove_magic_quotes($data);
! $s = addslashes(serialize($data));
! $title = addslashes($block->title);
$blockid = $block->id;
$sql = "DELETE FROM phpgw_sitemgr_content_lang WHERE
block_id = $blockid AND lang = '$lang'";
--- 230,235 ----
//this is necessary because double slashed data breaks
while serialized
$this->remove_magic_quotes($data);
! $s = $this->db->db_addslashes(serialize($data));
! $title = $this->db->db_addslashes($block->title);
$blockid = $block->id;
$sql = "DELETE FROM phpgw_sitemgr_content_lang WHERE
block_id = $blockid AND lang = '$lang'";
Index: class.Modules_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Modules_SO.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.Modules_SO.inc.php 17 Jan 2003 03:37:52 -0000 1.1
--- class.Modules_SO.inc.php 28 Jan 2003 20:00:00 -0000 1.2
***************
*** 13,17 ****
{
$this->deletemoduleproperties($module_id,$contentarea,$cat_id);
! $s = addslashes(serialize($data));
$sql = "INSERT INTO phpgw_sitemgr_properties
(area,cat_id,module_id,properties) VALUES
('$contentarea',$cat_id,'$module_id','$s')";
$this->db->query($sql,__LINE__,__FILE__);
--- 13,17 ----
{
$this->deletemoduleproperties($module_id,$contentarea,$cat_id);
! $s = $this->db->db_addslashes(serialize($data));
$sql = "INSERT INTO phpgw_sitemgr_properties
(area,cat_id,module_id,properties) VALUES
('$contentarea',$cat_id,'$module_id','$s')";
$this->db->query($sql,__LINE__,__FILE__);
***************
*** 48,52 ****
function registermodule($app_name,$modulename,$description)
{
! $description = addslashes($description);
$sql = "SELECT count(*) FROM phpgw_sitemgr_modules
where app_name='$app_name' AND module_name='$modulename'";
$this->db->query($sql,__LINE__,__FILE__);
--- 48,52 ----
function registermodule($app_name,$modulename,$description)
{
! $description = $this->db->db_addslashes($description);
$sql = "SELECT count(*) FROM phpgw_sitemgr_modules
where app_name='$app_name' AND module_name='$modulename'";
$this->db->query($sql,__LINE__,__FILE__);
Index: class.Pages_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Pages_SO.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.Pages_SO.inc.php 18 Jan 2003 04:30:34 -0000 1.11
--- class.Pages_SO.inc.php 28 Jan 2003 20:00:00 -0000 1.12
***************
*** 150,154 ****
$sql = 'UPDATE phpgw_sitemgr_pages SET ' .
'cat_id=\'' . $pageInfo->cat_id . '\',' .
! 'name=\'' . addslashes($pageInfo->name) . '\','
.
'sort_order=\'' . (int) $pageInfo->sort_order .
'\',' .
'hide_page=\'' . $pageInfo->hidden . '\' ' .
--- 150,154 ----
$sql = 'UPDATE phpgw_sitemgr_pages SET ' .
'cat_id=\'' . $pageInfo->cat_id . '\',' .
! 'name=\'' .
$this->db->db_addslashes($pageInfo->name) . '\',' .
'sort_order=\'' . (int) $pageInfo->sort_order .
'\',' .
'hide_page=\'' . $pageInfo->hidden . '\' ' .
***************
*** 165,170 ****
{
$sql = "UPDATE phpgw_sitemgr_pages_lang SET " .
! "title='" .
addslashes($pageInfo->title) . "'," .
! "subtitle='" .
addslashes($pageInfo->subtitle) . "' WHERE page_id='$page_id' and lang='$lang'";
$this->db->query($sql, __LINE__,__FILE__);
return true;
--- 165,170 ----
{
$sql = "UPDATE phpgw_sitemgr_pages_lang SET " .
! "title='" .
$this->db->db_addslashes($pageInfo->title) . "'," .
! "subtitle='" .
$this->db->db_addslashes($pageInfo->subtitle) . "' WHERE page_id='$page_id' and
lang='$lang'";
$this->db->query($sql, __LINE__,__FILE__);
return true;
***************
*** 173,178 ****
{
$sql = "INSERT INTO phpgw_sitemgr_pages_lang
(page_id,lang,title,subtitle) VALUES ('$page_id','$lang','" .
! addslashes($pageInfo->title) . "','" .
! addslashes($pageInfo->subtitle) . "')";
$this->db->query($sql, __LINE__,__FILE__);
return true;
--- 173,178 ----
{
$sql = "INSERT INTO phpgw_sitemgr_pages_lang
(page_id,lang,title,subtitle) VALUES ('$page_id','$lang','" .
!
$this->db->db_addslashes($pageInfo->title) . "','" .
!
$this->db->db_addslashes($pageInfo->subtitle) . "')";
$this->db->query($sql, __LINE__,__FILE__);
return true;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: sitemgr/inc class.Categories_SO.inc.php,1.12,1.13 class.Content_SO.inc.php,1.1,1.2 class.Modules_SO.inc.php,1.1,1.2 class.Pages_SO.inc.php,1.11,1.12,
Michael Totschnig <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: sitemgr/setup setup.inc.php,1.10,1.11 tables_current.inc.php,1.9,1.10 tables_update.inc.php,1.8,1.9
- Next by Date:
[Phpgroupware-cvs] CVS: bookmarks/setup phpgw_en.lang,1.5.2.2,1.5.2.3 phpgw_fr.lang,1.4.2.2,1.4.2.3
- Previous by thread:
[Phpgroupware-cvs] CVS: sitemgr/setup setup.inc.php,1.10,1.11 tables_current.inc.php,1.9,1.10 tables_update.inc.php,1.8,1.9
- Next by thread:
[Phpgroupware-cvs] CVS: bookmarks/setup phpgw_en.lang,1.5.2.2,1.5.2.3 phpgw_fr.lang,1.4.2.2,1.4.2.3
- Index(es):