Commit Graph

329 Commits

Author SHA1 Message Date
Damian Mooyman
dd49a888e8 Merge remote-tracking branch 'origin/3' 2015-06-17 15:54:01 +12:00
scott1702
60c68098eb Update default home content 2015-06-17 13:04:29 +12:00
Damian Mooyman
f3e1472493 API Revert DataObject::validate to 3.1 method signature (protected) 2015-06-16 11:44:19 +12:00
Daniel Hensby
715cd9ab4e Merge branch 'pulls/localized-urlsegment-creation' of https://github.com/chillu/silverstripe-cms into chillu-pulls/localized-urlsegment-creation
Conflicts:
	tests/model/SiteTreeTest.php
2015-06-13 15:23:22 +01:00
Stan Hutcheon
e2d85b2f88 VirtualPage call init on target controller 2015-06-13 12:38:59 +12:00
Damian Mooyman
3bc76e69fb API Formalise new DataObject::canCreate argument 2015-06-09 11:32:38 +12:00
Stevie Mayhew
a819bcfc97 FIX: explicitly call get functions for site tree checks 2015-06-05 11:09:23 +12:00
Damian Mooyman
b169823a00 API Deprecate delete in favour of archive
Remove "delete from live" duplicate action in favour of existing "unpublish" which is more consistent with current terminology
Add pop-up verification to destructive actions
Fix bug preventing side-by-side preview of archived pages
Fix bug in reporting publishing of error pages
Restoring a page without an available parent will restore to root
2015-06-03 14:46:16 +12:00
Damian Mooyman
1f9fc33349 Merge remote-tracking branch 'origin/3.1' into 3
Conflicts:
	code/model/SiteTree.php
	code/model/SiteTreeLinkTracking.php
	tests/controller/CMSMainTest.php
2015-06-02 19:23:48 +12:00
Ingo Schommer
36ac61115a Fix auto-setting of URL from localized page titles
Replace the hardcoded check for english locale ("new-page")
with a localized version.

See https://github.com/silverstripe/silverstripe-translatable/issues/180
2015-04-29 00:16:53 +12:00
Ingo Schommer
94d354de4a Fixed BacklinkTracking filter usage
Previous deprecation fixes made this method error out
when called on the root node (ID=0), so when admin/assets is first called.
2015-04-28 23:34:26 +12:00
Ingo Schommer
812a921072 Merge branch 'pulls/dataobject-relation-updates' of https://github.com/dhensby/silverstripe-cms into dhensby-pulls/dataobject-relation-updates 2015-04-28 23:17:25 +12:00
David Craig
7bdca7f5cc Added a list of pages where a file is used 2015-04-28 13:15:44 +12:00
Stephen Shkardoon
857ade7d1d Refactor ErrorPage to have static file building in a separate method 2015-04-27 11:56:54 +12:00
Nik Rolls
5163690bdc PHPDoc improvements for SiteTree and SiteTreeLinkTracking
- Removed @param/@method references to fields from extensions
- Added @mixin references to extensions
- Fixed incorrect PHPDoc @params and @returns
- Fixed wrapping width on many docblocks
- Added and/or improved method documentation when missing or confusing
- Fixed typos as found
2015-04-20 20:59:52 +12:00
Damian Mooyman
cf4d9edafb Merge remote-tracking branch 'origin/3.1' into 3
Conflicts:
	code/model/SiteConfig.php
	javascript/CMSMain.AddForm.js
	tests/model/SiteConfigTest.php
	tests/model/SiteTreeTest.php
