0011460.patch

Administrator Admin, 2009-07-01 19:49

Download (4.42 KB)

View differences:

typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php (Arbeitskopie)
115 115
		}
116 116

  
117 117

  
118

  
119
			// Process the redirect
120
		if (($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl) {
121
			if (!$GLOBALS['TSFE']->fe_user->cookieId) {
122
				$content .= '<p style="color:red; font-weight:bold;">' . $this->pi_getLL('cookie_warning', '', 1) . '</p>';
123
			} else {
124
				header('Location: '.t3lib_div::locationHeaderUrl($this->redirectUrl));
125
				exit;
118
		if (!$this->conf['redirectOnlyOnValidSubmit'] || $this->piVars['submit']) {
119
				// Process the redirect
120
			if (($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl) {
121
				if (!$GLOBALS['TSFE']->fe_user->cookieId) {
122
					$content .= '<p style="color:red; font-weight:bold;">' . $this->pi_getLL('cookie_warning', '', 1) . '</p>';
123
				} else {
124
					header('Location: '.t3lib_div::locationHeaderUrl($this->redirectUrl));
125
					exit;
126
				}
126 127
			}
127 128
		}
129

  
128 130
		return $this->conf['wrapContentInBaseClass'] ? $this->pi_wrapInBaseClass($content) : $content;
129 131

  
130 132
	}
......
190 192
		$markerArray['###FORGOT_PASSWORD_ENTEREMAIL###'] = $this->pi_getLL('forgot_password_enterEmail', '', 1);
191 193
		$markerArray['###FORGOT_EMAIL###'] = $this->prefixId.'[forgot_email]';
192 194
		$markerArray['###SEND_PASSWORD###'] = $this->pi_getLL('send_password', '', 1);
195
		$markerArray['###PREFIX_ID###'] = $this->prefixId;
193 196
		$markerArray = array_merge($markerArray, $this->getUserFieldMarkers());
194 197

  
195 198
		return $this->cObj->substituteMarkerArrayCached($subpart, $markerArray, $subpartArray, $linkpartArray);
......
214 217
		$markerArray['###STORAGE_PID###'] = $this->spid;
215 218
		$markerArray['###USERNAME###'] = htmlspecialchars($GLOBALS['TSFE']->fe_user->user['username']);
216 219
		$markerArray['###USERNAME_LABEL###'] = $this->pi_getLL('username', '', 1);
220
		$markerArray['###PREFIX_ID###'] = $this->prefixId;
217 221
		$markerArray = array_merge($markerArray, $this->getUserFieldMarkers());
218 222

  
219 223
		if ($this->redirectUrl) {
......
304 308
		$markerArray['###STORAGE_PID###'] = $this->spid;
305 309
		$markerArray['###USERNAME_LABEL###'] = $this->pi_getLL('username', '', 1);
306 310
		$markerArray['###REDIRECT_URL###'] = $gpRedirectUrl ? htmlspecialchars($gpRedirectUrl) : htmlspecialchars($this->redirectUrl);
311
		$markerArray['###PREFIX_ID###'] = $this->prefixId;
307 312
		$markerArray = array_merge($markerArray, $this->getUserFieldMarkers());
308 313

  
309 314
		if ($this->flexFormValue('showForgotPassword','sDEF') || $this->conf['showForgotPasswordLink']) {
typo3/sysext/felogin/ext_typoscript_setup.txt (Arbeitskopie)
74 74
	redirectPageLogin =
75 75
	redirectPageLoginError =
76 76
	redirectPageLogout =
77
	redirectOnlyOnValidSubmit =
77 78
	
78 79
	#disable redirect with one switch
79 80
	redirectDisable = 
typo3/sysext/felogin/template.html (Arbeitskopie)
19 19
	<li>###STORAGE_PID###    - explicit enough I guess (if not : id of the page where user are stored)</li>
20 20
	<li>###STATUS_HEADER###  - depends of the template</li>
21 21
	<li>###STATUS_MESSAGE### - depends of the template</li>
22
	<li>###PREFIX_ID###      - contains the prefixId, e.g. tx_felogin_pi1</li>
22 23
</ul>
23 24

  
24 25
<h2>Wrap parts</h2>
......
71 72
	<!--###PERMALOGIN_VALID###-->
72 73
	
73 74
	<div>	
74
		<input type="submit" name="submit" value="###LOGIN_LABEL###" />
75
		<input type="submit" name="###PREFIX_ID###[submit]" value="###LOGIN_LABEL###" />
75 76
	</div>
76 77

  
77 78
	<div class="felogin-hidden">
......
115 116
	 	###USERNAME###
116 117
    </div>
117 118
	<div>
118
		<input type="submit" name="submit" value="###LOGOUT_LABEL###" />
119
		<input type="submit" name="###PREFIX_ID###[submit]" value="###LOGOUT_LABEL###" />
119 120
	 </div>
120 121
	
121 122
	<div class="felogin-hidden"> 
......
148 149
		<input type="text" name="###FORGOT_EMAIL###" id="###FORGOT_EMAIL###" />
149 150
	</div>
150 151
	<div>
151
		<input type="submit" name="submit" value="###SEND_PASSWORD###" />
152
		<input type="submit" name="###PREFIX_ID###[submit]" value="###SEND_PASSWORD###" />
152 153
	 </div>
153 154
	</fieldset>
154 155
</form>