Commit Graph

455 Commits

Author SHA1 Message Date
Robbie Averill
67faa822f7 Update dependencies 2019-05-08 11:26:56 +12:00
Guy Marriott
aec3e2ba5b
FIX "Allow Comments" label now reads "Allow comments" - should not have been capitalised (#283)
FIX "Allow Comments" label now reads "Allow comments" - should not have been capitalised
2019-05-02 13:12:10 +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
4d19e6c43e Merge branch '3.1' into 3.2 2019-04-15 15:33:53 +12:00
Robbie Averill
303bdef1c8 Remove obsolete branch alias and add PHP 7.3 to Travis builds 2019-04-15 15:33:44 +12:00
Guy Marriott
1358594070
Merge pull request #275 from creative-commoners/pulls/3.1/update-jquery-validator
Update jQuery.validation to 1.19.0
2019-04-05 09:17:06 +13:00
Dylan Wagstaff
6fcc040485 Update jQuery.validation to 1.19.0
jQuery 3.3.1 is still the latest release
2019-03-25 09:56:58 +13:00
Dylan Wagstaff
8b178b63ac
Merge pull request #280 from creative-commoners/pulls/master/improve-compat-with-bulk-editing-tools
Adjust the output of CommentHandler to use HTTPBulkToolsResponse
2019-03-24 13:34:21 +13:00
Garion Herman
1e4378d212 Tighten version constraint for Bulk Editing Tools dependency 2019-03-22 15:53:12 +13: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
Garion Herman
9ff1db403e
Merge pull request #277 from creative-commoners/pulls/4.0/infix-spam-flicks
NEW relocate spam and approve admin actions
2019-03-22 11:10:29 +13:00
Robbie Averill
ce1e934d57
Merge pull request #278 from SpeksForks/doc-link
Fix documentation link
2019-02-19 05:09:33 +07:00
Peter Thaleikis
005f58f1ee
Fix documentation link 2019-02-19 02:32:09 +07:00
Robbie Averill
647c634dc4
Update .travis.yml
Co-Authored-By: NightJar <NightJar@users.noreply.github.com>
2019-02-11 09:22:02 +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
Robbie Averill
c4cfc44643 Update Scrutinizer configuration to use new build engine 2019-02-10 07:01:57 +03: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
Robbie Averill
d504d4a847 Merge branch '3.1' 2019-01-11 09:13:31 +01:00
Guy Marriott
f5c7024aaf
Merge pull request #276 from creative-commoners/pulls/3.1/deprotocol-my-site
Validate protocol-less URLs
2019-01-11 15:18:27 +13:00
Dylan Wagstaff
3812057b00 Add ability for commenters to enter a URL without a protocol
When posting a comment on the a page with this module applied, there is
an optional input for the commenter to give their URL,presumably their
website. However this input currently validates (via JavaScript) to
allow URLs only iff they have a protocol.

Common use cases when someone is asked for their website in my
experience is to then receive a URL without a protocol, confounded in
that most web browsers will accept this form and automatically add the
http protocol, where a webserver may then redirect to https by default.
This means that all the magic happens behind the scenes and most folks
don't particularly care to think about protocols when entering web
addresses.

Yest this input will only validate true and allow comment submission if
they do.

So now it will allow a protocol-less entry into the URL box.
2019-01-11 15:01:34 +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
Dylan Wagstaff
0535d29f8d
Merge pull request #274 from creative-commoners/pulls/3.1/i-de-test-those-labels
FIX Correcting inconsistent capitalisation of label and cleaning up tests
2019-01-11 14:49:02 +13:00
Guy Marriott
7691237fe5
FIX Correcting inconsistent capitalisation of label 2019-01-11 14:17:36 +13:00
Guy Marriott
a57c83c121
Removing superflous i18n test and updating label test to only test labels specifically added 2019-01-11 12:22:31 +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
Dylan Wagstaff
4ee9720081
Merge pull request #269 from creative-commoners/pulls/3.1/moderation-labels
FIX Capitalise comment moderation action labels and update i18n syntax in templates
2018-11-28 14:36:30 +13:00
Dylan Wagstaff
d7761290f8
Merge pull request #268 from creative-commoners/pulls/3.1/fix-rss-comments-on-page
FIX RSS feed for comments now render correctly
2018-11-28 14:35:48 +13:00
Robbie Averill
e101b74778 FIX Capitalise comment moderation action labels and update i18n syntax in templates 2018-11-27 13:27:19 +01: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
Dylan Wagstaff
f74d91041b
Merge pull request #267 from creative-commoners/pulls/3.1/remove-json-methods
FIX Replace Convert JSON methods with json_* methods, deprecated from SilverStripe 4.4
2018-10-29 11:05:43 +13: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
97461f8f35 Merge branch '3.1' 2018-10-05 11:51:41 +02:00
Guy Marriott
def91bb6d1
Merge pull request #265 from creative-commoners/pulls/3.1/minor-tidyups
Minor tidy ups to code formatting
2018-09-25 11:07:07 +12: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
9f9dc67950
Merge pull request #264 from caffeineinc/bugfix-3.1/xss-session-cookies
Prevent storing formdata to cookies.
2018-09-24 18:07:07 +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
Robbie Averill
cf86b2bb21
Merge pull request #262 from lukereative/pulls/3.1/fix-admin-height
FIX Comment admin form should fill height
2018-08-27 14:59:30 +12:00
Luke Edwards
75d63209aa FIX Comment admin form should fill height 2018-08-27 14:36:44 +12:00
Robbie Averill
04a5257e40 Merge branch '3.1' 2018-07-26 14:56:38 +12:00
Robbie Averill
19619b083e
Merge pull request #261 from micmania1/bugfix/canpostcomment-not-passed-to-include
BUGFIX canPostComment was being called out of scope
2018-07-03 11:43:34 +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
6d7b14367a
Merge pull request #259 from quantum-dragons/bugfix/reply-form-js-fix
Added JS fix for reply forms
2018-06-25 14:08:08 +12:00
pjayme
77f47af5cb Added JS fix for reply forms - fixes issue where the submit button breaks due to incorrect use of the jQuery validate function 2018-06-25 13:25:08 +12:00
Dylan Wagstaff
a1a42009cc
Merge pull request #258 from creative-commoners/pulls/3.1/travis-recipes
Add various recipe versions to Travis build matrix
2018-06-22 20:10:14 +12:00
Robbie Averill
c7235e1c5d FIX Comments GridField tests now use their own test stubs 2018-06-20 16:53:14 +12:00