aboutsummaryrefslogtreecommitdiff
path: root/src/Controller/ViewController.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Controller/ViewController.php')
-rw-r--r--src/Controller/ViewController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Controller/ViewController.php b/src/Controller/ViewController.php
index 1f13861..5be4ffd 100644
--- a/src/Controller/ViewController.php
+++ b/src/Controller/ViewController.php
@@ -38,7 +38,8 @@ class ViewController{
38 else{ 38 else{
39 // mode création d'article 39 // mode création d'article
40 // l'id du bloc et 'from=' sont vérifiés dans ArticleController::editorSubmit 40 // l'id du bloc et 'from=' sont vérifiés dans ArticleController::editorSubmit
41 if($request->query->get('id')[0] === 'n' && $request->query->has('from') && !empty($request->query->get('from'))){ 41 if(preg_match('/^n\d+\z/', $request->query->get('id')) // débute par 'n' puis des chiffres, \z au lieu de $ pour éviter un saut de ligne à la fin
42 && $request->query->has('from') && !empty($request->query->get('from'))){
42 NewBuilder::$new_article_mode = true; 43 NewBuilder::$new_article_mode = true;
43 } 44 }
44 } 45 }