mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: Fixed escaping of date in view of archived site.
This commit is contained in:
parent
a787dddeab
commit
a150989e6f
@ -179,8 +179,12 @@ class Versioned extends DataObjectDecorator {
|
||||
}
|
||||
|
||||
if(!DB::query("SELECT COUNT(*) FROM \"" . self::$archive_tables[$baseTable] . "\"")->value()) {
|
||||
if($date) $dateClause = "WHERE \"LastEdited\" <= '$date'";
|
||||
else $dateClause = "";
|
||||
if($date) {
|
||||
$SQL_date = Convert::raw2sql($date);
|
||||
$dateClause = "WHERE \"LastEdited\" <= '$SQL_date'";
|
||||
} else {
|
||||
$dateClause = "";
|
||||
}
|
||||
|
||||
DB::query("INSERT INTO \"" . self::$archive_tables[$baseTable] . "\"
|
||||
SELECT \"RecordID\", max(\"Version\") FROM \"{$baseTable}_versions\"
|
||||
|
Loading…
Reference in New Issue
Block a user