[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] hrm/inc class.acl2.inc.php class.bocommon.inc.p...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] hrm/inc class.acl2.inc.php class.bocommon.inc.p... |
Date: |
Fri, 27 Jan 2006 17:02:30 +0000 |
CVSROOT: /sources/phpgroupware
Module name: hrm
Branch:
Changes by: Sigurd Nes <address@hidden> 06/01/27 17:02:29
Modified files:
inc : class.acl2.inc.php class.bocommon.inc.php
class.soadmin.inc.php class.socategory.inc.php
class.socommon.inc.php class.sojob.inc.php
class.soplace.inc.php class.souser.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/hrm/inc/class.acl2.inc.php.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/hrm/inc/class.bocommon.inc.php.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/hrm/inc/class.soadmin.inc.php.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/hrm/inc/class.socategory.inc.php.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/hrm/inc/class.socommon.inc.php.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/hrm/inc/class.sojob.inc.php.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/hrm/inc/class.soplace.inc.php.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/hrm/inc/class.souser.inc.php.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: hrm/inc/class.acl2.inc.php
diff -u hrm/inc/class.acl2.inc.php:1.5 hrm/inc/class.acl2.inc.php:1.6
--- hrm/inc/class.acl2.inc.php:1.5 Thu Dec 1 14:37:55 2005
+++ hrm/inc/class.acl2.inc.php Fri Jan 27 17:02:29 2006
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General
Public License
* @package phpgwapi
* @subpackage accounts
- * @version $Id: class.acl2.inc.php,v 1.5 2005/12/01 14:37:55 sigurdne
Exp $
+ * @version $Id: class.acl2.inc.php,v 1.6 2006/01/27 17:02:29 sigurdne
Exp $
*/
/**
@@ -54,7 +54,13 @@
*/
function acl2($account_id = '')
{
- $this->db = $GLOBALS['phpgw']->db;
+ // $this->db = $GLOBALS['phpgw']->db;
+ $this->db = CreateObject('phpgwapi.db');
+ $this->db->Host =
$GLOBALS['phpgw_info']['server']['db_host'];
+ $this->db->Type =
$GLOBALS['phpgw_info']['server']['db_type'];
+ $this->db->Database =
$GLOBALS['phpgw_info']['server']['db_name'];
+ $this->db->User =
$GLOBALS['phpgw_info']['server']['db_user'];
+ $this->db->Password =
$GLOBALS['phpgw_info']['server']['db_pass'];
if (!($this->account_id = intval($account_id)))
{
@@ -694,7 +700,15 @@
$account_id =
get_account_id($accountid,$this->account_id);
$cache_accountid[$accountid] = $account_id;
}
- $db2 = $this->db;
+
+ $this->db2 = CreateObject('phpgwapi.db');
+ $this->db2->Host =
$GLOBALS['phpgw_info']['server']['db_host'];
+ $this->db2->Type =
$GLOBALS['phpgw_info']['server']['db_type'];
+ $this->db2->Database =
$GLOBALS['phpgw_info']['server']['db_name'];
+ $this->db2->User =
$GLOBALS['phpgw_info']['server']['db_user'];
+ $this->db2->Password =
$GLOBALS['phpgw_info']['server']['db_pass'];
+
+ // $db2 = $this->db;
$memberships =
$GLOBALS['phpgw']->accounts->membership($account_id);
$sql = "select acl_appname, acl_rights from hrm_acl
where acl_location = 'run' and "
. 'acl_account in ';
@@ -758,7 +772,14 @@
*/
function get_grants_type($app='',$location='',$type = '')
{
- $db2 = $this->db;
+ $this->db2 = CreateObject('phpgwapi.db');
+ $this->db2->Host =
$GLOBALS['phpgw_info']['server']['db_host'];
+ $this->db2->Type =
$GLOBALS['phpgw_info']['server']['db_type'];
+ $this->db2->Database =
$GLOBALS['phpgw_info']['server']['db_name'];
+ $this->db2->User =
$GLOBALS['phpgw_info']['server']['db_user'];
+ $this->db2->Password =
$GLOBALS['phpgw_info']['server']['db_pass'];
+
+// $db2 = $this->db;
if ($app=='')
{
Index: hrm/inc/class.bocommon.inc.php
diff -u hrm/inc/class.bocommon.inc.php:1.7 hrm/inc/class.bocommon.inc.php:1.8
--- hrm/inc/class.bocommon.inc.php:1.7 Fri Dec 2 17:10:28 2005
+++ hrm/inc/class.bocommon.inc.php Fri Jan 27 17:02:29 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package hrm
* @subpackage core
- * @version $Id: class.bocommon.inc.php,v 1.7 2005/12/02 17:10:28
sigurdne Exp $
+ * @version $Id: class.bocommon.inc.php,v 1.8 2006/01/27 17:02:29
sigurdne Exp $
*/
/**
@@ -674,4 +674,8 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('no_access' => $data));
}
+
+ function new_db()
+ {
return $this->socommon->new_db();
+ }
}
Index: hrm/inc/class.soadmin.inc.php
diff -u hrm/inc/class.soadmin.inc.php:1.4 hrm/inc/class.soadmin.inc.php:1.5
--- hrm/inc/class.soadmin.inc.php:1.4 Wed Nov 30 17:07:22 2005
+++ hrm/inc/class.soadmin.inc.php Fri Jan 27 17:02:29 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.4 2005/11/30 17:07:22
sigurdne Exp $
+ * @version $Id: class.soadmin.inc.php,v 1.5 2006/01/27 17:02:29
sigurdne Exp $
*/
/**
@@ -21,11 +21,11 @@
function soadmin()
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->db = $GLOBALS['phpgw']->db;
- $this->db2 = $this->db;
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
- $this->socommon =
CreateObject($this->currentapp.'.socommon');
- $this->join = $this->socommon->join;
- $this->like = $this->socommon->like;
+ $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;
}
}
Index: hrm/inc/class.socategory.inc.php
diff -u hrm/inc/class.socategory.inc.php:1.5
hrm/inc/class.socategory.inc.php:1.6
--- hrm/inc/class.socategory.inc.php:1.5 Wed Nov 30 17:07:22 2005
+++ hrm/inc/class.socategory.inc.php Fri Jan 27 17:02:29 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.socategory.inc.php,v 1.5 2005/11/30 17:07:22
sigurdne Exp $
+ * @version $Id: class.socategory.inc.php,v 1.6 2006/01/27 17:02:29
sigurdne Exp $
*/
/**
@@ -22,13 +22,13 @@
function socategory()
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->db = $GLOBALS['phpgw']->db;
- $this->db2 = $this->db;
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
- $this->socommon =
CreateObject($this->currentapp.'.socommon');
+ $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->db = $this->bocommon->new_db();
+ $this->db2 = $this->bocommon->new_db();
- $this->join = $this->socommon->join;
- $this->like = $this->socommon->like;
+ $this->join = $this->bocommon->join;
+ $this->like = $this->bocommon->like;
}
Index: hrm/inc/class.socommon.inc.php
diff -u hrm/inc/class.socommon.inc.php:1.4 hrm/inc/class.socommon.inc.php:1.5
--- hrm/inc/class.socommon.inc.php:1.4 Wed Nov 30 17:07:22 2005
+++ hrm/inc/class.socommon.inc.php Fri Jan 27 17:02:29 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package hrm
* @subpackage core
- * @version $Id: class.socommon.inc.php,v 1.4 2005/11/30 17:07:22
sigurdne Exp $
+ * @version $Id: class.socommon.inc.php,v 1.5 2006/01/27 17:02:29
sigurdne Exp $
*/
/**
@@ -22,8 +22,14 @@
{
//$GLOBALS['phpgw_info']['flags']['currentapp'] =
'hrm';
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->db = $GLOBALS['phpgw']->db;
- $this->db2 = $this->db;
+ // $this->db = $GLOBALS['phpgw']->db;
+ $this->db = CreateObject('phpgwapi.db');
+ $this->db->Host =
$GLOBALS['phpgw_info']['server']['db_host'];
+ $this->db->Type =
$GLOBALS['phpgw_info']['server']['db_type'];
+ $this->db->Database =
$GLOBALS['phpgw_info']['server']['db_name'];
+ $this->db->User =
$GLOBALS['phpgw_info']['server']['db_user'];
+ $this->db->Password =
$GLOBALS['phpgw_info']['server']['db_pass'];
+
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
if
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
@@ -85,4 +91,15 @@
$next_id = $this->db->f('maximum')+1;
return "$next_id";
}
+
+ function new_db()
+ {
$db = CreateObject('phpgwapi.db');
+ $db->Host = $GLOBALS['phpgw_info']['server']['db_host'];
+ $db->Type = $GLOBALS['phpgw_info']['server']['db_type'];
+ $db->Database =
$GLOBALS['phpgw_info']['server']['db_name'];
+ $db->User = $GLOBALS['phpgw_info']['server']['db_user'];
+ $db->Password =
$GLOBALS['phpgw_info']['server']['db_pass'];
+ return $db;
+ }
+
}
Index: hrm/inc/class.sojob.inc.php
diff -u hrm/inc/class.sojob.inc.php:1.14 hrm/inc/class.sojob.inc.php:1.15
--- hrm/inc/class.sojob.inc.php:1.14 Mon Dec 5 09:07:04 2005
+++ hrm/inc/class.sojob.inc.php Fri Jan 27 17:02:29 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package hrm
* @subpackage job
- * @version $Id: class.sojob.inc.php,v 1.14 2005/12/05 09:07:04 sigurdne
Exp $
+ * @version $Id: class.sojob.inc.php,v 1.15 2006/01/27 17:02:29 sigurdne
Exp $
*/
/**
@@ -21,10 +21,10 @@
function sojob()
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->db = $GLOBALS['phpgw']->db;
- $this->db2 = $this->db;
$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->left_join =
$this->bocommon->left_join;
$this->join = $this->bocommon->join;
Index: hrm/inc/class.soplace.inc.php
diff -u hrm/inc/class.soplace.inc.php:1.3 hrm/inc/class.soplace.inc.php:1.4
--- hrm/inc/class.soplace.inc.php:1.3 Wed Nov 30 17:07:22 2005
+++ hrm/inc/class.soplace.inc.php Fri Jan 27 17:02:29 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package hrm
* @subpackage place
- * @version $Id: class.soplace.inc.php,v 1.3 2005/11/30 17:07:22
sigurdne Exp $
+ * @version $Id: class.soplace.inc.php,v 1.4 2006/01/27 17:02:29
sigurdne Exp $
*/
/**
@@ -26,10 +26,10 @@
function soplace()
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->db = $GLOBALS['phpgw']->db;
- $this->db2 = $this->db;
$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->grants =
$GLOBALS['phpgw']->acl->get_grants('hrm');
$this->left_join =
$this->bocommon->left_join;
Index: hrm/inc/class.souser.inc.php
diff -u hrm/inc/class.souser.inc.php:1.8 hrm/inc/class.souser.inc.php:1.9
--- hrm/inc/class.souser.inc.php:1.8 Fri Dec 2 17:10:28 2005
+++ hrm/inc/class.souser.inc.php Fri Jan 27 17:02:29 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package hrm
* @subpackage user
- * @version $Id: class.souser.inc.php,v 1.8 2005/12/02 17:10:28 sigurdne
Exp $
+ * @version $Id: class.souser.inc.php,v 1.9 2006/01/27 17:02:29 sigurdne
Exp $
*/
/**
@@ -26,10 +26,10 @@
function souser()
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->db = $GLOBALS['phpgw']->db;
- $this->db2 = $this->db;
$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->acl =
CreateObject($this->currentapp.'.acl2');
$this->grants =
$this->acl->get_grants('hrm','user');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] hrm/inc class.acl2.inc.php class.bocommon.inc.p...,
Sigurd Nes <=