summaryrefslogtreecommitdiff
path: root/core/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-13 04:56:29 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-13 04:56:29 +0000
commit16bebdca068eebedb1eea71e04d986936561e8fc (patch)
treed05e749eae20ae07aa74a94f1f518f1fc09569d4 /core/controllers
parentac59df23958d206956e92b4761c70214f8ffee8e (diff)
Make the admin/graphics UI mimic admin/themes with a single selected
toolkit above, and other available ones below.
Diffstat (limited to 'core/controllers')
-rw-r--r--core/controllers/admin_graphics.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/core/controllers/admin_graphics.php b/core/controllers/admin_graphics.php
index ba1c7569..69a83575 100644
--- a/core/controllers/admin_graphics.php
+++ b/core/controllers/admin_graphics.php
@@ -21,8 +21,20 @@ class Admin_Graphics_Controller extends Admin_Controller {
public function index() {
$view = new Admin_View("admin.html");
$view->content = new View("admin_graphics.html");
- $view->content->tk = new ArrayObject(graphics::detect_toolkits(), ArrayObject::ARRAY_AS_PROPS);
- $view->content->active = module::get_var("core", "graphics_toolkit");
+
+ $tk = new ArrayObject(graphics::detect_toolkits(), ArrayObject::ARRAY_AS_PROPS);
+ $active = module::get_var("core", "graphics_toolkit");
+ foreach (array("gd", "imagemagick", "graphicsmagick") as $id) {
+ if ($id == $active) {
+ $view->content->active = new View("admin_graphics_$id.html");
+ $view->content->active->tk = $tk;
+ } else {
+ $v = new View("admin_graphics_$id.html");
+ $v->tk = $tk;
+ $view->content->available .= $v;
+ }
+ }
+
print $view;
}
@@ -38,7 +50,8 @@ class Admin_Graphics_Controller extends Admin_Controller {
site_status::clear("missing_graphics_toolkit");
message::success(t("Updated Graphics Toolkit"));
- log::success("graphics", t("Changed graphics toolkit to: {{toolkit}}", array("toolkit" => $toolkit)));
+ log::success("graphics", t("Changed graphics toolkit to: {{toolkit}}",
+ array("toolkit" => $toolkit)));
}
url::redirect("admin/graphics");