[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: sitemgr/inc class.Pages_BO.inc.php, 1.5.2.2, 1.
From: |
Dave Hall <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: sitemgr/inc class.Pages_BO.inc.php, 1.5.2.2, 1.5.2.3 class.Pages_SO.inc.php, 1.12.2.7, 1.12.2.8 |
Date: |
Tue, 26 Aug 2003 07:39:41 -0400 |
Update of /cvsroot/phpgroupware/sitemgr/inc
In directory subversions:/tmp/cvs-serv15639
Modified Files:
Tag: Version-0_9_16-branch
class.Pages_BO.inc.php class.Pages_SO.inc.php
Log Message:
finally got it right ... i hope
Index: class.Pages_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Pages_BO.inc.php,v
retrieving revision 1.5.2.2
retrieving revision 1.5.2.3
diff -C2 -r1.5.2.2 -r1.5.2.3
*** class.Pages_BO.inc.php 24 Aug 2003 07:02:27 -0000 1.5.2.2
--- class.Pages_BO.inc.php 26 Aug 2003 11:39:37 -0000 1.5.2.3
***************
*** 111,125 ****
function savePageInfo($page_Info,$lang)
{
- $cats = CreateObject('phpgwapi.categories');
- $cat_list = $cats->return_sorted_array(0, False, '',
'', '', False, CURRENT_SITE_ID, -1, 'id');
-
- if($cat_list)
- {
- foreach($cat_list as $null => $val)
- {
- $site_cats[] = $val['id'];
- }
- }
-
$oldpage = $this->getpage($page_Info->id);
--- 111,114 ----
***************
*** 140,144 ****
}
! if
($this->so->pageExists($page_Info->name,$page_Info->id, $site_cats))
{
$page_Info->name .= '--FIX-DUPLICATE-NAME';
--- 129,133 ----
}
! if
($this->so->pageExists($page_Info->name,$page_Info->id))
{
$page_Info->name .= '--FIX-DUPLICATE-NAME';
Index: class.Pages_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Pages_SO.inc.php,v
retrieving revision 1.12.2.7
retrieving revision 1.12.2.8
diff -C2 -r1.12.2.7 -r1.12.2.8
*** class.Pages_SO.inc.php 26 Aug 2003 06:24:10 -0000 1.12.2.7
--- class.Pages_SO.inc.php 26 Aug 2003 11:39:37 -0000 1.12.2.8
***************
*** 57,81 ****
}
! function pageExists($page_name, $exclude_page_id='',
$site_cats=0)
{
! $sql = 'SELECT page_id FROM phpgw_sitemgr_pages ';
! $sql .= "WHERE name='" .
$this->db->db_addslashes($page_name) . "' ";
! if ($exclude_page_id)
! {
! $sql .= "AND page_id!='".
$this->db->db_addslashes($exclude_page_id) . "' ";
! }
! if($site_cats)
! {
! $sql .= 'AND cat_id IN(' . implode(',',
$site_cats) . ') ';
! }
!
! $this->db->query($sql,__LINE__,__FILE__);
! if ($this->db->next_record())
{
! return $this->db->f('page_id');
}
else
{
! return false;
}
}
--- 57,71 ----
}
! //this function should be a deprecated function - IMHO - skwashd
! function pageExists($page_name, $exclude_page_id='')
{
! $page_id = $this->PagetoID($page_name);
! if($page_id)
{
! return ($page_id != $exclude_page_id ? $page_id
: False);
}
else
{
! return False;
}
}
***************
*** 95,101 ****
function PagetoID($page_name)
{
!
! $cats = CreateObject('phpgwapi.categories');
! $cat_list = $cats->return_sorted_array(0, False, '',
'', '', False, CURRENT_SITE_ID, -1, 'id');
if($cat_list)
{
--- 85,91 ----
function PagetoID($page_name)
{
! $cats = CreateObject('phpgwapi.categories', -1,
'sitemgr');
! $cat_list = $cats->return_sorted_array(0, False, '',
'', '', False, CURRENT_SITE_ID);
!
if($cat_list)
{
***************
*** 108,112 ****
$sql = 'SELECT page_id FROM phpgw_sitemgr_pages ';
$sql .= "WHERE name='" .
$this->db->db_addslashes($page_name) . "' ";
! $sql .= 'AND cat_id IN(' . implode(',', $site_cats) .
')';
$this->db->query($sql,__LINE__,__FILE__);
if ($this->db->next_record())
--- 98,106 ----
$sql = 'SELECT page_id FROM phpgw_sitemgr_pages ';
$sql .= "WHERE name='" .
$this->db->db_addslashes($page_name) . "' ";
! if($site_cats)
! {
! $sql .= 'AND cat_id IN(' . implode(',',
$site_cats) . ')';
! }
!
$this->db->query($sql,__LINE__,__FILE__);
if ($this->db->next_record())
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: sitemgr/inc class.Pages_BO.inc.php, 1.5.2.2, 1.5.2.3 class.Pages_SO.inc.php, 1.12.2.7, 1.12.2.8,
Dave Hall <address@hidden> <=