mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1222 from tractorcow/pulls/3.2/deprecations
Set deprecation level for all changes in 3.x to 4.0
This commit is contained in:
commit
124de94e67
@ -129,7 +129,7 @@ class ModelAsController extends Controller implements NestedController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 3.2 Use OldPageRedirector::find_old_page instead
|
||||
* @deprecated 4.0 Use OldPageRedirector::find_old_page instead
|
||||
*
|
||||
* @param string $URLSegment A subset of the url. i.e in /home/contact/ home and contact are URLSegment.
|
||||
* @param int $parent The ID of the parent of the page the URLSegment belongs to.
|
||||
@ -137,7 +137,7 @@ class ModelAsController extends Controller implements NestedController {
|
||||
* @return SiteTree
|
||||
*/
|
||||
static public function find_old_page($URLSegment, $parent = null, $ignoreNestedURLs = false) {
|
||||
Deprecation::notice('3.2', 'Use OldPageRedirector::find_old_page instead');
|
||||
Deprecation::notice('4.0', 'Use OldPageRedirector::find_old_page instead');
|
||||
if ($parent) {
|
||||
$parent = SiteTree::get()->byId($parent);
|
||||
}
|
||||
|
@ -63,22 +63,22 @@ class RootURLController extends Controller {
|
||||
* Set the URL Segment used for your homepage when it is created by dev/build.
|
||||
* This allows you to use home page URLs other than the default "home".
|
||||
*
|
||||
* @deprecated 3.2 Use the "RootURLController.default_homepage_link" config setting instead
|
||||
* @deprecated 4.0 Use the "RootURLController.default_homepage_link" config setting instead
|
||||
* @param string $urlsegment the URL segment for your home page
|
||||
*/
|
||||
static public function set_default_homepage_link($urlsegment = "home") {
|
||||
Deprecation::notice('3.2', 'Use the "RootURLController.default_homepage_link" config setting instead');
|
||||
Deprecation::notice('4.0', 'Use the "RootURLController.default_homepage_link" config setting instead');
|
||||
Config::inst()->update('RootURLController', 'default_homepage_link', $urlsegment);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the link that denotes the homepage if there is not one explicitly defined for this HTTP_HOST value.
|
||||
*
|
||||
* @deprecated 3.2 Use the "RootURLController.default_homepage_link" config setting instead
|
||||
* @deprecated 4.0 Use the "RootURLController.default_homepage_link" config setting instead
|
||||
* @return string
|
||||
*/
|
||||
static public function get_default_homepage_link() {
|
||||
Deprecation::notice('3.2', 'Use the "RootURLController.default_homepage_link" config setting instead');
|
||||
Deprecation::notice('4.0', 'Use the "RootURLController.default_homepage_link" config setting instead');
|
||||
return Config::inst()->get('RootURLController', 'default_homepage_link');
|
||||
}
|
||||
|
||||
|
@ -300,20 +300,20 @@ class ErrorPage extends Page {
|
||||
* Set the path where static error files are saved through {@link publish()}.
|
||||
* Defaults to /assets.
|
||||
*
|
||||
* @deprecated 3.2 Use "ErrorPage.static_file_path" instead
|
||||
* @deprecated 4.0 Use "ErrorPage.static_file_path" instead
|
||||
* @param string $path
|
||||
*/
|
||||
static public function set_static_filepath($path) {
|
||||
Deprecation::notice('3.2', 'Use "ErrorPage.static_file_path" instead');
|
||||
Deprecation::notice('4.0', 'Use "ErrorPage.static_file_path" instead');
|
||||
self::config()->static_filepath = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 3.2 Use "ErrorPage.static_file_path" instead
|
||||
* @deprecated 4.0 Use "ErrorPage.static_file_path" instead
|
||||
* @return string
|
||||
*/
|
||||
static public function get_static_filepath() {
|
||||
Deprecation::notice('3.2', 'Use "ErrorPage.static_file_path" instead');
|
||||
Deprecation::notice('4.0', 'Use "ErrorPage.static_file_path" instead');
|
||||
return self::config()->static_filepath;
|
||||
}
|
||||
}
|
||||
|
@ -241,69 +241,69 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
* by deleting all children when the their parent is deleted (TRUE),
|
||||
* or rather preserve this data even if its not reachable through any navigation path (FALSE).
|
||||
*
|
||||
* @deprecated 3.2 Use the "SiteTree.enforce_strict_hierarchy" config setting instead
|
||||
* @deprecated 4.0 Use the "SiteTree.enforce_strict_hierarchy" config setting instead
|
||||
* @param boolean
|
||||
*/
|
||||
static public function set_enforce_strict_hierarchy($to) {
|
||||
Deprecation::notice('3.2', 'Use the "SiteTree.enforce_strict_hierarchy" config setting instead');
|
||||
Deprecation::notice('4.0', 'Use the "SiteTree.enforce_strict_hierarchy" config setting instead');
|
||||
Config::inst()->update('SiteTree', 'enforce_strict_hierarchy', $to);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 3.2 Use the "SiteTree.enforce_strict_hierarchy" config setting instead
|
||||
* @deprecated 4.0 Use the "SiteTree.enforce_strict_hierarchy" config setting instead
|
||||
* @return boolean
|
||||
*/
|
||||
static public function get_enforce_strict_hierarchy() {
|
||||
Deprecation::notice('3.2', 'Use the "SiteTree.enforce_strict_hierarchy" config setting instead');
|
||||
Deprecation::notice('4.0', 'Use the "SiteTree.enforce_strict_hierarchy" config setting instead');
|
||||
return Config::inst()->get('SiteTree', 'enforce_strict_hierarchy');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns TRUE if nested URLs (e.g. page/sub-page/) are currently enabled on this site.
|
||||
*
|
||||
* @deprecated 3.2 Use the "SiteTree.nested_urls" config setting instead
|
||||
* @deprecated 4.0 Use the "SiteTree.nested_urls" config setting instead
|
||||
* @return bool
|
||||
*/
|
||||
static public function nested_urls() {
|
||||
Deprecation::notice('3.2', 'Use the "SiteTree.nested_urls" config setting instead');
|
||||
Deprecation::notice('4.0', 'Use the "SiteTree.nested_urls" config setting instead');
|
||||
return Config::inst()->get('SiteTree', 'nested_urls');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 3.2 Use the "SiteTree.nested_urls" config setting instead
|
||||
* @deprecated 4.0 Use the "SiteTree.nested_urls" config setting instead
|
||||
*/
|
||||
static public function enable_nested_urls() {
|
||||
Deprecation::notice('3.2', 'Use the "SiteTree.nested_urls" config setting instead');
|
||||
Deprecation::notice('4.0', 'Use the "SiteTree.nested_urls" config setting instead');
|
||||
Config::inst()->update('SiteTree', 'nested_urls', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 3.2 Use the "SiteTree.nested_urls" config setting instead
|
||||
* @deprecated 4.0 Use the "SiteTree.nested_urls" config setting instead
|
||||
*/
|
||||
static public function disable_nested_urls() {
|
||||
Deprecation::notice('3.2', 'Use the "SiteTree.nested_urls" config setting instead');
|
||||
Deprecation::notice('4.0', 'Use the "SiteTree.nested_urls" config setting instead');
|
||||
Config::inst()->update('SiteTree', 'nested_urls', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the (re)creation of default pages on /dev/build
|
||||
*
|
||||
* @deprecated 3.2 Use the "SiteTree.create_default_pages" config setting instead
|
||||
* @deprecated 4.0 Use the "SiteTree.create_default_pages" config setting instead
|
||||
* @param bool $option
|
||||
*/
|
||||
static public function set_create_default_pages($option = true) {
|
||||
Deprecation::notice('3.2', 'Use the "SiteTree.create_default_pages" config setting instead');
|
||||
Deprecation::notice('4.0', 'Use the "SiteTree.create_default_pages" config setting instead');
|
||||
Config::inst()->update('SiteTree', 'create_default_pages', $option);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if default pages should be created on /dev/build.
|
||||
*
|
||||
* @deprecated 3.2 Use the "SiteTree.create_default_pages" config setting instead
|
||||
* @deprecated 4.0 Use the "SiteTree.create_default_pages" config setting instead
|
||||
* @return bool
|
||||
*/
|
||||
static public function get_create_default_pages() {
|
||||
Deprecation::notice('3.2', 'Use the "SiteTree.create_default_pages" config setting instead');
|
||||
Deprecation::notice('4.0', 'Use the "SiteTree.create_default_pages" config setting instead');
|
||||
return Config::inst()->get('SiteTree', 'create_default_pages');
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ class SiteTreeFileExtension extends DataExtension {
|
||||
*/
|
||||
public function BackLinkTracking($filter = null, $sort = null, $join = null, $limit = null) {
|
||||
if($filter !== null || $sort !== null || $join !== null || $limit !== null) {
|
||||
Deprecation::notice('3.2', 'The $filter, $sort, $join and $limit parameters for
|
||||
Deprecation::notice('4.0', 'The $filter, $sort, $join and $limit parameters for
|
||||
SiteTreeFileExtension::BackLinkTracking() have been deprecated.
|
||||
Please manipluate the returned list directly.', Deprecation::SCOPE_GLOBAL);
|
||||
}
|
||||
@ -67,7 +67,7 @@ class SiteTreeFileExtension extends DataExtension {
|
||||
}
|
||||
|
||||
if($filter || $sort || $join || $limit) {
|
||||
Deprecation::notice('3.2', 'The $filter, $sort, $join and $limit parameters for
|
||||
Deprecation::notice('4.0', 'The $filter, $sort, $join and $limit parameters for
|
||||
SiteTreeFileExtension::BackLinkTracking() have been deprecated.
|
||||
Please manipluate the returned list directly.', Deprecation::SCOPE_GLOBAL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user