Commit Graph

56 Commits

Author SHA1 Message Date
Steve Boyd
b771bb624a API Stop using deprecated API 2022-11-29 09:35:55 +13:00
Steve Boyd
c3ef4d6efc API Update deprecations 2022-11-16 12:13:50 +13:00
Will Rossiter
d87dbc8367
fix: field formatting to correct include link 2022-06-13 11:53:44 +12:00
Steve Boyd
e7f9e60352 ENH PHP 8.1 compatibility 2022-04-13 10:22:29 +12:00
Steve Boyd
3b37fdb1ae ENH Use yarn and webpack to upgrade jquery 2021-03-04 17:05:29 +13:00
torleif
82c817c452
Fixes #300 2020-04-20 09:40:57 +12:00
Maxime Rainville
85374a1f76 Upgrade dependencies and build settings 2019-11-11 12:18:54 +13:00
Jason Irish
c0f0c99e56 BUGFIX CommentAdmin implements PermissionProvider
fixes #288
2019-07-15 12:02:50 -05:00
Heath Dunlop
82845626bc
comments extension filters on Parent Class
This allows both pages and DataObjects to have comments without the ParentID clashing and showing comments on a page where the ParentID is the Same as a DataObjects or even two DataObjects having the sameID
2019-05-16 13:46:28 +12:00
Robbie Averill
89204c0c1c FIX "Allow Comments" label now reads "Allow comments" - should not have been capitalised 2019-05-02 11:31:32 +12:00
Robbie Averill
f0998faafb
Allow translation of 'Changes applied' message on CommentHandler
Co-Authored-By: Cheddam <cheddam@me.com>
2019-03-22 15:43:19 +13:00
Garion Herman
74afde6d9b Adjust the output of CommentHandler to use HTTPBulkToolsResponse
GridFieldBulkEditingTools has introduced a common output schema
in the form of HTTPBulkToolsResponse. This commit adopts that API.
2019-03-22 15:00:19 +13:00
Guy Marriott
7d60fc2fe2
Update src/Admin/CommentsGridFieldSpamAction.php
Co-Authored-By: NightJar <NightJar@users.noreply.github.com>
2019-02-11 09:19:31 +13:00
Guy Marriott
18fbdfc94b
Update src/Admin/CommentsGridFieldApproveAction.php
Co-Authored-By: NightJar <NightJar@users.noreply.github.com>
2019-02-11 09:19:18 +13:00
Dylan Wagstaff
b6a2c608ac NEW relocate spam and approve admin actions
Previous versions had individual spam and approve buttons for a comment
in the admin area on the GridField row. However with the upgrade to
SilverStripe 4, and particularly 4.2, these were having layout issues
with the new GridField Action Menu component that groups actions
together.

The solution here is to put them into aforementioned gridfield action
menu component, with the other actions for that row. However this
requires two separate grid field components (one each for the two
comment actions) - previously these were a single component that output
two buttons instead of one each. This also reduces coupling, which is
nice :)

The previous class is still maintained for backwards compatibilty, but
is deprecated.
2019-02-08 15:19:45 +13:00
Guy Marriott
20c6a50f12
Merge pull request #273 from creative-commoners/pulls/3.1/name-that-member
FIX show name of members in summary tables
2019-01-11 14:56:20 +13:00
Guy Marriott
7691237fe5
FIX Correcting inconsistent capitalisation of label 2019-01-11 14:17:36 +13:00
Dylan Wagstaff
dc1f8622e0 FIX show name of members in summary tables
Anonymous comments (posted by the public at large) must have a name
and an email address associated with them. On the other hand, a logged
in user will have the `Member` record details used for this information,
via the Author relationship.

However the summary fields do not allow for this, and only reference
Name and Email on the Comment model directly, so any comment posted by a
logged in member has no data for name and email displayed in the various
GridFields in the CMS for administering comments (either per page, or in
the global ModelAdmin).

To recitfy this we can change the summary fields to use getter methods
that will return the Comment model info, or fall back to the Author
associated Member record if Name and Email are unset on the Comment.
2019-01-11 11:48:51 +13:00
Robbie Averill
8c08f43376 FIX RSS feed for comments now render correctly
The comment DataList filter applies ParentClass = $className - when this
is the base class, it fails to recognise comments for a BlogPost. This
change uses the late class name instead.
2018-11-27 13:19:55 +01:00
Robbie Averill
d38e7c5b67 FIX Replace Convert JSON methods with json_* methods, deprecated from SilverStripe 4.4 2018-10-28 21:31:19 +00:00
Robbie Averill
ec60328a0c Use short brackets, injection where possible and type hint injector created objects 2018-09-24 18:20:38 +02:00
Robbie Averill
c0ca79090b Use injection where possible and remove redundant code lines 2018-09-24 18:11:26 +02:00
Robbie Averill
9a57c3802c Remove redundant phpcs rules, reduce some line lengths and use injector to create checkbox fields 2018-09-24 18:09:25 +02:00
Robbie Averill
94950ee79c Tidy up phpcs violations, use short array syntax, optimise class imports 2018-09-24 17:57:31 +02:00
Simon Gow
747d4f4402 Prevent storing formdata to cookies.
- XSS an be stored in a cookie and potentially abused in other ways, so
to prevent this we need to use session instead. This requires the user
to have a session with silverstripe, but this is better than saving
potentially malicious content in cookies. (Also some cookies have
limited length).

