Commit Graph

130 Commits

Author SHA1 Message Date
Andreas Gohr 7e23bd088a use correct FeedOptions methods. fixes #4203
This makes feed.php use the correct methods for setting the feed type
and content-type header. It also adds the missing type definition for
RSS 1.0
2024-02-11 10:11:45 +01:00
splitbrain 2abe2b13fc 🤖 Rector and PHPCS fixes 2024-01-30 08:44:03 +00:00
Andreas Gohr 87f6c71855 remove obsolete feed creation code
This was left over in #4156
2024-01-26 20:11:43 +01:00
splitbrain 72c714a3b8 🤖 Rector and PHPCS fixes 2024-01-26 14:24:41 +00:00
Andreas Gohr fe9d054b30 Feed creation refactoring
This breaks up the humongous functions from feed.php into multiple
classes. To keep compatibility with existing Plugin events, the basic
principle of how the feed is assembled has not been changed:

* depending on the given mode and other options lose arrays of items are
  gathered
* these items are then converted (again based on the various options)
  into proper FeedItems
* the FeedItems are then added to the Feed

The conversion from loosely typed item data to something more structured
is now done by the FeedItemProcessor classes. Some very basic tests have
been added. It does not cover erverything but covers more than before
(which was nothing).

Manual testing before merging this is highly recommended. I am not
confident that I ported over everything correctly.

No new features have been added, but especially media support could and
should be improved in the future.
2024-01-17 19:32:10 +01:00
Gerrit Uitslag 6547cfc745 use $auth instanceof AuthPlugin instead of not null check 2023-09-01 01:10:48 +02:00
Andreas Gohr 26dfc2323f Rector to rename print to echo calls 2023-08-31 22:00:27 +02:00
Andreas Gohr 7d34963b3e coding style: control flow line breaks 2023-08-31 15:04:10 +02:00
Andreas Gohr 177d6836e2 coding style: control flow whitespaces 2023-08-31 14:22:35 +02:00
Gerrit Uitslag ff84abad8a reformatting at top level 2023-08-31 00:55:36 +02:00
Andreas Gohr dccd6b2bba coding style: function call spacing 2023-08-30 18:41:45 +02:00
Andreas Gohr b1f206e1d4 Apply rector fixes to bin and toplevel 2023-08-30 14:48:22 +02:00
Andreas Gohr adb8672aa6 Fix titles in feeds
The check introduced in 6fd2d4b0 did not work when media was set
explicitly to false.
2022-11-01 09:05:32 +01:00
Andreas Gohr 6fd2d4b07c fix warnings in feed.php. #3728 2022-08-27 19:22:03 +02:00
Andreas Gohr a30be5ec00 fix linelengths in feed.php 2022-02-04 23:20:23 +01:00
jpedryc 140bc87254 Code Style fix 2022-01-27 00:07:01 +01:00
jpedryc 95dc9a1d66 feed.php updates:
* search is disabled
  * code style fixes
2022-01-26 00:16:18 +01:00
Phy 08e9b52fd0
Renamed constant to RECENTS_ONLY_CREATION
This clarifies that it also works when requesting media changelog.
2020-03-09 20:24:19 -04:00
Tero Kivinen 68f43bcf6b
Implemented only_new option for RSS feed, so you can request RSS feed that contains only new files. 2020-03-09 20:21:11 -04:00
Phy 8de6bd9892
initialize rssRecentChanges flag to 0 2020-03-09 17:21:22 -04:00
Aurélien Martin 7b299f22af
Add option rss_show_deleted 2020-03-09 17:17:09 -04:00
Andreas Gohr cbb44eabe0 deprecated trigger_event() in favor of a static method on Event 2019-04-20 21:48:53 +02:00
Andreas Gohr e1d9dcc8b4 First go at moving the plugin classes into their own namespace 2019-04-20 21:33:23 +02:00
Michael Große d2f1d7a17e
Rename fields and add deprecated __get/__set
These fields might still be accessed from the outside, so in order to
not break backwards compatibility, this uses magic methods that emit
deprecation errors.
2019-02-14 23:41:13 +01:00
Michael Große 0db5771e6b
Refactor cache.php into different files 2019-02-02 13:41:48 +01:00
Andreas Gohr 0c3a570273 split changelog classes into their own namespace
The remaining functions in inc/changelog.php should be moved into a
utility class.
2018-06-15 11:45:58 +02:00
Andreas Gohr 4364181fd5 do not disclose email or IP addresses of users through RSS
The feed used to add real or fake email addresses to items (because some
feed formats require them). The default RSS1.0 format did not show them,
but that changed in the recent update of our FeedCreator classes.

