summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-30 21:39:23 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-30 21:39:23 +0000
commit6b03b798f3be23c83d0587f180341929c49af886 (patch)
treeec019c8a1ba7e98a678f3a98ff52bb466fb2ea2b
parent4271f7702a2754d8470949209f2db82990eb2d1a (diff)
Move rearrange HTML generation into welcome.php so that we gracefully
handle the case where the DB is not installed yet.
-rw-r--r--core/controllers/welcome.php2
-rw-r--r--core/views/welcome.html.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php
index b6c4f381..c29a5aaf 100644
--- a/core/controllers/welcome.php
+++ b/core/controllers/welcome.php
@@ -36,11 +36,13 @@ class Welcome_Controller extends Template_Controller {
$this->template->deepest_photo = ORM::factory("item")
->where("type", "photo")->orderby("level", "desc")->find();
$this->template->album_tree = $this->_load_album_tree();
+ $this->template->rearrange_html = rearrange::get_html()->render();
} catch (Exception $e) {
$this->template->album_count = 0;
$this->template->photo_count = 0;
$this->template->deepest_photo = null;
$this->template->album_tree = array();
+ $this->template->rearrange_html = "";
}
$this->_load_user_info();
diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php
index 61c87c8b..e2390e9e 100644
--- a/core/views/welcome.html.php
+++ b/core/views/welcome.html.php
@@ -258,7 +258,7 @@
</fieldset>
<fieldset>
<legend>Rearrange</legend>
- <?= rearrange::get_html()->render() ?>
+ <?= $rearrange_html ?>
</fieldset>
</div>