@see https://github.com/silverstripe/silverstripe-comments/issues/263
2018-09-20 14:53:35 +12:00
Luke Edwards
75d63209aa FIX Comment admin form should fill height 2018-08-27 14:36:44 +12:00
micmania1
c0a01dbc91 BUGFIX created way of knowing whether user has permission to post 2018-07-03 11:00:40 +12:00
Robbie Averill
886c5be21a FIX Bug with requiring login when posting a comment, pass correct controller in 2018-06-20 14:20:50 +12:00
Robbie Averill
32ec3bde50
FIX Add getDate method to return created date for comments, tidy up translations
RSS feeds are looking for $Date, so this method maps to the created field in these cases
2018-06-15 16:40:44 +01:00
Dylan Wagstaff
02db1cc86e [SS-2018-015] Update jQuery version, remove entwine from frontend use
jQuery version was extremely old, and was probably stuck at that as a way
of enabling the frivilous use of entwine on the front end for somewhat
trivial ajax submisions. A mild refactor has taken place to leverage newer
jQuery features, and remove outdated dependencies.

Also accompanying this commit are alterations to the markup to make it
more semantically correct (probably not entirely though), and help with
testing the JS functionality of reply forms (when enabled).
2018-05-29 11:40:18 +12:00
Daniel Hensby
aa46291adf
Merge pull request #249 from Dennisprins93/master 2018-05-11 14:14:58 +01:00
Dennisprins93
386f8602f0
Omit http because of potential https conflicts 2018-05-11 14:11:22 +02:00
Robbie Averill
eb0415a938
Merge pull request #245 from creative-commoners/pulls/2.0/reallow-commentform-alterations
FIX reintroduce extension hook for comment form rendering
2018-04-04 16:36:51 +12:00
Raissa North
a886f68c58 FIX reintroduce extension hook for comment form rendering
In CWP 1.x there was an extension hook to allow alterations to the commenting form.
Since the upgrade of this module for CWP 2.x this was no longer there, meaning functionality
that relied upon it no longer worked. This commit reintroduces this functionality to keep
other modules that apply extensions to that hook, happy.
2018-04-04 15:45:45 +12:00
Robbie Averill
3e0cae0cc9 API Reintroduce abstract handler (previously removed in 192ddbb) and deprecate for future removal 2018-04-03 12:22:15 +12:00
Cameron Grant
abb45aa733 Setting the http error to come from the request handler, and the session coming form the Request objects. Just small bugs fix's so the comment form works with ss4. 2018-03-14 11:18:30 +13:00
Daniel Hensby
909066c0a8
Move comment handles to shared parent class 2018-02-26 11:40:49 +00:00
Robbie Averill
192ddbb4b5 API Use concrete Handler implementations for Spam and Approve bulk editing 2018-02-26 23:24:34 +13:00
Dylan Wagstaff
a25668eba0 Remove SS 2.x upgrade code that runs every build 2018-01-29 15:26:16 +13:00
Dylan Wagstaff
7b38707fde FIX: update javascript requirements so user JS doesn't error 2018-01-29 13:04:34 +13:00
Robbie Averill
b02928e02a Merge branch '2' 2017-12-19 09:14:47 +13:00
Robbie Averill
216ad8eb54 FIX Duplicated tabset, invalid Pjax request, update translations and Spam/Approve buttons 2017-12-14 16:08:43 +13:00
Shea Dawson
b1e9722320 use SilverStripe\CMS\Model\SiteTree; 2017-10-26 13:54:49 +13:00
Robbie Averill
fa61608c7d FIX Merge config in tests, add phpcs and add HTML purifier to Travis builds 2017-10-09 17:26:07 +13:00
Will Rossiter
f294ab26d6 Update tests and lang’s for 4.0 2017-09-18 14:16:24 +12:00
Will Rossiter
9366ef603e Split comment form out to its’ own class 2017-09-16 09:06:03 +12:00
Will Rossiter
d9333b3160 Test fixes 2017-09-14 11:12:07 +12:00
Will Rossiter
0c964d1ed8 Composer lint 2017-09-14 09:41:11 +12:00
Will Rossiter
85e8384151 If user cannot view record then prevent comment 2017-07-28 17:12:01 +12:00
Andrew Aitken-Fincham
e7c358f730 update thirdpartydir and session non-statics 2017-07-04 15:53:38 +01:00