change how get attachments w/ children works
This commit is contained in:
parent
ec907484bb
commit
b87735e2d7
@ -167,10 +167,11 @@ class ComicPressComicPost {
|
||||
$attachments_with_children = array();
|
||||
foreach ($this->normalize_ordering($skip_checks) as $id => $info) {
|
||||
if ($info['enabled']) {
|
||||
$attachments_with_children[$id] = array();
|
||||
$attachment = array('id' => $id);
|
||||
if (isset($info['children'])) {
|
||||
$attachments_with_children[$id] = $info['children'];
|
||||
$attachment['children'] = $info['children'];
|
||||
}
|
||||
$attachments_with_children[] = $attachment;
|
||||
}
|
||||
}
|
||||
return $attachments_with_children;
|
||||
|
@ -195,8 +195,8 @@ class ComicPressComicPostTest extends PHPUnit_Framework_TestCase {
|
||||
'test-4' => array('enabled' => false),
|
||||
),
|
||||
array(
|
||||
'test-1' => array(),
|
||||
'test-2' => array()
|
||||
array('id' => 'test-1'),
|
||||
array('id' => 'test-2')
|
||||
)
|
||||
),
|
||||
array(
|
||||
@ -205,7 +205,7 @@ class ComicPressComicPostTest extends PHPUnit_Framework_TestCase {
|
||||
'test-2' => array('enabled' => false, 'children' => array('rss' => 'test-4')),
|
||||
),
|
||||
array(
|
||||
'test-1' => array('rss' => 'test-3'),
|
||||
array('id' => 'test-1', 'children' => array('rss' => 'test-3')),
|
||||
)
|
||||
),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user