Now all code for that has been removed, always showing an
@undisclosed.example.com email address. Because some feed readers may
use the email address to distinguis authors, the mechanism to prepend
the user name was kept.
2017-08-05 17:42:54 +02:00
Andreas Gohr 572dd708be use composer based library for feed creator #1970 2017-05-18 22:38:19 +02:00
Gerrit Uitslag 6ebabe2fed Fix PHP7 evaluation order incompatibility
Fixes #1480
2016-03-02 21:48:37 +01:00
Andreas Gohr 79e7937762 Remove error supression for file_exists()
In an older version of PHP a file_exists() call would issue a warning
when the file did not exist. This was fixed in later PHP releases. Since
we require PHP 5.3 now, there's no need to supress any error here
anymore. This might even give a minor performance boost.
2015-01-07 10:47:45 +01:00
Gerrit Uitslag e0c26282a6 scrutinizer documentations issues 2014-09-29 03:34:17 +02:00
Andreas Gohr ed74b60ead Merge pull request #626 from splitbrain/feedmodelistsort
Added sort by date option to feed in list mode
2014-05-25 11:47:07 +02:00
Gerrit Uitslag 470bf4b293 username_link should show user's name in feed too 2014-05-14 20:58:35 +02:00
Andreas Gohr d2704764cf use new $INPUT->valid() method in feed.php 2014-04-30 19:49:25 +02:00
Gerrit Uitslag 477e59988f add date sort option for list mode of feed 2014-03-20 15:40:31 +01:00
Gerrit Uitslag 6dcc1e8f85 Improve encoding dir in rssListNamespace() 2014-03-20 15:39:57 +01:00
Gerrit Uitslag b09b9f475d add 404 status header to feed disabled 2014-03-18 14:02:01 +01:00
Gerrit Uitslag 54be1338e5 allow disabling the rss feed 2014-03-18 13:19:05 +01:00
Andreas Gohr 3275c5d6fe Merge branch 'master' into diff_navigation
* master: (103 commits)
  Add a basic test case for the cache
  Events: Trigger a warning if the default action is not callable
  Fix caching (make the event callback public again)
  translation update
  translation update
  translation update
  translation update
  translation update
  translation update
  translation update
  avoid HTTP image screenshot urls. closes #595
  translation update
  Extension manager: Fix cache extension to be .repo
  adjusted the office type color again
  another instance of empty() where an array key might not exist
  remove placeholder van denied.txt
  updated file icons once more
  removed 'not logged in' text, loginform is shown already
  Revert "added stripped bit to language file"
  fixed index file
  ...

Conflicts:
	inc/html.php
2014-03-14 17:09:29 +01:00
Christopher Smith e90eadd0d4 Merge pull request #547 from splitbrain/chris_rssfeedfixes
RSS feed fixes
2014-03-02 19:48:20 +00:00
Christopher Smith 26b26af6b5 add security character '$' around REMOTE_USER in cache key to avoid key clashes 2014-02-26 01:52:56 +00:00
Christopher Smith 4a193141ca remove rendundant line 2014-02-26 01:50:39 +00:00
Christopher Smith 3bf4233a75 add HOST and PORT to feed cache key 2014-02-26 01:49:29 +00:00
Gerrit Uitslag 8fcb305db0 Merge remote-tracking branch 'origin/master' into diff_navigation
Conflicts:
	inc/html.php
2014-02-23 22:07:26 +01:00
Gerrit Uitslag 0e2431b761 Improve PHPDocs, rename auth_basic to DokuWiki_Auth_Plugin 2014-02-17 19:01:57 +01:00
Gerrit Uitslag 2643fc174c Merge remote-tracking branch 'origin/master' into diff_navigation 2014-02-15 15:10:15 +01:00
Christopher Smith 27538f87e3 make media links in rss feeds absolute
This resolves issues with broken images when the wiki feed is
hosted by third parties (e.g. FeedBurner), as mentioned in
FS#2931 comments.
2014-02-14 21:04:08 +00:00
Christopher Smith ed714c3e6d add missing '&' before 't' in url construction 2014-02-14 21:00:10 +00:00
Michael Hamann 0b4e20cc13 Fix RSS namespace listings containing hidden pages 2013-12-02 00:15:38 +01:00
Michael Hamann 11540fc120 Revert "Exclude hidden pages (config["hidepages"]) from RSS feed (see https://www.dokuwiki.org/config:hidepages)"
This reverts commit f5151bdbf9.
2013-12-02 00:15:38 +01:00