@@ -19,7 +19,7 @@ |
||
19 | 19 | $url_image = ROOT."modules/blog/images/".$url_article.".png"; |
20 | 20 | |
21 | 21 | if (file_exists($url_image)) { |
22 | - return WEBROOT."modules/blog/images/".$url_article.".png";; |
|
22 | + return WEBROOT."modules/blog/images/".$url_article.".png"; ; |
|
23 | 23 | } |
24 | 24 | else { |
25 | 25 | return WEBROOT."modules/blog/images/fond-bloc.jpg"; |
@@ -21,10 +21,10 @@ |
||
21 | 21 | * @return bool |
22 | 22 | * function that verify if title of the article is ok |
23 | 23 | */ |
24 | - private function getTestTitle($title, $id_article=null) { |
|
24 | + private function getTestTitle($title, $id_article = null) { |
|
25 | 25 | $dbc = App::getDb(); |
26 | 26 | |
27 | - if (strlen($title) < 5){ |
|
27 | + if (strlen($title) < 5) { |
|
28 | 28 | $this->error_title = "votre titre doit être supérieur à 4 caractères"; |
29 | 29 | return false; |
30 | 30 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | private function getTestTitle($title, $id_article=null) { |
25 | 25 | $dbc = App::getDb(); |
26 | 26 | |
27 | - if (strlen($title) < 5){ |
|
27 | + if (strlen($title) < 5) { |
|
28 | 28 | $this->error_title = "votre titre doit être supérieur à 4 caractères"; |
29 | 29 | return false; |
30 | 30 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @return bool |
25 | 25 | * test if a category exist |
26 | 26 | */ |
27 | - private function getTestCategoryExist($name, $id=null) { |
|
27 | + private function getTestCategoryExist($name, $id = null) { |
|
28 | 28 | $dbc = App::getDb(); |
29 | 29 | |
30 | 30 | if ($id === null) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | $count = count($categories); |
119 | 119 | if ((is_array($categories)) && ($count > 0)) { |
120 | - for ($i=0 ; $i<$count ; $i++) { |
|
120 | + for ($i = 0; $i < $count; $i++) { |
|
121 | 121 | if ($this->getTestCategoryExist($categories[$i]) != false) { |
122 | 122 | $dbc->insert("ID_category", $this->getTestCategoryExist($categories[$i]))->insert("ID_article", $id_article)->into("_blog_article_category")->set(); |
123 | 123 | } |
@@ -8,4 +8,4 @@ |
||
8 | 8 | $arr = \modules\blog\app\controller\Blog::getValues(); |
9 | 9 | |
10 | 10 | \core\App::setTitle("Blog module list articles of category ".$category->getNamemCategorieUrl()); |
11 | - \core\App::setDescription("Description of the blog module ". $category->getNamemCategorieUrl()); |
|
12 | 11 | \ No newline at end of file |
12 | + \core\App::setDescription("Description of the blog module ".$category->getNamemCategorieUrl()); |
|
13 | 13 | \ No newline at end of file |
@@ -8,4 +8,4 @@ |
||
8 | 8 | $arr = \modules\blog\app\controller\Blog::getValues(); |
9 | 9 | |
10 | 10 | \core\App::setTitle(" ".$arr["blog"]["article"]["title"]); |
11 | - \core\App::setDescription("". $arr["blog"]["article"]["title"]); |
|
12 | 11 | \ No newline at end of file |
12 | + \core\App::setDescription("".$arr["blog"]["article"]["title"]); |
|
13 | 13 | \ No newline at end of file |