mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUG Fix regression in #312 in PHP 5.3
This commit is contained in:
parent
a4c6e5abb6
commit
5282ad84f9
@ -216,7 +216,7 @@ class BlogPost extends Page
|
|||||||
$authorField = ListboxField::create(
|
$authorField = ListboxField::create(
|
||||||
'Authors',
|
'Authors',
|
||||||
_t('BlogPost.Authors', 'Authors'),
|
_t('BlogPost.Authors', 'Authors'),
|
||||||
$this->getCandidateAuthors()->map()->toArray()
|
$self->getCandidateAuthors()->map()->toArray()
|
||||||
)->setMultiple(true);
|
)->setMultiple(true);
|
||||||
|
|
||||||
$authorNames = TextField::create(
|
$authorNames = TextField::create(
|
||||||
|
@ -78,5 +78,9 @@ class BlogPostTest extends SapphireTest
|
|||||||
Config::inst()->update('BlogPost', 'restrict_authors_to_group', 'BlogUsers');
|
Config::inst()->update('BlogPost', 'restrict_authors_to_group', 'BlogUsers');
|
||||||
|
|
||||||
$this->assertEquals(3, $blogpost->getCandidateAuthors()->count());
|
$this->assertEquals(3, $blogpost->getCandidateAuthors()->count());
|
||||||
|
|
||||||
|
// Test cms field is generated
|
||||||
|
$fields = $blogpost->getCMSFields();
|
||||||
|
$this->assertNotEmpty($fields->dataFieldByName('Authors'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user