2015-03-31 19:54:43 +13:00
Damian Mooyman
a84361e4e8 Ensure SiteConfig::canView 2015-03-19 16:16:54 +13:00
Damian Mooyman
3df41e1176 BUG Fix SiteTree / SiteConfig permissions 2015-03-19 15:29:38 +13:00
Loz Calver
e0afd2f772 Update use of DataObject methods (as per framework #3799) 2015-03-13 22:11:51 +00:00
Damian Mooyman
9d7a640205 Merge remote-tracking branch 'origin/3.1' into 3 2015-03-11 11:43:56 +13:00
Damian Mooyman
cabd8bbab9 Merge pull request #1132 from kinglozzer/pulls/virtualpage-casting
FIX: VirtualPages use correct casting for 'virtual' database fields
2015-03-06 11:29:18 +13:00
Damian Mooyman
21e2bc7258 Merge remote-tracking branch 'origin/3.1' into 3
Conflicts:
	code/reports/Report.php
2015-02-20 10:16:37 +13:00
Michael Strong
7733c4335e BUG Correctly sanitise Title 2015-01-22 17:54:05 +13:00
Damian Mooyman
d01883a5f8 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	code/model/SiteConfig.php
2014-11-18 12:45:42 +13:00
Loz Calver
a142ffd465 FIX: VirtualPages use correct casting for 'virtual' database fields 2014-11-17 15:44:17 +00:00
guywatson
d2f0eafa27 Add an extension hook to the getIsModifiedOnStage method 2014-11-03 23:04:28 +00:00
micmania1
8310135923 FIX Broken links on dependent pages tab 2014-10-23 21:53:12 +00:00
Nerijus Eimanavičius
7f3563cd72 Fixes #1112
Fixes  #1112 $conn->fieldList('SiteTree') has protected access but is called from SiteTree
2014-10-07 10:11:49 +03:00
Daniel Hensby
89184a8134 Implement TemplateGlobalProvider on SiteConfig
Seeing as the `SiteConfig` is a site wide and "global" object, it makes sense to have it universally available to the templates
2014-08-22 14:28:19 +01:00
Sean Harvey
195ef05c8d Removing deprecated method 2014-08-22 18:16:03 +12:00
Mateusz Uzdowski
2ba1c46bc8 API Change broken link hihglighting to write to database.
Before it would be applied on the fly during the rendering of the
HtmlEditorField, and only be written to the database during the
subsequent write.

We just shift the behaviour to apply just-in-time.
2014-08-15 12:29:26 +12:00
Mateusz Uzdowski
b41e081130 Refactor the link-tracking code and move it from framework.
This code has a dependency on SiteTree, so it fits much better in the
cms module.

Abstracted away the content parser so the same code can be reused both
in the render phase (to highlight the links) and in the write phase
(storing information about broken links and references).
2014-08-14 11:16:49 +12:00
Mateusz Uzdowski
52d297e6ef Merge remote-tracking branch 'origin/3.1' into merge-back
Conflicts:
	code/controllers/CMSSiteTreeFilter.php
	code/controllers/ReportAdmin.php
	code/reports/Report.php
2014-08-13 17:19:01 +12:00
Will Rossiter
18d6c538a7 API: Extract siteconfig out to an external module. 2014-08-09 17:29:50 +12:00
Stig Lindqvist
45046f08e8 Bug: CMS tree filters doesn't count the correct number of children for deleted pages
This is a bug that combines Hierarchy, Versioned and LeftAndMain admins and CMSSiteTreeFilters.

This bug can be reproduced by having a large site tree with enough deleted pages in it so it doesn't
pre load all the children pages when initially opening an admin. Filter by either 'All pages including deleted'
or 'Deleted pages'. For CMS users it will look like deleted pages are gone.

The solution involves a couple of smaller fixes in both CMS and framework modules.

1) Ensure that 'numHistoricalChildren' are used instead of 'numChildren' when dealing with deleted pages
2) LeftAndMain::currentPage() deletes all the 'marking' cache previously built up by Hierarchy::markPartialTree()
3) Use Versioned::get_included_deleted() instead of raw DB queries against the DataObject tables when calculating parents in CMSSiteTreeFilter
2014-07-25 16:18:54 +12:00
Damian Mooyman
a395c5322f API Move of codebase to parameterised query database abstraction layer
API Renamed DB static methods to properly conform to naming convention (lowercase, underscored)
API Replaced deprecated method
2014-07-07 15:07:37 +12:00
Rodney Way
1e194854e0 BUG: Ensure that all child pages are deleted (regardless of ShowInMenu status) under enforce_strict_hierarchy.
Also updated SiteTree YML test data to match.
2014-06-24 13:29:16 +10:00
Damian Mooyman
519b0dfaa0 Merge remote-tracking branch 'origin/3.1' 2014-06-17 18:18:21 +12:00
Damian Mooyman
b8d19ba495 BUG Fix deleted pages redirecting the CMS
Update behat tests for Mink 1.6 compatibility
2014-06-17 10:36:08 +12:00
Damian Mooyman
1a85c7a1ec Merge pull request #1022 from silverstripe-iterators/pulls/redirector-proto-relative
Pulls/redirector proto relative
2014-06-13 16:01:20 +12:00
Damian Mooyman
cba0061fe2 Merge pull request #974 from micmania1/930-added-breadcrumbs-getter
API Added getBreadcrumbItems to SiteTree
2014-06-03 08:43:53 +12:00
Ingo Schommer
40f7a876d4 Support for protocol relative RedirectorPage.ExternalURL 2014-05-30 00:01:45 +12:00
Damian Mooyman
6a69134fb0 Merge remote-tracking branch 'origin/3.1' 2014-05-12 11:33:44 +12:00
micmania1
f46b6bde51 Added getBreadcrumbItems to SiteTree 2014-05-08 03:21:40 +01:00
Damian Mooyman
3162d0e664 API Update ErrorPage to respect new HTTP Error codes 2014-05-06 15:29:33 +12:00
Damian Mooyman
b3699281c0 Merge remote-tracking branch 'origin/3.1'
Conflicts:
.travis.yml
2014-05-06 10:24:28 +12:00
Mateusz U
fcb6a9140c Merge pull request #1004 from tractorcow/pulls/sitetree-title
BUG Fix encoding of SiteTree.MetaTags
2014-04-29 14:37:29 +12:00
Damian Mooyman
89fbae2c2e BUG Fix encoding of SiteTree.MetaTags 2014-04-29 08:54:17 +12:00
Loz Calver
396fd9a86e FIX: Broken file link tracking (fixes #996) 2014-04-28 09:26:34 +01:00
Damian Mooyman
61ebe08437 Merge remote-tracking branch 'origin/3.1' 2014-04-22 12:10:49 +12:00
Damian Mooyman
3204ab5af3 BUG Fix orphaned pages reporting they can be viewed 2014-04-07 12:52:07 +12:00
Damian Mooyman
ecda66a1c4 Merge remote-tracking branch 'origin/3.1' 2014-04-02 17:39:47 +13:00
Stephen Shkardoon
8e50405871 FIX Prevent SQLi when no URL filters are applied 2014-03-19 19:05:13 +13:00
Simon Welsh
b497b8f548 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	.travis.yml
	code/reports/Report.php
2014-03-18 09:23:39 +13:00
Simon Welsh
2503d1dca2 Merge pull request #911 from chillu/pulls/908-all-sections-canedit
Page edit access with CMS_ACCESS_LeftAndMain (fixes #908)
2014-03-16 20:12:15 +13:00
Ingo Schommer
889e97e17d Merge remote-tracking branch 'origin/3.1' 2014-02-18 22:06:56 +13:00
Hamish Friedlander
224033e518 FIX Limit ExtraMeta to only allow meta and link elements 2014-02-17 12:08:09 +13:00
Sean Harvey
0bb5b4c8a4 Merge branch '3.1' 2014-02-12 11:13:29 +13:00
Gus King
7b4cc316ef Numerous PHPDoc fixes. 2014-02-10 15:35:13 -05:00
Gus King
457cadb103 Documented magic properties/methods of SiteTree and SiteConfig. 2014-02-09 19:13:04 -05:00
Russell Michell
7d7c75414c NEW Track broken anchors 2014-01-31 12:44:59 +13:00
Ingo Schommer
1f17f4320d Page edit access with CMS_ACCESS_LeftAndMain (fixes #908)
"Access to all sections" implies edit access in the CMS
2013-12-13 10:05:06 +01:00
Will Rossiter
ddc2e3822b FIX: ErrorPage generating empty responses for 403/401 requests
Previously by setting the response status code inside the action, this prevented response bodies from being included due to 403/401 being matched by SS_HTTPResponse::isFinished() (which stops popular

I assume SS_HTTPResponse::isFinished() is valid for the permission error use case (and I would be hesitant to change it) so this simply moves the declaration of the response status code till after the parent has populated the body of the response.
2013-11-18 16:32:15 +13:00
Ingo Schommer
aae6b2b296 Avoid encoded HTML breadcrumbs 2013-10-11 00:27:21 +02:00
Ingo Schommer
8a96bab70d Merge remote-tracking branch 'origin/3.0' into 3.1 2013-09-27 18:50:52 +02:00
Ingo Schommer
e170f4c21b FIX Escaping in "dependent pages" (SS-2013-009) 2013-09-24 21:37:26 +02:00
Ingo Schommer
29e502a63a Hints for SiteTree.TreeTitle casting
Relates to SS-2013-009
2013-09-24 21:37:26 +02:00
Damian Mooyman
5f828149c3 BUG Fixed instances of loosely defined SQL predicates not qualified by table name
Fixed duplicate SQL escaping on SiteTree::get_by_link
2013-08-29 13:59:45 +12:00
Ingo Schommer
ba57d42349 Merge remote-tracking branch 'origin/3.0' into 3.1.0
Conflicts:
	code/controllers/ContentController.php
	code/model/SiteTree.php
	tests/search/SearchFormTest.php
2013-08-20 20:59:44 +02:00
Hamish Friedlander
71608f0d4a FIX Add SiteTree link tracking as an extension, and apply to SiteTree itself 2013-08-09 11:46:32 +02:00
Simon Welsh
b1664f86a4 FIX Check for stage and drafts in SiteTree::canView() 2013-08-09 10:45:09 +12:00
Hamish Friedlander
a5f00ae2c3 FIX Not checking stage in SiteTree#canView
SiteTree versions that arent the live version shouldnt be accessed by
regular users, but the logic to check that was split off into canViewStage,
which wasnt checked by code that isnt specifically SiteTree aware
(like RestfulServer)
2013-07-05 12:14:22 +12:00
Ingo Schommer
98750a9cf1 Merge pull request #772 from chillu/pulls/sitetree-urlsegment-votes
API SiteTree->validURLSegment() prioritizes extension votes
2013-06-25 02:18:08 -07:00
Jeremy Thomerson
b8908efdf7 ENHANCEMENT: allow sites to override meta generator tag 2013-06-17 20:35:14 +00:00
Ingo Schommer
0c4b2f8157 API SiteTree->validURLSegment() prioritizes extension votes
Tri-state, use NULL to ignore the extension result
2013-06-12 12:32:42 +02:00
g4b0
238f2908e5 BUG: fixed "regression" inserted with 9281ebc647 adding a new class to SiteTree elem (edit-disabled) 2013-06-03 13:46:10 +02:00
Sean Harvey
20f044cef0 BUG Fixing regression from silverstripe/sapphire/67d1327
Status flag classes didn't pick up styling because the flag was
changed to prefix "status-".
2013-05-26 12:31:15 +12:00
Russell Michell
9281ebc647 BUGFIX: Content authors with SiteTree#canView() but not SiteTree#canEdit() were unable to click on SiteTree items in the CMS.
- The 'disabled' attribute in <li> will now only render if the author _really_ can't do _anything_
2013-05-23 14:48:24 +12:00
Ingo Schommer
b2e9353755 Merge pull request #701 from tractorcow/3.1-api-updaterelativelink
API Added SiteTreeExtension::updateRelativeLink
2013-05-17 05:05:03 -07:00
Mateusz Uzdowski
bccd2f8e51 API Add a missing alternatePreviewLink hook for SiteTree extensions. 2013-05-17 15:00:08 +12:00
Sean Harvey
a681b8e4ab BUG Don't redirect to ErrorPage in CMS with x-cms-edit-link 2013-05-14 00:06:09 +12:00
Simon Welsh
be25c302ac FIX Escape the sitetree_link shortcode return value 2013-05-10 14:05:06 +12:00
Damian Mooyman
61312a5d7f API Added SiteTreeExtension::updateRelativeLink
Updated SiteTreeExtension PHPDoc
Refactored out Translatable extension in RelativeLink
2013-05-10 12:22:22 +12:00
Sean Harvey
b4f2e35b32 Updating text for permission description to be accurate for 3.x 2013-04-30 17:58:47 +12:00
Ingo Schommer
878cf541b9 Better UI feedback on VirtualPage states (fixes #1594) 2013-04-16 11:56:33 +02:00
Ingo Schommer
da515b8f65 FIX Use SSViewer.theme_enabled in CMS logic 2013-04-08 19:29:09 +12:00
Ingo Schommer
18201c05af Fixed Config usage in ErrorPage 2013-03-27 12:00:55 +01:00
Ingo Schommer
51c8e8639e API Marked statics private, use Config API instead (#8317)
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:21:04 +01:00
Daniel Hensby
e131a041d4 BUG Metadata heading removed from RediretorPage
Currently the empty metadata accordion stays on the RedirectorPage. This is now removed.
2013-02-20 13:32:55 +00:00
Ingo Schommer
a0e965b7b4 Revert "FIX: updateCMSFields not accepting var by reference"
This reverts commit e56a78b160.
2013-02-06 18:59:51 +01:00
Ingo Schommer
23eeb99075 FIX Clear Requirements before in-memory HTTP request for ErrorPage
For example, avoids issues where separate controllers (calling and called) operate on the same
set of files through Requirements::combine_files().
2013-02-06 10:43:42 +01:00
Ingo Schommer
b19a82b693 SiteTree on*() callbacks now consistently invoke on subclasses as well
Before this was only possible for some specific ones, like onBeforeWrite.
This excludes any callbacks with augment*() or update*() naming,
since these are assumed to be on extension only, with a corresponding
base method available on the class itself (e.g. "updateCMSFields()"
vs "getCMSFields()").
2013-02-06 10:43:31 +01:00
Michael Andrewartha
e56a78b160 FIX: updateCMSFields not accepting var by reference
updateCMSFields should be taking the fields var by reference.
@see https://github.com/silverstripe/sapphire/pull/1156
2013-02-04 12:55:29 +00:00
Ingo Schommer
00097a5d5d NEW Clickable URL preview in CMS
- Refactored SiteTreeURLSegmentField to render controls in template
rather than JS for better clientside performance, and cleaner behaviour.
- Added dynamic ellipsis to start of URL, to retain most relevant
part of the URL (the last bits)
- Added "suffix" setting to field, which defaults to ?stage=Stage
- Removed prefix from edit view to leave more room for URL

Thanks to @sunnysideup for getting this started in
https://github.com/silverstripe/silverstripe-cms/pull/269
2013-02-04 12:12:28 +01:00
Ingo Schommer
931b726589 Merge remote-tracking branch 'origin/3.0' into 3.1 2013-01-30 13:09:14 +01:00
Ingo Schommer
b25063b09c Extracted ErrorPage default data to getter
Allows for less verbose overloading, while still keeping i18n capabilities
in place, which isn't possible with DataObject::$default_records
2013-01-30 13:07:11 +01:00
Ingo Schommer
416178b668 Reduced code duplication in ErrorPage (no functional changes) 2013-01-29 19:34:05 +01:00
Kirk Mayo
81cd0e6e04 BUG: Replaced extendedSQL with DataList as per ticket 8183 2013-01-24 08:45:30 +13:00
Ingo Schommer
61f2ab7519 Merge remote-tracking branch 'origin/3.0' into 3.1 2013-01-21 10:03:30 +01:00
unclecheese
cfc976bff8 MINOR: Grammar error 2013-01-17 14:31:35 -05:00