BUG 6453 Fix Bug deprecated PHP 5.3 features and functions in code.

This commit is contained in:
Hector Cortez
2012-02-28 16:15:54 -04:00
parent dd8d08eb8f
commit 3f695d28c6
15 changed files with 114 additions and 52 deletions

View File

@@ -11,5 +11,7 @@
$fileJrxml = PATH_DYNAFORM . $aFields['PRO_UID'] . PATH_SEP . $aFields['OUT_DOC_UID'] . '.' . $extension ;
$bDownload = true;
$downFileName = ereg_replace('[^A-Za-z0-9_]', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
// The ereg_replace function has been DEPRECATED as of PHP 5.3.0.
// $downFileName = ereg_replace('[^A-Za-z0-9_]', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
$downFileName = preg_replace('/[^A-Za-z0-9_]/i', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
G::streamFile ( $fileJrxml, $bDownload, $downFileName );