Skip to content

Commit bb56f05

Browse files
committed
* remove tt_products_cache
* replace most t3lib_div classes by \TYPO3\CMS\Core\Utility\GeneralUtility * remove widgets for mydashboard because this extension does not exist any more. * remove include_once statements
1 parent 010601e commit bb56f05

File tree

146 files changed

+1728
-1875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1728
-1875
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2+
2019-07-31 Franz Holzinger <franz@ttproducts.de>
3+
* remove tt_products_cache
4+
* replace most t3lib_div classes by \TYPO3\CMS\Core\Utility\GeneralUtility
5+
* remove widgets for mydashboard because this extension does not exist any more.
6+
* remove include_once statements
7+
18
2019-03-25 Franz Holzinger <franz@ttproducts.de>
29
* compatibility for PHP 7.2
310
* compatibility with MySQL strict mode

Classes/Api/ControlApi.php

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?php
2+
3+
namespace JambageCom\TtProducts\Api;
4+
5+
/***************************************************************
6+
* Copyright notice
7+
*
8+
* (c) 2016 Franz Holzinger <franz@ttproducts.de>
9+
* All rights reserved
10+
*
11+
* This script is part of the Typo3 project. The Typo3 project is
12+
* free software; you can redistribute it and/or modify
13+
* it under the terms of the GNU General Public License as published by
14+
* the Free Software Foundation; either version 2 of the License, or
15+
* (at your option) any later version.
16+
*
17+
* The GNU General Public License can be found at
18+
* http://www.gnu.org/copyleft/gpl.html.
19+
* A copy is found in the textfile GPL.txt and important notices to the license
20+
* from the author is found in LICENSE.txt distributed with these scripts.
21+
*
22+
*
23+
* This script is distributed in the hope that it will be useful,
24+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
25+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26+
* GNU General Public License for more details.
27+
*
28+
* This copyright notice MUST APPEAR in all copies of the script!
29+
***************************************************************/
30+
/**
31+
* Part of the tt_products (Shop System) extension.
32+
*
33+
* control functions
34+
*
35+
* @author Franz Holzinger <franz@ttproducts.de>
36+
* @package TYPO3
37+
* @subpackage tt_products
38+
*
39+
*
40+
*/
41+
42+
43+
class ControlApi {
44+
static protected $conf = array();
45+
static protected $cObj = null;
46+
47+
static public function init ($conf, $cObj) {
48+
static::$conf = $conf;
49+
static::$cObj = $cObj;
50+
}
51+
52+
static public function getConf () {
53+
return static::$conf;
54+
}
55+
56+
static public function getCObj () {
57+
return static::$cObj;
58+
}
59+
60+
static public function isOverwriteMode ($infoArray) {
61+
$overwriteMode = false;
62+
$conf = static::getConf();
63+
$checkField = \JambageCom\TtProducts\Api\CustomerApi::getPossibleCheckField();
64+
65+
if (
66+
(
67+
!$infoArray['billing'] ||
68+
!$infoArray['billing'][$checkField] ||
69+
$conf['editLockedLoginInfo'] ||
70+
$infoArray['billing']['error']
71+
) &&
72+
$conf['lockLoginUserInfo']
73+
) {
74+
$overwriteMode = true;
75+
}
76+
77+
return $overwriteMode;
78+
}
79+
80+
static public function getTagId (
81+
$jsTableNamesId,
82+
$theCode,
83+
$uid,
84+
$field
85+
) {
86+
$result = $jsTableNamesId . '-' . strtolower($theCode) . '-' . $uid . '-' . $field;
87+
return $result;
88+
}
89+
}
90+

Classes/Api/Localization.php

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
3+
namespace JambageCom\TtProducts\Api;
4+
5+
/***************************************************************
6+
* Copyright notice
7+
*
8+
* (c) 2018 Franz Holzinger (franz@ttproducts.de)
9+
* All rights reserved
10+
*
11+
* This script is part of the TYPO3 project. The TYPO3 project is
12+
* free software; you can redistribute it and/or modify
13+
* it under the terms of the GNU General Public License as published by
14+
* the Free Software Foundation; either version 2 of the License, or
15+
* (at your option) any later version.
16+
*
17+
* The GNU General Public License can be found at
18+
* http://www.gnu.org/copyleft/gpl.html.
19+
* A copy is found in the textfile GPL.txt and important notices to the license
20+
* from the author is found in LICENSE.txt distributed with these scripts.
21+
*
22+
*
23+
* This script is distributed in the hope that it will be useful,
24+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
25+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26+
* GNU General Public License for more details.
27+
*
28+
* This copyright notice MUST APPEAR in all copies of the script!
29+
***************************************************************/
30+
/**
31+
*
32+
* language object
33+
*
34+
* @author Franz Holzinger <franz@ttproducts.de>
35+
* @maintainer Franz Holzinger <franz@ttproducts.de>
36+
* @package TYPO3
37+
* @subpackage tt_products
38+
*
39+
*
40+
*/
41+
42+
43+
class Localization extends \JambageCom\Div2007\Base\TranslationBase implements \TYPO3\CMS\Core\SingletonInterface {
44+
45+
}
46+
47+

