[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14885] Merge 14879:14884 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14885] Merge 14879:14884 from trunk |
Date: |
Fri, 01 Apr 2016 13:06:28 +0000 |
Revision: 14885
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14885
Author: sigurdne
Date: 2016-04-01 13:06:28 +0000 (Fri, 01 Apr 2016)
Log Message:
-----------
Merge 14879:14884 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/phpgwapi/inc/class.sessions.inc.php
branches/Version-2_0-branch/phpgwapi/inc/functions.inc.php
branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
branches/Version-2_0-branch/property/templates/base/admin_entity.xsl
branches/Version-2_0-branch/rental/inc/class.socontract.inc.php
Property Changed:
----------------
branches/Version-2_0-branch/
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878
+ /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884
Modified: branches/Version-2_0-branch/phpgwapi/inc/class.sessions.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.sessions.inc.php
2016-04-01 13:04:30 UTC (rev 14884)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.sessions.inc.php
2016-04-01 13:06:28 UTC (rev 14885)
@@ -278,7 +278,7 @@
if (
isset($GLOBALS['phpgw_info']['server']['usecookies'])
&&
$GLOBALS['phpgw_info']['server']['usecookies'] )
{
- $this->phpgw_setcookie(session_name(),
$this->_sessionid);
+// $this->phpgw_setcookie(session_name(),
$this->_sessionid);// already sendt with session_start()
$this->phpgw_setcookie('domain',
$this->_account_domain);
}
@@ -830,7 +830,15 @@
*/
public function phpgw_setcookie($cookiename, $cookievalue='',
$cookietime=0)
{
- setcookie($cookiename, $cookievalue, $cookietime);
+ $cookie_params = session_get_cookie_params();
+ setcookie($cookiename,
+ $cookievalue,
+ $cookietime,
+ $cookie_params['path'],
+ $cookie_params['domain'],
+ !!$cookie_params['secure'],
+ !!$cookie_params['httponly']
+ );
}
@@ -947,15 +955,14 @@
*/
public function register_session($login, $user_ip, $now,
$session_flags)
{
- if ( $this->_sessionid )
+ if ( $this->_sessionid != session_id())
{
- session_id($this->_sessionid);
+ throw new Exception("sessions::sessionid is
tampered");
}
if ( !strlen(session_id()) )
{
throw new
Exception("sessions::register_session() - No value for session_id()");
-// session_start();
}
$_SESSION['phpgw_session'] = array
Modified: branches/Version-2_0-branch/phpgwapi/inc/functions.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/functions.inc.php 2016-04-01
13:04:30 UTC (rev 14884)
+++ branches/Version-2_0-branch/phpgwapi/inc/functions.inc.php 2016-04-01
13:06:28 UTC (rev 14885)
@@ -332,22 +332,28 @@
'line' => $error_line,
'text' => "$error_msg\n" . phpgw_parse_backtrace($bt)
);
-
+ $message = '';
switch ( $error_level )
{
case E_USER_ERROR:
case E_ERROR:
$log_args['severity'] = 'F'; //all "ERRORS"
should be fatal
$log->fatal($log_args);
- echo '<p class="msg">' . lang('ERROR: %1 in %2
at line %3', $error_msg, $error_file, $error_line) . "</p>\n";
- die('<pre>' . phpgw_parse_backtrace($bt) .
"</pre>\n");
-
+ if (ini_get('display_errors'))
+ {
+ echo '<p class="msg">' . lang('ERROR:
%1 in %2 at line %3', $error_msg, $error_file, $error_line) . "</p>\n";
+ die('<pre>' .
phpgw_parse_backtrace($bt) . "</pre>\n");
+ }
+ else
+ {
+ die('Error');
+ }
case E_WARNING:
case E_USER_WARNING:
$log_args['severity'] = 'W';
$log->warn($log_args);
- echo '<p class="msg">' . lang('Warning: %1 in
%2 at line %3', $error_msg, $error_file, $error_line) . "</p>\n";
- echo '<pre>' . phpgw_parse_backtrace($bt) .
"</pre>\n";
+ $message .= '<p class="msg">' . lang('Warning:
%1 in %2 at line %3', $error_msg, $error_file, $error_line) . "</p>\n";
+ $message .= '<pre>' .
phpgw_parse_backtrace($bt) . "</pre>\n";
break;
case PHPGW_E_INFO:
@@ -366,8 +372,8 @@
$log->notice($log_args);
if(isset($GLOBALS['phpgw_info']['server']['log_levels']['global_level']) &&
$GLOBALS['phpgw_info']['server']['log_levels']['global_level'] == 'N')
{
- echo '<p>' . lang('Notice: %1 in %2 at
line %3', $error_msg, $error_file, $error_line) . "</p>\n";
- echo '<pre>' .
phpgw_parse_backtrace($bt) . "</pre>\n";
+ $message .= '<p>' . lang('Notice: %1
in %2 at line %3', $error_msg, $error_file, $error_line) . "</p>\n";
+ $message .= '<pre>' .
phpgw_parse_backtrace($bt) . "</pre>\n";
}
break;
case E_STRICT:
@@ -386,10 +392,15 @@
case E_USER_DEPRECATED:
$log_args['severity'] = 'DP';
$log->deprecated($log_args);
- echo '<p class="msg">' . lang('deprecated: %1
in %2 at line %3', $error_msg, $error_file, $error_line) . "</p>\n";
- echo '<pre>' . phpgw_parse_backtrace($bt) .
"</pre>\n";
+ $message .= '<p class="msg">' .
lang('deprecated: %1 in %2 at line %3', $error_msg, $error_file, $error_line) .
"</p>\n";
+ $message .= '<pre>' .
phpgw_parse_backtrace($bt) . "</pre>\n";
break;
}
+
+ if (ini_get('display_errors'))
+ {
+ echo $message;
+ }
}
set_error_handler('phpgw_handle_error');
Modified: branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
2016-04-01 13:04:30 UTC (rev 14884)
+++ branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
2016-04-01 13:06:28 UTC (rev 14885)
@@ -1065,4 +1065,9 @@
}
return $locations[$location_code];
}
+
+ function get_item_id( $location_code )
+ {
+ return $this->so->get_item_id($location_code);
+ }
}
\ No newline at end of file
Modified: branches/Version-2_0-branch/property/templates/base/admin_entity.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/admin_entity.xsl
2016-04-01 13:04:30 UTC (rev 14884)
+++ branches/Version-2_0-branch/property/templates/base/admin_entity.xsl
2016-04-01 13:06:28 UTC (rev 14885)
@@ -2263,7 +2263,7 @@
</td>
<td align="center">
<xsl:choose>
- <xsl:when
test="selected='selected' or selected = 1>
+ <xsl:when
test="selected='selected' or selected = 1">
<input
type="checkbox" name="values[lookup_entity][]" value="{id}" checked="checked"
onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
Modified: branches/Version-2_0-branch/rental/inc/class.socontract.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.socontract.inc.php
2016-04-01 13:04:30 UTC (rev 14884)
+++ branches/Version-2_0-branch/rental/inc/class.socontract.inc.php
2016-04-01 13:06:28 UTC (rev 14885)
@@ -1176,6 +1176,7 @@
public function update_price_items( $contract_id, $rented_area )
{
+ $db2 = clone($this->db);
$success_price_item = true;
$new_area = $rented_area;
$q_price_items = "SELECT id AS rpi_id, price as
rpi_price FROM rental_contract_price_item WHERE contract_id={$contract_id} AND
is_area";
@@ -1186,24 +1187,9 @@
$price = $this->db->f('rpi_price');
$curr_total_price = ($new_area * $price);
$sql_pi = "UPDATE rental_contract_price_item
SET area={$new_area}, total_price={$curr_total_price} WHERE id={$id}";
- $result = $this->db->query($sql_pi, __LINE__,
__FILE__, false, true);
- if ($result)
- {
- //noop
- }
- else
- {
- $success_price_item = false;
- }
+ $success_price_item = $db2->query($sql_pi,
__LINE__, __FILE__);
}
- if ($success_price_item)
- {
- return true;
- }
- else
- {
- return false;
- }
+ return $success_price_item;
}
public function import_contract_reference( $contract_id,
$reference )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14885] Merge 14879:14884 from trunk,
Sigurd Nes <=