diff options
| author | polo <ordipolo@gmx.fr> | 2023-04-06 15:05:45 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2023-04-06 15:05:45 +0200 |
| commit | 9dececd6b9694cf071b93c40121d5d66e0f325c6 (patch) | |
| tree | 2a18d26d151a09b4906864659780af53339c8cd1 /model | |
| parent | c0b176ae142624d6a6daa0f65ea6fead448b8b47 (diff) | |
| download | melaine-9dececd6b9694cf071b93c40121d5d66e0f325c6.tar.gz melaine-9dececd6b9694cf071b93c40121d5d66e0f325c6.tar.bz2 melaine-9dececd6b9694cf071b93c40121d5d66e0f325c6.zip | |
fonction Article::delete()
Diffstat (limited to 'model')
| -rw-r--r-- | model/Article.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/model/Article.php b/model/Article.php index f4fe65a..33848bb 100644 --- a/model/Article.php +++ b/model/Article.php | |||
| @@ -252,6 +252,14 @@ class Article | |||
| 252 | // delete | 252 | // delete |
| 253 | public function delete() | 253 | public function delete() |
| 254 | { | 254 | { |
| 255 | unlink('data/' . $this->page . '/' . $this->format . '/' . $this->fileCode . '.' . $this->format); | 255 | $path = 'data/' . $this->page . '/' . $this->format . '/' . $this->fileCode . '.' . $this->format; |
| 256 | unlink($path); | ||
| 257 | |||
| 258 | // fichiers html dans html-maxi-images | ||
| 259 | $path_maxi = 'data/' . $this->page . '/' . $this->format . '-maxi-images/' . $this->fileCode . '.' . $this->format; | ||
| 260 | if(file_exists($path_maxi)) | ||
| 261 | { | ||
| 262 | unlink($path_maxi); | ||
| 263 | } | ||
| 256 | } | 264 | } |
| 257 | } | 265 | } |
