mirror of
https://github.com/silverstripe/silverstripe-versionfeed
synced 2024-10-22 09:05:31 +00:00
DEP PHP Support in CMS5 (#77)
This commit is contained in:
parent
48220dad3a
commit
9b92ba8d6c
@ -16,14 +16,14 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.4 || ^8.0",
|
"php": "^8.1",
|
||||||
"silverstripe/cms": "^4",
|
"silverstripe/cms": "^5",
|
||||||
"silverstripe/versioned": "^1",
|
"silverstripe/versioned": "^2",
|
||||||
"silverstripe/siteconfig": "^4"
|
"silverstripe/siteconfig": "^5"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9.5",
|
"phpunit/phpunit": "^9.5",
|
||||||
"squizlabs/php_codesniffer": "^3.0"
|
"squizlabs/php_codesniffer": "^3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
@ -80,7 +80,7 @@ class VersionFeed extends SiteTreeExtension
|
|||||||
$qLimit = (int)$limit + 1;
|
$qLimit = (int)$limit + 1;
|
||||||
$versions = $this->owner->Versions(
|
$versions = $this->owner->Versions(
|
||||||
"\"WasPublished\"='1' AND \"CanViewType\" IN ('Anyone', 'Inherit') $offset",
|
"\"WasPublished\"='1' AND \"CanViewType\" IN ('Anyone', 'Inherit') $offset",
|
||||||
"\"SiteTree\".\"LastEdited\" DESC, \"SiteTree\".\"ID\" DESC",
|
"\"LastEdited\" DESC, \"ID\" DESC",
|
||||||
$qLimit
|
$qLimit
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -114,7 +114,6 @@ class VersionFeedController extends Extension
|
|||||||
AND ("PublicHistory" IS NULL OR "PublicHistory" = \'1\')
|
AND ("PublicHistory" IS NULL OR "PublicHistory" = \'1\')
|
||||||
ORDER BY "LastEdited" DESC LIMIT ' . $limit);
|
ORDER BY "LastEdited" DESC LIMIT ' . $limit);
|
||||||
$lastChange = $latestChanges->record();
|
$lastChange = $latestChanges->record();
|
||||||
$latestChanges->rewind();
|
|
||||||
|
|
||||||
if ($lastChange) {
|
if ($lastChange) {
|
||||||
// Cache the diffs to remove DOS possibility.
|
// Cache the diffs to remove DOS possibility.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user