fixed warning: implode(): Invalid arguments passed in /var/www/epl-trunk/etemplate/inc/class.bo_merge.inc.php on line 569

This commit is contained in:
Ralf Becker 2011-03-18 15:14:55 +00:00
parent ebbbf233cf
commit 6c05070aa0

View File

@ -557,24 +557,24 @@ abstract class bo_merge
}
// Look for numbers, set their value if needed
$format = $replacement = '';
if($this->numeric_fields) {
if($this->numeric_fields)
{
$names = array();
foreach($this->numeric_fields as $fieldname) {
$names[] = preg_quote($fieldname,'/');
}
switch($mimetype.$mso_application_progid)
{
case 'application/vnd.oasis.opendocument.spreadsheet': // open office calc
$format = '/<table:table-cell([^>]+?)office:value-type="([^"]+)"([^>]*?)>.?<([a-z].*?)[^>]*>('.implode('|',$names).')<\/\4>.?<\/table:table-cell>/s';
$replacement = '<table:table-cell$1office:value-type="float" office:value="$5"$3>$5</table:table-cell>';
break;
}
if($format && $names)
{
$content = preg_replace($format, $replacement, $content);
}
}
switch($mimetype.$mso_application_progid)
{
case 'application/vnd.oasis.opendocument.spreadsheet': // open office calc
$format = '/<table:table-cell([^>]+?)office:value-type="([^"]+)"([^>]*?)>.?<([a-z].*?)[^>]*>('.implode('|',$names).')<\/\4>.?<\/table:table-cell>/s';
$replacement = '<table:table-cell$1office:value-type="float" office:value="$5"$3>$5</table:table-cell>';
break;
}
if($format && $names)
{
$content = preg_replace($format, $replacement, $content);
}
// replace CRLF with linebreak tag of given type
switch($mimetype.$mso_application_progid)
{