|
@@ 157-160 (lines=4) @@
|
| 154 |
|
public function setAddArticle($title, $categories, $article, $state) { |
| 155 |
|
$dbc = App::getDb(); |
| 156 |
|
|
| 157 |
|
if ($this->getTestTitle($title) == false || $this->getTestArticle($article) == false) { |
| 158 |
|
FlashMessage::setFlash($this->error_title.$this->error_article); |
| 159 |
|
return false; |
| 160 |
|
} |
| 161 |
|
|
| 162 |
|
$this->setImageArticle($title); |
| 163 |
|
|
|
@@ 189-192 (lines=4) @@
|
| 186 |
|
public function setEditArticle($title, $categories, $article, $state, $id_article) { |
| 187 |
|
$dbc = App::getDb(); |
| 188 |
|
|
| 189 |
|
if ($this->getTestTitle($title, $id_article) == false || $this->getTestArticle($article) == false) { |
| 190 |
|
FlashMessage::setFlash($this->error_title.$this->error_article); |
| 191 |
|
return false; |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
if ($this->getTestArticleExist($id_article) == false) { |
| 195 |
|
FlashMessage::setFlash("votre article n'existe pas"); |