Commit Graph

154 Commits

Author SHA1 Message Date
Damian Mooyman
e22b653e06 API batch restore action 2015-08-03 20:57:30 +12:00
Daniel Hensby
f55b22bd75 Merge branch '3.1' into 3.2
Conflicts:
	CONTRIBUTING.md
	code/reports/BrokenLinksReport.php
	code/reports/SideReport.php
	tests/model/RedirectorPageTest.php
	tests/reports/ReportTest.php
2015-07-20 11:09:29 +01:00
Loz Calver
d78d325073 FIX: RedirectorPage_Controller shouldn't attempt redirection if the response is finished (fixes #1230) 2015-06-26 10:47:39 +01:00
Damian Mooyman
d5c7bf66a2 Fix test regressions 2015-06-19 10:47: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
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
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
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
3df41e1176 BUG Fix SiteTree / SiteConfig permissions 2015-03-19 15:29:38 +13:00
Damian Mooyman
9d7a640205 Merge remote-tracking branch 'origin/3.1' into 3 2015-03-11 11:43:56 +13:00
Loz Calver
a142ffd465 FIX: VirtualPages use correct casting for 'virtual' database fields 2014-11-17 15:44:17 +00: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
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
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
b3699281c0 Merge remote-tracking branch 'origin/3.1'
Conflicts:
.travis.yml
2014-05-06 10:24:28 +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
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
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
172a1816f9 Merge remote-tracking branch 'origin/3.1' 2014-02-04 07:56:10 +13:00
Russell Michell
7d7c75414c NEW Track broken anchors 2014-01-31 12:44:59 +13:00
Mateusz U
b52002724e Merge pull request #926 from halkyon/virtualpage_extensions_fix
Fixing test failures introduced by Translatable and SiteTreeSubsites
2014-01-16 14:16:25 -08:00
Sean Harvey
93dca704fb Fixing test failures introduced by Translatable and SiteTreeSubsites
Same fix as e93abc6, except it applies to VirtualPageTest.
2014-01-17 10:36:00 +13:00
Sean Harvey
e93abc6eb2 Fixing test failures because of Translatable and SiteTreeSubsites 2014-01-16 11:36:25 +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
Ingo Schommer
87734cdfe1 Fixed ErrorPageTest Link() usage 2013-12-06 15:35:53 +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
Andrew Short
1f4cdfced8 Fix test sometimes using cached relationship object.
In some circumstances, the CopyContentFrom page will be cached, so when
it is accessed the incorrect value was returned, meaning the test
would fail.
2013-10-02 15:03:50 +10: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
Hamish Friedlander
71608f0d4a FIX Add SiteTree link tracking as an extension, and apply to SiteTree itself 2013-08-09 11:46:32 +02: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
Ingo Schommer
f2a9f9aa0a ErrorPageTest: Reset env state
Otherwise SapphireTest will complain, see 0da70dafa457564a6adb02140ffeb5dd01f3a982
2013-06-19 13:17:22 +02: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
Simon Welsh
be25c302ac FIX Escape the sitetree_link shortcode return value 2013-05-10 14:05:06 +12:00
Ingo Schommer
6457ab2433 Regression in URL generation (dots now filtered out)
Caused by framework/5ec85d06f68d09ab30b124312c54f1d84ce7d6f4
2013-04-02 11:39:46 +02:00
Ingo Schommer
f73a5c68f3 FIX VirtualPageTest memory errors due to Config API quirks 2013-03-27 10:59:17 +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
Ingo Schommer
eba4d205c3 Merge remote-tracking branch 'origin/3.0' into 3.1 2013-01-30 12:44:40 +01:00
Ingo Schommer
b15b98345f Using new "Security.login_url" configuration value 2013-01-29 18:06:49 +01:00
Ingo Schommer
8dd9bf3a1e Merge remote-tracking branch 'origin/3.0' into 3.1 2012-12-17 17:34:20 +01:00
Ingo Schommer
894d48789c String casting in SimpleXML tests for older phpunit versions 2012-12-17 17:32:46 +01:00
Ingo Schommer
76b99e4006 Fixed tests without assertions 2012-11-23 15:52:00 +01:00
Ingo Schommer
26bdee4f08 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	tests/model/SiteTreeTest.php
2012-11-23 15:31:03 +01:00
Ingo Schommer
8659c27487 Remove unused set_up_once() invocations from various tests
SapphireTest method name was changed to instance method
and setUpOnce() naming in mid 2010 already (093da759).
Since those methods were never invoked, they're obsolete.
Checked that the SiteTree-related tests pass with
Translatable enabled.
2012-11-23 13:58:54 +01:00
Andrew O'Neil
48a9bcf276 APICHANGE: Use late static binding for Object::remove_extension() 2012-11-07 11:08:36 +13:00
Andrew O'Neil
1722f00869 APICHANGE: add_extension() is now called directly on the class, instead of on Object 2012-11-07 11:08:36 +13:00
Sean Harvey
cb8c10a473 Merge branch '3.0' of github.com:silverstripe/silverstripe-cms into 3.0 2012-09-27 10:49:03 +12:00
Sean Harvey
2c4ebd3cb9 Fixing broken SiteTreeHTMLEditorFieldTest 2012-09-23 22:49:44 +12:00
Ingo Schommer
cbd31e3ab2 API Removed SiteTree.MetaTitle and MetaKeywords
They are irrelevant in terms of SEO, general page informancy,
clutter up the CMS UI, and encourage CMS authors to waste
their time filling them out.

