mirror of
https://github.com/silverstripe/silverstripe-versionfeed
synced 2024-10-22 11:05:31 +02:00
Compare commits
38 Commits
2.3.0-beta
...
2
Author | SHA1 | Date | |
---|---|---|---|
|
55d18d8392 | ||
|
0b94f4b8a9 | ||
|
a2b6f45abd | ||
|
b12eee33ed | ||
|
0a17d0c537 | ||
|
66da923502 | ||
|
3c922398ca | ||
|
82872780eb | ||
|
900aae6a25 | ||
|
d082606ded | ||
|
4129c23c0f | ||
|
84f1ed3914 | ||
|
b11db96d7a | ||
|
1f015f119c | ||
|
ebae2446a9 | ||
|
633b85537e | ||
|
df5845176f | ||
|
4afd8ce074 | ||
|
1e78dfc828 | ||
|
b56ae94e87 | ||
|
1ec4a141e3 | ||
|
d44e506d00 | ||
|
48220dad3a | ||
|
6699b9074a | ||
|
8041c15dc7 | ||
|
9f6b6f9d8a | ||
|
831c178514 | ||
|
2e1dc4a46e | ||
|
c5fdbcbd72 | ||
|
2ba0438277 | ||
|
656094763b | ||
|
d18a07213e | ||
|
e8da1e07bf | ||
|
abb248242f | ||
|
75237f89db | ||
|
befc7f07d3 | ||
|
c5f4a5ccdb | ||
|
9433c0542a |
11
.github/workflows/ci.yml
vendored
Normal file
11
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
name: CI
|
||||||
|
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
|
@ -1,13 +1,15 @@
|
|||||||
name: Build Docs
|
name: Deploy Userhelp Docs
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- '3'
|
||||||
|
- '2'
|
||||||
- 'master'
|
- 'master'
|
||||||
paths:
|
paths:
|
||||||
- 'docs/en/userguide/**'
|
- 'docs/en/userguide/**'
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
deploy:
|
||||||
name: build-docs
|
name: deploy-userhelp-docs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Run build hook
|
- name: Run build hook
|
16
.github/workflows/dispatch-ci.yml
vendored
Normal file
16
.github/workflows/dispatch-ci.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
name: Dispatch CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
# At 11:10 AM UTC, only on Sunday and Monday
|
||||||
|
schedule:
|
||||||
|
- cron: '10 11 * * 0,1'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dispatch-ci:
|
||||||
|
name: Dispatch CI
|
||||||
|
# Only run cron on the silverstripe account
|
||||||
|
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Dispatch CI
|
||||||
|
uses: silverstripe/gha-dispatch-ci@v1
|
17
.github/workflows/keepalive.yml
vendored
Normal file
17
.github/workflows/keepalive.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: Keepalive
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
# The 8th of every month at 11:50am UTC
|
||||||
|
schedule:
|
||||||
|
- cron: '50 11 8 * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
keepalive:
|
||||||
|
name: Keepalive
|
||||||
|
# Only run cron on the silverstripe account
|
||||||
|
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Keepalive
|
||||||
|
uses: silverstripe/gha-keepalive@v1
|
@ -1,15 +0,0 @@
|
|||||||
inherit: true
|
|
||||||
|
|
||||||
build:
|
|
||||||
nodes:
|
|
||||||
analysis:
|
|
||||||
tests:
|
|
||||||
override: [php-scrutinizer-run]
|
|
||||||
|
|
||||||
checks:
|
|
||||||
php:
|
|
||||||
code_rating: true
|
|
||||||
duplication: true
|
|
||||||
|
|
||||||
filter:
|
|
||||||
paths: [src/*, tests/*]
|
|
@ -1,4 +0,0 @@
|
|||||||
version: ~> 1.0
|
|
||||||
|
|
||||||
import:
|
|
||||||
- silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-range.yml
|
|
@ -1,8 +1,9 @@
|
|||||||
[main]
|
[main]
|
||||||
host = https://www.transifex.com
|
host = https://www.transifex.com
|
||||||
|
|
||||||
[silverstripe-versionfeed.master]
|
[o:silverstripe:p:silverstripe-versionfeed:r:master]
|
||||||
file_filter = lang/<lang>.yml
|
file_filter = lang/<lang>.yml
|
||||||
source_file = lang/en.yml
|
source_file = lang/en.yml
|
||||||
source_lang = en
|
source_lang = en
|
||||||
type = YML
|
type = YML
|
||||||
|
|
||||||
|
12
README.md
12
README.md
@ -1,9 +1,7 @@
|
|||||||
# Version Feed
|
# Version Feed
|
||||||
|
|
||||||
[![Build Status](https://api.travis-ci.com/silverstripe/silverstripe-versionfeed.svg?branch=2)](https://travis-ci.com/silverstripe/silverstripe-versionfeed)
|
[![CI](https://github.com/silverstripe/silverstripe-versionfeed/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-versionfeed/actions/workflows/ci.yml)
|
||||||
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-versionfeed/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-versionfeed/?branch=master)
|
[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)
|
||||||
[![codecov](https://codecov.io/gh/silverstripe/silverstripe-versionfeed/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-versionfeed)
|
|
||||||
[![SilverStripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@ -11,13 +9,13 @@ The module creates an RSS feed on each page with their change history, as well a
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* SilverStripe ^4
|
* Silverstripe ^4
|
||||||
|
|
||||||
**Note:** For a SilverStripe 3.x compatible version, please use [the 1.x release line](https://github.com/silverstripe/silverstripe-versionfeed/tree/1.2).
|
**Note:** For a Silverstripe 3.x compatible version, please use [the 1.x release line](https://github.com/silverstripe/silverstripe-versionfeed/tree/1.2).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Install with composer by running `composer require silverstripe/versionfeed` in the root of your SilverStripe project.
|
Install with composer by running `composer require silverstripe/versionfeed` in the root of your Silverstripe project.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9.5",
|
"phpunit/phpunit": "^9.5",
|
||||||
|
"silverstripe/framework": "^4.10",
|
||||||
"squizlabs/php_codesniffer": "^3.0"
|
"squizlabs/php_codesniffer": "^3.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
---
|
||||||
title: Content change RSS
|
title: Content change RSS
|
||||||
summary: Adds page or site wide RSS feeds that display content changes
|
summary: Adds page or site wide RSS feeds that display content changes
|
||||||
|
---
|
||||||
|
|
||||||
# Content change RSS
|
# Content change RSS
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@ en:
|
|||||||
TITLECHANGED: 'Title has changed:'
|
TITLECHANGED: 'Title has changed:'
|
||||||
Warning: 'Publicising the history will also disclose the changes that have at the time been protected from the public view.'
|
Warning: 'Publicising the history will also disclose the changes that have at the time been protected from the public view.'
|
||||||
Warning2: 'Changing access settings in such a way that this page or pages under it become publicly<br>accessible may result in publicising all historical changes on these pages too. Please review<br> this section''s "Public history" settings to ascertain only intended information is disclosed.'
|
Warning2: 'Changing access settings in such a way that this page or pages under it become publicly<br>accessible may result in publicising all historical changes on these pages too. Please review<br> this section''s "Public history" settings to ascertain only intended information is disclosed.'
|
||||||
|
db_PublicHistory: 'Public history'
|
||||||
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||||
ALLCHANGES: 'All page changes'
|
ALLCHANGES: 'All page changes'
|
||||||
ALLCHANGESLABEL: 'Make global changes feed public'
|
ALLCHANGESLABEL: 'Make global changes feed public'
|
||||||
|
db_AllChangesEnabled: 'All changes enabled'
|
||||||
|
@ -6,6 +6,8 @@ eo:
|
|||||||
TITLECHANGED: 'Titolo estas ŝanĝita:'
|
TITLECHANGED: 'Titolo estas ŝanĝita:'
|
||||||
Warning: 'Publikigi la historion ankaŭ malkaŝos la ŝanĝojn ĝis tiam protektitajn kontraŭ publika vido.'
|
Warning: 'Publikigi la historion ankaŭ malkaŝos la ŝanĝojn ĝis tiam protektitajn kontraŭ publika vido.'
|
||||||
Warning2: 'Ŝanĝi la alirajn agordojn tiel ke ĉi tiu paĝo, aŭ paĝoj sub ĝi, fariĝas publike alireblaj <br>eble rezultigos ke publikiĝos ĉiuj historiaj ŝanĝoj en tiuj paĝoj. Bonvole rekonsideru <br> la sekcion "Publika historio" de ĉi tiu sekcio, por certigi ke nur intencita informo publikiĝu.'
|
Warning2: 'Ŝanĝi la alirajn agordojn tiel ke ĉi tiu paĝo, aŭ paĝoj sub ĝi, fariĝas publike alireblaj <br>eble rezultigos ke publikiĝos ĉiuj historiaj ŝanĝoj en tiuj paĝoj. Bonvole rekonsideru <br> la sekcion "Publika historio" de ĉi tiu sekcio, por certigi ke nur intencita informo publikiĝu.'
|
||||||
|
db_PublicHistory: 'Publika historio'
|
||||||
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||||
ALLCHANGES: 'Ĉiuj paĝaj ŝanĝoj'
|
ALLCHANGES: 'Ĉiuj paĝaj ŝanĝoj'
|
||||||
ALLCHANGESLABEL: 'Ĉieaj ŝanĝoj fluu en publikan'
|
ALLCHANGESLABEL: 'Ĉieaj ŝanĝoj fluu en publikan'
|
||||||
|
db_AllChangesEnabled: 'Ĉiuj ŝanĝoj enŝaltitaj'
|
||||||
|
13
lang/sk.yml
Normal file
13
lang/sk.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
sk:
|
||||||
|
SilverStripe\VersionFeed\VersionFeed:
|
||||||
|
LABEL: 'Zverejniť históriu'
|
||||||
|
SINGLEPAGEFEEDTITLE: 'Aktualizácie stránky {title}'
|
||||||
|
SITEFEEDTITLE: 'Aktualizácie {title}'
|
||||||
|
TITLECHANGED: 'Názov sa zmenil:'
|
||||||
|
Warning: 'Zverejnením histórie sa zverejnia aj zmeny, ktoré boli v tom čase chránené pred zrakom verejnosti.'
|
||||||
|
Warning2: 'Zmena nastavení prístupu tak, aby sa táto stránka alebo stránky pod ňou stali verejne prístupné,<br>môže viesť k zverejneniu všetkých historických zmien aj na týchto stránkach.<br> Skontrolujte nastavenia v časti "Verejná história", aby ste sa uistili, že sú zverejnené iba zamýšľané informácie.'
|
||||||
|
db_PublicHistory: 'Verejná história'
|
||||||
|
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||||
|
ALLCHANGES: 'Všetky zmeny stránky'
|
||||||
|
ALLCHANGESLABEL: 'Zverejnite informačný kanál globálnych zmien'
|
||||||
|
db_AllChangesEnabled: 'Všetky zmeny povolené'
|
@ -6,6 +6,7 @@ sl:
|
|||||||
TITLECHANGED: 'Spremenjen naslov:'
|
TITLECHANGED: 'Spremenjen naslov:'
|
||||||
Warning: 'Objava zgodovine bo razkrila tudi spremembe, ki do sedaj niso bile javno objavljene.'
|
Warning: 'Objava zgodovine bo razkrila tudi spremembe, ki do sedaj niso bile javno objavljene.'
|
||||||
Warning2: 'Sprememba nastavitev dostopa tako, da so so ta stran ali njene podstrani dostopne javnosti, <br> lahko povzroči objavo tudi vseh sprememb na omenjenih straneh. Podrobno preverite <br> seznam sprememb in se prepričajte, da boste razkrili samo tiste informacije, ki jih želite.'
|
Warning2: 'Sprememba nastavitev dostopa tako, da so so ta stran ali njene podstrani dostopne javnosti, <br> lahko povzroči objavo tudi vseh sprememb na omenjenih straneh. Podrobno preverite <br> seznam sprememb in se prepričajte, da boste razkrili samo tiste informacije, ki jih želite.'
|
||||||
|
db_PublicHistory: 'Javna zgodovina'
|
||||||
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||||
ALLCHANGES: 'Vse spremembe'
|
ALLCHANGES: 'Vse spremembe'
|
||||||
ALLCHANGESLABEL: 'Javno objavi seznam s krovnimi spremembami'
|
ALLCHANGESLABEL: 'Javno objavi seznam s krovnimi spremembami'
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true">
|
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Default">
|
<testsuite name="Default">
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace SilverStripe\VersionFeed;
|
namespace SilverStripe\VersionFeed;
|
||||||
|
|
||||||
|
use SilverStripe\Dev\Deprecation;
|
||||||
use SilverStripe\CMS\Model\SiteTreeExtension;
|
use SilverStripe\CMS\Model\SiteTreeExtension;
|
||||||
use SilverStripe\Core\Config\Config;
|
use SilverStripe\Core\Config\Config;
|
||||||
use SilverStripe\Forms\CheckboxField;
|
use SilverStripe\Forms\CheckboxField;
|
||||||
@ -77,7 +78,7 @@ class VersionFeed extends SiteTreeExtension
|
|||||||
$offset = $highestVersion ? "AND \"SiteTree_Versions\".\"Version\"<='".(int)$highestVersion."'" : '';
|
$offset = $highestVersion ? "AND \"SiteTree_Versions\".\"Version\"<='".(int)$highestVersion."'" : '';
|
||||||
// Get just enough elements for diffing. We need one more than desired to have something to compare to.
|
// Get just enough elements for diffing. We need one more than desired to have something to compare to.
|
||||||
$qLimit = (int)$limit + 1;
|
$qLimit = (int)$limit + 1;
|
||||||
$versions = $this->owner->allVersions(
|
$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",
|
"\"SiteTree\".\"LastEdited\" DESC, \"SiteTree\".\"ID\" DESC",
|
||||||
$qLimit
|
$qLimit
|
||||||
@ -171,7 +172,7 @@ class VersionFeed extends SiteTreeExtension
|
|||||||
/**
|
/**
|
||||||
* Compile a list of changes to the current page, excluding non-published and explicitly secured versions.
|
* Compile a list of changes to the current page, excluding non-published and explicitly secured versions.
|
||||||
*
|
*
|
||||||
* @deprecated 2.0.0 Use VersionFeed::getDiffList instead
|
* @deprecated 2.0.0 Use VersionFeed::getDiffList() instead
|
||||||
*
|
*
|
||||||
* @param int $highestVersion Top version number to consider.
|
* @param int $highestVersion Top version number to consider.
|
||||||
* @param boolean $fullHistory Set to true to get the full change history, set to false for a single diff.
|
* @param boolean $fullHistory Set to true to get the full change history, set to false for a single diff.
|
||||||
@ -181,6 +182,7 @@ class VersionFeed extends SiteTreeExtension
|
|||||||
*/
|
*/
|
||||||
public function getDiffedChanges($highestVersion = null, $fullHistory = true, $limit = 100)
|
public function getDiffedChanges($highestVersion = null, $fullHistory = true, $limit = 100)
|
||||||
{
|
{
|
||||||
|
Deprecation::notice('2.0.0', 'Use VersionFeed::getDiffList() instead');
|
||||||
return $this->getDiffList(
|
return $this->getDiffList(
|
||||||
$highestVersion,
|
$highestVersion,
|
||||||
$fullHistory ? $limit : 1
|
$fullHistory ? $limit : 1
|
||||||
|
@ -191,6 +191,7 @@ class VersionFeedController extends Extension
|
|||||||
{
|
{
|
||||||
if (!Config::inst()->get(VersionFeed::class, 'allchanges_enabled')
|
if (!Config::inst()->get(VersionFeed::class, 'allchanges_enabled')
|
||||||
|| !SiteConfig::current_site_config()->AllChangesEnabled
|
|| !SiteConfig::current_site_config()->AllChangesEnabled
|
||||||
|
|| !method_exists($this->owner, 'getSiteRSSLink')
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user