Merge branch '3.1' into 3.2

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

View File

@ -185,7 +185,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

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