[1] http://www.seomoz.org/learn-seo/title-tag
[2] http://www.mattcutts.com/blog/keywords-meta-tag-in-web-search/
2012-09-21 11:31:00 +02:00
Ingo Schommer
df44239060 Method visibility according to coding conventions 2012-09-20 10:41:50 +02:00
Ingo Schommer
8a514d8b64 BUG Correct live state in SiteTree->getAbsoluteLiveLink()
Was fetching the record from live (and its direct URLSegment),
but all of its parents from the current stage, which might be draft,
leading to "mixed" draft/live nested URLs which might no longer
be reachable in live mode.
2012-08-28 19:04:16 +02:00
Hamish Friedlander
d45dd34db9 FIX VirtualPageTest failing on apps with no $db on Page
VirtualPageTest was adding fields to Page via a decorator, but Page might
not have any fields itself. This changed Page from not having a table
to having a table, which then caused a problem on tearDown
2012-08-28 15:13:57 +12:00
Mateusz Uzdowski
54fd54a2fb BUG Change all shortcodes into the new, comma separated, format.
Ref http://open.silverstripe.org/ticket/7337
2012-07-12 17:57:38 +02:00
Ingo Schommer
813ed75869 MINOR Test MenuTitle null'ing (see #7505) 2012-06-20 18:26:55 +02:00
Ingo Schommer
e50936fe9f MINOR Added caching to SiteTree->getStatusFlags(), as its called twice for every node now in LeftAndMain->SiteTreeAsUL() (see #7410) 2012-06-12 19:35:15 +02:00
Sean Harvey
542d727db2 MINOR Don't use deprecated extraStatics when adding extra statics with
DataExtension
2012-05-23 22:13:27 +12:00
Sean Harvey
c72bae3a8e MINOR Fixing assertType() assertions with assertInstanceOf() 2012-05-09 23:06:55 +12:00
Ingo Schommer
8563322971 BUGFIX Fixed publication of multibyte URLSegment in SiteTree->onBeforeWrite(), was wrongly detecting a change and double encoding 2012-05-08 23:45:29 +02:00
Andrew O'Neil
d1c500a5f9 MINOR: Remove checks for PHP <5.3.2, as it's no longer supported 2012-04-18 10:36:55 +12:00
Simon Welsh
b8e86ae261 MINOR Add newline to end of files without one 2012-04-15 10:56:40 +12:00
Normann Lou
c1b248e2cf ENHANCEMENT SiteTree->getStatusFlags() which makes SiteTree->getTreeTitle() extensible 2012-04-04 23:02:53 +02:00
Sean Harvey
0ea9451014 MINOR Fixes to method arguments in cms classes for E_STRICT support. 2012-03-27 21:42:54 +13:00
Ingo Schommer
f620f9b46c MINOR Using <button> tags for CMS UI, and new 'data-icon' HTML5 attribute to denote icons 2012-02-17 15:30:37 +01:00
Ingo Schommer
f4e3e79c0d API CHANGE Removed ThumbnailStripField class, as it was only used for the CMS image insertion logic (which was rewritten with a more powerful file selection based on GridField) 2012-02-14 13:32:58 +01:00
Fred Condo
d99e3a0927 Code cleanup: removed trailing ?> markers per code standard.
All cms module except lang directory.
2012-02-13 12:48:41 -08:00
Ingo Schommer
a570e2f2a0 API CHANGE Publish ex-VirtualPage records when their page type changes, propagate type change to live (AIR-78) BUGFIX Remove extraneous database rows when changing a page from VirtualPage to another type (AIR-78) 2012-01-14 13:07:48 +01:00
Ingo Schommer
0e4e8034d6 BUGFIX Validate SiteTree::$can_be_root on saving, as well as for VirtualPage originals (AIR-80) 2012-01-14 11:20:54 +01:00
Ingo Schommer
87c318d168 BUGFIX Don't create new version on related VirtualPage records in SiteTree->onAfterWrite() when the write was triggered through writeWithoutVersion(). Use a new $_nextWriteWithoutVersion flag replacing the -1 Version number for this purpose (AIR-97) (see similar commit in sapphire) 2012-01-14 11:11:21 +01:00
Ingo Schommer
7a80e6d2ea MINOR Ensuring assets/ folder is created before using it in FileLinkTrackingTest (and using ASSETS_PATH constant instead of hardcoding it) 2011-12-16 17:29:50 +01:00
Ingo Schommer
0b5d20513c ENHANCEMENT Using new URLPathFilter API in SiteTree->generateURLSegment(), allowing customisation of URL filtering and transliteration 2011-11-29 10:45:19 +01:00
Stig Lindqvist
a3a50b7b6f MINOR Skipping test when PHP Version is lower than 5.3.2
ReflectionMethod#setAccessible was released in PHP Version 5.3.2
2011-10-22 16:17:28 +02:00
Ingo Schommer
f98bc8480c BUGFIX Respect writeWithoutVersion() when updating VirtualPage relationships in SiteTree->onAfterWrite() (AIR-97) 2011-10-07 11:12:52 +02:00
Sam Minnee
5d235fa9f7 ENHACEMENT: Improved caching of permissions for improved CMS perfromance for non-admins (merged from r102278) 2011-10-07 10:36:56 +02:00
Sam Minnee
6fc01394a6 API CHANGE: Added VirtualPage::$non_virtual_fields and VirtualPage::$initially_copied_fields for configuring the behaviour of virtual pages. (merged from r100463) 2011-10-07 10:05:32 +02:00
Ingo Schommer
4903fad537 BUGFIX Checking for SiteTree:: in SiteTree->getClassDropdown() (AIR-20) 2011-10-07 09:29:03 +02:00
Ingo Schommer
2dd96a4050 API CHANGE Checking for SiteTree::$allowed_children in SiteTree->validate() (was only checked via JavaScript before).
BUGFIX Ensure that VirtualPage $allowed_children are checked on original classes to avoid allowing more than necessary (AIR-38)
2011-10-07 08:59:23 +02:00
ajshort
4ecf908e34 MINOR: Replaced containsIDs() calls in tests with assertContains() and column(). 2011-10-07 08:51:54 +02:00
ajshort
daecdcd335 MINOR: Replaced usage of deprecated toDropdownMap() with map(). 2011-10-07 08:51:54 +02:00
Sam Minnee
1821ccbb7d MINOR: Added more explicit test to aid w/ debugging. 2011-10-07 08:51:53 +02:00
Sam Minnee
7a2097dbd0 BUGFIX: Removed obsolete test. 2011-10-07 08:51:53 +02:00
Sam Minnee
d3ca4dac5b BUGFIX: Updated models to suit minor changes in the new ORM. 2011-10-07 08:50:51 +02:00
Ingo Schommer
5de2ba5628 MINOR Removing executable flag from all files (thanks miiihi) 2011-09-18 22:04:42 +02:00
Ingo Schommer
eecb401952 ENHANCEMENT Removed automatic redirection to admin URLs in ContentController, too counter-intuitive and hard to implement consistently, while still allowing linkage of pages without CMS around them. 2011-08-12 17:06:29 +02:00
Ingo Schommer
75ce441348 ENHANCEMENT Redirecting to cms preview in ContentController if user is logged in 2011-07-08 15:36:30 +02:00
Ingo Schommer
7a50608e24 API CHANGE Splitting off "Behaviour" and "Access" tabs from SiteTree->getCMSFields() into SiteTree->getSettingsFields(). Adjusting functionality to split of SiteTree->getCMSFields() into getSettingsFields(), and new tab paths ("Root.Content" instead of "Root.Content.Main") 2011-04-28 22:48:55 +12:00