Merge branch '3.2' into 3.3

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

View File

@ -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);
} }

View File

@ -1451,10 +1451,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.