Controller/WikiTagController.php
changeset 102 d1af10ee0aa5
parent 98 b307fcd1435a
child 104 af79031ee002
--- a/Controller/WikiTagController.php	Mon Jul 16 18:08:01 2012 +0200
+++ b/Controller/WikiTagController.php	Mon Jul 16 18:17:21 2012 +0200
@@ -50,7 +50,7 @@
      * @param unknown_type $tags_list
      * @return \Symfony\Bundle\FrameworkBundle\Controller\Response
      */
-    public function addJavascriptAction($tags_list=false, $profile_name=null, $read_only="false")
+    public function addJavascriptAction($tags_list=false, $profile_name=null, $read_only=false)
     {
         $cats = $this->getDoctrine()->getRepository('WikiTagBundle:Category')->findOrderedCategories();
         // $cats is {"Label":"Créateur"},{"Label":"Datation"},...
@@ -68,13 +68,7 @@
         if($profile_array!=null && $profile_name!=null && $profile_name!=""){
             $columns_array = $profile_array[$profile_name];
         }
-        // Set read_only if asked
-        if(strtolower($read_only)=="true"){
-            $read_only = true;
-        }
-        else{
-            $read_only = false;
-        }
+        
         return $this->render('WikiTagBundle:WikiTag:javascript.html.twig', array('categories' => $categories, 'tags_list' => $tags_list, 'columns' => $columns_array, 'read_only' => $read_only));
     }