[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: sitemgr/inc class.ACL_BO.inc.php,1.3,1.4 class.C
From: |
Michael Totschnig <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: sitemgr/inc class.ACL_BO.inc.php,1.3,1.4 class.Categories_BO.inc.php,1.7,1.8class.Categories_SO.inc.php,1.15,1.16 class.Categories_UI.inc.php,1.3,1.4 class.Common_UI.inc.php,1.12,1.13 class.Content_UI.inc.php,1.6,1.7 class.MainMenu_UI.inc.php,1.8,1.9 class.Modules_BO.inc.php,1.2,1.3 class.Modules_UI.inc.php,1.4,1.5 class.Pages_BO.inc.php,1.6,1.7 class.Pages_SO.inc.php,1.12,1.13 class.Sites_BO.inc.php,1.3,1.4 class.Sites_UI.inc.php,1.2,1.3 |
Date: |
Thu, 22 May 2003 23:37:27 -0400 |
Update of /cvsroot/phpgroupware/sitemgr/inc
In directory subversions:/tmp/cvs-serv7770/inc
Modified Files:
class.ACL_BO.inc.php class.Categories_BO.inc.php
class.Categories_SO.inc.php class.Categories_UI.inc.php
class.Common_UI.inc.php class.Content_UI.inc.php
class.MainMenu_UI.inc.php class.Modules_BO.inc.php
class.Modules_UI.inc.php class.Pages_BO.inc.php
class.Pages_SO.inc.php class.Sites_BO.inc.php
class.Sites_UI.inc.php
Log Message:
numerous bugs and improved ACL
Index: class.ACL_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.ACL_BO.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.ACL_BO.inc.php 22 May 2003 02:36:53 -0000 1.3
--- class.ACL_BO.inc.php 23 May 2003 03:37:25 -0000 1.4
***************
*** 29,56 ****
}
! function can_read_page($page_id)
! {
! /*!
! $acl->check_specific calls $acl->get_specific_rights
which is for this->account_id
! */
! $page = $this->pages_so->getPage($page_id);
! if ($page)
! {
! if ($this->is_admin())
! {
! return true;
! }
! $category_id = $page->cat_id;
! //$this->acl =
CreateObject('phpgwapi.acl',$this->logged_in_user);
! //return
($this->acl->get_rights('L'.$category_id,'sitemgr') & PHPGW_ACL_READ);
! return
($this->acl_so->get_permission('L'.$category_id) & PHPGW_ACL_READ);
! }
! else
! {
! return false;
! }
! }
!
! function is_admin($site_id=False,$account_id=False)
{
if (!$site_id)
--- 29,33 ----
}
! function is_admin($site_id=False)
{
if (!$site_id)
***************
*** 58,73 ****
$site_id = CURRENT_SITE_ID;
}
! if (!$account_id)
! {
! $account_id = $this->logged_in_user;
! }
! if ($this->acl_so->get_rights($account_id,'L'.$site_id)
& SITEMGR_ACL_IS_ADMIN)
! {
! return True;
! }
! else
! {
! return False;
! }
}
--- 35,39 ----
$site_id = CURRENT_SITE_ID;
}
! return $this->acl_so->get_permission('L'.$site_id) &
SITEMGR_ACL_IS_ADMIN;
}
***************
*** 162,171 ****
//$rights =
$this->acl->get_specific_rights('L'.$category_id,'sitemgr');
$rights =
$this->acl_so->get_rights($account_id, 'L'.$category_id);
! $permissions[] =
array('account_id'=>$account_id, 'rights'=>$rights);
}
return $permissions;
}
! //at there are only implicit permissions for the toplevel
site_category, is this a problem?
//everybody can read it, only admins can write it.
function can_read_category($category_id)
--- 128,137 ----
//$rights =
$this->acl->get_specific_rights('L'.$category_id,'sitemgr');
$rights =
$this->acl_so->get_rights($account_id, 'L'.$category_id);
! $permissions[$account_id] = $rights;
}
return $permissions;
}
! //at this moment there are only implicit permissions for the
toplevel site_category, is this a problem?
//everybody can read it, only admins can write it.
function can_read_category($category_id)
Index: class.Categories_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Categories_BO.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.Categories_BO.inc.php 22 May 2003 02:36:53 -0000 1.7
--- class.Categories_BO.inc.php 23 May 2003 03:37:25 -0000 1.8
***************
*** 3,7 ****
{
var $so;
!
function Categories_BO()
{
--- 3,8 ----
{
var $so;
! var $currentcats;
!
function Categories_BO()
{
***************
*** 10,13 ****
--- 11,21 ----
}
+ //since we need this information several times we store it once,
+ //this function is called by Sites_BO after the current site is
defined
+ function setcurrentcats()
+ {
+ $this->currentcats =
$this->so->getallcatidsforsite(CURRENT_SITE_ID);
+ }
+
function getCategoryOptionList()
{
***************
*** 29,32 ****
--- 37,44 ----
$cat_id = CURRENT_SITE_ID;
}
+ else
+ {
+ $this-check($cat_id);
+ }
return $this->getPermittedCatNested($cat_id,'read');
}
***************
*** 36,39 ****
--- 48,55 ----
{
$cat_id = CURRENT_SITE_ID;
+ }
+ else
+ {
+ $this-check($cat_id);
}
return $this->getPermittedCatNested($cat_id,'write');
***************
*** 86,89 ****
--- 102,109 ----
$cat_id = CURRENT_SITE_ID;
}
+ else
+ {
+ $this-check($cat_id);
+ }
$full_list = $this->so->getChildrenIDList($cat_id);
***************
*** 109,112 ****
--- 129,136 ----
$cat_id = CURRENT_SITE_ID;
}
+ else
+ {
+ $this-check($cat_id);
+ }
$full_list = $this->so->getChildrenIDList($cat_id);
***************
*** 135,139 ****
if ($GLOBALS['Common_BO']->acl->is_admin())
{
! return $this->so->addCategory($name,
$description, $parent);
}
else
--- 159,165 ----
if ($GLOBALS['Common_BO']->acl->is_admin())
{
! $cat_id = $this->so->addCategory($name,
$description, $parent);
! $this->currentcats[] = $cat_id;
! return $cat_id;
}
else
***************
*** 147,150 ****
--- 173,178 ----
function removeCategory($cat_id,$force=False,$recurse=False)
{
+ $this->check($cat_id);
+
if ($GLOBALS['Common_BO']->acl->is_admin() || $force)
{
***************
*** 211,217 ****
}
! function getCategory($cat_id,$lang=False)
{
! if
($GLOBALS['Common_BO']->acl->can_read_category($cat_id))
{
return $this->so->getCategory($cat_id,$lang);
--- 239,246 ----
}
! //$force is for bypassing ACL when we called from Sites_UI for
building up the info for the currentsite
! function getCategory($cat_id,$lang=False,$force=False)
{
! if ($force || ($this->check($cat_id) &&
$GLOBALS['Common_BO']->acl->can_read_category($cat_id)))
{
return $this->so->getCategory($cat_id,$lang);
***************
*** 225,229 ****
function getCategoryancestorids($cat_id,$permittedonly=False)
{
! $cat_id = $cat_id ? $cat_id : CURRENT_SITE_ID;
$result = array();
while ($cat_id != CURRENT_SITE_ID)
--- 254,265 ----
function getCategoryancestorids($cat_id,$permittedonly=False)
{
! if (!$cat_id)
! {
! $cat_id = CURRENT_SITE_ID;
! }
! else
! {
! $this->check($cat_id);
! }
$result = array();
while ($cat_id != CURRENT_SITE_ID)
***************
*** 240,246 ****
function getlangarrayforcategory($cat_id)
! {
return $this->so->getlangarrayforcategory($cat_id);
! }
function saveCategoryPerms($cat_id, $group_access, $user_access)
--- 276,282 ----
function getlangarrayforcategory($cat_id)
! {
return $this->so->getlangarrayforcategory($cat_id);
! }
function saveCategoryPerms($cat_id, $group_access, $user_access)
***************
*** 328,331 ****
--- 364,381 ----
{
$this->so->migratealllang($oldlang,$newlang);
+ }
+
+ //make sure cat_id belongs to current site
+ function check($cat_id)
+ {
+ if (in_array($cat_id,$this->currentcats))
+ {
+ return True;
+ }
+ else
+ {
+ echo '<p><center><b>'.lang('Attempt to access
information outside current website').'</b></center>';
+ $GLOBALS['phpgw']->common->phpgw_exit(True);
+ }
}
}
Index: class.Categories_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Categories_SO.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.Categories_SO.inc.php 22 May 2003 06:19:23 -0000 1.15
--- class.Categories_SO.inc.php 23 May 2003 03:37:25 -0000 1.16
***************
*** 12,15 ****
--- 12,27 ----
}
+ function getallcatidsforsite($site_id)
+ {
+ $result = array();
+ //the API's category class does not permit to retrieve
all children of a main category
+ $this->db->query("SELECT cat_id from phpgw_categories
WHERE cat_main = $site_id",__LINE__,__FILE__);
+ while ($this->db->next_record())
+ {
+ $result[] = $this->db->f('cat_id');
+ }
+ return $result;
+ }
+
function getChildrenIDList($parent)
{
Index: class.Categories_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Categories_UI.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.Categories_UI.inc.php 22 May 2003 06:19:23 -0000 1.3
--- class.Categories_UI.inc.php 23 May 2003 03:37:25 -0000 1.4
***************
*** 234,241 ****
//$this->t->set_var('group_id',$permissionlist[$i]['account_id']);
$account_name =
$grouplist[$i]['account_lid'];
!
$this->t->set_var('group_id',$grouplist[$i]['account_id']);
if ($cat_id)
{
! $permission_id =
$permissionlist[$i]['rights'];
}
else
--- 234,242 ----
//$this->t->set_var('group_id',$permissionlist[$i]['account_id']);
$account_name =
$grouplist[$i]['account_lid'];
! $account_id =
$grouplist[$i]['account_id'];
!
$this->t->set_var('group_id',$account_id);
if ($cat_id)
{
! $permission_id =
$permissionlist[$account_id];
}
else
***************
*** 245,252 ****
$this->t->set_var('groupname',
$account_name);
! if ($permission_id == PHPGW_ACL_ADD)
! {
! $permission_id = PHPGW_ACL_ADD
| PHPGW_ACL_READ;
! }
if ($permission_id & PHPGW_ACL_READ)
{
--- 246,254 ----
$this->t->set_var('groupname',
$account_name);
! //I comment out the assumption, that when you write, you should necessarily
read,
! // if ($permission_id == PHPGW_ACL_ADD)
! // {
! // $permission_id = PHPGW_ACL_ADD
| PHPGW_ACL_READ;
! // }
if ($permission_id & PHPGW_ACL_READ)
{
***************
*** 283,289 ****
{
$user_name =
$userlist[$i]['account_lid'];
if ($cat_id)
{
! $user_permission_id =
$userpermissionlist[$i]['rights'];
}
else
--- 285,292 ----
{
$user_name =
$userlist[$i]['account_lid'];
+ $user_id = $userlist[$i]['account_id'];
if ($cat_id)
{
! $user_permission_id =
$userpermissionlist[$user_id];
}
else
***************
*** 291,301 ****
$user_permission_id = 0;
}
! $this->t->set_var('user_id',
$userlist[$i]['account_id']);
$this->t->set_var('username',
$user_name);
! if ($user_permission_id ==
PHPGW_ACL_ADD)
! {
! $user_permission_id =
PHPGW_ACL_ADD | PHPGW_ACL_READ;
! }
if ($user_permission_id &
PHPGW_ACL_READ )
{
--- 294,304 ----
$user_permission_id = 0;
}
! $this->t->set_var('user_id', $user_id);
$this->t->set_var('username',
$user_name);
! // if ($user_permission_id ==
PHPGW_ACL_ADD)
! // {
! // $user_permission_id =
PHPGW_ACL_ADD | PHPGW_ACL_READ;
! // }
if ($user_permission_id &
PHPGW_ACL_READ )
{
Index: class.Common_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Common_UI.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.Common_UI.inc.php 22 May 2003 06:19:23 -0000 1.12
--- class.Common_UI.inc.php 23 May 2003 03:37:25 -0000 1.13
***************
*** 283,286 ****
--- 283,287 ----
$this->t->set_file('sitemgr_header','sitemgr_header.tpl');
$this->t->set_block('sitemgr_header','switch','switchhandle');
+
$this->t->set_block('sitemgr_header','admin','adminhandle');
if ($this->do_sites_exist)
{
***************
*** 302,305 ****
--- 303,318 ----
{
$this->t->set_var('switchhandle','');
+ }
+ if
($GLOBALS['phpgw']->acl->check('run',1,'admin'))
+ {
+ $this->t->set_var(array(
+ 'sitesadmin' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=sitemgr.Sites_UI.list_sites'),
+ 'view_admin' => lang('Define
Websites')
+ ));
+ $this->t->parse('adminhandle','admin');
+ }
+ else
+ {
+ $this->t->set_var('adminhandle','');
}
$this->t->pparse('out','sitemgr_header');
Index: class.Content_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Content_UI.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.Content_UI.inc.php 22 May 2003 06:19:23 -0000 1.6
--- class.Content_UI.inc.php 23 May 2003 03:37:25 -0000 1.7
***************
*** 31,35 ****
'3' => lang('anonymous')
);
! $this->sitelanguages =
$GLOBALS['Common_BO']->sites->current_site['site_languages'];
$sessionlang =
$GLOBALS['phpgw']->session->appsession('worklanguage','sitemgr');
$this->worklanguage = $sessionlang ? $sessionlang :
$this->sitelanguages[0];
--- 31,35 ----
'3' => lang('anonymous')
);
! $this->sitelanguages =
$GLOBALS['Common_BO']->sites->current_site['sitelanguages'];
$sessionlang =
$GLOBALS['phpgw']->session->appsession('worklanguage','sitemgr');
$this->worklanguage = $sessionlang ? $sessionlang :
$this->sitelanguages[0];
Index: class.MainMenu_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.MainMenu_UI.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.MainMenu_UI.inc.php 22 May 2003 06:19:23 -0000 1.8
--- class.MainMenu_UI.inc.php 23 May 2003 03:37:25 -0000 1.9
***************
*** 46,51 ****
$this->t->set_var(Array(
'menutitle' => lang('Administrative
Menu'),
! 'lang_configure' => lang('Configure
SiteMgr'),
! 'lang_check' => lang('check here after
every upgrade'),
'lang_managesitemodules' =>
lang('Manage site-wide module properties'),
'lang_managesitecontent' =>
lang('Manage Site Content'),
--- 46,50 ----
$this->t->set_var(Array(
'menutitle' => lang('Administrative
Menu'),
! 'lang_configure' => lang('Configure
Website'),
'lang_managesitemodules' =>
lang('Manage site-wide module properties'),
'lang_managesitecontent' =>
lang('Manage Site Content'),
Index: class.Modules_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Modules_BO.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.Modules_BO.inc.php 4 Mar 2003 17:26:43 -0000 1.2
--- class.Modules_BO.inc.php 23 May 2003 03:37:25 -0000 1.3
***************
*** 146,150 ****
{
$cat_ancestorlist =
$GLOBALS['Common_BO']->cats->getCategoryancestorids($cat_id);
! $cat_ancestorlist[] = 0;
$cat_ancestorlist_temp = $cat_ancestorlist;
--- 146,150 ----
{
$cat_ancestorlist =
$GLOBALS['Common_BO']->cats->getCategoryancestorids($cat_id);
! $cat_ancestorlist[] = CURRENT_SITE_ID;
$cat_ancestorlist_temp = $cat_ancestorlist;
***************
*** 174,178 ****
{
$cat_ancestorlist =
$GLOBALS['Common_BO']->cats->getCategoryancestorids($cat_id);
! $cat_ancestorlist[] = 0;
$cat_ancestorlist_temp = $cat_ancestorlist;
--- 174,178 ----
{
$cat_ancestorlist =
$GLOBALS['Common_BO']->cats->getCategoryancestorids($cat_id);
! $cat_ancestorlist[] = CURRENT_SITE_ID;
$cat_ancestorlist_temp = $cat_ancestorlist;
Index: class.Modules_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Modules_UI.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.Modules_UI.inc.php 22 May 2003 06:19:23 -0000 1.4
--- class.Modules_UI.inc.php 23 May 2003 03:37:25 -0000 1.5
***************
*** 23,26 ****
--- 23,27 ----
$this->bo = &$GLOBALS['Common_BO']->modules;
$this->acl = &$GLOBALS['Common_BO']->acl;
+ $this->catbo = &$GLOBALS['Common_BO']->cats;
}
***************
*** 34,48 ****
global $btnselect,$inputmodules,$inputarea;
$cat_id = $_GET['cat_id'];
- $scopename = lang(($cat_id) ? 'Category' :
'Site');
$this->modules = $this->bo->getallmodules();
! if ($cat_id)
{
! $catbo =
CreateObject('sitemgr.Categories_BO');
! $cat =
$catbo->getCategory($cat_id);
$cat_name = $cat->name;
$managelink =
$GLOBALS['phpgw']->link('/index.php','menuaction=sitemgr.Categories_UI._manageCategories');
$goto = lang('Category
manager');
}
--- 35,52 ----
global $btnselect,$inputmodules,$inputarea;
$cat_id = $_GET['cat_id'];
$this->modules = $this->bo->getallmodules();
! if ($cat_id != CURRENT_SITE_ID)
{
! $cat =
$this->catbo->getCategory($cat_id);
$cat_name = $cat->name;
$managelink =
$GLOBALS['phpgw']->link('/index.php','menuaction=sitemgr.Categories_UI._manageCategories');
$goto = lang('Category
manager');
+ $scopename = lang('Category');
+ }
+ else
+ {
+ $scopename = lang('Site');
}
***************
*** 50,54 ****
$this->t->set_block('Managemodules','Contentarea','CBlock');
$this->t->set_var(array(
! 'module_manager' => lang('Module
manager'),
'lang_help_module_manager' => lang('You
can choose the modules that can be used on the site. The first list is a sort
of master list, that is consulted if you do not configure lists specific to
contentareas or (sub)categories. Then you can choose lists specific to each
content area. In the category manager these lists can be overriden for each
(sub)category.'),
'lang_findmodules' => lang('Register
new modules'),
--- 54,58 ----
$this->t->set_block('Managemodules','Contentarea','CBlock');
$this->t->set_var(array(
! 'module_manager' => lang('%1 module
manager', $scopename),
'lang_help_module_manager' => lang('You
can choose the modules that can be used on the site. The first list is a sort
of master list, that is consulted if you do not configure lists specific to
contentareas or (sub)categories. Then you can choose lists specific to each
content area. In the category manager these lists can be overriden for each
(sub)category.'),
'lang_findmodules' => lang('Register
new modules'),
***************
*** 140,145 ****
if ($cat_id)
{
! $catbo =
CreateObject('sitemgr.Categories_BO');
! $cat =
$catbo->getCategory($cat_id);
$cat_name = $cat->name;
}
--- 144,148 ----
if ($cat_id)
{
! $cat =
$this->catbo->getCategory($cat_id);
$cat_name = $cat->name;
}
Index: class.Pages_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Pages_BO.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.Pages_BO.inc.php 22 May 2003 02:36:53 -0000 1.6
--- class.Pages_BO.inc.php 23 May 2003 03:37:25 -0000 1.7
***************
*** 69,75 ****
function getPage($page_id,$lang=False)
{
! if ($GLOBALS['Common_BO']->acl->can_read_page($page_id))
{
! return $this->pageso->getPage($page_id,$lang);
}
else
--- 69,80 ----
function getPage($page_id,$lang=False)
{
! $page = $this->pageso->getPage($page_id,$lang);
! if(
! $page &&
!
in_array($page->cat_id,$GLOBALS['Common_BO']->cats->currentcats) &&
!
$GLOBALS['Common_BO']->acl->can_read_category($page->cat_id)
! )
{
! return $page;
}
else
Index: class.Pages_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Pages_SO.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.Pages_SO.inc.php 28 Jan 2003 20:00:00 -0000 1.12
--- class.Pages_SO.inc.php 23 May 2003 03:37:25 -0000 1.13
***************
*** 9,17 ****
}
! function getPageIDList($cat_id=0)
{
if (!$cat_id)
{
! $sql = 'SELECT page_id FROM phpgw_sitemgr_pages
WHERE 1=1 ORDER BY cat_id, sort_order ASC';
}
else
--- 9,28 ----
}
! function getPageIDList($cat_id=False)
{
+ $page_id_list = array();
if (!$cat_id)
{
! $cat_list =
$GLOBALS['Common_BO']->cats->allcatidsforsite;
! if ($cat_list)
! {
! $sql = 'SELECT page_id FROM
phpgw_sitemgr_pages WHERE cat_id IN (' .
! implode(',',$cat_list) .
! ')ORDER BY cat_id, sort_order
ASC';
! }
! else
! {
! return $page_id_list;
! }
}
else
***************
*** 23,30 ****
{
$page_id_list[] = $this->db->f('page_id');
- }
- if (!is_array($page_id_list))
- {
- $page_id_list = array();
}
return $page_id_list;
--- 34,37 ----
Index: class.Sites_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Sites_BO.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.Sites_BO.inc.php 22 May 2003 06:19:23 -0000 1.3
--- class.Sites_BO.inc.php 23 May 2003 03:37:25 -0000 1.4
***************
*** 95,99 ****
foreach($result['sitelanguages'] as $lang)
{
! $langinfo =
$GLOBALS['Common_BO']->cats->getCategory($id,$lang);
$result['site_name_' . $lang] =
$langinfo->name;
$result['site_desc_' . $lang] =
$langinfo->description;
--- 95,99 ----
foreach($result['sitelanguages'] as $lang)
{
! $langinfo =
$GLOBALS['Common_BO']->cats->getCategory($id,$lang,True);
$result['site_name_' . $lang] =
$langinfo->name;
$result['site_desc_' . $lang] =
$langinfo->description;
***************
*** 109,113 ****
function get_adminlist($site_id)
{
! return
$GLOBALS['Common_BO']->acl->get_adminlist($site_id);
}
--- 109,113 ----
function get_adminlist($site_id)
{
! return
$GLOBALS['Common_BO']->acl->get_permission_list($site_id);
}
***************
*** 198,201 ****
--- 198,202 ----
}
define('CURRENT_SITE_ID',$this->current_site['site_id']);
+ $GLOBALS['Common_BO']->cats->setcurrentcats();
return True;
}
Index: class.Sites_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Sites_UI.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.Sites_UI.inc.php 22 May 2003 03:06:14 -0000 1.2
--- class.Sites_UI.inc.php 23 May 2003 03:37:25 -0000 1.3
***************
*** 139,143 ****
function edit()
{
!
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
--- 139,146 ----
function edit()
{
! if ($_POST['done'])
! {
! return $this->list_sites();
! }
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 147,155 ****
$this->deny();
}
-
- if ($_POST['done'])
- {
- return $this->list_sites();
- }
if ($_POST['delete'])
{
--- 150,153 ----
***************
*** 201,205 ****
'note_name' => lang('This is only used as an
internal name for the website.'),
'note_dir' => lang('This must be an absolute
directory location. <b>No trailing slash</b>.'),
! 'note_url' => lang('The URL can be relative or
absolute. Name must end in a slash.'),
'note_anonuser' => lang('If you haven\'t done
so already, create a user that will be used for public viewing of the site.
Recommended name: anonymous.'),
'note_anonpasswd' => lang('Password that you
assigned for the anonymous user account.'),
--- 199,203 ----
'note_name' => lang('This is only used as an
internal name for the website.'),
'note_dir' => lang('This must be an absolute
directory location. <b>No trailing slash</b>.'),
! 'note_url' => lang('The URL must be absolute
and end in a slash, for example http://mydomain.com/mysite/'),
'note_anonuser' => lang('If you haven\'t done
so already, create a user that will be used for public viewing of the site.
Recommended name: anonymous.'),
'note_anonpasswd' => lang('Password that you
assigned for the anonymous user account.'),
***************
*** 247,254 ****
$accounts = $GLOBALS['phpgw']->accounts->get_list();
$admin_list = $this->bo->get_adminlist($site_id);
while (list($null,$account) = each($accounts))
{
$selectlist .= '<option value="' .
$account['account_id'] . '"';
! if(in_array($account['account_id'],$admin_list))
{
$selectlist .= ' selected="selected"';
--- 245,253 ----
$accounts = $GLOBALS['phpgw']->accounts->get_list();
$admin_list = $this->bo->get_adminlist($site_id);
+ print_r($admin_list);
while (list($null,$account) = each($accounts))
{
$selectlist .= '<option value="' .
$account['account_id'] . '"';
! if($admin_list[$account['account_id']] ==
SITEMGR_ACL_IS_ADMIN)
{
$selectlist .= ' selected="selected"';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: sitemgr/inc class.ACL_BO.inc.php,1.3,1.4 class.Categories_BO.inc.php,1.7,1.8class.Categories_SO.inc.php,1.15,1.16 class.Categories_UI.inc.php,1.3,1.4 class.Common_UI.inc.php,1.12,1.13 class.Content_UI.inc.php,1.6,1.7 class.MainMenu_UI.inc.php,1.8,1.9 class.Modules_BO.inc.php,1.2,1.3 class.Modules_UI.inc.php,1.4,1.5 class.Pages_BO.inc.php,1.6,1.7 class.Pages_SO.inc.php,1.12,1.13 class.Sites_BO.inc.php,1.3,1.4 class.Sites_UI.inc.php,1.2,1.3,
Michael Totschnig <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: phpgwapi/templates/idots/images favicon.ico,NONE,1.1.2.1
- Next by Date:
[Phpgroupware-cvs] CVS: sitemgr/templates/default mainmenu.tpl,1.7,1.8 manage_modules.tpl,1.2,1.3 sitemgr_header.tpl,1.4,1.5
- Previous by thread:
[Phpgroupware-cvs] CVS: phpgwapi/templates/idots/images favicon.ico,NONE,1.1.2.1
- Next by thread:
[Phpgroupware-cvs] CVS: sitemgr/templates/default mainmenu.tpl,1.7,1.8 manage_modules.tpl,1.2,1.3 sitemgr_header.tpl,1.4,1.5
- Index(es):