mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge branch '3.3' into 3
This commit is contained in:
commit
457931d664
@ -188,7 +188,7 @@ jQuery.noConflict();
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show message (but ignore aborted requests)
|
// Show message (but ignore aborted requests)
|
||||||
if(xhr.status !== 0 && msg && $.inArray(msg, ignoredMessages)) {
|
if(xhr.status !== 0 && msg && $.inArray(msg, ignoredMessages) === -1) {
|
||||||
// Decode into UTF-8, HTTP headers don't allow multibyte
|
// Decode into UTF-8, HTTP headers don't allow multibyte
|
||||||
statusMessage(decodeURIComponent(msg), msgType);
|
statusMessage(decodeURIComponent(msg), msgType);
|
||||||
}
|
}
|
||||||
@ -261,7 +261,7 @@ jQuery.noConflict();
|
|||||||
|
|
||||||
fromWindow: {
|
fromWindow: {
|
||||||
onstatechange: function(e){
|
onstatechange: function(e){
|
||||||
this.handleStateChange(e);
|
this.handleStateChange(e);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ jQuery.noConflict();
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Confirm whether the current user can navigate away from this page
|
* Confirm whether the current user can navigate away from this page
|
||||||
*
|
*
|
||||||
* @param {array} selectors Optional list of selectors
|
* @param {array} selectors Optional list of selectors
|
||||||
* @returns {boolean} True if the navigation can proceed
|
* @returns {boolean} True if the navigation can proceed
|
||||||
*/
|
*/
|
||||||
@ -521,7 +521,7 @@ jQuery.noConflict();
|
|||||||
* Last html5 history state
|
* Last html5 history state
|
||||||
*/
|
*/
|
||||||
LastState: null,
|
LastState: null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to pause handleStateChange
|
* Flag to pause handleStateChange
|
||||||
*/
|
*/
|
||||||
@ -553,7 +553,7 @@ jQuery.noConflict();
|
|||||||
if(this.getPauseState()) {
|
if(this.getPauseState()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't allow parallel loading to avoid edge cases
|
// Don't allow parallel loading to avoid edge cases
|
||||||
if(this.getStateChangeXHR()) this.getStateChangeXHR().abort();
|
if(this.getStateChangeXHR()) this.getStateChangeXHR().abort();
|
||||||
|
|
||||||
@ -576,12 +576,12 @@ jQuery.noConflict();
|
|||||||
if(h.emulated.pushState) {
|
if(h.emulated.pushState) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var lastState = this.getLastState();
|
var lastState = this.getLastState();
|
||||||
|
|
||||||
// Suppress panel loading while resetting state
|
// Suppress panel loading while resetting state
|
||||||
this.setPauseState(true);
|
this.setPauseState(true);
|
||||||
|
|
||||||
// Restore best last state
|
// Restore best last state
|
||||||
if(lastState) {
|
if(lastState) {
|
||||||
h.pushState(lastState.id, lastState.title, lastState.url);
|
h.pushState(lastState.id, lastState.title, lastState.url);
|
||||||
@ -589,7 +589,7 @@ jQuery.noConflict();
|
|||||||
h.back();
|
h.back();
|
||||||
}
|
}
|
||||||
this.setPauseState(false);
|
this.setPauseState(false);
|
||||||
|
|
||||||
// Abort loading of this panel
|
// Abort loading of this panel
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1478,10 +1478,13 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
|
|||||||
*/
|
*/
|
||||||
public function isLatestVersion() {
|
public function isLatestVersion() {
|
||||||
$version = self::get_latest_version($this->owner->class, $this->owner->ID);
|
$version = self::get_latest_version($this->owner->class, $this->owner->ID);
|
||||||
|
if($version) {
|
||||||
return ($version->Version == $this->owner->Version);
|
return ($version->Version == $this->owner->Version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the equivalent of a DataList::create() call, querying the latest
|
* Return the equivalent of a DataList::create() call, querying the latest
|
||||||
* version of each page stored in the (class)_versions tables.
|
* version of each page stored in the (class)_versions tables.
|
||||||
|
@ -275,9 +275,12 @@ class Security extends Controller implements TemplateGlobalProvider {
|
|||||||
$form = $me->LoginForm();
|
$form = $me->LoginForm();
|
||||||
$form->sessionMessage($message, 'warning');
|
$form->sessionMessage($message, 'warning');
|
||||||
Session::set('MemberLoginForm.force_message',1);
|
Session::set('MemberLoginForm.force_message',1);
|
||||||
$formText = $me->login();
|
$loginResponse = $me->login();
|
||||||
|
if($loginResponse instanceof SS_HTTPResponse) {
|
||||||
|
return $loginResponse;
|
||||||
|
}
|
||||||
|
|
||||||
$response->setBody($formText);
|
$response->setBody((string)$loginResponse);
|
||||||
|
|
||||||
$controller->extend('permissionDenied', $member);
|
$controller->extend('permissionDenied', $member);
|
||||||
|
|
||||||
@ -502,7 +505,7 @@ class Security extends Controller implements TemplateGlobalProvider {
|
|||||||
* For multiple authenticators, Security_MultiAuthenticatorLogin is used.
|
* For multiple authenticators, Security_MultiAuthenticatorLogin is used.
|
||||||
* See getTemplatesFor and getIncludeTemplate for how to override template logic
|
* See getTemplatesFor and getIncludeTemplate for how to override template logic
|
||||||
*
|
*
|
||||||
* @return string Returns the "login" page as HTML code.
|
* @return string|SS_HTTPResponse Returns the "login" page as HTML code.
|
||||||
*/
|
*/
|
||||||
public function login() {
|
public function login() {
|
||||||
// Check pre-login process
|
// Check pre-login process
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
Name: emptyconfig
|
||||||
|
---
|
Loading…
x
Reference in New Issue
Block a user