mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Remove Unnecessary SplFileObject's
This commit is contained in:
@@ -896,7 +896,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
|
||||
private function check_record_constraints(record_adapter $record)
|
||||
{
|
||||
$errors = array();
|
||||
if ( ! $record->get_hd_file() instanceof SplFileObject)
|
||||
if ( ! $record->get_hd_file() instanceof \SplFileInfo)
|
||||
$errors["file_size"] = _("Le record n'a pas de fichier physique"); //Record must rely on real file
|
||||
|
||||
if ($record->get_duration() > self::AUTH_VIDEO_DURATION)
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use \Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -818,7 +818,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf
|
||||
private function check_record_constraints(record_adapter $record)
|
||||
{
|
||||
$errors = array();
|
||||
if ( ! $record->get_hd_file() instanceof SplFileObject)
|
||||
if ( ! $record->get_hd_file() instanceof \SplFileInfo)
|
||||
$errors["file_size"] = _("Le record n'a pas de fichier physique"); //Record must rely on real file
|
||||
if ($record->get_technical_infos('size') > self::AUTH_PHOTO_SIZE)
|
||||
$errors["size"] = sprintf(_("Le poids maximum d'un fichier est de %s"), p4string::format_octets(self::AUTH_PHOTO_SIZE));
|
||||
|
@@ -1022,7 +1022,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter
|
||||
{
|
||||
$errors = array();
|
||||
$key = $record->get_serialize_key();
|
||||
if ( ! $record->get_hd_file() instanceof SplFileObject)
|
||||
if ( ! $record->get_hd_file() instanceof SplFileInfo)
|
||||
$errors["file_size_" . $key] = _("Le record n'a pas de fichier physique"); //Record must rely on real file
|
||||
|
||||
if ($record->get_duration() > self::AUTH_VIDEO_DURATION)
|
||||
|
@@ -50,8 +50,8 @@ class module_console_systemUpgrade extends Command
|
||||
|
||||
if ($continue == 'y') {
|
||||
try {
|
||||
$connexionInc = new \SplFileObject(__DIR__ . '/../../../../config/connexion.inc');
|
||||
$configInc = new \SplFileObject(__DIR__ . '/../../../../config/config.inc');
|
||||
$connexionInc = new \SplFileInfo(__DIR__ . '/../../../../config/connexion.inc', true);
|
||||
$configInc = new \SplFileInfo(__DIR__ . '/../../../../config/config.inc', true);
|
||||
|
||||
$Core->getConfiguration()->upgradeFromOldConf($configInc, $connexionInc);
|
||||
} catch (\Exception $e) {
|
||||
|
Reference in New Issue
Block a user