diff --git a/code/BlogEntry.php b/code/BlogEntry.php
index 862b07c..e16b768 100644
--- a/code/BlogEntry.php
+++ b/code/BlogEntry.php
@@ -61,22 +61,22 @@ class BlogEntry extends Page {
SiteTree::enableCMSFieldsExtensions();
if(!self::$allow_wysiwyg_editing) {
- $fields->removeFieldFromTab("Root.Content.Main","Content");
- $fields->addFieldToTab("Root.Content.Main", new TextareaField("Content", _t("BlogEntry.CN", "Content"), 20));
+ $fields->removeFieldFromTab("Root.Main","Content");
+ $fields->addFieldToTab("Root.Main", new TextareaField("Content", _t("BlogEntry.CN", "Content"), 20));
}
- $fields->addFieldToTab("Root.Content.Main", $dateField = new DatetimeField("Date", _t("BlogEntry.DT", "Date")),"Content");
+ $fields->addFieldToTab("Root.Main", $dateField = new DatetimeField("Date", _t("BlogEntry.DT", "Date")),"Content");
$dateField->getDateField()->setConfig('showcalendar', true);
$dateField->getTimeField()->setConfig('showdropdown', true);
- $fields->addFieldToTab("Root.Content.Main", new TextField("Author", _t("BlogEntry.AU", "Author"), $firstName),"Content");
+ $fields->addFieldToTab("Root.Main", new TextField("Author", _t("BlogEntry.AU", "Author"), $firstName),"Content");
if(!self::$allow_wysiwyg_editing) {
- $fields->addFieldToTab("Root.Content.Main", new LiteralField("BBCodeHelper", "
" .
+ $fields->addFieldToTab("Root.Main", new LiteralField("BBCodeHelper", "
"));
}
- $fields->addFieldToTab("Root.Content.Main", new TextField("Tags", _t("BlogEntry.TS", "Tags (comma sep.)")),"Content");
+ $fields->addFieldToTab("Root.Main", new TextField("Tags", _t("BlogEntry.TS", "Tags (comma sep.)")),"Content");
$this->extend('updateCMSFields', $fields);
@@ -88,7 +88,7 @@ class BlogEntry extends Page {
*/
function TagsCollection() {
$tags = split(" *, *", trim($this->Tags));
- $output = new DataObjectSet();
+ $output = new ArrayList();
$link = $this->getParent() ? $this->getParent()->Link('tag') : '';
diff --git a/code/BlogHolder.php b/code/BlogHolder.php
index b50d830..243f1bc 100644
--- a/code/BlogHolder.php
+++ b/code/BlogHolder.php
@@ -34,9 +34,9 @@ class BlogHolder extends BlogTree implements PermissionProvider {
$fields = parent::getCMSFields();
SiteTree::enableCMSFieldsExtensions();
- $fields->addFieldToTab('Root.Content.Main', new CheckboxField('TrackBacksEnabled', 'Enable TrackBacks'));
- $fields->addFieldToTab('Root.Content.Main', new DropdownField('OwnerID', 'Blog owner', $blogOwners->toDropDownMap('ID', 'Name', 'None')));
- $fields->addFieldToTab('Root.Content.Main', new CheckboxField('AllowCustomAuthors', 'Allow non-admins to have a custom author field'));
+ $fields->addFieldToTab('Root.Main', new CheckboxField('TrackBacksEnabled', 'Enable TrackBacks'));
+ $fields->addFieldToTab('Root.Main', new DropdownField('OwnerID', 'Blog owner', $blogOwners->map('ID', 'Name')));
+ $fields->addFieldToTab('Root.Main', new CheckboxField('AllowCustomAuthors', 'Allow non-admins to have a custom author field'));
$this->extend('updateCMSFields', $fields);
@@ -50,8 +50,8 @@ class BlogHolder extends BlogTree implements PermissionProvider {
$adminMembers = Permission::get_members_by_permission('ADMIN');
$blogOwners = Permission::get_members_by_permission('BLOGMANAGEMENT');
- if(!$adminMembers) $adminMembers = new DataObjectSet();
- if(!$blogOwners) $blogOwners = new DataObjectSet();
+ if(!$adminMembers) $adminMembers = new ArrayList();
+ if(!$blogOwners) $blogOwners = new ArrayList();
$blogOwners->merge($adminMembers);
$blogOwners->sort($sort, $direction);
diff --git a/code/BlogTree.php b/code/BlogTree.php
index 758d828..9d832f5 100644
--- a/code/BlogTree.php
+++ b/code/BlogTree.php
@@ -95,8 +95,8 @@ class BlogTree extends Page {
function getCMSFields() {
$fields = parent::getCMSFields();
- $fields->addFieldToTab("Root.Content.Main", new TextField("Name", "Name of blog"));
- $fields->addFieldToTab('Root.Content.Main', new DropdownField('LandingPageFreshness', 'When you first open the blog, how many entries should I show', array(
+ $fields->addFieldToTab("Root.Main", new TextField("Name", "Name of blog"));
+ $fields->addFieldToTab('Root.Main', new DropdownField('LandingPageFreshness', 'When you first open the blog, how many entries should I show', array(
"" => "All entries",
"1 MONTH" => "Last month's entries",
"2 MONTH" => "Last 2 months' entries",
@@ -113,8 +113,8 @@ class BlogTree extends Page {
"INHERIT" => "Take value from parent Blog Tree"
)));
- $fields->addFieldToTab("Root.Content.Widgets", new CheckboxField("InheritSideBar", 'Inherit Sidebar From Parent'));
- $fields->addFieldToTab("Root.Content.Widgets", new WidgetAreaEditor("SideBar"));
+ $fields->addFieldToTab("Root.Widgets", new CheckboxField("InheritSideBar", 'Inherit Sidebar From Parent'));
+ $fields->addFieldToTab("Root.Widgets", new WidgetAreaEditor("SideBar"));
return $fields;
}
@@ -149,7 +149,7 @@ class BlogTree extends Page {
* @param string date Only get blog entries on this date - either a year, or a year-month eg '2008' or '2008-02'
* @param callback retrieveCallback A function to call with pagetype, filter and limit for custom blog sorting or filtering
* @param string $where
- * @return DataObjectSet
+ * @return DataList
*/
public function Entries($limit = '', $tag = '', $date = '', $retrieveCallback = null, $filter = '') {
diff --git a/code/TrackBackDecorator.php b/code/TrackBackDecorator.php
index 5356fd9..680faef 100644
--- a/code/TrackBackDecorator.php
+++ b/code/TrackBackDecorator.php
@@ -30,10 +30,10 @@ class TrackBackDecorator extends DataObjectDecorator {
'',
'ID'
);
- $fields->addFieldToTab("Root.Content.Main", $trackbackURLTable);
+ $fields->addFieldToTab("Root.Main", $trackbackURLTable);
}
else {
- $fields->addFieldToTab("Root.Content.Main", new ReadonlyField("TrackBackURLsReadOnly", _t("BlogEntry.TrackbackURLs", "Trackback URLs"), _t("BlogEntry.TrackbackURLs_DISABLED", "To use this feature, please check 'Enable TrackBacks' check box on the blog holder.")));
+ $fields->addFieldToTab("Root.Main", new ReadonlyField("TrackBackURLsReadOnly", _t("BlogEntry.TrackbackURLs", "Trackback URLs"), _t("BlogEntry.TrackbackURLs_DISABLED", "To use this feature, please check 'Enable TrackBacks' check box on the blog holder.")));
}
}
diff --git a/code/import/TypoImport.php b/code/import/TypoImport.php
index 11e264d..240fdf2 100644
--- a/code/import/TypoImport.php
+++ b/code/import/TypoImport.php
@@ -99,7 +99,7 @@ class TypoImport extends Controller {
$Ccreated_at = $row2[8];
// put the typo blog comment in the SS database
- $newCEntry = new PageComment();
+ $newCEntry = new Comment();
$newCEntry->Name = $Cauthor;
$newCEntry->Comment = $comment;
$newCEntry->Created = $created_at;
@@ -129,17 +129,17 @@ class TypoImport extends Controller {
pg_query($dbconn, "UPDATE SiteTree SET Content = REPLACE(Content, \"™\", \"™\")");
pg_query($dbconn, "UPDATE SiteTree SET Content = REPLACE(Content, \"&\", \"&\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"×\", \"x\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"’\", \"’\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"‘\", \"‘\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"\", \"—\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"“\", \"“\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"”\", \"”\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"–\", \"–\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"—\", \"—\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"…\", \"…\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"™\", \"™\")");
- pg_query($dbconn, "UPDATE PageComment SET Comment = REPLACE(Comment, \"&\", \"&\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"×\", \"x\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"’\", \"’\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"‘\", \"‘\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"\", \"—\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"“\", \"“\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"”\", \"”\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"–\", \"–\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"—\", \"—\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"…\", \"…\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"™\", \"™\")");
+ pg_query($dbconn, "UPDATE Comment SET Comment = REPLACE(Comment, \"&\", \"&\")");
}
diff --git a/code/widgets/ArchiveWidget.php b/code/widgets/ArchiveWidget.php
index 77b2c7b..6f90b14 100644
--- a/code/widgets/ArchiveWidget.php
+++ b/code/widgets/ArchiveWidget.php
@@ -52,7 +52,7 @@ class ArchiveWidget extends Widget {
function Dates() {
Requirements::themedCSS('archivewidget');
- $results = new DataObjectSet();
+ $results = new ArrayList();
$container = BlogTree::current();
$ids = $container->BlogHolderIDs();
diff --git a/code/widgets/BlogManagementWidget.php b/code/widgets/BlogManagementWidget.php
index 964d7bc..a40cf1c 100644
--- a/code/widgets/BlogManagementWidget.php
+++ b/code/widgets/BlogManagementWidget.php
@@ -21,7 +21,7 @@ class BlogManagementWidget extends Widget implements PermissionProvider {
static $description = "Provide a number of links useful for administering a blog. Only shown if the user is an admin.";
function CommentText() {
- $unmoderatedcount = DB::query("SELECT COUNT(*) FROM \"PageComment\" WHERE \"NeedsModeration\"=1")->value();
+ $unmoderatedcount = DB::query("SELECT COUNT(*) FROM \"Comment\" WHERE \"NeedsModeration\"=1")->value();
if($unmoderatedcount == 1) {
return _t("BlogManagementWidget.UNM1", "You have 1 unmoderated comment");
} else if($unmoderatedcount > 1) {
@@ -35,7 +35,7 @@ class BlogManagementWidget extends Widget implements PermissionProvider {
if(!Permission::check('BLOGMANAGEMENT')) {
return false;
}
- $unmoderatedcount = DB::query("SELECT COUNT(*) FROM \"PageComment\" WHERE \"NeedsModeration\"=1")->value();
+ $unmoderatedcount = DB::query("SELECT COUNT(*) FROM \"Comment\" WHERE \"NeedsModeration\"=1")->value();
if($unmoderatedcount > 0) {
return "admin/comments/unmoderated";
diff --git a/code/widgets/RSSWidget.php b/code/widgets/RSSWidget.php
index 17f8bc9..fedb09f 100644
--- a/code/widgets/RSSWidget.php
+++ b/code/widgets/RSSWidget.php
@@ -59,7 +59,7 @@ class RSSWidget extends Widget {
}
function FeedItems() {
- $output = new DataObjectSet();
+ $output = new ArrayList();
// Protection against infinite loops when an RSS widget pointing to this page is added to this page
if(stristr($_SERVER['HTTP_USER_AGENT'], 'SimplePie')) {
diff --git a/code/widgets/TagCloudWidget.php b/code/widgets/TagCloudWidget.php
index ed1bbe0..01e1f33 100644
--- a/code/widgets/TagCloudWidget.php
+++ b/code/widgets/TagCloudWidget.php
@@ -105,7 +105,7 @@ class TagCloudWidget extends Widget {
}
}
- $output = new DataObjectSet();
+ $output = new ArrayList();
foreach($allTags as $tag => $fields) {
$output->push(new ArrayData($fields));
}
diff --git a/tests/BlogHolderTest.php b/tests/BlogHolderTest.php
index 05938a6..17bec02 100644
--- a/tests/BlogHolderTest.php
+++ b/tests/BlogHolderTest.php
@@ -56,7 +56,7 @@ class BlogHolderTest extends SapphireTest {
function testBlogOwners() {
$mainblog = $this->objFromFixture('BlogHolder', 'mainblog');
- $actualMembers = array_values($mainblog->blogOwners()->toDropDownMap('ID', 'Name'));
+ $actualMembers = array_values($mainblog->blogOwners()->map('ID', 'Name'));
$expectedMembers = array(
'ADMIN User', // test default admin
'Admin One',