Project

General

Profile

Feature #20708 » 11460_v2.diff

Administrator Admin, 2009-07-02 00:06

View differences:

typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php (working copy)
var $template;
var $uploadDir;
var $redirectUrl;
protected $noRedirect;
/**
* The main method of the plugin
......
// GPvars:
$this->logintype = t3lib_div::_GP('logintype');
$this->redirectUrl = t3lib_div::_GP('redirect_url');
$this->noRedirect = ($this->piVars['noredirect'] || $this->conf['redirectDisable']);
// if config.typolinkLinkAccessRestrictedPages is set, the var is return_url
$returnUrl = t3lib_div::_GP('return_url');
......
$this->userIsLoggedIn = $GLOBALS['TSFE']->loginUser;
// Redirect
if ($this->conf['redirectMode'] && !$this->conf['redirectDisable']) {
if ($this->conf['redirectMode'] && !$this->conf['redirectDisable'] && !$this->noRedirect) {
$this->redirectUrl = $this->processRedirect();
}
......
// Process the redirect
if (($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl) {
if (($this->logintype === 'login' || $this->logintype === 'logout') && $this->redirectUrl && !$this->noRedirect) {
if (!$GLOBALS['TSFE']->fe_user->cookieId) {
$content .= '<p style="color:red; font-weight:bold;">' . $this->pi_getLL('cookie_warning', '', 1) . '</p>';
} else {
......
$markerArray['###STORAGE_PID###'] = $this->spid;
$markerArray['###USERNAME###'] = htmlspecialchars($GLOBALS['TSFE']->fe_user->user['username']);
$markerArray['###USERNAME_LABEL###'] = $this->pi_getLL('username', '', 1);
$markerArray['###NOREDIRECT###'] = $this->noRedirect ? '1' : '0';
$markerArray['###PREFIXID###'] = $this->prefixId;
$markerArray = array_merge($markerArray, $this->getUserFieldMarkers());
if ($this->redirectUrl) {
......
$markerArray['###STORAGE_PID###'] = $this->spid;
$markerArray['###USERNAME_LABEL###'] = $this->pi_getLL('username', '', 1);
$markerArray['###REDIRECT_URL###'] = $gpRedirectUrl ? htmlspecialchars($gpRedirectUrl) : htmlspecialchars($this->redirectUrl);
$markerArray['###NOREDIRECT###'] = $this->noRedirect ? '1' : '0';
$markerArray['###PREFIXID###'] = $this->prefixId;
$markerArray = array_merge($markerArray, $this->getUserFieldMarkers());
if ($this->flexFormValue('showForgotPassword','sDEF') || $this->conf['showForgotPasswordLink']) {
......
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/felogin/pi1/class.tx_felogin_pi1.php']);
}
?>
?>
typo3/sysext/felogin/template.html (working copy)
<li>###ACTION_URI### - URI of the request for the login/logout form</li>
<li>###EXTRA_HIDDEN### - Hook required (additionnal hidden field used by kb_md5fepw extension by Kraft Bernhard)</li>
<li>###ON_SUBMIT### - Hook required (used by kb_md5fepw extension by Kraft Bernhard)</li>
<li>###PREFIXID### - Same as class name ('tx_newloginbox_pi1') usefull to get a unique classname prefix</li>
<li>###PREFIXID### - Same as class name ('tx_felogin_pi1') usefull to get a unique classname prefix</li>
<li>###REDIRECT_URL### - URL of redirection upon login</li>
<li>###NOREDIRECT### - if set, no redirect will be done</li>
<li>###STORAGE_PID### - explicit enough I guess (if not : id of the page where user are stored)</li>
<li>###STATUS_HEADER### - depends of the template</li>
<li>###STATUS_MESSAGE### - depends of the template</li>
......
<input type="hidden" name="logintype" value="login" />
<input type="hidden" name="pid" value="###STORAGE_PID###" />
<input type="hidden" name="redirect_url" value="###REDIRECT_URL###" />
<input type="hidden" name="###PREFIXID###[noredirect]" value="###NOREDIRECT###" />
###EXTRA_HIDDEN###
</div>
</fieldset>
......
<div class="felogin-hidden">
<input type="hidden" name="logintype" value="logout" />
<input type="hidden" name="pid" value="###STORAGE_PID###" />
<input type="hidden" name="###PREFIXID###[noredirect]" value="###NOREDIRECT###" />
</div>
</fieldset>
</form>
(2-2/2)