]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/IdxController.php
allow anonymous routes creation
[syj.git] / application / controllers / IdxController.php
index ac315581eafbc29eb300c65cbba1a7c9c908b835..caad6a1595bb51f09562d3e5698640973a013f69 100644 (file)
@@ -68,14 +68,12 @@ class IdxController extends Zend_Controller_Action
         }
 
         if (isset($path)) {
-            if ($user and $path->owner->id == $user->id) {
-                $loggedinfo->isowner = true;
-            } else {
-                $loggedinfo->isowner = false;
+            $loggedinfo->iscreator = $path->isCreator($user);
+            if ($path->creator) {
+                $loggedinfo->creatorname = $this->view->escape((string)$path->creator->pseudo);
             }
-            $loggedinfo->ownername = $this->view->escape((string)$path->owner->pseudo);
         } else {
-            $loggedinfo->isowner = true;
+            $loggedinfo->iscreator = true;
         }
 
         $this->view->headScript()->prependScript((string) $loggedinfo);
@@ -93,8 +91,6 @@ class IdxController extends Zend_Controller_Action
             'userEmptyWarn' => __("you must enter a login name"),
             'loginSuccess' => __("Login correct"),
             'loginFailure' => __("Wrong login/password"),
-            'loginNeeded' => __("You need to login before retrying to save"),
-            'cookiesNeeded' => __("You need to have cookies enabled to login to SYJ"),
             'passwordEmptyWarn' => __("you must enter a password"),
             'passwordNoMatchWarn' => __("Password do not match"),
             'acceptTermsofuseWarn' => __("You must accept terms of use"),