From: Roland Häder Date: Tue, 13 May 2008 14:31:01 +0000 (+0000) Subject: Fix for moved code X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;ds=sidebyside;h=e715e324e8c85368b6ff53d8a9d5a20575bc7e32;hp=972ca1b602ce12c764cb4fe06bc4212a180ba995;p=shipsimu.git Fix for moved code --- diff --git a/inc/classes/main/controller/default/class_WebDefaultNewsController.php b/inc/classes/main/controller/default/class_WebDefaultNewsController.php index ff86531..b9f1ee8 100644 --- a/inc/classes/main/controller/default/class_WebDefaultNewsController.php +++ b/inc/classes/main/controller/default/class_WebDefaultNewsController.php @@ -84,11 +84,8 @@ class WebDefaultNewsController extends BaseController implements Controller { // Get the command instance from the resolver by sending a request instance to the resolver $commandInstance = $this->resolverInstance->resolvCommandByRequest($requestInstance); - // Get the news page variable from the request instance - $newsPage = $requestInstance->getRequestElement("news_page"); - // Load the news here - $this->loadNews($newsPage); + $this->loadNews($requestInstance); // Execute the command $commandInstance->execute($requestInstance, $responseInstance); @@ -100,10 +97,12 @@ class WebDefaultNewsController extends BaseController implements Controller { /** * Loads news from the connected database for later usage * - * @param $newsPage Page of listed news we want to read + * @param $requestInstance An instance of a request class * @return void */ - private function loadNews ($newsPage) { + private function loadNews (Requestable $requestInstance) { + // Get the news page variable from the request instance + $newsPage = $requestInstance->getRequestElement("news_page"); } }