Merge branch '3.3' into 3

This commit is contained in:
Daniel Hensby 2016-05-04 23:32:10 +01:00
commit 457931d664
No known key found for this signature in database
GPG Key ID: E38EC566FE29EB66
5 changed files with 22 additions and 13 deletions

View File

@ -188,7 +188,7 @@ jQuery.noConflict();
}
// 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
statusMessage(decodeURIComponent(msg), msgType);
}

View File

@ -1478,10 +1478,13 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
*/
public function isLatestVersion() {
$version = self::get_latest_version($this->owner->class, $this->owner->ID);
if($version) {
return ($version->Version == $this->owner->Version);
}
return false;
}
/**
* Return the equivalent of a DataList::create() call, querying the latest
* version of each page stored in the (class)_versions tables.

View File

@ -275,9 +275,12 @@ class Security extends Controller implements TemplateGlobalProvider {
$form = $me->LoginForm();
$form->sessionMessage($message, 'warning');
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);
@ -502,7 +505,7 @@ class Security extends Controller implements TemplateGlobalProvider {
* For multiple authenticators, Security_MultiAuthenticatorLogin is used.
* 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() {
// Check pre-login process

View File

@ -0,0 +1,3 @@
---
Name: emptyconfig
---