From cd64f578859ae37bf9fde7563eb1f1ae6aa0ba72 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 18 Nov 2009 21:25:35 -0500 Subject: [PATCH] more polishing --- classes/ComicPress.inc | 12 +-- classes/ComicPressAdmin.inc | 79 +++++++++++-------- .../_comic-image-ordering-sorters.inc | 1 - functions.inc | 26 ++++-- js/MediaUpload.js | 5 +- test/ComicPressAdminTest.php | 3 +- 6 files changed, 78 insertions(+), 48 deletions(-) diff --git a/classes/ComicPress.inc b/classes/ComicPress.inc index cd7feb2..5c971cb 100644 --- a/classes/ComicPress.inc +++ b/classes/ComicPress.inc @@ -95,11 +95,13 @@ class ComicPress { } function editor_max_image_size($current_max, $size) { - if (isset($this->comicpress_options['image_types'])) { - if (isset($this->comicpress_options['image_types'][$size])) { - if (isset($this->comicpress_options['image_types'][$size]['dimensions'])) { - list($width, $height) = explode('x', $this->comicpress_options['image_types'][$size]['dimensions']); - $current_max = array(intval($width), intval($height)); + if (is_string($size)) { + if (isset($this->comicpress_options['image_types'])) { + if (isset($this->comicpress_options['image_types'][$size])) { + if (isset($this->comicpress_options['image_types'][$size]['dimensions'])) { + list($width, $height) = explode('x', $this->comicpress_options['image_types'][$size]['dimensions']); + $current_max = array(intval($width), intval($height)); + } } } } diff --git a/classes/ComicPressAdmin.inc b/classes/ComicPressAdmin.inc index 136adb7..7018924 100644 --- a/classes/ComicPressAdmin.inc +++ b/classes/ComicPressAdmin.inc @@ -122,15 +122,24 @@ class ComicPressAdmin { $is_managed = $comicpress_info['managed']; } + $form_fields['comicpress_management'] = array( + 'label' => __("Let ComicPress Manage?", 'comicpress'), + 'input' => 'html', + 'html' => '' + + . '' + . '' + ); + if ($pagenow !== "media.php") { - $form_fields['auto_attach'] = array( - 'label' => __("Let ComicPress Manage?", 'comicpress'), + $form_fields['attach_parent'] = array( + 'label' => __("Change parent?", 'comicpress'), 'input' => 'html', - 'html' => '