From 4014a4c0975c1cfc6c3b16b0fb08a36fe77cc06c Mon Sep 17 00:00:00 2001
From: Carsten  Rose <carsten.rose@math.uzh.ch>
Date: Sat, 30 Jan 2016 17:33:43 +0100
Subject: [PATCH] Support: appendTypo3Paramter(): added 'id' as Typo3
 Parameter.

---
 qfq/helper/Support.php | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/qfq/helper/Support.php b/qfq/helper/Support.php
index 3201d2925..f1fa8b8bd 100644
--- a/qfq/helper/Support.php
+++ b/qfq/helper/Support.php
@@ -12,6 +12,21 @@ require_once(__DIR__ . '/Sanatize.php');
 
 class Support {
 
+    /**
+     * @param array $queryArray Empty or prefilled assoc array with url parameter
+     */
+    public static function appendTypo3ParameterToArray(array &$queryArray) {
+        if (isset($_GET['id']))
+            $queryArray['id'] = self::getCurrentPage();
+
+        if (isset($_GET['L']))
+            $queryArray['L'] = $_GET['L'];
+
+        if (isset($_GET['type']))
+            $queryArray['type'] = $_GET['type'];
+
+    }
+
     /**
      * @return string If exist content of $_GET[], otherwise the name of the first GET Parameter
      * @throws CodeException
@@ -27,20 +42,10 @@ class Support {
     }
 
     /**
-     * @param array $queryArray Empty or prefilled assoc array with url parameter
-     */
-    public static function appendTypo3ParameterToArray(array &$queryArray) {
-        if (isset($_GET['L']))
-            $queryArray['L'] = $_GET['L'];
-
-        if (isset($_GET['type']))
-            $queryArray['type'] = $_GET['type'];
-    }
-
-    /**
-     * Builds a urlencoded query string of assoc array
+     * Builds a urlencoded query string of an assoc array.
+     *
      * @param array $queryArray
-     * @return string
+     * @return string Querystring (e.g.: id=23&type=99
      */
     public static function arrayToQueryString(array $queryArray) {
         $items = array();
-- 
GitLab