Loading module/Oscar/src/Oscar/Service/administration/AdminCustomTextAPIService.php +8 −1 Changes for module/Oscar/src/Oscar/Service/administration/AdminCustomTextAPIService.php: 8 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -28,8 +28,15 @@ class AdminCustomTextAPIService extends AbstractAPIService $custom[$key] = $value; } } if( !is_writable(OscarText::fileCustom()) ){ $err = "Le fichier '" .OscarText::fileCustom(). "' n'est pas accessible en écriture"; $this->getlogger()->error($err); throw new OscarException($err); } $this->getlogger()->info("Enregistrement dans " . OscarText::fileCustom()); file_put_contents(OscarText::fileCustom(), json_encode($custom, JSON_PRETTY_PRINT)); if( !file_put_contents(OscarText::fileCustom(), json_encode($custom, JSON_PRETTY_PRINT)) ){ throw new OscarException("Impossible de enregistrer le fichier"); } return OscarText::getMerged(true); } } No newline at end of file Loading
module/Oscar/src/Oscar/Service/administration/AdminCustomTextAPIService.php +8 −1 Changes for module/Oscar/src/Oscar/Service/administration/AdminCustomTextAPIService.php: 8 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -28,8 +28,15 @@ class AdminCustomTextAPIService extends AbstractAPIService $custom[$key] = $value; } } if( !is_writable(OscarText::fileCustom()) ){ $err = "Le fichier '" .OscarText::fileCustom(). "' n'est pas accessible en écriture"; $this->getlogger()->error($err); throw new OscarException($err); } $this->getlogger()->info("Enregistrement dans " . OscarText::fileCustom()); file_put_contents(OscarText::fileCustom(), json_encode($custom, JSON_PRETTY_PRINT)); if( !file_put_contents(OscarText::fileCustom(), json_encode($custom, JSON_PRETTY_PRINT)) ){ throw new OscarException("Impossible de enregistrer le fichier"); } return OscarText::getMerged(true); } } No newline at end of file