Skip to content

Commit

Permalink
Feature #11467 - Enable cache (USER instead of USER_INT object) - Tha…
Browse files Browse the repository at this point in the history
…nks to Robert Heel!

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/powermail/trunk@45815 735d13b6-9817-0410-8766-e36946ffe9aa
  • Loading branch information
rabe69 committed Mar 28, 2011
1 parent 3c02b45 commit c7a2c6c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:powermail/pageTSconfig.txt">');

t3lib_extMgm::addPItoST43($_EXTKEY, 'pi1/class.tx_powermail_pi1.php', '_pi1', 'CType', 0);
t3lib_extMgm::addPItoST43($_EXTKEY, 'pi1/class.tx_powermail_pi1.php', '_pi1', 'CType', 1);

$TYPO3_CONF_VARS['EXTCONF']['cms']['db_layout']['addTables']['tx_powermail_fieldsets'][0] = array(
'fList' => 'uid,title',
Expand Down
20 changes: 16 additions & 4 deletions pi1/class.tx_powermail_confirmation.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,22 @@ function main($conf, $sessionfields, $cObj) {
$this->markerArray['###POWERMAIL_NAME_SUBMIT###'] = $this->cObj->data['tx_powermail_title'].'_confirmation_submit'; // Fill Marker with formname
$this->markerArray['###POWERMAIL_METHOD###'] = $this->conf['form.']['method']; // Form method
//$this->markerArray['###POWERMAIL_TARGET_BACK###'] = $this->cObj->typolink('x', array('returnLast' => 'url', 'parameter' => $GLOBALS['TSFE']->id, 'section' => ($this->cObj->data['_LOCALIZED_UID'] > 0 ? $this->cObj->data['_LOCALIZED_UID'] : $this->cObj->data['uid']), 'useCacheHash'=>1)); // Create target url
$this->markerArray['###POWERMAIL_TARGET_BACK###'] = $this->cObj->typolink('x', array('returnLast' => 'url', 'parameter' => $GLOBALS['TSFE']->id, 'useCacheHash'=>1)); // Create target url
$this->markerArray['###POWERMAIL_TARGET_SUBMIT###'] = $this->cObj->typolink('x', array('returnLast' => 'url', 'parameter' => $GLOBALS['TSFE']->id, 'section' => ($this->cObj->data['_LOCALIZED_UID'] > 0 ? $this->cObj->data['_LOCALIZED_UID'] : $this->cObj->data['uid']), 'additionalParams' => '&tx_powermail_pi1[mailID]='.($this->cObj->data['_LOCALIZED_UID'] > 0 ? $this->cObj->data['_LOCALIZED_UID'] : $this->cObj->data['uid']).'&tx_powermail_pi1[sendNow]=1', 'useCacheHash' => 1)); // Create target url

// Return
//$this->markerArray['###POWERMAIL_TARGET_BACK###'] = $this->cObj->typolink('x', array('returnLast' => 'url', 'parameter' => $GLOBALS['TSFE']->id, 'useCacheHash'=>1)); // Create target url
//$this->markerArray['###POWERMAIL_TARGET_SUBMIT###'] = $this->cObj->typolink('x', array('returnLast' => 'url', 'parameter' => $GLOBALS['TSFE']->id, 'section' => ($this->cObj->data['_LOCALIZED_UID'] > 0 ? $this->cObj->data['_LOCALIZED_UID'] : $this->cObj->data['uid']), 'additionalParams' => '&tx_powermail_pi1[mailID]='.($this->cObj->data['_LOCALIZED_UID'] > 0 ? $this->cObj->data['_LOCALIZED_UID'] : $this->cObj->data['uid']).'&tx_powermail_pi1[sendNow]=1', 'useCacheHash' => 1)); // Create target url
$this->markerArray['###POWERMAIL_TARGET_BACK###'] = $this->cObj->typolink('x', array(
'returnLast' => 'url',
'parameter' => $GLOBALS['TSFE']->id,
'useCacheHash' => 1,
'no_cache' => 1,
));
$this->markerArray['###POWERMAIL_TARGET_SUBMIT###'] = $this->cObj->typolink('x', array(
'returnLast' => 'url',
'parameter' => $GLOBALS['TSFE']->id,
'section' => ($this->cObj->data['_LOCALIZED_UID'] > 0 ? $this->cObj->data['_LOCALIZED_UID'] : $this->cObj->data['uid']),
'additionalParams' => '&tx_powermail_pi1[mailID]='.($this->cObj->data['_LOCALIZED_UID'] > 0 ? $this->cObj->data['_LOCALIZED_UID'] : $this->cObj->data['uid']).'&tx_powermail_pi1[sendNow]=1',
'useCacheHash' => 1,
'no_cache' => 1,
));
$this->hook(); // adds hook
$this->content = $this->cObj->substituteMarkerArrayCached($this->tmpl['all'],$this->markerArray); // substitute Marker in Template
$this->content = $this->dynamicMarkers->main($this->conf, $this->cObj, $this->content); // Fill dynamic locallang or typoscript markers
Expand Down
3 changes: 2 additions & 1 deletion pi1/class.tx_powermail_mandatory.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public function main($conf, $sessionfields, $cObj) {
$targetLinkParams = array(
'returnLast' => 'url',
'parameter' => $GLOBALS['TSFE']->id,
'useCacheHash' => 1,
'useCacheHash' => 1,
'no_cache' => 1
#'section' =>
);
$this->markerArray['###POWERMAIL_TARGET###'] = $this->cObj->typolink('x', $targetLinkParams) . '#' . $anchorId;
Expand Down
4 changes: 4 additions & 0 deletions pi1/class.tx_powermail_pi1.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ function main($content,$conf) {
$this->div->debug($this->sessionfields, 'Values from session'); // Debug function (Array from Session)
}

if($this->sessionfields){
$GLOBALS['TSFE']->set_no_cache();
}

// Start main choose
$this->hook_main_content_before(); // hook for content manipulation 1

Expand Down
1 change: 1 addition & 0 deletions static/pi1/setup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ plugin.tx_powermail_pi1 {
parameter.data = TSFE:id
returnLast = url
useCacheHash = 1
no_cache = 1
section.field = uid
additionalParams.cObject = COA
additionalParams.cObject {
Expand Down

0 comments on commit c7a2c6c

Please sign in to comment.