strict checking
This commit is contained in:
parent
70867b8045
commit
d2e227a549
|
@ -215,8 +215,10 @@ class ComicPressAdmin {
|
||||||
foreach ($_POST['attachments'] as $post_id => $settings) {
|
foreach ($_POST['attachments'] as $post_id => $settings) {
|
||||||
if (isset($settings['comicpress_management'])) {
|
if (isset($settings['comicpress_management'])) {
|
||||||
$media_post = get_post($post_id);
|
$media_post = get_post($post_id);
|
||||||
$media_post->post_parent = $settings['post_parent'];
|
if (isset($media_post->post_parent)) {
|
||||||
wp_update_post($media_post);
|
$media_post->post_parent = $settings['post_parent'];
|
||||||
|
wp_update_post($media_post);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
update_post_meta($post_id, 'comicpress', array(
|
update_post_meta($post_id, 'comicpress', array(
|
||||||
'managed' => isset($settings['comicpress_management']
|
'managed' => isset($settings['comicpress_management']
|
||||||
|
|
|
@ -156,13 +156,16 @@ class ComicPressStoryline {
|
||||||
if (isset($this->_structure[$id])) {
|
if (isset($this->_structure[$id])) {
|
||||||
$all_adjacent = array();
|
$all_adjacent = array();
|
||||||
do {
|
do {
|
||||||
$new_id = $this->_structure[$id][$direction];
|
|
||||||
|
|
||||||
$has_adjacent = false;
|
$has_adjacent = false;
|
||||||
if (!in_array($new_id, $all_adjacent)) {
|
|
||||||
if ($has_adjacent = isset($this->_structure[$id][$direction])) {
|
if (isset($this->_structure[$id][$direction])) {
|
||||||
$all_adjacent[] = $new_id;
|
$new_id = $this->_structure[$id][$direction];
|
||||||
$id = $new_id;
|
|
||||||
|
if (!in_array($new_id, $all_adjacent)) {
|
||||||
|
if ($has_adjacent = isset($this->_structure[$id][$direction])) {
|
||||||
|
$all_adjacent[] = $new_id;
|
||||||
|
$id = $new_id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while ($has_adjacent);
|
} while ($has_adjacent);
|
||||||
|
|
|
@ -18,8 +18,10 @@ class ComicPressBackendAttachment extends ComicPressBackend {
|
||||||
if (!empty($children)) {
|
if (!empty($children)) {
|
||||||
foreach ($children as $child) {
|
foreach ($children as $child) {
|
||||||
$meta = get_post_meta($child->ID, 'comicpress', true);
|
$meta = get_post_meta($child->ID, 'comicpress', true);
|
||||||
if ($meta['managed']) {
|
if (isset($meta['managed'])) {
|
||||||
$result[] = new ComicPressBackendAttachment($child);
|
if ($meta['managed']) {
|
||||||
|
$result[] = new ComicPressBackendAttachment($child);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit colors="true" bootstrap="test/bootstrap.php" />
|
<phpunit colors="true" bootstrap="test/bootstrap.php">
|
||||||
|
<php>
|
||||||
|
<ini name="error_reporting" value="30719" />
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
Loading…
Reference in New Issue