mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Remove old code that was here for old PHP version compatibility
SVN:trunk[5995]
This commit is contained in:
@@ -6383,12 +6383,14 @@ abstract class MetaModel
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
// We need to pop the pushed archived mode before the exception is thrown, otherwise the application stays in ArchiveMode true which has caused hazardious behavior!
|
||||
// Note: When switching to PHP 5.6, we can use a finally block instead of duplicating this line.
|
||||
utils::PopArchiveMode();
|
||||
// In the finally block we will pop the pushed archived mode
|
||||
// otherwise the application stays in ArchiveMode true which has caused hazardious behavior!
|
||||
throw $e;
|
||||
}
|
||||
utils::PopArchiveMode();
|
||||
finally
|
||||
{
|
||||
utils::PopArchiveMode();
|
||||
}
|
||||
|
||||
if (empty($aRow))
|
||||
{
|
||||
|
||||
@@ -549,26 +549,7 @@ class SetupUtils
|
||||
*/
|
||||
static function GetTmpDir()
|
||||
{
|
||||
// try to figure out what is the temporary directory
|
||||
// prior to PHP 5.2.1 the function sys_get_temp_dir
|
||||
// did not exist
|
||||
if ( !function_exists('sys_get_temp_dir'))
|
||||
{
|
||||
if( $temp=getenv('TMP') ) return realpath($temp);
|
||||
if( $temp=getenv('TEMP') ) return realpath($temp);
|
||||
if( $temp=getenv('TMPDIR') ) return realpath($temp);
|
||||
$temp=tempnam(__FILE__,'');
|
||||
if (file_exists($temp))
|
||||
{
|
||||
unlink($temp);
|
||||
return realpath(dirname($temp));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return realpath(sys_get_temp_dir());
|
||||
}
|
||||
return realpath(sys_get_temp_dir());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user