From 3c286381eced49a44d5c9af223506054d8115008 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 5 Apr 2013 11:20:03 +1300 Subject: [PATCH] Fixing further statics for 3.1 compatibility --- code/TrackBackDecorator.php | 2 +- code/TrackBackPing.php | 10 +++++----- code/TrackBackURL.php | 6 +++--- code/widgets/ArchiveWidget.php | 18 +++++++++--------- code/widgets/BlogManagementWidget.php | 18 +++++++++--------- code/widgets/BlogTreeExtension.php | 4 ++-- code/widgets/RSSWidget.php | 16 ++++++++-------- code/widgets/SubscribeRSSWidget.php | 6 +++--- code/widgets/TagCloudWidget.php | 18 +++++++++--------- 9 files changed, 49 insertions(+), 49 deletions(-) diff --git a/code/TrackBackDecorator.php b/code/TrackBackDecorator.php index e463be6..32936e3 100644 --- a/code/TrackBackDecorator.php +++ b/code/TrackBackDecorator.php @@ -16,7 +16,7 @@ class TrackBackDecorator extends DataExtension { // ); // } - static $has_many = array( + private static $has_many = array( 'TrackBackURLs' => 'TrackBackURL', 'TrackBacks' => 'TrackBackPing' ); diff --git a/code/TrackBackPing.php b/code/TrackBackPing.php index 0ebec77..8a102b0 100644 --- a/code/TrackBackPing.php +++ b/code/TrackBackPing.php @@ -1,7 +1,7 @@ 'Varchar', 'Excerpt' => 'Text', // 2083 is URL-length limit for IE, AFAIK. @@ -10,15 +10,15 @@ class TrackBackPing extends DataObject { 'BlogName' => 'Varchar' ); - static $has_one = array( + private static $has_one = array( 'Page' => 'Page' ); - static $has_many = array(); + private static $has_many = array(); - static $many_many = array(); + private static $many_many = array(); - static $belongs_many_many = array(); + private static $belongs_many_many = array(); } ?> diff --git a/code/TrackBackURL.php b/code/TrackBackURL.php index 2d3c775..a14e059 100644 --- a/code/TrackBackURL.php +++ b/code/TrackBackURL.php @@ -1,12 +1,12 @@ 'Varchar(2048)', 'Pung' => 'Boolean(0)' ); - static $has_one = array( + private static $has_one = array( 'BlogEntry' => 'BlogEntry' ); @@ -52,4 +52,4 @@ class TrackBackURL extends DataObject { return false; } -} \ No newline at end of file +} diff --git a/code/widgets/ArchiveWidget.php b/code/widgets/ArchiveWidget.php index ca75c68..4e0fdbb 100644 --- a/code/widgets/ArchiveWidget.php +++ b/code/widgets/ArchiveWidget.php @@ -6,27 +6,27 @@ * @package blog */ class ArchiveWidget extends Widget { - static $db = array( + private static $db = array( 'DisplayMode' => 'Varchar' ); - static $has_one = array(); + private static $has_one = array(); - static $has_many = array(); + private static $has_many = array(); - static $many_many = array(); + private static $many_many = array(); - static $belongs_many_many = array(); + private static $belongs_many_many = array(); - static $defaults = array( + private static $defaults = array( 'DisplayMode' => 'month' ); - static $title = 'Browse by Date'; + private static $title = 'Browse by Date'; - static $cmsTitle = 'Blog Archive'; + private static $cmsTitle = 'Blog Archive'; - static $description = 'Show a list of months or years in which there are blog posts, and provide links to them.'; + private static $description = 'Show a list of months or years in which there are blog posts, and provide links to them.'; function getCMSFields() { $fields = parent::getCMSFields(); diff --git a/code/widgets/BlogManagementWidget.php b/code/widgets/BlogManagementWidget.php index c5b2022..be8ccaa 100644 --- a/code/widgets/BlogManagementWidget.php +++ b/code/widgets/BlogManagementWidget.php @@ -4,21 +4,21 @@ * @package blog */ class BlogManagementWidget extends Widget implements PermissionProvider { - static $db = array(); + private static $db = array(); - static $has_one = array(); + private static $has_one = array(); - static $has_many = array(); + private static $has_many = array(); - static $many_many = array(); + private static $many_many = array(); - static $belongs_many_many = array(); + private static $belongs_many_many = array(); - static $defaults = array(); + private static $defaults = array(); - static $title = "Blog Management"; - static $cmsTitle = "Blog Management"; - static $description = "Provide a number of links useful for administering a blog. Only shown if the user is an admin."; + private static $title = "Blog Management"; + private static $cmsTitle = "Blog Management"; + private static $description = "Provide a number of links useful for administering a blog. Only shown if the user is an admin."; function CommentText() { diff --git a/code/widgets/BlogTreeExtension.php b/code/widgets/BlogTreeExtension.php index 60b5820..e8d1eda 100644 --- a/code/widgets/BlogTreeExtension.php +++ b/code/widgets/BlogTreeExtension.php @@ -2,6 +2,6 @@ class BlogTreeExtension extends DataExtension { - static $has_one = array("SideBar" => "WidgetArea"); + private static $has_one = array("SideBar" => "WidgetArea"); -} \ No newline at end of file +} diff --git a/code/widgets/RSSWidget.php b/code/widgets/RSSWidget.php index 19f9966..efbbf41 100644 --- a/code/widgets/RSSWidget.php +++ b/code/widgets/RSSWidget.php @@ -1,26 +1,26 @@ "Text", "RssUrl" => "Text", "NumberToShow" => "Int" ); - static $has_one = array(); + private static $has_one = array(); - static $has_many = array(); + private static $has_many = array(); - static $many_many = array(); + private static $many_many = array(); - static $belongs_many_many = array(); + private static $belongs_many_many = array(); - static $defaults = array( + private static $defaults = array( "NumberToShow" => 10, "RSSTitle" => 'RSS Feed' ); - static $cmsTitle = "RSS Feed"; - static $description = "Downloads another page's RSS feed and displays items in a list."; + private static $cmsTitle = "RSS Feed"; + private static $description = "Downloads another page's RSS feed and displays items in a list."; /** * If the RssUrl is relative, convert it to absolute with the diff --git a/code/widgets/SubscribeRSSWidget.php b/code/widgets/SubscribeRSSWidget.php index e75bdec..3da8bcd 100644 --- a/code/widgets/SubscribeRSSWidget.php +++ b/code/widgets/SubscribeRSSWidget.php @@ -9,11 +9,11 @@ */ class SubscribeRSSWidget extends Widget { - static $title = 'Subscribe via RSS'; + private static $title = 'Subscribe via RSS'; - static $cmsTitle = 'Subscribe via RSS widget'; + private static $cmsTitle = 'Subscribe via RSS widget'; - static $description = 'Shows a link allowing a user to subscribe to this blog via RSS.'; + private static $description = 'Shows a link allowing a user to subscribe to this blog via RSS.'; /** * Return an absolute URL based on the BlogHolder diff --git a/code/widgets/TagCloudWidget.php b/code/widgets/TagCloudWidget.php index f52435e..c2c4133 100644 --- a/code/widgets/TagCloudWidget.php +++ b/code/widgets/TagCloudWidget.php @@ -1,30 +1,30 @@ "Varchar", "Limit" => "Int", "Sortby" => "Varchar" ); - static $has_one = array(); + private static $has_one = array(); - static $has_many = array(); + private static $has_many = array(); - static $many_many = array(); + private static $many_many = array(); - static $belongs_many_many = array(); + private static $belongs_many_many = array(); - static $defaults = array( + private static $defaults = array( "Title" => "Tag Cloud", "Limit" => "0", "Sortby" => "alphabet" ); - static $cmsTitle = "Tag Cloud"; - static $description = "Shows a tag cloud of tags on your blog."; + private static $cmsTitle = "Tag Cloud"; + private static $description = "Shows a tag cloud of tags on your blog."; - static $popularities = array( 'not-popular', 'not-very-popular', 'somewhat-popular', 'popular', 'very-popular', 'ultra-popular' ); + private static $popularities = array( 'not-popular', 'not-very-popular', 'somewhat-popular', 'popular', 'very-popular', 'ultra-popular' ); function getCMSFields() { $fields = parent::getCMSFields();