loadController() is now more generic (TODO: check that all other apps works)
[core.git] / inc / classes / main / reader / class_DefaultNewsReader.php
index b0dbac671522f27e7c59cfcd5acb18fae4aeda2c..0240b74da57e77a262cce8181f67735205b307c1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -54,13 +54,13 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
        }
 
        /**
        }
 
        /**
-        * Initializes this reader class by pre-fetching news depending on "page"
+        * Initializes this reader class by pre-fetching news depending on 'page'
         * (outside or login area), which amount of news and how much to skip
         *
         * @return      void
         */
        public function initializeReader () {
         * (outside or login area), which amount of news and how much to skip
         *
         * @return      void
         */
        public function initializeReader () {
-               // Get "page" for saving some calls
+               // Get 'page' for saving some calls
                $page = $this->getRequestInstance()->getRequestElement('page');
 
                // First get a wrapper instance
                $page = $this->getRequestInstance()->getRequestElement('page');
 
                // First get a wrapper instance
@@ -70,10 +70,10 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the page as criteria to it at lease
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the page as criteria to it at lease
-               $criteriaInstance->addCriteria("page", $page);
+               $criteriaInstance->addCriteria('page', $page);
 
                // Add limitation from config
 
                // Add limitation from config
-               $criteriaInstance->setLimit($this->getConfigInstance()->readConfig("news_{$page}_limit"));
+               $criteriaInstance->setLimit($this->getConfigInstance()->readConfig('news_' . $page . '_limit'));
 
                // Get a resultInstance back from the database
                $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
 
                // Get a resultInstance back from the database
                $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);