Revision: 1808
http://mrbs.svn.sourceforge.net/mrbs/?rev=1808&view=rev
Author: cimorrison
Date: 2011-03-30 07:52:48 +0000 (Wed, 30 Mar 2011)
Log Message:
-----------
Fixed bug causing custom fields not to be reported properly in delete email
notifications
Modified Paths:
--------------
mrbs/trunk/web/edit_entry_handler.php
mrbs/trunk/web/functions_mail.inc
mrbs/trunk/web/mrbs_sql.inc
Modified: mrbs/trunk/web/edit_entry_handler.php
===================================================================
--- mrbs/trunk/web/edit_entry_handler.php 2011-03-27 22:14:24 UTC (rev
1807)
+++ mrbs/trunk/web/edit_entry_handler.php 2011-03-30 07:52:48 UTC (rev
1808)
@@ -565,7 +565,10 @@
$data['type'] = $type;
$data['description'] = $description;
$data['status'] = $status;
- $data['custom_fields'] = $custom_fields;
+ foreach ($custom_fields as $key => $value)
+ {
+ $data[$key] = $value;
+ }
$data['rep_type'] = $rep_type;
if ($edit_type == "series")
{
Modified: mrbs/trunk/web/functions_mail.inc
===================================================================
--- mrbs/trunk/web/functions_mail.inc 2011-03-27 22:14:24 UTC (rev 1807)
+++ mrbs/trunk/web/functions_mail.inc 2011-03-30 07:52:48 UTC (rev 1808)
@@ -589,7 +589,7 @@
if (!in_array($field['name'], $standard_fields['entry']))
{
$key = $field['name'];
- $value = (isset($data['custom_fields'][$key])) ?
$data['custom_fields'][$key] : '';
+ $value = (isset($data[$key])) ? $data[$key] : '';
// Convert any booleans or pseudo-booleans to text strings (in the
mail language)
if (($field['nature'] == 'boolean') ||
(($field['nature'] == 'integer') && isset($field['length']) &&
($field['length'] <= 2)) )
Modified: mrbs/trunk/web/mrbs_sql.inc
===================================================================
--- mrbs/trunk/web/mrbs_sql.inc 2011-03-27 22:14:24 UTC (rev 1807)
+++ mrbs/trunk/web/mrbs_sql.inc 2011-03-30 07:52:48 UTC (rev 1808)
@@ -308,7 +308,7 @@
switch ($field['nature'])
{
case 'integer':
- if (!isset($data['custom_fields'][$key]) ||
($data['custom_fields'][$key] === ''))
+ if (!isset($data[$key]) || ($data[$key] === ''))
{
// Try and set it to NULL when we can because there will be
cases when we
// want to distinguish between NULL and 0 - especially when
the field
@@ -317,17 +317,17 @@
}
else
{
- $value = $data['custom_fields'][$key];
+ $value = $data[$key];
}
break;
default:
- if (!isset($data['custom_fields'][$key]))
+ if (!isset($data[$key]))
{
$value = '';
}
else
{
- $value = "'" . addslashes($data['custom_fields'][$key]) . "'";
+ $value = "'" . addslashes($data[$key]) . "'";
}
break;
} // switch ($field_natures[$key])
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits