Commit Graph

2192 Commits

Author SHA1 Message Date
Daniel Hensby
a71f5f99fa FIX Use SearchForm::create to instantiate SearchForm 2015-03-31 17:03:17 +01: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
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
Daniel Hensby
fe8cbc89d4 Remove double escaping of report data 2015-02-08 02:11:17 +00:00
Daniel Hensby
a530085016 FIX External redirects shouldnt show in preview pane 2015-02-08 00:30:38 +00:00
Michael Strong
7733c4335e BUG Correctly sanitise Title 2015-01-22 17:54:05 +13:00
Stephen McMahon
9d888d5dde BUG: Fixed SearchForm not calling getTemplate() in forTemplate() 2014-12-02 15:13:42 +11:00
Loz Calver
a142ffd465 FIX: VirtualPages use correct casting for 'virtual' database fields 2014-11-17 15:44:17 +00:00
Daniel Hensby
dd0332d66d Merge branch 'guywatson-patch-1' into 3.1 2014-11-03 23:06:38 +00:00
guywatson
d2f0eafa27 Add an extension hook to the getIsModifiedOnStage method 2014-11-03 23:04:28 +00:00
Sean Harvey
56142b8bba BUG sprintf missing on exception in SilverStripeNavigator 2014-11-03 14:09:27 +13:00
micmania1
8310135923 FIX Broken links on dependent pages tab 2014-10-23 21:53:12 +00: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
Damian Mooyman
13565a5e90 BUG Fix sorting on main ReportAdmin grid ref: CWPBUG-133 2014-08-14 10:08:11 +12:00
Sean Harvey
796874dae7 Merge pull request #1017 from tractorcow/pulls/3.1/fix-report-sorting
BUG Fix sorting on main ReportAdmin grid
2014-08-13 10:52:51 +12:00
madmatt
4e5b1966d3 Fix changed pages filter to match SiteTree's 'MODIFIED' label 2014-08-07 16:48:06 +12:00
Damian Mooyman
53dbbb7982 BUG Fix CMSMain::getList to correctly respect filter result
Fixes #1064
CMSSiteTreeFilter refactored to allow SS_List of filtered pages to be returned
2014-08-06 15:00:48 +12:00
Damian Mooyman
1c48cb6aae BUG Fix search range for asset filter 2014-08-06 13:26:23 +12:00
Jakx.nz
20df063f43 #1067 No updateEditForm hook on CMSFieldAddController::getEditForm() 2014-08-01 10:37:11 +12:00
Stig Lindqvist
482c23f18e NEW Adding CMS sitetree filter to see the current 'live' site
This adds a new filter that will show a content editor what the current published site-tree
looks like for a visitor. This helps when there is a lot of drafted content that get included
in the default filter 'All Pages'
2014-07-29 13:12:36 +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
Simon Welsh
6a0366fb84 Merge pull request #1060 from stojg/pull/search-for-date
BUG: Narrowing site tree search to one date shows no pages
2014-07-24 13:32:31 +10:00
Stig Lindqvist
3eefd65f7c BUG: Narrowing site tree search to one date shows no pages
It turns out that the search doesn't work if you put the same date into both start and end date. Adding
time to the query seems to fix this issue.
2014-07-24 15:24:03 +12:00
Will Rossiter
a777266e43 FIX ensure controller stack is updated when execution halted by an exception.
See: https://github.com/silverstripe/silverstripe-framework/issues/2467

popCurrent would be incorrectly not pop a controller from the controller stack if an exception was throw from inside the handleRequest() method.

This change captures the exception, ensures the controller is popped from the stack and passes the exception along.
2014-07-01 14:18:53 +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
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
7277dc1600 BUG Fix sorting on main ReportAdmin grid
ref: CWPBUG-133
2014-05-15 14:49:41 +12:00
Damian Mooyman
3162d0e664 API Update ErrorPage to respect new HTTP Error codes 2014-05-06 15:29:33 +12:00
Damian Mooyman
f9cb8805e1 API Error page support for Security controller errors 2014-05-05 17:13:11 +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
341eeb7c31 Merge pull request #998 from kinglozzer/pulls/sitetree-file-linktracking
FIX: Broken file link tracking (fixes #996)
2014-04-29 09:36:36 +12:00
Damian Mooyman
89fbae2c2e BUG Fix encoding of SiteTree.MetaTags 2014-04-29 08:54:17 +12:00
Ingo Schommer
9bff36c078 Merge pull request #994 from tractorcow/pulls/3.1-asset-datefilter
API Filter by date created for files
2014-04-28 23:40:17 +12:00
Ingo Schommer
66919ed0cc Merge pull request #1003 from tractorcow/pulls/3.1-configurable-paging
API Ability to configure paging for assets / pages
2014-04-28 23:06:47 +12:00
Loz Calver
396fd9a86e FIX: Broken file link tracking (fixes #996) 2014-04-28 09:26:34 +01:00
Damian Mooyman
0285322049 API Ability to configure paging for assets / pages
ref: CWPBUG-143
2014-04-28 15:22:17 +12:00
Russell Michell
a502c9d21c NEW Fixes #966. Ability to filter pages on page status.
- New filters for statuses normally found through SiteTree::getStatusFlags().
- Refactored menu sorting. Now alphabetical, as it wasn't previously.
2014-04-28 14:50:07 +12:00
Damian Mooyman
3765030faa API Filter by date created for files
Added test cases
Do not merge before https://github.com/silverstripe-labs/silverstripe-behat-extension/pull/32

ref: CWPBUG-144
2014-04-15 09:42:53 +12:00
Damian Mooyman
baff7f12bd Merge pull request #968 from phptek/issue/965
FIX Fixes #965. Allow user date-settings to show on GridField Page admin
2014-04-10 14:21:08 +12:00
Damian Mooyman
3204ab5af3 BUG Fix orphaned pages reporting they can be viewed 2014-04-07 12:52:07 +12:00
Damian Mooyman
ab78198946 Merge pull request #979 from ss23/SS2014005-3-1
FIX Do now allow arbitary class creation in CMS
2014-03-27 12:55:40 +13:00
Stephen Shkardoon
a67ed2799d FIX Do now allow arbitary class creation in CMS 2014-03-19 19:27:39 +13:00
Stephen Shkardoon
8e50405871 FIX Prevent SQLi when no URL filters are applied 2014-03-19 19:05:13 +13:00
Russell Michell
b4a1aa4537 FIX Fixes #965. Allow user date-settings to show on GridField Page admin
- Relies on framework PR #2961.
2014-03-17 10:40:08 +13:00
Simon Welsh
403b47fe6c Merge pull request #951 from sheadawson/950-fileexists
FIX fileexists check
2014-03-16 20:29:12 +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
Simon Welsh
5024a48f89 FIX: Reports with Parameter fields override ReportTitle and ReportDescription
Fixes #696
2014-03-16 19:09:47 +13:00
sheadawson
dc865399dc FIX fileexists check via ajax didnt know what folder the file was being uploaded to. Fixes #950 2014-02-20 15:17:04 +11:00
Hamish Friedlander
224033e518 FIX Limit ExtraMeta to only allow meta and link elements 2014-02-17 12:08:09 +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
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
Martijn
dec2be38fa use Controller::join_links() for listview links
This fixes incorrect adding of the locale parameter when using translatable :

http://site.com/admin/pages/edit/show?locale=nl_NL/11
2013-12-06 15:45:15 +01:00
Ingo Schommer
ec41cb38ce ValidationException support in CMS "Settings" UI 2013-12-02 16:38:46 +01:00
Ingo Schommer
6804461539 Merge pull request #898 from dnadesign/errorpagepermissions
FIX: ErrorPage generating empty responses for 403/401 requests
2013-11-22 11:49:37 -08:00
Loz Calver
8f720406b5 Implement History.js logic for "Cancel" action 2013-11-22 12:46:03 +01:00
Loz Calver
95d9257b1b ENHANCEMENT: Add 'Cancel' button to 'Add Page' form 2013-11-20 20:15:08 +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
Damian Mooyman
f9c3f4d1cc Merge pull request #889 from chillu/pulls/2638-uploadfield
Disable UploadField change detection in assets/admin/add
2013-11-06 17:16:17 -08:00
Stephen Shkardoon
f972466880 Refactor old page redirector into an extension 2013-11-06 23:00:50 +13:00
Ingo Schommer
2d0ee2ca91 Disable UploadField change detection in assets/admin/add
See https://github.com/silverstripe/silverstripe-framework/issues/2638
2013-11-06 10:08:15 +01:00
Trevor
e3724e9207 Fix comment typo 2013-10-28 13:48:31 +11:00
Loz Calver
b6589ba9a9 NEW: Page types no longer require a controller, they can inherit the parent page type's
Use ClassInfo::ancestry() instead of get_parent_class()

Fall back to ContentController by default
2013-10-23 16:44:59 +01:00
Ingo Schommer
3d9fc2cc4c Default CMSMain to Versioned::reading_stage("Stage")
Regression caused by https://github.com/silverstripe/silverstripe-framework/pull/2585
2013-10-23 14:29:24 +02:00
Ingo Schommer
c645d76b1f Merge pull request #879 from sheadawson/833-currentPageID
Add hook for extensions to update current page id, before falling ...
2013-10-21 00:24:06 -07:00
sheadawson
1b5465809d MINOR add hook for extensions to update current page id, before falling back to default 2013-10-21 17:42:45 +11:00
Ingo Schommer
aae6b2b296 Avoid encoded HTML breadcrumbs 2013-10-11 00:27:21 +02:00
Andrew Short
68d254c3c4 Add an extension hook for customising site tree hints. 2013-10-11 01:31:07 +11:00
Andrew Short
b7476f2a46 BUG: Fix add new button not passing the correct parent ID.
The `%s` parent ID placeholder was being URL encoded, so it was not being
replaced properly when adding a new page. This fix separately adds
placeholder parameters to the URL to avoid this issue.

The fix is not ideal, but there is no easy way to indicate that some
URL parameters should be URL encoded and others should not while still
correctly constructing the URL.
2013-10-10 13:09:24 +11:00
Loz Calver
66bfff4d15 FIX Don't validate pages when restoring or reverting (fixes #2449)
Use new method
2013-10-03 16:54:38 +01:00
Ingo Schommer
2a4191d449 Merge remote-tracking branch 'origin/3.0' into 3.1 2013-10-02 12:21:50 +02:00
Ingo Schommer
92e0c410b8 Fixed report link escaping 2013-10-02 12:19:23 +02:00
Ingo Schommer
956b6de05c Merge remote-tracking branch 'origin/3.0' into 3.1 2013-10-01 11:19:14 +02:00
Ingo Schommer
daf92e6ce0 FIX ReportAdmin report links regression
Regression from 79996a76fe,
escaped quotes are no longer necessary because the string
doesn't get eval'ed.
2013-10-01 11:17:36 +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
9a4a5d909d Merge pull request #816 from kinglozzer/798-custom-page-icons
Move CMSMain->generatePageIconsCss() into a LeftAndMain extension (fixes #798)
2013-09-25 12:54:01 -07:00
Ingo Schommer
86339a551d Clearer escaping in CMSMain
No direct security issue, but makes intent clearer
2013-09-24 21:37:26 +02:00
Ingo Schommer
e170f4c21b FIX Escaping in "dependent pages" (SS-2013-009) 2013-09-24 21:37:26 +02:00
Ingo Schommer
79996a76fe Clearer escaping in ReportAdmin
No direct security issue since report titles can't be set by the user
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
Ingo Schommer
201f4881e6 Merge remote-tracking branch 'origin/3.0' into 3.1 2013-09-12 17:16:29 +02:00
Ingo Schommer
4e031076be Search callback for "add page" selector
Necessary since we now default $showSearch=true in TreeDropdownField.
See https://github.com/silverstripe/silverstripe-framework/pull/2364
2013-08-29 17:08:42 +02:00
Tom Densham
4f30fedafd FIX: GridField button styling in reports 2013-08-29 13:56:29 +01: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
6d694a550a Merge pull request #837 from ARNHOE/3.1-siteconfigfix
SiteConfig updated to modeladmin style and fixed ajax switching
2013-08-28 02:20:47 -07:00
Sean Harvey
27749fdb7a AssetAdmin: PHP warning trying to add empty values into CompositeField
If the logged in user doesn't have permission to add a Folder record,
AssetAdmin::getEditForm() tries to enter an empty value into the
children of a ComposteField. This breaks SSViewer with a
call_user_func invalid args PHP warning.

Only include these buttons when they're available to the user.
2013-08-27 14:30:39 +12:00
Arno Poot
920da0d120 SiteConfig updated to modeladmin style and fixed ajax switching 2013-08-24 12:33:38 +02:00
Ingo Schommer
3dc86f98a3 Fixed merge error 2013-08-20 22:25:24 +02: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
Ingo Schommer
44fdf66834 Merge pull request #809 from ARNHOE/3.1-siteconfig
Updated siteconfig layout to be more like modeladmin
2013-08-15 13:45:50 -07: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
Sam Minnée
d7d0cb45ae Merge pull request #824 from hafriedlander/fix/archivedate
FIX ArchiveDate enforcement
2013-08-08 17:38:53 -07:00
Simon Welsh
b1664f86a4 FIX Check for stage and drafts in SiteTree::canView() 2013-08-09 10:45:09 +12:00
Hamish Friedlander
2fae9280e5 FIX ArchiveDate enforcement 2013-08-08 17:17:35 +12:00
Ingo Schommer
99ba7bdb4e Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	lang/en.yml
	templates/CMSPageHistoryController_versions.ss
2013-08-07 17:15:17 +02:00
Ingo Schommer
07cccc8e95 Translations: Switch to Transifex format
- Based on new (last) translation download from getlocalization.com
- Removed untranslated strings. Getlocalization started including those at some point
which is highly annoying, unnecessary and breaks the new transfix system,
since it'll mark all of the english strings as actual translations
- Avoid dots in entities. It confuses the Transifex YML parser
- Removed some locales unknown to Transifex which didn't have any translations anyway
- Removed "lolcat" locale, uses custom notation (en@lolcal)
  which SilverStripe's i18n system can't handle
  (needs mapping from SS naming to Zend naming)
- Renamed "Te Reo/Maori" locale from "mi_NZ" to "mi" (Transifex/CLDR notation)
- Namespaced all entities used in templates (deprecated usage)
- Converted dots to underscores where template filenames are used for namespaces,
since Transifex YML parsing handles them as separate YML keys otherwise
- Removed whitespace in entity names, SilverStripe i18n can't handle it
- Only allow selection of locales registered through i18n::$all_locales to avoid
  issues with unknown locales in Zend's CLDR database
2013-08-04 12:31:29 +02:00
Ingo Schommer
3f118ef08f Translations: Switch to Transifex format
- Based on new (last) translation download from getlocalization.com
- Removed untranslated strings. Getlocalization started including those at some point
which is highly annoying, unnecessary and breaks the new transfix system,
since it'll mark all of the english strings as actual translations
- Avoid dots in entities. It confuses the Transifex YML parser
- Removed some locales unknown to Transifex which didn't have any translations anyway
- Removed "lolcat" locale, uses custom notation (en@lolcal)
  which SilverStripe's i18n system can't handle
  (needs mapping from SS naming to Zend naming)
- Renamed "Te Reo/Maori" locale from "mi_NZ" to "mi" (Transifex/CLDR notation)
- Namespaced all entities used in templates (deprecated usage)
- Converted dots to underscores where template filenames are used for namespaces,
since Transifex YML parsing handles them as separate YML keys otherwise
- Removed whitespace in entity names, SilverStripe i18n can't handle it
2013-08-04 12:28:07 +02:00
Loz Calver
09b869f5d3 Move CMSMain->generatePageIconsCss() into a LeftAndMain extension (fixes #798) 2013-07-31 09:30:58 +01:00
Arno Poot
afd9f28279 Updated siteconfig layout to be more like modeladmin 2013-07-26 17:45:28 +02:00