[TASK] compatibilty to TYPO3 6.2 LTS and tt_address < 3.0
authorIvan Kartolo <ivan.kartolo@gmail.com>
Tue, 1 Mar 2016 21:04:15 +0000 (22:04 +0100)
committerIvan Kartolo <ivan.kartolo@gmail.com>
Tue, 1 Mar 2016 21:04:15 +0000 (22:04 +0100)
Change-Id: I7cde161b55affdc17dcc1f214f2e6f8a8d26b14e

composer.json
fe_adminLib.inc

index 066939d..abe335c 100644 (file)
@@ -22,8 +22,7 @@
     "issues": "https://forge.typo3.org/projects/extension-direct_mail_subscription"
   },
   "require": {
-    "typo3/cms-core": ">=6.2,<8.0",
-    "typo3-ter/tt_address": ">=2.3"
+    "typo3/cms-core": ">=6.2,<8.0"
   },
   "autoload": {
     "psr-4": {
index 78d401b..f21f1e1 100644 (file)
@@ -276,7 +276,15 @@ class user_feAdmin
             $this->deleteRecord();
         }
             // If incoming data is seen...
-        if (is_array($this->dataArr) && count(ArrayUtility::removeArrayEntryByValue(array_keys($this->dataArr), 'captcha'))) {
+        if (is_array($this->dataArr)){
+            if (GeneralUtility::compat_version('7.0')) {
+                $countDataArray = ArrayUtility::removeArrayEntryByValue(array_keys($this->dataArr), 'captcha');
+            } else {
+                $countDataArray = GeneralUtility::removeArrayEntryByValue(array_keys($this->dataArr), 'captcha');
+            }
+        }
+
+        if (is_array($this->dataArr) && count($countDataArray)) {
             // Evaluation of data:
             $this->parseValues();
             $this->overrideValues();
@@ -1514,8 +1522,13 @@ class user_feAdmin
 
                 //get PID recursively
                 if ($this->conf['pidRecursive']) {
-                    $pidList = $this->cObj->getTreeList($this->thePid, 100) . ',' . $this->thePid;
-                    $pidLock = 'AND pid IN (' . $pidList . ')';
+                    $recursivePidList = $this->cObj->getTreeList($this->thePid, 100);
+                    if ($recursivePidList) {
+                        $pidList = $recursivePidList . ',' . $this->thePid;
+                    } else {
+                        $pidList = $this->thePid;
+                    }
+                    $pidLock = 'AND pid IN (' .  $pidList . ')';
                 }
 
                     // Getting records