From fc7b78492bc671f6dd78e04f5d42de958cdfb1d7 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 17 Dec 2008 04:45:35 +0000 Subject: Separate thumbnails out into var/thumbs. This clears up some ambiguity in Item_Model and simplifies file_proxy. It also means we can stop munging file names in the var/resizes hierarchy. In the process, rename "thumbnail" to "thumb" everywhere in honor of Chad (well, ok because it's shorter).. --- core/controllers/welcome.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'core/controllers/welcome.php') diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index 7235e2c0..b341b1af 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -92,10 +92,15 @@ class Welcome_Controller extends Template_Controller { try { call_user_func(array("{$module->name}_installer", "uninstall")); } catch (Exception $e) { + print $e; } } } - } catch (Exception $e) { } + core_installer::uninstall(); + } catch (Exception $e) { + print $e; + } + // Since we're in a state of flux, it's possible that other stuff went wrong with the // uninstall, so back off and nuke it from orbit. It's the only way to be sure. @@ -206,15 +211,15 @@ class Welcome_Controller extends Template_Controller { $type = rand(0, 10) ? "photo" : "album"; } if ($type == "album") { - $thumbnail_size = module::get_var("core", "thumbnail_size"); + $thumb_size = module::get_var("core", "thumb_size"); $parents[] = album::create( $parent->id, "rnd_" . rand(), "Rnd $i", "random album $i", $owner_id) - ->set_thumbnail(DOCROOT . "core/tests/test.jpg", $thumbnail_size, $thumbnail_size) + ->set_thumb(DOCROOT . "core/tests/test.jpg", $thumb_size, $thumb_size) ->save(); } else { $photo_index = rand(0, count($test_images) - 1); photo::create($parent->id, $test_images[$photo_index], basename($test_images[$photo_index]), - "rnd_" . rand(), "sample thumbnail", $owner_id); + "rnd_" . rand(), "sample thumb", $owner_id); } } url::redirect("welcome"); -- cgit v1.2.3