Classes/Hooks/StatusProvider.php

100644100755
File mode changed.

api/class.tx_ttproducts_api.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@
3636
*
3737
*/
3838

39+
use TYPO3\CMS\Core\Utility\GeneralUtility;
3940

40-
class tx_ttproducts_api implements t3lib_Singleton {
41+
42+
class tx_ttproducts_api implements \TYPO3\CMS\Core\SingletonInterface {
4143

4244
static public function roundPrice ($value, $format) {
4345

@@ -47,7 +49,7 @@ static public function roundPrice ($value, $format) {
4749
$floatLen = strlen($value) - $dotPos - 1;
4850

4951
if (strpos($format, '.') !== false) {
50-
$priceRoundFormatArray = t3lib_div::trimExplode('.', $format);
52+
$priceRoundFormatArray = GeneralUtility::trimExplode('.', $format);
5153
} else {
5254
$priceRoundFormatArray['0'] = $format;
5355
}
@@ -193,7 +195,7 @@ static public function roundPrice ($value, $format) {
193195
static public function createFeuser ($conf, $infoObj, $basketView, $calculatedArray, $fromArray) {
194196

195197
$result = false;
196-
$tablesObj = t3lib_div::makeInstance('tx_ttproducts_tables');
198+
$tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables');
197199
$infoArray = $infoObj->infoArray;
198200
$apostrophe = $conf['orderEmail_apostrophe'];
199201

api/class.tx_ttproducts_ts.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@
3636
*
3737
*/
3838

39+
use TYPO3\CMS\Core\Utility\GeneralUtility;
3940

40-
class tx_ttproducts_ts implements t3lib_Singleton {
41+
42+
class tx_ttproducts_ts implements \TYPO3\CMS\Core\SingletonInterface {
4143
static $count = 0;
4244

4345
protected function getChilds ($uid = 0) {
44-
$cObj = t3lib_div::makeInstance('tx_div2007_cobj');
46+
$cObj = GeneralUtility::makeInstance('tx_div2007_cobj');
4547
$where = 'pid = ' . $uid . $cObj->enableFields('pages');
4648

4749
$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', $where);
@@ -78,7 +80,7 @@ protected function getAllChilds ($uid = 0) {
7880

7981
protected function getProductCount ($uid = 0) {
8082
$result = 0;
81-
$cObj = t3lib_div::makeInstance('tx_div2007_cobj');
83+
$cObj = GeneralUtility::makeInstance('tx_div2007_cobj');
8284

8385
$allChilds = $this->getAllChilds($uid);
8486

@@ -99,7 +101,7 @@ protected function getProductCount ($uid = 0) {
99101

100102
protected function getMemoCount ($uid = 0) {
101103
$result = 0;
102-
$cObj = t3lib_div::makeInstance('tx_div2007_cobj');
104+
$cObj = GeneralUtility::makeInstance('tx_div2007_cobj');
103105
$where = 'pid = ' . $uid . $cObj->enableFields('tt_content');
104106

105107
$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,CType,list_type,pi_flexform', 'tt_content', $where);
@@ -116,7 +118,7 @@ protected function getMemoCount ($uid = 0) {
116118
$row['list_type'] == '5' &&
117119
$row['pi_flexform'] != ''
118120
) {
119-
$flexformArray = t3lib_div::xml2array($row['pi_flexform']);
121+
$flexformArray = GeneralUtility::xml2array($row['pi_flexform']);
120122
$codes =
121123
tx_div2007_ff::get(
122124
$flexformArray,
@@ -126,7 +128,7 @@ protected function getMemoCount ($uid = 0) {
126128
'vDEF'
127129
);
128130

129-
$codeArray = t3lib_div::trimExplode(',' , $codes);
131+
$codeArray = GeneralUtility::trimExplode(',' , $codes);
130132
if (in_array('MEMO', $codeArray)) {
131133

132134
$bMemoFound = true;
@@ -139,7 +141,7 @@ protected function getMemoCount ($uid = 0) {
139141
$functablename = 'tt_products';
140142
$memoItems = tx_ttproducts_control_memo::readSessionMemoItems($functablename);
141143
if ($memoItems != '') {
142-
$memoArray = t3lib_div::trimExplode(',', $memoItems);
144+
$memoArray = GeneralUtility::trimExplode(',', $memoItems);
143145
$count = count($memoArray);
144146
}
145147
}
@@ -183,7 +185,7 @@ public function processMemo() {
183185

184186
$functablename = 'tt_products';
185187
$conf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][TT_PRODUCTS_EXT . '.'];
186-
$piVars = t3lib_div::_GPmerged('tt_products');
188+
$piVars = GeneralUtility::_GPmerged('tt_products');
187189

188190
tx_ttproducts_control_memo::process($functablename, $piVars, $conf);
189191
}

cache/class.tx_ttproducts_cache.php

Lines changed: 0 additions & 143 deletions
This file was deleted.

0 commit comments

Comments
 (0)