[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14907] property: strip entities from filename
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14907] property: strip entities from filename |
Date: |
Thu, 07 Apr 2016 11:19:07 +0000 |
Revision: 14907
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14907
Author: sigurdne
Date: 2016-04-07 11:19:07 +0000 (Thu, 07 Apr 2016)
Log Message:
-----------
property: strip entities from filename
Modified Paths:
--------------
trunk/property/inc/class.bofiles.inc.php
Modified: trunk/property/inc/class.bofiles.inc.php
===================================================================
--- trunk/property/inc/class.bofiles.inc.php 2016-04-07 10:34:54 UTC (rev
14906)
+++ trunk/property/inc/class.bofiles.inc.php 2016-04-07 11:19:07 UTC (rev
14907)
@@ -157,6 +157,7 @@
foreach ($values['file_action'] as $file_name)
{
$file_name = html_entity_decode($file_name);
+ $file_name =
$this->strip_entities_from_name($file_name);
$file = "{$this->fakebase}{$path}{$file_name}";
@@ -203,6 +204,7 @@
if (!$file)
{
$file_name =
html_entity_decode(urldecode(phpgw::get_var('file_name')));
+ $file_name =
$this->strip_entities_from_name($file_name);
$id = phpgw::get_var('id');
$file =
"{$this->fakebase}/{$type}/{$id}/{$file_name}";
}
@@ -273,6 +275,7 @@
$attachments = array();
foreach ($values as $file_name)
{
+ $file_name =
$this->strip_entities_from_name($file_name);
$file = "{$this->fakebase}{$path}{$file_name}";
if ($this->vfs->file_exists(array(
@@ -291,4 +294,9 @@
}
return $attachments;
}
+
+ function strip_entities_from_name($file_name)
+ {
+ return str_replace(array('(',
')','−−'),array('(', ')', '--'), $file_name);
+ }
}
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14907] property: strip entities from filename,
Sigurd Nes <=