mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 15:57:01 +02:00
Bump version to 3.0.56 plus some other minor tweaks
This commit is contained in:
@@ -488,6 +488,7 @@ abstract class AdminThemeFramework extends AdminTheme {
|
||||
$navArray[] = array(
|
||||
'url' => $urls->root,
|
||||
'title' => $this->_('View site'),
|
||||
'target' => '_top',
|
||||
'icon' => 'eye',
|
||||
);
|
||||
|
||||
@@ -501,6 +502,7 @@ abstract class AdminThemeFramework extends AdminTheme {
|
||||
$navArray[] = array(
|
||||
'url' => $urls->admin . 'login/logout/',
|
||||
'title' => $this->_('Logout'),
|
||||
'target' => '_top',
|
||||
'icon' => 'power-off',
|
||||
);
|
||||
|
||||
|
@@ -45,7 +45,7 @@ class ProcessWire extends Wire {
|
||||
* Reversion revision number
|
||||
*
|
||||
*/
|
||||
const versionRevision = 55;
|
||||
const versionRevision = 56;
|
||||
|
||||
/**
|
||||
* Version suffix string (when applicable)
|
||||
|
@@ -20,12 +20,12 @@ function InputfieldRepeater($) {
|
||||
var depthSize = 50;
|
||||
|
||||
/**
|
||||
* Whether or not AdminThemeReno is present
|
||||
* Whether or not AdminThemeDefault is present
|
||||
*
|
||||
* @type {bool}
|
||||
*
|
||||
*/
|
||||
var isReno = $('body').hasClass('AdminThemeReno');
|
||||
var isAdminDefault = $('body').hasClass('AdminThemeDefault');
|
||||
|
||||
/**
|
||||
* Event timer for double clicks
|
||||
@@ -495,8 +495,8 @@ function InputfieldRepeater($) {
|
||||
var prevDepth = parseInt($depth.val());
|
||||
var left = ui.position.left;
|
||||
|
||||
// AdminThemeReno has something different going on with the left positions, so we adjust for that here
|
||||
if(isReno) left -= depthSize;
|
||||
// AdminThemeDefault has something different going on with the left positions, so we adjust for that here
|
||||
if(!isAdminDefault) left -= depthSize;
|
||||
|
||||
if(left < 0) {
|
||||
depth = prevDepth - Math.round(Math.abs(left) / depthSize);
|
||||
|
File diff suppressed because one or more lines are too long
@@ -17,6 +17,7 @@
|
||||
* @method void afterLogin() #pw-hooker
|
||||
* @method void executeLogout() #pw-hooker
|
||||
* @method void afterLoginRedirect() #pw-hooker
|
||||
* @method string afterLoginURL($url) #pw-hooker
|
||||
* @method string renderLoginForm() #pw-hooker
|
||||
* @method InputfieldForm buildLoginForm() #pw-hooker
|
||||
*
|
||||
@@ -143,7 +144,8 @@ class ProcessLogin extends Process {
|
||||
public function ___execute() {
|
||||
|
||||
if($this->user->isLoggedin()) {
|
||||
if($this->loginURL) $this->wire('session')->redirect($this->loginURL);
|
||||
if($this->loginURL) $this->wire('session')->redirect($this->afterLoginURL($this->loginURL));
|
||||
if($this->input->get('layout')) return ''; // blank placeholder page option for admin themes
|
||||
$this->message($this->_("You are logged in."));
|
||||
if($this->isAdmin && $this->user->hasPermission('page-edit')) $this->afterLoginRedirect();
|
||||
// fallback if nothing set
|
||||
@@ -181,13 +183,13 @@ class ProcessLogin extends Process {
|
||||
$this->session->remove('error');
|
||||
$this->afterLogin();
|
||||
}
|
||||
$this->session->redirect("./?login=1" . ($this->id ? "&id={$this->id}" : ''));
|
||||
$url = $this->afterLoginURL("./?login=1" . ($this->id ? "&id=$this->id" : ''));
|
||||
$this->session->redirect($url);
|
||||
} else {
|
||||
$this->error($name . " - " . $this->_("Login failed"));
|
||||
}
|
||||
|
||||
return $this->renderLoginForm();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -455,7 +457,19 @@ class ProcessLogin extends Process {
|
||||
*
|
||||
*/
|
||||
protected function ___afterLoginRedirect() {
|
||||
$this->session->redirect($this->pages->get($this->config->adminRootPageID)->url);
|
||||
$this->session->redirect($this->pages->get($this->config->adminRootPageID)->url . '?login=1');
|
||||
}
|
||||
|
||||
/**
|
||||
* #pw-hooker
|
||||
* #pw-internal
|
||||
*
|
||||
* @param string $url
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function ___afterLoginURL($url) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user