[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.soadmin_location.inc.php cla...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.soadmin_location.inc.php cla... |
Date: |
Tue, 28 Feb 2006 13:29:34 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/02/28 13:29:34
Modified files:
inc : class.soadmin_location.inc.php
class.socommon.inc.php class.bocommon.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.soadmin_location.inc.php.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.socommon.inc.php.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.bocommon.inc.php.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
Patches:
Index: property/inc/class.bocommon.inc.php
diff -u property/inc/class.bocommon.inc.php:1.24
property/inc/class.bocommon.inc.php:1.25
--- property/inc/class.bocommon.inc.php:1.24 Tue Feb 14 14:45:49 2006
+++ property/inc/class.bocommon.inc.php Tue Feb 28 13:29:34 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage core
- * @version $Id: class.bocommon.inc.php,v 1.24 2006/02/14 14:45:49
sigurdne Exp $
+ * @version $Id: class.bocommon.inc.php,v 1.25 2006/02/28 13:29:34
sigurdne Exp $
*/
/**
@@ -52,12 +52,18 @@
)
);
- function bocommon()
+ function bocommon($currentapp='')
{
+ if($currentapp)
+ {
+ $this->currentapp = $currentapp;
+ }
+ else
+ {
+ $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ }
- $GLOBALS['phpgw_info']['flags']['currentapp'] =
'property';
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->socommon =
CreateObject($this->currentapp.'.socommon');
+ $this->socommon =
CreateObject($this->currentapp.'.socommon',$this->currentapp);
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
if (!is_object($GLOBALS['phpgw']->asyncservice))
Index: property/inc/class.soadmin_location.inc.php
diff -u property/inc/class.soadmin_location.inc.php:1.17
property/inc/class.soadmin_location.inc.php:1.18
--- property/inc/class.soadmin_location.inc.php:1.17 Tue Feb 14 19:32:20 2006
+++ property/inc/class.soadmin_location.inc.php Tue Feb 28 13:29:34 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.soadmin_location.inc.php,v 1.17 2006/02/14
19:32:20 sigurdne Exp $
+ * @version $Id: class.soadmin_location.inc.php,v 1.18 2006/02/28
13:29:34 sigurdne Exp $
*/
/**
@@ -19,12 +19,21 @@
class soadmin_location
{
var $grants;
+ var $currentapp;
- function soadmin_location()
+ function soadmin_location($currentapp='')
{
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ if($currentapp)
+ {
+ $this->currentapp = $currentapp;
+ }
+ else
+ {
+ $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ }
+
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
- $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->bocommon =
CreateObject($this->currentapp.'.bocommon',$this->currentapp);
$this->db = $this->bocommon->new_db();
$this->db2 = $this->bocommon->new_db();
Index: property/inc/class.socommon.inc.php
diff -u property/inc/class.socommon.inc.php:1.16
property/inc/class.socommon.inc.php:1.17
--- property/inc/class.socommon.inc.php:1.16 Tue Feb 14 14:45:50 2006
+++ property/inc/class.socommon.inc.php Tue Feb 28 13:29:34 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage core
- * @version $Id: class.socommon.inc.php,v 1.16 2006/02/14 14:45:50
sigurdne Exp $
+ * @version $Id: class.socommon.inc.php,v 1.17 2006/02/28 13:29:34
sigurdne Exp $
*/
/**
@@ -18,16 +18,36 @@
class socommon
{
- function socommon()
+ function socommon($currentapp='')
{
- $GLOBALS['phpgw_info']['flags']['currentapp'] =
'property';
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ if($currentapp)
+ {
+ $this->currentapp = $currentapp;
+ }
+ else
+ {
+ $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ }
+
$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($GLOBALS['phpgw_info']['server']['db_name'])
+ {
+ $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'];
+ }
+ else
+ {
+ $ConfigDomain =
get_var('ConfigDomain',array('COOKIE','POST'));
+ $phpgw_domain = $GLOBALS['phpgw_domain'];
+ $this->db->Host =
$phpgw_domain[$ConfigDomain]['db_host'];
+ $this->db->Database =
$phpgw_domain[$ConfigDomain]['db_name'];
+ $this->db->User =
$phpgw_domain[$ConfigDomain]['db_user'];
+ $this->db->Password =
$phpgw_domain[$ConfigDomain]['db_pass'];
+ }
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
@@ -319,11 +339,24 @@
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'];
+ if($GLOBALS['phpgw_info']['server']['db_name'])
+ {
+ $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'];
+ }
+ else
+ {
+ $ConfigDomain =
get_var('ConfigDomain',array('COOKIE','POST'));
+ $phpgw_domain = $GLOBALS['phpgw_domain'];
+ $db->Host =
$phpgw_domain[$ConfigDomain]['db_host'];
+ $db->Database =
$phpgw_domain[$ConfigDomain]['db_name'];
+ $db->User =
$phpgw_domain[$ConfigDomain]['db_user'];
+ $db->Password =
$phpgw_domain[$ConfigDomain]['db_pass'];
+ }
+
return $db;
}
@@ -335,4 +368,4 @@
}
}
-?>
\ No newline at end of file
+?>
- [Phpgroupware-cvs] property/inc class.soadmin_location.inc.php cla...,
Sigurd Nes <=