[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12036] property: custom functions
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12036] property: custom functions |
Date: |
Mon, 30 Jun 2014 07:45:53 +0000 |
Revision: 12036
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12036
Author: sigurdne
Date: 2014-06-30 07:45:51 +0000 (Mon, 30 Jun 2014)
Log Message:
-----------
property: custom functions
Modified Paths:
--------------
trunk/property/inc/class.boentity.inc.php
Modified: trunk/property/inc/class.boentity.inc.php
===================================================================
--- trunk/property/inc/class.boentity.inc.php 2014-06-30 07:38:19 UTC (rev
12035)
+++ trunk/property/inc/class.boentity.inc.php 2014-06-30 07:45:51 UTC (rev
12036)
@@ -706,15 +706,6 @@
$values_attribute =
$this->custom->convert_attribute_save($values_attribute);
}
- if ($action=='edit')
- {
- $receipt =
$this->so->edit($values,$values_attribute,$entity_id,$cat_id);
- }
- else
- {
- $receipt =
$this->so->add($values,$values_attribute,$entity_id,$cat_id);
- }
-
$criteria = array
(
'appname' =>
$this->type_app[$this->type],
@@ -734,12 +725,39 @@
$file = PHPGW_SERVER_ROOT .
"/{$this->type_app[$this->type]}/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
- if ( $entry['active'] && !$entry['client_side']
&& is_file($file) )
+ if ( $entry['active'] && is_file($file) &&
!$entry['client_side'] && $entry['pre_commit'])
{
require_once $file;
}
}
+
+ if ($action=='edit')
+ {
+ $receipt =
$this->so->edit($values,$values_attribute,$entity_id,$cat_id);
+ }
+ else
+ {
+ $receipt =
$this->so->add($values,$values_attribute,$entity_id,$cat_id);
+ }
+
+ reset($custom_functions);
+ foreach ( $custom_functions as $entry )
+ {
+ // prevent path traversal
+ if ( preg_match('/\.\./', $entry['file_name']) )
+ {
+ continue;
+ }
+
+ $file = PHPGW_SERVER_ROOT .
"/{$this->type_app[$this->type]}/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
+
+ if ( $entry['active'] && is_file($file) &&
!$entry['client_side'] && !$entry['pre_commit'])
+ {
+ require_once $file;
+ }
+ }
+
return $receipt;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12036] property: custom functions,
Sigurd Nes <=