Author: jablko
Date: Wed Oct 27 21:31:12 2010
New Revision: 8599

Log:
HACK ->bind() can't modify $params? Factor into routing one day?

Modified:
   trunk/apps/qubit/modules/staticpage/actions/indexAction.class.php
   trunk/lib/QubitResourceRoute.class.php

Modified: trunk/apps/qubit/modules/staticpage/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/staticpage/actions/indexAction.class.php   Wed Oct 
27 21:21:34 2010        (r8598)
+++ trunk/apps/qubit/modules/staticpage/actions/indexAction.class.php   Wed Oct 
27 21:31:12 2010        (r8599)
@@ -22,9 +22,31 @@
   public function execute($request)
   {
     $this->resource = $this->getRoute()->resource;
-    if (!$this->resource instanceof QubitStaticPage)
+
+    // HACK factor this into routing one day?
+    switch (true)
     {
-      $this->forward404();
+      case $this->resource instanceof QubitActor:
+        $this->forward('sfIsaarPlugin', 'index');
+
+        break;
+
+      case $this->resource instanceof QubitFunction:
+        $this->forward('sfIsdfPlugin', 'index');
+
+        break;
+
+      case $this->resource instanceof QubitInformationObject:
+        $this->forward('sfIsadPlugin', 'index');
+
+        break;
+
+      case $this->resource instanceof QubitStaticPage:
+
+        break;
+
+      default:
+        $this->forward404();
     }
   }
 }

Modified: trunk/lib/QubitResourceRoute.class.php
==============================================================================
--- trunk/lib/QubitResourceRoute.class.php      Wed Oct 27 21:21:34 2010        
(r8598)
+++ trunk/lib/QubitResourceRoute.class.php      Wed Oct 27 21:31:12 2010        
(r8599)
@@ -31,28 +31,6 @@
       throw new sfError404Exception;
     }
 
-    // HACK Clean this up one day
-    if ('staticpage' == $params['module'])
-    {
-      switch (true)
-      {
-        case $this->resource instanceof QubitActor:
-          $params['module'] = 'sfIsaarPlugin';
-
-          break;
-
-        case $this->resource instanceof QubitFunction:
-          $params['module'] = 'sfIsdfPlugin';
-
-          break;
-
-        case $this->resource instanceof QubitInformationObject:
-          $params['module'] = 'sfIsadPlugin';
-
-          break;
-      }
-    }
-
     return parent::bind($context, $params);
   }
 }

-- 
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