Now DefaultNewsController is the default controller
[core.git] / inc / classes / main / resolver / controller / class_BaseControllerResolver.php
index 964024dda6c630619366a3a3ee9ebcab10310744..23e449ac913386c2b6092539f41cdfc2d39004b5 100644 (file)
@@ -102,15 +102,9 @@ class BaseControllerResolver extends BaseResolver {
                        if (class_exists($this->getClassName())) {
                                // This class does exist. :-)
                                $isValid = true;
-                       } elseif (($this->getClassName() != $this->controllerPrefix.'DefaultController') && ($this->getClassName() != $this->controllerPrefix.'DefaultNewsController')) {
-                               // Do we have news?
-                               if ($this->getConfigInstance()->readConfig('page_with_news') == $this->getApplicationInstance()->getRequestInstance()->getRequestElement('page')) {
-                                       // Yes, display news in home then set default controller with news
-                                       $this->setClassName($this->controllerPrefix . 'DefaultNewsController');
-                               } else {
-                                       // No news at home page or non-news page
-                                       $this->setClassName($this->controllerPrefix . 'DefaultController');
-                               }
+                       } elseif ($this->getClassName() != $this->controllerPrefix.'DefaultNewsController') {
+                               // Set default controller
+                               $this->setClassName($this->controllerPrefix . 'DefaultNewsController');
                        } else {
                                // All is tried, give it up here
                                throw new DefaultControllerException($this, self::EXCEPTION_DEFAULT_CONTROLLER_GONE);