[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/inc class.bo.inc.php,1.4,1.
From: |
Patrick Walsh <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/inc class.bo.inc.php,1.4,1.5 |
Date: |
Thu, 05 Sep 2002 02:57:54 -0400 |
Update of /cvsroot/phpgroupware/sitemgr/sitemgr-site/inc
In directory subversions:/tmp/cvs-serv16269/inc
Modified Files:
class.bo.inc.php
Log Message:
bunch of changes having to do with nested categories
Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/sitemgr-site/inc/class.bo.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.bo.inc.php 2 Sep 2002 23:08:13 -0000 1.4
--- class.bo.inc.php 5 Sep 2002 06:57:52 -0000 1.5
***************
*** 64,70 ****
}
! function getIndex()
{
! $cats = $this->getCatLinks();
$index = array();
--- 64,70 ----
}
! function getIndex($showhidden=true, $rootonly=false)
{
! $cats = $this->getCatLinks(0,!$rootonly);
$index = array();
***************
*** 75,79 ****
while(list($cat_id,$cat) = each($cats))
{
! $pages = $this->getPageLinks($cat_id);
if (count($pages)>0)
{
--- 75,79 ----
while(list($cat_id,$cat) = each($cats))
{
! $pages =
$this->getPageLinks($cat_id,$showhidden);
if (count($pages)>0)
{
***************
*** 82,85 ****
--- 82,86 ----
$index[] = array(
'catname'=>$cat['name'],
+
'catlink'=>$cat['link'],
'catdescrip'=>$cat['description'],
'pagename'=>$link['name'],
***************
*** 95,98 ****
--- 96,100 ----
'catname'=>$cat['name'],
'catdescrip'=>$cat['description'],
+ 'catlink'=>$cat['link'],
'pagelink'=>'No pages
in this section.'
);
***************
*** 175,179 ****
}
! function getPageLinks($category_id)
{
$pages=$this->pages_bo->getPageIDList($category_id);
--- 177,181 ----
}
! function getPageLinks($category_id, $showhidden=true)
{
$pages=$this->pages_bo->getPageIDList($category_id);
***************
*** 181,202 ****
{
$page=$this->pages_bo->getPage($page_id);
! if (strtolower($page->subtitle) == 'link')
{
! $pglinks[$page_id] = array(
! 'name'=>$page->name,
! 'link'=>'<a
href="'.$page->content.'">'.$page->title.'</a>',
! 'title'=>$page->title,
! 'subtitle'=>''
! );
! }
! else
! {
! $pglinks[$page_id] = array(
! 'name'=>$page->name,
! 'link'=>'<a
href="'.sitemgr_link2('/index.php','page_name='.
!
$page->name).'">'.$page->title.'</a>',
! 'title'=>$page->title,
! 'subtitle'=>$page->subtitle
! );
}
}
--- 183,207 ----
{
$page=$this->pages_bo->getPage($page_id);
! if ($showhidden || !$page->hidden)
{
! if (strtolower($page->subtitle) ==
'link')
! {
! $pglinks[$page_id] = array(
! 'name'=>$page->name,
! 'link'=>'<a
href="'.$page->content.'">'.$page->title.'</a>',
! 'title'=>$page->title,
! 'subtitle'=>''
! );
! }
! else
! {
! $pglinks[$page_id] = array(
! 'name'=>$page->name,
! 'link'=>'<a
href="'.sitemgr_link2('/index.php','page_name='.
!
$page->name).'">'.$page->title.'</a>',
! 'title'=>$page->title,
!
'subtitle'=>$page->subtitle
! );
! }
}
}
***************
*** 204,211 ****
}
! function getCatLinks()
{
$catlinks = array();
!
$cat_list=$this->catbo->getPermittedCategoryIDReadList();
foreach($cat_list as $cat_id)
{
--- 209,223 ----
}
! function getCatLinks($cat_id=0,$recurse=true)
{
$catlinks = array();
! if ($recurse)
! {
!
$cat_list=$this->catbo->getPermittedCatReadNested($cat_id);
! }
! else
! {
!
$cat_list=$this->catbo->getPermittedCategoryIDReadList($cat_id);
! }
foreach($cat_list as $cat_id)
{
***************
*** 213,219 ****
$catlinks[$cat_id] = array(
'name'=>$category->name,
! 'link'=>'<a
href="'.sitemgr_link2('/index.php','category_id='.$cat_id).'">'.
! $category->name.'</a>',
! 'description'=>$category->description
);
}
--- 225,232 ----
$catlinks[$cat_id] = array(
'name'=>$category->name,
! 'link'=>'<a
href="'.sitemgr_link2('/index.php',
!
'category_id='.$cat_id).'">'.$category->name.'</a>',
! 'description'=>$category->description,
! 'depth'=>$category->depth
);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/inc class.bo.inc.php,1.4,1.5,
Patrick Walsh <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/blocks block-SiteIndex.php,1.1.1.1,1.2 block-Table_of_Contents.php,1.1.1.1,1.2
- Next by Date:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/templates footer.tpl,NONE,1.1 header.tpl,NONE,1.1
- Previous by thread:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/blocks block-SiteIndex.php,1.1.1.1,1.2 block-Table_of_Contents.php,1.1.1.1,1.2
- Next by thread:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/templates footer.tpl,NONE,1.1 header.tpl,NONE,1.1
- Index(es):