fix false check in comic post
This commit is contained in:
parent
cd64f57885
commit
e90cd16563
@ -168,6 +168,8 @@ class ComicPressComicPost {
|
|||||||
|
|
||||||
$normalized_children = $this->normalize_ordering($skip_checks);
|
$normalized_children = $this->normalize_ordering($skip_checks);
|
||||||
|
|
||||||
|
$attachments_with_children = array();
|
||||||
|
if (is_array($normalized_children)) {
|
||||||
$remove_from_list = array();
|
$remove_from_list = array();
|
||||||
foreach ($normalized_children as $id => $info) {
|
foreach ($normalized_children as $id => $info) {
|
||||||
if (isset($info['children'])) {
|
if (isset($info['children'])) {
|
||||||
@ -175,7 +177,6 @@ class ComicPressComicPost {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$attachments_with_children = array();
|
|
||||||
foreach ($normalized_children as $id => $info) {
|
foreach ($normalized_children as $id => $info) {
|
||||||
if (!in_array($id, $remove_from_list)) {
|
if (!in_array($id, $remove_from_list)) {
|
||||||
if ($info['enabled']) {
|
if ($info['enabled']) {
|
||||||
@ -189,6 +190,7 @@ class ComicPressComicPost {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $attachments_with_children;
|
return $attachments_with_children;
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ class ComicPressComicPostTest extends PHPUnit_Framework_TestCase {
|
|||||||
array('comic' => 'test-1', 'rss' => 'test-3', 'default' => 'test-1'),
|
array('comic' => 'test-1', 'rss' => 'test-3', 'default' => 'test-1'),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
array(false, array())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user