Author: jablko
Date: Tue Oct 26 16:42:10 2010
New Revision: 8523

Log:
Ignore root

Modified:
   trunk/apps/qubit/modules/term/actions/editAction.class.php
   trunk/apps/qubit/modules/term/actions/indexAction.class.php

Modified: trunk/apps/qubit/modules/term/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/term/actions/editAction.class.php  Tue Oct 26 
16:35:30 2010        (r8522)
+++ trunk/apps/qubit/modules/term/actions/editAction.class.php  Tue Oct 26 
16:42:10 2010        (r8523)
@@ -55,6 +55,12 @@
         $this->forward404();
       }
 
+      // Check that this isn't the root
+      if (!isset($this->resource->parent))
+      {
+        $this->forward404();
+      }
+
       // Check authorization
       if (!QubitAcl::check($this->resource, 'update') && 
!QubitAcl::check($this->resource, 'translate'))
       {

Modified: trunk/apps/qubit/modules/term/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/term/actions/indexAction.class.php Tue Oct 26 
16:35:30 2010        (r8522)
+++ trunk/apps/qubit/modules/term/actions/indexAction.class.php Tue Oct 26 
16:42:10 2010        (r8523)
@@ -42,6 +42,12 @@
       $this->forward404();
     }
 
+    // Check that this isn't the root
+    if (!isset($this->resource->parent))
+    {
+      $this->forward404();
+    }
+
     if (1 > strlen($title = $this->resource))
     {
       $title = $this->context->i18n->__('Untitled');

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to