[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7215] Merge 7213:7214 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7215] Merge 7213:7214 from trunk |
Date: |
Tue, 12 Apr 2011 20:06:07 +0000 |
Revision: 7215
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7215
Author: sigurdne
Date: 2011-04-12 20:06:07 +0000 (Tue, 12 Apr 2011)
Log Message:
-----------
Merge 7213:7214 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/admin/inc/class.solog.inc.php
branches/Version-1_0-branch/booking/inc/class.sobilling_sequential_number_generator.inc.php
branches/Version-1_0-branch/calendar/inc/class.socalendar_sql.inc.php
branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_sql.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.acl.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.contacts_sql.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.custom_fields.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.db.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.db_adodb.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.preferences.inc.php
branches/Version-1_0-branch/property/inc/class.db_mssql.inc.php
branches/Version-1_0-branch/property/inc/class.soadmin_entity.inc.php
branches/Version-1_0-branch/property/inc/class.soadmin_location.inc.php
branches/Version-1_0-branch/property/inc/class.solocation.inc.php
branches/Version-1_0-branch/property/inc/class.sopending_action.inc.php
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214
Modified: branches/Version-1_0-branch/admin/inc/class.solog.inc.php
===================================================================
--- branches/Version-1_0-branch/admin/inc/class.solog.inc.php 2011-04-12
16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/admin/inc/class.solog.inc.php 2011-04-12
20:06:07 UTC (rev 7215)
@@ -25,7 +25,7 @@
$account_id = (int) $account_id;
if ($account_id > 0)
{
- return " WHEEE log_account_id = $account_id";
+ return " WHERE log_account_id = $account_id";
}
}
Modified:
branches/Version-1_0-branch/booking/inc/class.sobilling_sequential_number_generator.inc.php
===================================================================
---
branches/Version-1_0-branch/booking/inc/class.sobilling_sequential_number_generator.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++
branches/Version-1_0-branch/booking/inc/class.sobilling_sequential_number_generator.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -92,7 +92,7 @@
throw new LogicException("Cannot be reused over
multiple transactions");
}
- if ($this->get_db()->Transaction === false) {
+ if ($this->get_db()->get_transaction() === false) {
throw new LogicException("Must only be called
within a transaction");
}
@@ -133,7 +133,7 @@
}
function get_current() {
- if ($this->used || ($this->get_db()->Transaction ===
false && $this->locked)) {
+ if ($this->used || ($this->get_db()->get_transaction()
=== false && $this->locked)) {
$this->set_used();
throw new LogicException("Cannot be reused over
multiple transactions");
}
@@ -154,4 +154,4 @@
$this->locked = false;
$this->used = true;
}
- }
\ No newline at end of file
+ }
Modified: branches/Version-1_0-branch/calendar/inc/class.socalendar_sql.inc.php
===================================================================
--- branches/Version-1_0-branch/calendar/inc/class.socalendar_sql.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/calendar/inc/class.socalendar_sql.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -92,7 +92,7 @@
$this->delete_event( (int) $this->stream->f('cal_id'));
}
// $this->stream->lock(array('phpgw_cal_user'));
- if ( $this->stream->Transaction )
+ if ( $this->stream->get_transaction() )
{
$this->global_lock = true;
}
@@ -507,7 +507,7 @@
);
$this->stream->lock($locks);
*/
- if ( $this->stream->Transaction )
+ if ( $this->stream->get_transaction() )
{
$this->global_lock = true;
}
Modified:
branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_sql.inc.php
===================================================================
---
branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_sql.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++
branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_sql.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -100,7 +100,7 @@
*/
public function create_group_account($account)
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -154,7 +154,7 @@
*/
public function create_user_account($account)
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.acl.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.acl.inc.php 2011-04-12
16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.acl.inc.php 2011-04-12
20:06:07 UTC (rev 7215)
@@ -409,7 +409,7 @@
unset($subs);
unset($_locations);
- if ( $this->_db->Transaction )
+ if ( $this->_db->get_transaction() )
{
$this->global_lock = true;
}
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.contacts_sql.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.contacts_sql.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.contacts_sql.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -2391,7 +2391,7 @@
$principal['preferred_address'] = '';
}
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -2478,7 +2478,7 @@
$this->org = createObject('phpgwapi.contact_org');
if ($action == PHPGW_SQL_RUN_SQL)
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -2511,7 +2511,7 @@
$this->person = createObject('phpgwapi.contact_person');
if ($action == PHPGW_SQL_RUN_SQL)
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -2569,7 +2569,7 @@
if ($action == PHPGW_SQL_RUN_SQL)
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -2616,7 +2616,7 @@
$data['my_creatby'] =
$this->get_user_id();
if ($action == PHPGW_SQL_RUN_SQL)
{
- if ( $this->db->Transaction )
+ if (
$this->db->get_transaction() )
{
$this->global_lock =
true;
}
@@ -2646,7 +2646,7 @@
$this->location = createObject('phpgwapi.contact_addr');
if ($action == PHPGW_SQL_RUN_SQL)
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -2686,7 +2686,7 @@
$this->comm = createObject('phpgwapi.contact_comm');
if ($action == PHPGW_SQL_RUN_SQL)
{
- if ( $this->db->Transaction &&
!$this->local_lock)
+ if ( $this->db->get_transaction() &&
!$this->local_lock)
{
$this->global_lock = true;
}
@@ -2719,7 +2719,7 @@
$this->note = createObject('phpgwapi.contact_note');
if ($action == PHPGW_SQL_RUN_SQL)
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -2752,7 +2752,7 @@
$this->others = createObject('phpgwapi.contact_others');
if ($action == PHPGW_SQL_RUN_SQL)
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -2927,7 +2927,7 @@
function delete_org_person_relation($org_id, $person_id,
$action=PHPGW_SQL_RUN_SQL)
{
$relations =
createObject('phpgwapi.contact_org_person');
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -3933,7 +3933,7 @@
foreach($records as $data)
{
$this->relations =
createObject('phpgwapi.contact_org_person');
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
@@ -3967,7 +3967,7 @@
if(!$this->exist_org_person_relation($new_organization_id,
$data['my_person_id']))
{
$this->relations =
createObject('phpgwapi.contact_org_person');
- if ( $this->db->Transaction )
+ if (
$this->db->get_transaction() )
{
$this->global_lock =
true;
}
@@ -4100,7 +4100,7 @@
*/
function unlock_table()
{
- if(!$this->global_lock && $this->db->Transaction)
+ if( !$this->global_lock && $this->db->get_transaction()
)
{
$this->db->transaction_commit();
$this->locked = NULL;
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.custom_fields.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.custom_fields.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -320,7 +320,7 @@
unset($attrib);
- if ( $this->_db->Transaction )
+ if ( $this->_db->get_transaction() )
{
$this->global_lock = true;
}
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.db.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.db.inc.php 2011-04-12
16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.db.inc.php 2011-04-12
20:06:07 UTC (rev 7215)
@@ -106,7 +106,7 @@
var $fetchmode = 'ASSOC';//'BOTH';
- var $Transaction = false;
+ protected $Transaction = false;
var $persistent = false;
/**
@@ -669,4 +669,9 @@
$next_id = $this->f('maximum')+1;
return $next_id;
}
+
+ public function get_transaction()
+ {
+ return $this->Transaction;
+ }
}
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.db_adodb.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.db_adodb.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.db_adodb.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -377,9 +377,21 @@
*/
public function transaction_abort()
{
+ $ret = false;
$this->Transaction = false;
- $this->adodb->FailTrans();
- return $this->adodb->HasFailedTrans();
+ try
+ {
+ $this->adodb->FailTrans();
+ $ret = $this->adodb->HasFailedTrans();
+ }
+ catch(Exception $e)
+ {
+ if ( $e )
+ {
+ throw $e;
+ }
+ }
+ return $ret;
}
/**
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -361,6 +361,7 @@
if ( $e && $this->Halt_On_Error == 'yes' )
{
$this->transaction_abort();
+
if($file)
{
trigger_error('Error: ' .
$e->getMessage() . "<br>SQL: $sql\n in File: $file\n on Line: $line\n",
E_USER_ERROR);
@@ -446,6 +447,7 @@
if ( $e && $this->Halt_On_Error == 'yes' )
{
$this->transaction_abort();
+
if($file)
{
trigger_error('Error: ' .
$e->getMessage() . "<br>SQL: $sql\n in File: $file\n on Line: $line\n",
E_USER_ERROR);
@@ -561,8 +563,21 @@
*/
public function transaction_abort()
{
+ $ret = false;
$this->Transaction = false;
- return $this->db->rollBack();
+ try
+ {
+ $ret = $this->db->rollBack();
+ }
+ catch(PDOException $e)
+ {
+ if ( $e )
+ {
+ trigger_error('Error: ' .
$e->getMessage(), E_USER_ERROR);
+ // throw $e;
+ }
+ }
+ return $ret;
}
/**
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.preferences.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.preferences.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.preferences.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -608,7 +608,7 @@
if (!
$GLOBALS['phpgw']->acl->check('session_only_preferences',1,'preferences'))
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
Modified: branches/Version-1_0-branch/property/inc/class.db_mssql.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.db_mssql.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/property/inc/class.db_mssql.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -28,7 +28,7 @@
var $Error = '';
var $Auto_Free = 0; ## set this to 1 to automatically
free results
var $Debug = false;
- var $Transaction = false;
+ protected $Transaction = false;
function connect()
{
@@ -379,5 +379,11 @@
$return = array();
return $return;
}
+
+ public function get_transaction()
+ {
+ return $this->Transaction;
+ }
+
}
Modified: branches/Version-1_0-branch/property/inc/class.soadmin_entity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soadmin_entity.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/property/inc/class.soadmin_entity.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -608,7 +608,7 @@
else
{
$receipt['error'][] = array('msg' =>
lang('table could not be added') );
- if($this->db->Transaction)
+ if( $this->db->get_transaction() )
{
$this->db->transaction_abort();
}
Modified:
branches/Version-1_0-branch/property/inc/class.soadmin_location.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soadmin_location.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/property/inc/class.soadmin_location.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -458,7 +458,7 @@
else
{
$receipt['error'][] = array('msg' =>
lang('table could not be added'));
- if($this->db->Transaction)
+ if( $this->db->get_transaction() )
{
$this->db->transaction_abort();
}
Modified: branches/Version-1_0-branch/property/inc/class.solocation.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.solocation.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/property/inc/class.solocation.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -1415,7 +1415,7 @@
function update_location()
{
- if ( $this->db->Transaction )
+ if ( $this->db->get_transaction() )
{
$this->global_lock = true;
}
Modified:
branches/Version-1_0-branch/property/inc/class.sopending_action.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sopending_action.inc.php
2011-04-12 16:45:11 UTC (rev 7214)
+++ branches/Version-1_0-branch/property/inc/class.sopending_action.inc.php
2011-04-12 20:06:07 UTC (rev 7215)
@@ -114,7 +114,7 @@
$reminder = 1;
- if( $this->db->Transaction )
+ if( $this->db->get_transaction() )
{
$this->global_transaction = true;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7215] Merge 7213:7214 from trunk,
Sigurd Nes <=