[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10573] property: generalize
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10573] property: generalize |
Date: |
Thu, 06 Dec 2012 09:10:30 +0000 |
Revision: 10573
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10573
Author: sigurdne
Date: 2012-12-06 09:10:29 +0000 (Thu, 06 Dec 2012)
Log Message:
-----------
property: generalize
Modified Paths:
--------------
trunk/property/inc/class.bocommon.inc.php
trunk/property/inc/class.boinvestment.inc.php
trunk/property/inc/class.boinvoice.inc.php
trunk/property/inc/class.bopricebook.inc.php
trunk/property/inc/class.db_mssql.inc.php
trunk/property/inc/class.soagreement.inc.php
trunk/property/inc/class.solocation.inc.php
trunk/property/inc/class.soproject.inc.php
trunk/property/inc/class.sorequest.inc.php
trunk/property/inc/class.uiinvoice.inc.php
trunk/property/inc/class.uiworkorder.inc.php
trunk/property/inc/cron/default/Import_fra_basware_X205.php
trunk/property/inc/cron/default/export_info_as_files.php
trunk/property/inc/cron/default/forward_mail_as_sms.php
trunk/property/inc/cron/default/import_files.php
trunk/property/inc/cron/default/import_from_scanner.php
trunk/property/inc/cron/default/oppdater_antall_leieobjekt.php
trunk/property/inc/cron/default/oppdater_namssakstatus_pr_leietaker.php
trunk/property/inc/cron/default/organize_drawing.php
trunk/property/inc/cron/default/organize_energy_pdf_bbb.php
trunk/property/inc/cron/default/synkroniser_med_boei.php
trunk/property/inc/cron/default/update_googlemap.php
trunk/property/inc/cron/default/update_phpgw.php
trunk/property/inc/cron/default/update_workorder_status.php
trunk/property/inc/custom/default/estimert_ferdigdato_til_leieobjekt_BBB.php
trunk/property/inc/custom/default/innflyttetdato_entity_2_11_BBB.php
trunk/property/inc/custom/default/kalkuler_risiko_for_ros.php
trunk/property/inc/export/default/Agresso
trunk/property/inc/export/default/Ecolink
trunk/property/inc/import/default/Import_fra_BKK
trunk/property/inc/import/default/Import_fra_Kemner
trunk/property/inc/import/default/Import_fra_Kemner_xml
trunk/property/inc/import/default/Import_fra_Service
trunk/property/inc/import/default/Import_fra_Service_xml
trunk/property/inc/import/default/import_fra_Service_xls
Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php 2012-12-05 20:57:42 UTC (rev
10572)
+++ trunk/property/inc/class.bocommon.inc.php 2012-12-06 09:10:29 UTC (rev
10573)
@@ -44,6 +44,9 @@
var $cat_id;
var $district_id;
var $xsl_rootdir;
+ protected $join;
+ protected $left_join;
+ protected $like;
var $public_functions = array
(
@@ -63,31 +66,10 @@
}
$this->async = &$GLOBALS['phpgw']->asyncservice;
- $this->join = $this->socommon->join;
+ $this->join = $this->socommon->join;
$this->left_join = $this->socommon->left_join;
- $this->like = $this->socommon->like;
+ $this->like = $this->socommon->like;
- switch($GLOBALS['phpgw_info']['server']['db_type'])
- {
- case 'mssql':
- $this->dateformat = "M d Y";
- $this->datetimeformat = "M d Y g:iA";
- break;
- case 'mysql':
- $this->dateformat = "Y-m-d";
- $this->datetimeformat = "Y-m-d G:i:s";
- break;
- case 'pgsql':
- $this->dateformat = "Y-m-d";
- $this->datetimeformat = "Y-m-d G:i:s";
- //
$this->dateformat = "F j, Y";
- //
$this->datetimeformat = "F j, Y g:iA";
- break;
- case 'postgres':
- $this->dateformat = "Y-m-d";
- $this->datetimeformat = "Y-m-d G:i:s";
- break;
- }
$this->xsl_rootdir = PHPGW_SERVER_ROOT .
'/property/templates/base';
}
@@ -136,20 +118,7 @@
return $msgbox_data;
}
- function moneyformat($amount)
- {
- if
($GLOBALS['phpgw_info']['server']['db_type']=='mssql')
- {
- $moneyformat =
"CONVERT(MONEY,"."'$amount'".",0)";
- }
- else
- {
- $moneyformat = "'" . $amount . "'";
- }
- return $moneyformat;
- }
-
function confirm_session()
{
if($GLOBALS['phpgw']->session->verify())
@@ -1458,42 +1427,7 @@
}
- function validate_db_insert($values)
- {
- foreach($values as $value)
- {
- if($value || $value === 0)
- {
- $insert_value[] = "'".$value."'";
- }
- else
- {
- $insert_value[] = 'NULL';
- }
- }
- $values = implode(",", $insert_value);
- return $values;
- }
-
- function validate_db_update($value_set)
- {
- while (is_array($value_set) && list($field,$value) =
each($value_set))
- {
- if($value || $value === 0)
- {
- $value_entry[]= "$field='$value'";
- }
- else
- {
- $value_entry[]= "$field=NULL";
- }
- }
-
- $value_set = implode(",", $value_entry);
- return $value_set;
- }
-
function fm_cache($name='',$value='')
{
return $this->socommon->fm_cache($name,$value);
Modified: trunk/property/inc/class.boinvestment.inc.php
===================================================================
--- trunk/property/inc/class.boinvestment.inc.php 2012-12-05 20:57:42 UTC
(rev 10572)
+++ trunk/property/inc/class.boinvestment.inc.php 2012-12-06 09:10:29 UTC
(rev 10573)
@@ -221,7 +221,7 @@
//_debug_array($values);
$values['date'] =
$this->bocommon->date_to_timestamp($values['date']);
- $values['date']=
date($this->bocommon->dateformat,$values['date']);
+ $values['date']=
date($GLOBALS['phpgw']->db->date_format(),$values['date']);
$values['initial_value'] =
abs($values['initial_value']);
@@ -263,7 +263,7 @@
$date_array =
phpgwapi_datetime::date_array($values['date']);
$date = mktime
(2,0,0,$date_array['month'],$date_array['day'],$date_array['year']);
- $date= date($this->bocommon->dateformat,$date);
+ $date= date($GLOBALS['phpgw']->db->date_format(),$date);
$new_index=str_replace(",",".",$values['new_index']);
Modified: trunk/property/inc/class.boinvoice.inc.php
===================================================================
--- trunk/property/inc/class.boinvoice.inc.php 2012-12-05 20:57:42 UTC (rev
10572)
+++ trunk/property/inc/class.boinvoice.inc.php 2012-12-06 09:10:29 UTC (rev
10573)
@@ -430,7 +430,7 @@
$values['belop'] =
$values['amount'];
$values['godkjentbelop'] = $values['amount'];
- $_dateformat = $this->bocommon->dateformat;
+ $_dateformat = $GLOBALS['phpgw']->db->date_format();
$invoice_date = $values['invoice_date'] ?
phpgwapi_datetime::date_to_timestamp($values['invoice_date']) : time();
$payment_date = $values['payment_date'] ?
phpgwapi_datetime::date_to_timestamp($values['payment_date']) : time();
@@ -538,15 +538,15 @@
$values['belop'] =
$values['amount'];
$values['godkjentbelop'] = $values['amount'];
- $values['fakturadato'] =
date($this->bocommon->dateformat,mktime(2,0,0,$values['smonth'],$values['sday'],$values['syear']));
+ $values['fakturadato'] =
date($GLOBALS['phpgw']->db->date_format(),mktime(2,0,0,$values['smonth'],$values['sday'],$values['syear']));
if($values['num_days'])
{
- $values['forfallsdato'] =
date($this->bocommon->dateformat,mktime(2,0,0,$values['smonth'],$values['sday'],$values['syear'])+(86400*$values['num_days']));
+ $values['forfallsdato'] =
date($GLOBALS['phpgw']->db->date_format(),mktime(2,0,0,$values['smonth'],$values['sday'],$values['syear'])+(86400*$values['num_days']));
}
else
{
- $values['forfallsdato'] =
date($this->bocommon->dateformat,mktime(2,0,0,$values['emonth'],$values['eday'],$values['eyear']));
+ $values['forfallsdato'] =
date($GLOBALS['phpgw']->db->date_format(),mktime(2,0,0,$values['emonth'],$values['eday'],$values['eyear']));
}
$values['artid'] =
$values['art'];
Modified: trunk/property/inc/class.bopricebook.inc.php
===================================================================
--- trunk/property/inc/class.bopricebook.inc.php 2012-12-05 20:57:42 UTC
(rev 10572)
+++ trunk/property/inc/class.bopricebook.inc.php 2012-12-06 09:10:29 UTC
(rev 10573)
@@ -215,7 +215,7 @@
$date_array=phpgwapi_datetime::date_array($values['date']);
$date = mktime
(2,0,0,$date_array['month'],$date_array['day'],$date_array['year']);
-// $date= date($this->bocommon->dateformat,$date);
+// $date= date($GLOBALS['phpgw']->db->date_format(),$date);
$new_index=str_replace(",",".",$values['new_index']);
@@ -282,7 +282,7 @@
$date_array=phpgwapi_datetime::date_array($values['date']);
$date = mktime
(2,0,0,$date_array['month'],$date_array['day'],$date_array['year']);
-// $date= date($this->bocommon->dateformat,$date);
+// $date= date($GLOBALS['phpgw']->db->date_format(),$date);
$m_cost =
str_replace(",",".",$values['m_cost']);
$w_cost =
str_replace(",",".",$values['w_cost']);
Modified: trunk/property/inc/class.db_mssql.inc.php
===================================================================
--- trunk/property/inc/class.db_mssql.inc.php 2012-12-05 20:57:42 UTC (rev
10572)
+++ trunk/property/inc/class.db_mssql.inc.php 2012-12-06 09:10:29 UTC (rev
10573)
@@ -385,5 +385,154 @@
return $this->Transaction;
}
+ /**
+ * Get the correct date format for DATE field for a particular
RDBMS
+ *
+ * @internal the string is compatiable with PHP's date()
+ * @return string the date format string
+ */
+ public static function date_format()
+ {
+ static $date_format = null;
+ if ( is_null($date_format) )
+ {
+
switch($GLOBALS['phpgw_info']['server']['db_type'])
+ {
+ case 'mssql':
+ $date_format = 'M d
Y';
+ break;
+ case 'mysql':
+ case 'pgsql':
+ case 'postgres':
+ default:
+ $date_format =
'Y-m-d';
+ }
+ }
+ return $date_format;
+ }
+
+ /**
+ * Get the correct datetime format for DATETIME field for a
particular RDBMS
+ *
+ * @internal the string is compatiable with PHP's date()
+ * @return string the date format string
+ */
+ public static function datetime_format()
+ {
+ static $datetime_format = null;
+ if ( is_null($datetime_format) )
+ {
+
switch($GLOBALS['phpgw_info']['server']['db_type'])
+ {
+ case 'mssql':
+ $datetime_format
= 'M d Y g:iA';
+ break;
+ case 'mysql':
+ case 'pgsql':
+ case 'postgres':
+ default:
+ $datetime_format
= 'Y-m-d G:i:s';
+ }
+ }
+ return $datetime_format;
+ }
+
+ /**
+ * Get the correct datetime format for MONEY field for a
particular RDBMS
+ *
+ * @return string the formatted string
+ */
+ public static function money_format($amount)
+ {
+ if
($GLOBALS['phpgw_info']['server']['db_type']=='mssql')
+ {
+ return "CONVERT(MONEY,'{$amount}',0)";
+ }
+ else
+ {
+ return "'{$amount}'";
+ }
+ }
+
+
+ /**
+ * Prepare the VALUES component of an INSERT sql statement by
guessing data types
+ *
+ * It is not a good idea to rely on the data types determined
by this method if
+ * you are inserting numeric data into varchar/text fields,
such as street numbers
+ *
+ * @param array $value_set array of values to insert into the
database
+ * @return string the prepared sql, empty string for invalid
input
+ */
+ public function validate_insert($values)
+ {
+ if ( !is_array($values) || !count($values) )
+ {
+ return '';
+ }
+
+ $insert_value = array();
+ foreach ( $values as $value )
+ {
+ if($value || (is_numeric($value) && $value ==
0) )
+ {
+ if ( is_numeric($value) )
+ {
+ $insert_value[] = "'$value'";
+ }
+ else
+ {
+ $insert_value[] = "'" .
$this->db_addslashes(stripslashes($value)) . "'"; //in case slashes are already
added.
+ }
+ }
+ else
+ {
+ $insert_value[] = 'NULL';
+ }
+ }
+ return implode(",", $insert_value);
+ }
+
+ /**
+ * Prepare the SET component of an UPDATE sql statement
+ *
+ * @param array $value_set associative array of values to
update the database with
+ * @return string the prepared sql, empty string for invalid
input
+ */
+ public function validate_update($value_set)
+ {
+ if ( !is_array($value_set) || !count($value_set) )
+ {
+ return '';
+ }
+
+ $value_entry = array();
+ foreach ( $value_set as $field => $value )
+ {
+ if($value || (is_numeric($value) && $value ==
0) )
+ {
+ if ( is_numeric($value) )
+ {
+ if((strlen($value) > 1 &&
strpos($value,'0') === 0))
+ {
+ $value_entry[]=
"{$field}='{$value}'";
+ }
+ else
+ {
+ $value_entry[]=
"{$field}={$value}";
+ }
+ }
+ else
+ {
+ $value_entry[]=
"{$field}='{$value}'";
+ }
+ }
+ else
+ {
+ $value_entry[]= "{$field}=NULL";
+ }
+ }
+ return implode(',', $value_entry);
+ }
+
}
-
Modified: trunk/property/inc/class.soagreement.inc.php
===================================================================
--- trunk/property/inc/class.soagreement.inc.php 2012-12-05 20:57:42 UTC
(rev 10572)
+++ trunk/property/inc/class.soagreement.inc.php 2012-12-06 09:10:29 UTC
(rev 10573)
@@ -42,9 +42,9 @@
$this->bocommon =
CreateObject('property.bocommon');
$this->db = clone($GLOBALS['phpgw']->db);
$this->db2 = clone($this->db);
- $this->join = $this->bocommon->join;
- $this->left_join = $this->bocommon->left_join;
- $this->like = $this->bocommon->like;
+ $this->join = $this->db->join;
+ $this->left_join = $this->db->left_join;
+ $this->like = $this->db->like;
// $this->role =
'agreement';
}
@@ -757,7 +757,7 @@
if($cols)
{
$cols = "," . implode(",", $cols);
- $vals =
$this->bocommon->validate_db_insert($vals);
+ $vals = $this->db->validate_insert($vals);
}
$this->db->query("INSERT INTO $table
(id,name,descr,entry_date,category,start_date,end_date,termination_date,vendor_id,user_id
$cols) "
@@ -850,7 +850,7 @@
$value_set['status'] = $values['status'];
if($value_set)
{
- $value_set = ',' .
$this->bocommon->validate_db_update($value_set);
+ $value_set = ',' .
$this->db->validate_update($value_set);
}
$this->db->query("UPDATE $table set entry_date='" .
time() . "', category='"
@@ -873,7 +873,7 @@
if($value_set)
{
- $value_set = ',' .
$this->bocommon->validate_db_update($value_set);
+ $value_set = ',' .
$this->db->validate_update($value_set);
}
$this->db->query("UPDATE fm_activity_price_index set
entry_date=" . time() . "$value_set WHERE agreement_id=" .
intval($values['agreement_id']) . ' AND activity_id=' . intval($values['id']));
Modified: trunk/property/inc/class.solocation.inc.php
===================================================================
--- trunk/property/inc/class.solocation.inc.php 2012-12-05 20:57:42 UTC (rev
10572)
+++ trunk/property/inc/class.solocation.inc.php 2012-12-06 09:10:29 UTC (rev
10573)
@@ -1341,7 +1341,7 @@
$value_set['entry_date'] = time();
- $value_set =
$this->bocommon->validate_db_update($value_set);
+ $value_set =
$this->db->validate_update($value_set);
$sql = "SELECT * from fm_location$type_id where
location_code ='" . $location['location_code'] . "'";
$this->db->query($sql,__LINE__,__FILE__);
@@ -1375,10 +1375,10 @@
}
$cols[] = 'exp_date';
- $vals[] = date($this->bocommon->datetimeformat,time());
+ $vals[] = date($this->db->datetime_format(),time());
$cols =implode(",", $cols);
- $vals = $this->bocommon->validate_db_insert($vals);
+ $vals = $this->db->validate_insert($vals);
$this->db->transaction_begin();
$sql = "INSERT INTO fm_location" . $type_id ."_history
($cols) VALUES ($vals)";
Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php 2012-12-05 20:57:42 UTC (rev
10572)
+++ trunk/property/inc/class.soproject.inc.php 2012-12-06 09:10:29 UTC (rev
10573)
@@ -1024,7 +1024,7 @@
$project['budget_periodization'],
);
- $values = $this->bocommon->validate_db_insert($values);
+ $values = $this->db->validate_insert($values);
$this->db->query("INSERT INTO fm_project
(id,project_group,name,access,category,entry_date,start_date,end_date,coordinator,status,"
.
"descr,budget,reserve,location_code,address,key_deliver,key_fetch,other_branch,key_responsible,user_id,ecodimb,account_group,contact_id,inherit_location,periodization_id
$cols) "
Modified: trunk/property/inc/class.sorequest.inc.php
===================================================================
--- trunk/property/inc/class.sorequest.inc.php 2012-12-05 20:57:42 UTC (rev
10572)
+++ trunk/property/inc/class.sorequest.inc.php 2012-12-06 09:10:29 UTC (rev
10573)
@@ -858,7 +858,7 @@
$value_set['regulations'] =
$request['regulations'] ? ',' . implode(',',$request['regulations']) . ',' : '';
$cols = implode(',', array_keys($value_set));
- $values =
$this->bocommon->validate_db_insert(array_values($value_set));
+ $values =
$this->db->validate_insert(array_values($value_set));
$this->db->query("INSERT INTO fm_request ({$cols})
VALUES ({$values})",__LINE__,__FILE__);
Modified: trunk/property/inc/class.uiinvoice.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice.inc.php 2012-12-05 20:57:42 UTC (rev
10572)
+++ trunk/property/inc/class.uiinvoice.inc.php 2012-12-06 09:10:29 UTC (rev
10573)
@@ -3248,7 +3248,7 @@
unset($edateparts);
}
- $values['regtid'] =
date($this->bocommon->datetimeformat);
+ $values['regtid'] =
date($GLOBALS['phpgw']->db->datetime_format());
$_receipt = array();//local errors
Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php 2012-12-05 20:57:42 UTC
(rev 10572)
+++ trunk/property/inc/class.uiworkorder.inc.php 2012-12-06 09:10:29 UTC
(rev 10573)
@@ -2224,7 +2224,7 @@
//_debug_array($values);
if (!is_array($receipt['error']))
{
- $values['regtid'] =
date($this->bocommon->datetimeformat);
+ $values['regtid'] =
date($GLOBALS['phpgw']->db->datetime_format());
$_receipt = array();//local errors
$receipt =
$boinvoice->add_manual_invoice($values);
Modified: trunk/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
--- trunk/property/inc/cron/default/Import_fra_basware_X205.php 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/Import_fra_basware_X205.php 2012-12-06
09:10:29 UTC (rev 10573)
@@ -347,7 +347,7 @@
$insert_values= array
(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
$this->db->db_addslashes(implode(',',(array_keys($msgbox_data))))
);
Modified: trunk/property/inc/cron/default/export_info_as_files.php
===================================================================
--- trunk/property/inc/cron/default/export_info_as_files.php 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/export_info_as_files.php 2012-12-06
09:10:29 UTC (rev 10573)
@@ -144,12 +144,12 @@
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
implode(',',(array_keys($msgbox_data)))
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
Modified: trunk/property/inc/cron/default/forward_mail_as_sms.php
===================================================================
--- trunk/property/inc/cron/default/forward_mail_as_sms.php 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/forward_mail_as_sms.php 2012-12-06
09:10:29 UTC (rev 10573)
@@ -117,12 +117,12 @@
{
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
$receipt
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
Modified: trunk/property/inc/cron/default/import_files.php
===================================================================
--- trunk/property/inc/cron/default/import_files.php 2012-12-05 20:57:42 UTC
(rev 10572)
+++ trunk/property/inc/cron/default/import_files.php 2012-12-06 09:10:29 UTC
(rev 10573)
@@ -137,12 +137,12 @@
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
implode(',',(array_keys($msgbox_data)))
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
Modified: trunk/property/inc/cron/default/import_from_scanner.php
===================================================================
--- trunk/property/inc/cron/default/import_from_scanner.php 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/import_from_scanner.php 2012-12-06
09:10:29 UTC (rev 10573)
@@ -276,12 +276,12 @@
$insert_values= array(
$cron,
-
date($this->bocommon->datetimeformat),
+
date($this->db->datetime_format()),
$this->function_name,
implode(',',(array_keys($msgbox_data)))
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES
($insert_values)";
@@ -485,7 +485,7 @@
$values['loc4'],
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_document
(document_name,title,access,category,entry_date,document_date,version,coordinator,status,"
.
"location_code,address,branch_id,vendor_id,user_id,loc1,loc2,loc3,loc4) "
Modified: trunk/property/inc/cron/default/oppdater_antall_leieobjekt.php
===================================================================
--- trunk/property/inc/cron/default/oppdater_antall_leieobjekt.php
2012-12-05 20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/oppdater_antall_leieobjekt.php
2012-12-06 09:10:29 UTC (rev 10573)
@@ -158,12 +158,12 @@
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
implode(',',(array_keys($msgbox_data)))
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
Modified:
trunk/property/inc/cron/default/oppdater_namssakstatus_pr_leietaker.php
===================================================================
--- trunk/property/inc/cron/default/oppdater_namssakstatus_pr_leietaker.php
2012-12-05 20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/oppdater_namssakstatus_pr_leietaker.php
2012-12-06 09:10:29 UTC (rev 10573)
@@ -154,12 +154,12 @@
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
$receipt
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
Modified: trunk/property/inc/cron/default/organize_drawing.php
===================================================================
--- trunk/property/inc/cron/default/organize_drawing.php 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/organize_drawing.php 2012-12-06
09:10:29 UTC (rev 10573)
@@ -190,12 +190,12 @@
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
implode(',',(array_keys($msgbox_data)))
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
@@ -416,7 +416,7 @@
$values['loc3'],
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_document
(document_name,title,access,category,entry_date,document_date,version,coordinator,status,"
.
"location_code,address,branch_id,vendor_id,user_id,loc1,loc2,loc3) "
Modified: trunk/property/inc/cron/default/organize_energy_pdf_bbb.php
===================================================================
--- trunk/property/inc/cron/default/organize_energy_pdf_bbb.php 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/organize_energy_pdf_bbb.php 2012-12-06
09:10:29 UTC (rev 10573)
@@ -166,7 +166,7 @@
$insert_values= array
(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
implode(',',(array_keys($msgbox_data)))
);
Modified: trunk/property/inc/cron/default/synkroniser_med_boei.php
===================================================================
--- trunk/property/inc/cron/default/synkroniser_med_boei.php 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/synkroniser_med_boei.php 2012-12-06
09:10:29 UTC (rev 10573)
@@ -181,12 +181,12 @@
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
$receipt
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
@@ -265,10 +265,10 @@
for ($i=0; $i<count($owner_utf); $i++)
{
$sql2_utf = "INSERT INTO fm_owner
(id,org_name,remark,category,entry_date,owner_id)"
- . "VALUES (" .
$this->bocommon->validate_db_insert($owner_utf[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($owner_utf[$i]) . ")";
$sql2_latin = "INSERT INTO fm_owner
(id,org_name,remark,category,entry_date,owner_id)"
- . "VALUES (" .
$this->bocommon->validate_db_insert($owner_latin[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($owner_latin[$i]) . ")";
$this->db->query($sql2_utf,__LINE__,__FILE__);
$this->db_boei->query($sql2_latin,__LINE__,__FILE__);
@@ -374,9 +374,9 @@
{
$sql2_utf = "INSERT INTO fm_location1
(location_code, loc1, loc1_name, part_of_town_id, owner_id, kostra_id,category)
"
- . "VALUES (" .
$this->bocommon->validate_db_insert($objekt_utf[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($objekt_utf[$i]) . ")";
$sql2_latin = "INSERT INTO fm_location1
(location_code, loc1, loc1_name, part_of_town_id, owner_id, kostra_id,category)
"
- . "VALUES (" .
$this->bocommon->validate_db_insert($objekt_latin[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($objekt_latin[$i]) . ")";
$this->db->query($sql2_utf,__LINE__,__FILE__);
$this->db_boei->query($sql2_latin,__LINE__,__FILE__);
@@ -430,9 +430,9 @@
{
$sql2_utf = "INSERT INTO fm_location2
(location_code, loc1, loc2, loc2_name,category) "
- . "VALUES (" .
$this->bocommon->validate_db_insert($bygg_utf[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($bygg_utf[$i]) . ")";
$sql2_latin = "INSERT INTO fm_location2
(location_code, loc1, loc2, loc2_name,category) "
- . "VALUES (" .
$this->bocommon->validate_db_insert($bygg_latin[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($bygg_latin[$i]) . ")";
$this->db->query($sql2_utf,__LINE__,__FILE__);
$this->db_boei->query($sql2_latin,__LINE__,__FILE__);
@@ -494,9 +494,9 @@
{
$sql2_utf = "INSERT INTO fm_location3
(location_code, loc1, loc2, loc3, loc3_name, fellesareal,category) "
- . "VALUES (" .
$this->bocommon->validate_db_insert($seksjon_utf[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($seksjon_utf[$i]) . ")";
$sql2_latin = "INSERT INTO fm_location3
(location_code, loc1, loc2, loc3, loc3_name, fellesareal,category) "
- . "VALUES (" .
$this->bocommon->validate_db_insert($seksjon_latin[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($seksjon_latin[$i]) . ")";
$this->db->query($sql2_utf,__LINE__,__FILE__);
$this->db_boei->query($sql2_latin,__LINE__,__FILE__);
@@ -584,10 +584,10 @@
$sql2_utf = "INSERT INTO fm_location4
(location_code, loc1, loc4, leieobjekttype_id, loc2, loc3, category, street_id,
street_number, etasje, antallrom, boareal, livslopsstd, heis, driftsstatus_id,
tenant_id, beregnet_boa, flyttenr)"
- . "VALUES (" .
$this->bocommon->validate_db_insert($leieobjekt_utf[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($leieobjekt_utf[$i]) . ")";
$sql2_latin = "INSERT INTO fm_location4
(location_code, loc1, loc4, leieobjekttype_id, loc2, loc3, category, street_id,
street_number, etasje, antallrom, boareal, livslopsstd, heis, driftsstatus_id,
tenant_id, beregnet_boa, flyttenr)"
- . "VALUES (" .
$this->bocommon->validate_db_insert($leieobjekt_latin[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($leieobjekt_latin[$i]) . ")";
$this->db->query($sql2_utf,__LINE__,__FILE__);
$this->db_boei->query($sql2_latin,__LINE__,__FILE__);
@@ -650,9 +650,9 @@
$this->db_boei->query("DELETE FROM fm_tenant
WHERE id=" . (int)$leietaker_latin[$i]['id'],__LINE__,__FILE__);
$sql2_utf = "INSERT INTO fm_tenant (id,
first_name, last_name, category, status_eco, status_drift,entry_date,owner_id)"
- . "VALUES (" .
$this->bocommon->validate_db_insert($leietaker_utf[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($leietaker_utf[$i]) . ")";
$sql2_latin = "INSERT INTO fm_tenant (id,
first_name, last_name, category, status_eco, status_drift,entry_date,owner_id)"
- . "VALUES (" .
$this->bocommon->validate_db_insert($leietaker_latin[$i]) . ")";
+ . "VALUES (" .
$this->db->validate_insert($leietaker_latin[$i]) . ")";
$this->db->query($sql2_utf,__LINE__,__FILE__);
$this->db_boei->query($sql2_latin,__LINE__,__FILE__);
@@ -724,7 +724,7 @@
. " driftsstatus_id = '" .
$this->db_boei->f('driftsstatus_id') . "',"
. " boareal = '" . $this->db_boei->f('boareal')
. "',"
. " flyttenr = '" .
$this->db_boei->f('flyttenr') . "',"
- . " innflyttetdato = '" .
date($this->bocommon->dateformat,strtotime($this->db_boei->f('innflyttetdato')))
. "'"
+ . " innflyttetdato = '" .
date($this->db->date_format(),strtotime($this->db_boei->f('innflyttetdato'))) .
"'"
. " WHERE loc1 = '" .
$this->db_boei->f('objekt_id') . "' AND loc4= '" .
$this->db_boei->f('leie_id') . "'";
$sql2_latin = " UPDATE fm_location4 SET "
. " tenant_id = '" .
$this->db_boei->f('leietaker_id') . "',"
Modified: trunk/property/inc/cron/default/update_googlemap.php
===================================================================
--- trunk/property/inc/cron/default/update_googlemap.php 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/update_googlemap.php 2012-12-06
09:10:29 UTC (rev 10573)
@@ -124,12 +124,12 @@
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
implode(',',(array_keys($msgbox_data)))
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
Modified: trunk/property/inc/cron/default/update_phpgw.php
===================================================================
--- trunk/property/inc/cron/default/update_phpgw.php 2012-12-05 20:57:42 UTC
(rev 10572)
+++ trunk/property/inc/cron/default/update_phpgw.php 2012-12-06 09:10:29 UTC
(rev 10573)
@@ -114,12 +114,12 @@
{
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
$receipt
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
Modified: trunk/property/inc/cron/default/update_workorder_status.php
===================================================================
--- trunk/property/inc/cron/default/update_workorder_status.php 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/cron/default/update_workorder_status.php 2012-12-06
09:10:29 UTC (rev 10573)
@@ -122,12 +122,12 @@
$insert_values= array(
$cron,
- date($this->bocommon->datetimeformat),
+ date($this->db->datetime_format()),
$this->function_name,
implode(',',(array_keys($msgbox_data)))
);
- $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+ $insert_values =
$this->db->validate_insert($insert_values);
$sql = "INSERT INTO fm_cron_log
(cron,cron_date,process,message) "
. "VALUES ($insert_values)";
Modified:
trunk/property/inc/custom/default/estimert_ferdigdato_til_leieobjekt_BBB.php
===================================================================
---
trunk/property/inc/custom/default/estimert_ferdigdato_til_leieobjekt_BBB.php
2012-12-05 20:57:42 UTC (rev 10572)
+++
trunk/property/inc/custom/default/estimert_ferdigdato_til_leieobjekt_BBB.php
2012-12-06 09:10:29 UTC (rev 10573)
@@ -23,7 +23,7 @@
if($finnish_date >0)
{
- $finnish_date =
date($this->bocommon->dateformat,$finnish_date);
+ $finnish_date = date($db->date_format(),$finnish_date);
$db->query("UPDATE fm_location4 set finnish_date =
'$finnish_date' WHERE location_code='$location_code'",__LINE__,__FILE__);
}
}
Modified: trunk/property/inc/custom/default/innflyttetdato_entity_2_11_BBB.php
===================================================================
--- trunk/property/inc/custom/default/innflyttetdato_entity_2_11_BBB.php
2012-12-05 20:57:42 UTC (rev 10572)
+++ trunk/property/inc/custom/default/innflyttetdato_entity_2_11_BBB.php
2012-12-06 09:10:29 UTC (rev 10573)
@@ -22,7 +22,7 @@
if($tenant_id == $values['extra']['tenant_id'] &&
!$innflyttetdato_old)
{
$value_set['innflyttet'] = $innflyttetdato;
- $value_set =
$this->bocommon->validate_db_update($value_set);
+ $value_set = $db->validate_update($value_set);
$db->transaction_begin();
$db->query("UPDATE fm_entity_2_11 set $value_set WHERE
id=" . (int) $receipt['id'],__LINE__,__FILE__);
$db->transaction_commit();
Modified: trunk/property/inc/custom/default/kalkuler_risiko_for_ros.php
===================================================================
--- trunk/property/inc/custom/default/kalkuler_risiko_for_ros.php
2012-12-05 20:57:42 UTC (rev 10572)
+++ trunk/property/inc/custom/default/kalkuler_risiko_for_ros.php
2012-12-06 09:10:29 UTC (rev 10573)
@@ -75,7 +75,7 @@
}
}
- $value_set =
$this->bocommon->validate_db_update($value_set);
+ $value_set = $db->validate_update($value_set);
$db->transaction_begin();
$db->query("UPDATE fm_entity_2_6 set $value_set WHERE
id=" . (int)$receipt['id'],__LINE__,__FILE__);
$db->transaction_commit();
Modified: trunk/property/inc/export/default/Agresso
===================================================================
--- trunk/property/inc/export/default/Agresso 2012-12-05 20:57:42 UTC (rev
10572)
+++ trunk/property/inc/export/default/Agresso 2012-12-06 09:10:29 UTC (rev
10573)
@@ -286,15 +286,15 @@
$BilagOverf['item_id'],
);
- $values = $this->bocommon->validate_db_insert($values);
+ $values = $this->db->validate_insert($values);
$sql= "INSERT INTO fm_ecobilag
(project_id,kostra_id,pmwrkord_code,bilagsnr,splitt,kildeid,kidnr,typeid,"
. "
fakturadato,forfallsdato,regtid,artid,spvend_code,dimb,oppsynsmannid,"
. "
saksbehandlerid,budsjettansvarligid,fakturanr,spbudact_code,dima,loc1,dimd,mvakode,"
. "
periode,merknad,utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato,item_type,item_id,belop,godkjentbelop)"
. " values ($values,"
- . $this->bocommon->moneyformat($BilagOverf['belop']) .
","
- .
$this->bocommon->moneyformat($BilagOverf['godkjentbelop']) . ")";
+ . $this->db->money_format($BilagOverf['belop']) . ","
+ . $this->db->money_format($BilagOverf['godkjentbelop'])
. ")";
$this->db->query($sql,__LINE__,__FILE__);
}
Modified: trunk/property/inc/export/default/Ecolink
===================================================================
--- trunk/property/inc/export/default/Ecolink 2012-12-05 20:57:42 UTC (rev
10572)
+++ trunk/property/inc/export/default/Ecolink 2012-12-06 09:10:29 UTC (rev
10573)
@@ -222,15 +222,15 @@
$BilagOverf['utbetalingsigndato'],
);
- $values = $this->bocommon->validate_db_insert($values);
+ $values = $this->db->validate_insert($values);
$sql= "INSERT INTO fm_ecobilag
(pmwrkord_code,bilagsnr,splitt,kildeid,kidnr,typeid,"
. "
fakturadato,forfallsdato,regtid,artid,spvend_code,dimb,oppsynsmannid,"
. "
saksbehandlerid,budsjettansvarligid,fakturanr,spbudact_code,dima,loc1,dimd,mvakode,"
. "
periode,merknad,utbetalingid,oppsynsigndato,saksigndato,budsjettsigndato,utbetalingsigndato,belop,godkjentbelop)"
. " values ($values,"
- . $this->bocommon->moneyformat($BilagOverf['belop']) .
","
- .
$this->bocommon->moneyformat($BilagOverf['godkjentbelop']) . ")";
+ . $this->db->money_format($BilagOverf['belop']) . ","
+ . $this->db->money_format($BilagOverf['godkjentbelop'])
. ")";
$this->db->query($sql,__LINE__,__FILE__);
}
Modified: trunk/property/inc/import/default/Import_fra_BKK
===================================================================
--- trunk/property/inc/import/default/Import_fra_BKK 2012-12-05 20:57:42 UTC
(rev 10572)
+++ trunk/property/inc/import/default/Import_fra_BKK 2012-12-06 09:10:29 UTC
(rev 10573)
@@ -96,13 +96,10 @@
function import_conv()
{
-
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->soXport =
CreateObject($this->currentapp.'.soXport');
- $this->invoice =
CreateObject($this->currentapp.'.boinvoice');
- $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
- $this->dateformat = $this->bocommon->dateformat;
- $this->datetimeformat =
$this->bocommon->datetimeformat;
+ $this->soXport =
CreateObject('property.soXport');
+ $this->invoice =
CreateObject('property.boinvoice');
+ $this->dateformat =
$GLOBALS['phpgw']->db->date_format();
+ $this->datetimeformat =
$GLOBALS['phpgw']->db->datetime_format();
$this->next_bilagsnr =
$this->invoice->next_bilagsnr();
$this->config =
CreateObject('phpgwapi.config','property');
$this->config->read_repository();
@@ -320,4 +317,3 @@
return $receipt;
}
}
-?>
Modified: trunk/property/inc/import/default/Import_fra_Kemner
===================================================================
--- trunk/property/inc/import/default/Import_fra_Kemner 2012-12-05 20:57:42 UTC
(rev 10572)
+++ trunk/property/inc/import/default/Import_fra_Kemner 2012-12-06 09:10:29 UTC
(rev 10573)
@@ -65,13 +65,10 @@
function import_conv()
{
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->soXport =
CreateObject($this->currentapp.'.soXport');
- $this->invoice =
CreateObject($this->currentapp.'.boinvoice');
- $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
- $this->dateformat = $this->bocommon->dateformat;
- $this->datetimeformat =
$this->bocommon->datetimeformat;
-
+ $this->soXport =
CreateObject('property.soXport');
+ $this->invoice =
CreateObject('property.boinvoice');
+ $this->dateformat =
$GLOBALS['phpgw']->db->date_format();
+ $this->datetimeformat =
$GLOBALS['phpgw']->db->datetime_format();
}
function import($invoice_common,$download)
Modified: trunk/property/inc/import/default/Import_fra_Kemner_xml
===================================================================
--- trunk/property/inc/import/default/Import_fra_Kemner_xml 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/import/default/Import_fra_Kemner_xml 2012-12-06
09:10:29 UTC (rev 10573)
@@ -62,12 +62,10 @@
function import_conv()
{
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->soXport =
CreateObject($this->currentapp.'.soXport');
- $this->invoice =
CreateObject($this->currentapp.'.boinvoice');
- $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
- $this->dateformat = $this->bocommon->dateformat;
- $this->datetimeformat =
$this->bocommon->datetimeformat;
+ $this->soXport =
CreateObject('property.soXport');
+ $this->invoice =
CreateObject('property.boinvoice');
+ $this->dateformat =
$GLOBALS['phpgw']->db->date_format();
+ $this->datetimeformat =
$GLOBALS['phpgw']->db->datetime_format();
}
function import($invoice_common,$download)
Modified: trunk/property/inc/import/default/Import_fra_Service
===================================================================
--- trunk/property/inc/import/default/Import_fra_Service 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/import/default/Import_fra_Service 2012-12-06
09:10:29 UTC (rev 10573)
@@ -58,14 +58,12 @@
function import_conv()
{
- // $this->db = $GLOBALS['phpgw']->db;
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->soXport =
CreateObject($this->currentapp.'.soXport');
- $this->invoice =
CreateObject($this->currentapp.'.boinvoice');
- $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
- $this->db = $this->bocommon->new_db();
- $this->dateformat = $this->bocommon->dateformat;
- $this->datetimeformat =
$this->bocommon->datetimeformat;
+ $this->db =
clone($GLOBALS['phpgw']->db);
+ $this->soXport =
CreateObject('property.soXport');
+ $this->invoice =
CreateObject('property.boinvoice');
+ $this->bocommon =
CreateObject('property.bocommon');
+ $this->dateformat =
$GLOBALS['phpgw']->db->date_format();
+ $this->datetimeformat =
$GLOBALS['phpgw']->db->datetime_format();
$this->next_bilagsnr =
$this->invoice->next_bilagsnr();
}
Modified: trunk/property/inc/import/default/Import_fra_Service_xml
===================================================================
--- trunk/property/inc/import/default/Import_fra_Service_xml 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/import/default/Import_fra_Service_xml 2012-12-06
09:10:29 UTC (rev 10573)
@@ -58,16 +58,13 @@
function import_conv()
{
- // $this->db = $GLOBALS['phpgw']->db;
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $this->soXport =
CreateObject($this->currentapp.'.soXport');
- $this->invoice =
CreateObject($this->currentapp.'.boinvoice');
- $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
- $this->db = $this->bocommon->new_db();
- $this->dateformat = $this->bocommon->dateformat;
- $this->datetimeformat =
$this->bocommon->datetimeformat;
+ $this->db =
clone($GLOBALS['phpgw']->db);
+ $this->soXport =
CreateObject('property.soXport');
+ $this->invoice =
CreateObject('property.boinvoice');
+ $this->dateformat =
$GLOBALS['phpgw']->db->date_format();
+ $this->datetimeformat =
$GLOBALS['phpgw']->db->datetime_format();
$this->next_bilagsnr =
$this->invoice->next_bilagsnr();
- $this->xmltool =
CreateObject('phpgwapi.xmltool');
+ $this->xmltool =
CreateObject('phpgwapi.xmltool');
}
function import($invoice_common,$download)
Modified: trunk/property/inc/import/default/import_fra_Service_xls
===================================================================
--- trunk/property/inc/import/default/import_fra_Service_xls 2012-12-05
20:57:42 UTC (rev 10572)
+++ trunk/property/inc/import/default/import_fra_Service_xls 2012-12-06
09:10:29 UTC (rev 10573)
@@ -58,14 +58,12 @@
function import_conv()
{
- // $this->db = $GLOBALS['phpgw']->db;
- $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ $this->db =
clone($GLOBALS['phpgw']->db);
$this->soXport =
CreateObject('property.soXport');
$this->invoice =
CreateObject('property.boinvoice');
$this->bocommon =
CreateObject('property.bocommon');
- $this->db = $this->bocommon->new_db();
- $this->dateformat =
$this->bocommon->dateformat;
- $this->datetimeformat =
$this->bocommon->datetimeformat;
+ $this->dateformat =
$GLOBALS['phpgw']->db->date_format();
+ $this->datetimeformat =
$GLOBALS['phpgw']->db->datetime_format();
$this->next_bilagsnr =
$this->invoice->next_bilagsnr();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10573] property: generalize,
Sigurd Nes <=