Skip to content

Commit

Permalink
* bugfix: The recs POST data and FE sessions are available only in th…
Browse files Browse the repository at this point in the history
…e Front End.
  • Loading branch information
franzholz committed Nov 21, 2019
1 parent c1eff3a commit 71fc86e
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 28 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2019-11-21 Franz Holzinger <[email protected]>
* bugfix: The recs POST data and FE sessions are available only in the Front End.

2019-11-04 Franz Holzinger <[email protected]>
* bugfix: The object of tx_ttproducts_basket has no basketExtra member variable. Use tx_ttproducts_control_basket::getBasketExtra() instead.
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/tt_products_products_mm_articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

$result = NULL;

if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TT_PRODUCTS_EXT]['articleMode'] == '2') {
if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TT_PRODUCTS_EXT]['articleMode'] >= '1') {
$result = array (
'ctrl' => array (
'title' => 'LLL:EXT:' . TT_PRODUCTS_EXT . '/locallang_db.xml:tt_products_products_mm_articles',
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"require": {
"typo3/cms-core": ">=6.2.0,<8.99.99",
"jambagecom/div2007": ">=1.10.24",
"jambagecom/div2007": ">=1.10.25",
"jambagecom/table": ">=0.7.0",
"jambagecom/tsparser": ">=0.2.5"
},
Expand Down
2 changes: 1 addition & 1 deletion control/class.tx_ttproducts_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public function getContent (
if ($this->activityArray['products_overview']) {
tx_div2007_alpha5::load_noLinkExtCobj_fh002($this->pibase); //
$contentEmpty = $this->cObj->getSubpart(
templateCode,
$templateCode,
$this->subpartmarkerObj->spMarker('###BASKET_OVERVIEW_EMPTY' . $this->config['templateSuffix'] . '###')
);

Expand Down
53 changes: 30 additions & 23 deletions eid/class.tx_ttproducts_db.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,35 @@ public function init (&$conf, &$config, &$ajax, &$pObj) {
$this->cObj->start(array());
}

$recs = GeneralUtility::_GP('recs');

if (
is_array($recs) &&
$conf['transmissionSecurity']
) {
$errorCode = array();
$errorMessage = '';
$security = GeneralUtility::makeInstance(\JambageCom\Div2007\Security\TransmissionSecurity::class);
$decryptionResult = $security->decryptIncomingFields(
$recs,
$errorCode,
$errorMessage
);
}

if (is_array($recs)) {
$api = GeneralUtility::makeInstance( \JambageCom\Div2007\Api\Frontend::class);
// If any record registration is submitted, register the record.
$api->record_registration($recs, $GLOBALS['TYPO3_CONF_VARS']['FE']['maxSessionDataSize']);
if (TYPO3_MODE == 'FE') {
$recs = GeneralUtility::_GP('recs');

if (
is_array($recs) &&
$conf['transmissionSecurity']
) {
$errorCode = array();
$errorMessage = '';
$security = GeneralUtility::makeInstance(\JambageCom\Div2007\Security\TransmissionSecurity::class);
$decryptionResult = $security->decryptIncomingFields(
$recs,
$errorCode,
$errorMessage
);
}

if (is_array($recs)) {
$api = GeneralUtility::makeInstance( \JambageCom\Div2007\Api\Frontend::class);
// If any record registration is submitted, register the record.
$api->record_registration(
$recs,
$GLOBALS['TYPO3_CONF_VARS']['FE']['maxSessionDataSize'],
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TT_PRODUCTS_EXT]['checkCookies']
);
}
$recs = tx_ttproducts_control_basket::getStoredRecs();
}
$recs = tx_ttproducts_control_basket::getStoredRecs();

if (empty($recs)) {
$recs = array();
}
Expand All @@ -117,7 +124,7 @@ public function printContent () {
}


public function &fetchRow ($data) {
public function fetchRow ($data) {
$rc = '';
$view = '';
$rowArray = array();
Expand Down Expand Up @@ -243,7 +250,7 @@ public function &fetchRow ($data) {
}


protected function &generateResponse ($view, &$rowArray, &$variantArray) {
protected function generateResponse ($view, &$rowArray, &$variantArray) {
$csConvObj = $GLOBALS['TSFE']->csConvObj;

$theCode = strtoupper($view);
Expand Down
2 changes: 2 additions & 0 deletions ext_conf_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
pageAsCategory = 0
# cat=basic/enable; type=string; label=Address table: Name of the address table to be used in the backend. The usage of the 'fe_users' table is recommended.
addressTable =
# cat=basic/enable; type=boolean; label=Check Cookies: If set then the data inserted into the shopping basket or user data is only stored in a session if another extension allows to set the cookies.
checkCookies = 0
# cat=basic/enable; type=string; label=Image upload folder: This is the place where the images lie.
imageFolder = uploads/pics
# cat=basic/enable; type=string; label=Order tables by sorting: Enter a comma separated list of tt_products table names where the items should be listed by sorting in the backend
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'version' => '2.9.6',
'constraints' => array(
'depends' => array(
'div2007' => '1.10.24-0.0.0',
'div2007' => '1.10.25-0.0.0',
'php' => '5.6.0-7.2.99',
'table' => '0.7.0-0.0.0',
'tsparser' => '0.2.5-0.0.0',
Expand Down
2 changes: 1 addition & 1 deletion view/class.tx_ttproducts_relatedlist_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function getListMarkerArray (
'functablename' => $functablename,
'uid' => $uid
);
$tmpContent = $listView->printView (
$tmpContent = $listView->printView(
$templateCode,
$funcArray['code'],
$funcArray['functablename'],
Expand Down

0 comments on commit 71fc86e

Please sign in to comment.