Move _GET parsing out of controllers
[gitphp.git] / index.php
blob:a/index.php -> blob:b/index.php
--- a/index.php
+++ b/index.php
@@ -54,6 +54,16 @@
 } catch (Exception $e) {
 
 	$messageController = new GitPHP_Controller_Message();
+	if (!empty($_GET['h']))
+		$messageController->SetParam('hash', $_GET['h']);
+	if (!empty($_GET['p']))
+		$messageController->SetParam('project', $_GET['p']);
+	if (!empty($_GET['s']))
+		$messageController->SetParam('search', $_GET['s']);
+	if (!empty($_GET['st']))
+		$messageController->SetParam('searchtype', $_GET['st']);
+	if (!empty($_GET['l']))
+		$messageController->SetParam('lang', $_GET['l']);
 	$messageController->Initialize();
 
 	$config = $messageController->GetConfig();

comments