[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] hrm/inc class.soadmin.inc.php
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] hrm/inc class.soadmin.inc.php |
Date: |
Fri, 24 Feb 2006 13:24:14 +0000 |
CVSROOT: /sources/phpgroupware
Module name: hrm
Branch:
Changes by: Sigurd Nes <address@hidden> 06/02/24 13:24:14
Modified files:
inc : class.soadmin.inc.php
Log message:
Added inheritance of rights
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/hrm/inc/class.soadmin.inc.php.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: hrm/inc/class.soadmin.inc.php
diff -u hrm/inc/class.soadmin.inc.php:1.5 hrm/inc/class.soadmin.inc.php:1.6
--- hrm/inc/class.soadmin.inc.php:1.5 Fri Jan 27 17:02:29 2006
+++ hrm/inc/class.soadmin.inc.php Fri Feb 24 13:24:14 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package hrm
* @subpackage admin
- * @version $Id: class.soadmin.inc.php,v 1.5 2006/01/27 17:02:29
sigurdne Exp $
+ * @version $Id: class.soadmin.inc.php,v 1.6 2006/02/24 13:24:14
sigurdne Exp $
*/
/**
@@ -21,11 +21,38 @@
function soadmin()
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
+ $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->db = $this->bocommon->new_db();
$this->db2 = $this->bocommon->new_db();
- $this->join = $this->bocommon->join;
- $this->like = $this->bocommon->like;
+ $this->join = $this->bocommon->join;
+ $this->like = $this->bocommon->like;
}
+
+ function select_location($grant='', $appname = '')
+ {
+ if(!$appname)
+ {
+ $appname = $this->currentapp;
+ }
+
+ $filter = " WHERE appname='$appname'";
+
+ if($grant)
+ {
+ $filter .= ' AND allow_grant=1';
+ }
+ $this->db->query("SELECT * FROM hrm_acl_location
$filter ORDER BY id ");
+
+ $i = 0;
+ while ($this->db->next_record())
+ {
+ $location[$i]['id']
= $this->db->f('id');
+ $location[$i]['descr']
= stripslashes($this->db->f('descr'));
+ $i++;
+ }
+
+ return $location;
+ }
+
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] hrm/inc class.soadmin.inc.php,
Sigurd Nes <=