mirror of
https://github.com/silverstripe/silverstripe-versionfeed
synced 2024-10-22 11:05:31 +02:00
Compare commits
No commits in common. "2" and "2.3.0-beta1" have entirely different histories.
2
...
2.3.0-beta
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@ -1,11 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: CI
|
||||
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
|
16
.github/workflows/dispatch-ci.yml
vendored
16
.github/workflows/dispatch-ci.yml
vendored
@ -1,16 +0,0 @@
|
||||
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
17
.github/workflows/keepalive.yml
vendored
@ -1,17 +0,0 @@
|
||||
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 +1,13 @@
|
||||
name: Deploy Userhelp Docs
|
||||
name: Build Docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '3'
|
||||
- '2'
|
||||
- 'master'
|
||||
paths:
|
||||
- 'docs/en/userguide/**'
|
||||
jobs:
|
||||
deploy:
|
||||
name: deploy-userhelp-docs
|
||||
build:
|
||||
name: build-docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Run build hook
|
15
.scrutinizer.yml
Normal file
15
.scrutinizer.yml
Normal file
@ -0,0 +1,15 @@
|
||||
inherit: true
|
||||
|
||||
build:
|
||||
nodes:
|
||||
analysis:
|
||||
tests:
|
||||
override: [php-scrutinizer-run]
|
||||
|
||||
checks:
|
||||
php:
|
||||
code_rating: true
|
||||
duplication: true
|
||||
|
||||
filter:
|
||||
paths: [src/*, tests/*]
|
4
.travis.yml
Normal file
4
.travis.yml
Normal file
@ -0,0 +1,4 @@
|
||||
version: ~> 1.0
|
||||
|
||||
import:
|
||||
- silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-range.yml
|
@ -1,9 +1,8 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[o:silverstripe:p:silverstripe-versionfeed:r:master]
|
||||
[silverstripe-versionfeed.master]
|
||||
file_filter = lang/<lang>.yml
|
||||
source_file = lang/en.yml
|
||||
source_lang = en
|
||||
type = YML
|
||||
|
||||
type = YML
|
12
README.md
12
README.md
@ -1,7 +1,9 @@
|
||||
# Version Feed
|
||||
|
||||
[![CI](https://github.com/silverstripe/silverstripe-versionfeed/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-versionfeed/actions/workflows/ci.yml)
|
||||
[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)
|
||||
[![Build Status](https://api.travis-ci.com/silverstripe/silverstripe-versionfeed.svg?branch=2)](https://travis-ci.com/silverstripe/silverstripe-versionfeed)
|
||||
[![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)
|
||||
[![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
|
||||
|
||||
@ -9,13 +11,13 @@ The module creates an RSS feed on each page with their change history, as well a
|
||||
|
||||
## 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
|
||||
|
||||
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
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"silverstripe/framework": "^4.10",
|
||||
"squizlabs/php_codesniffer": "^3.0"
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1,7 +1,5 @@
|
||||
---
|
||||
title: Content change RSS
|
||||
summary: Adds page or site wide RSS feeds that display content changes
|
||||
---
|
||||
|
||||
# Content change RSS
|
||||
|
||||
|
@ -6,8 +6,6 @@ en:
|
||||
TITLECHANGED: 'Title has changed:'
|
||||
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.'
|
||||
db_PublicHistory: 'Public history'
|
||||
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||
ALLCHANGES: 'All page changes'
|
||||
ALLCHANGESLABEL: 'Make global changes feed public'
|
||||
db_AllChangesEnabled: 'All changes enabled'
|
||||
|
@ -6,8 +6,6 @@ eo:
|
||||
TITLECHANGED: 'Titolo estas ŝanĝita:'
|
||||
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.'
|
||||
db_PublicHistory: 'Publika historio'
|
||||
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||
ALLCHANGES: 'Ĉiuj paĝaj ŝanĝoj'
|
||||
ALLCHANGESLABEL: 'Ĉieaj ŝanĝoj fluu en publikan'
|
||||
db_AllChangesEnabled: 'Ĉiuj ŝanĝoj enŝaltitaj'
|
||||
|
13
lang/sk.yml
13
lang/sk.yml
@ -1,13 +0,0 @@
|
||||
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,7 +6,6 @@ sl:
|
||||
TITLECHANGED: 'Spremenjen naslov:'
|
||||
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.'
|
||||
db_PublicHistory: 'Javna zgodovina'
|
||||
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||
ALLCHANGES: 'Vse spremembe'
|
||||
ALLCHANGESLABEL: 'Javno objavi seznam s krovnimi spremembami'
|
||||
|
@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true">
|
||||
<testsuites>
|
||||
<testsuite name="Default">
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace SilverStripe\VersionFeed;
|
||||
|
||||
use SilverStripe\Dev\Deprecation;
|
||||
use SilverStripe\CMS\Model\SiteTreeExtension;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
@ -78,7 +77,7 @@ class VersionFeed extends SiteTreeExtension
|
||||
$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.
|
||||
$qLimit = (int)$limit + 1;
|
||||
$versions = $this->owner->Versions(
|
||||
$versions = $this->owner->allVersions(
|
||||
"\"WasPublished\"='1' AND \"CanViewType\" IN ('Anyone', 'Inherit') $offset",
|
||||
"\"SiteTree\".\"LastEdited\" DESC, \"SiteTree\".\"ID\" DESC",
|
||||
$qLimit
|
||||
@ -172,7 +171,7 @@ class VersionFeed extends SiteTreeExtension
|
||||
/**
|
||||
* 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 boolean $fullHistory Set to true to get the full change history, set to false for a single diff.
|
||||
@ -182,7 +181,6 @@ class VersionFeed extends SiteTreeExtension
|
||||
*/
|
||||
public function getDiffedChanges($highestVersion = null, $fullHistory = true, $limit = 100)
|
||||
{
|
||||
Deprecation::notice('2.0.0', 'Use VersionFeed::getDiffList() instead');
|
||||
return $this->getDiffList(
|
||||
$highestVersion,
|
||||
$fullHistory ? $limit : 1
|
||||
|
@ -191,7 +191,6 @@ class VersionFeedController extends Extension
|
||||
{
|
||||
if (!Config::inst()->get(VersionFeed::class, 'allchanges_enabled')
|
||||
|| !SiteConfig::current_site_config()->AllChangesEnabled
|
||||
|| !method_exists($this->owner, 'getSiteRSSLink')
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user