summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2008-12-12 19:36:07 +0000
committerTim Almdal <tnalmdal@shaw.ca>2008-12-12 19:36:07 +0000
commit7715aa9c64e190585eda165a31c42de139bcd416 (patch)
tree894e314dd951dcbfbdfc90cddff1f81d115aa775
parente12451cf1033e6b6cfa8e278894ccac3098ddd84 (diff)
If the user class doesn't exist, then just set the owner_id to null. Another issue of generating data before the user class is installed
-rw-r--r--core/controllers/welcome.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php
index 5e76789c..10903f67 100644
--- a/core/controllers/welcome.php
+++ b/core/controllers/welcome.php
@@ -193,7 +193,7 @@ class Welcome_Controller extends Template_Controller {
function add_albums_and_photos($count, $desired_type=null) {
srand(time());
$parents = ORM::factory("item")->where("type", "album")->find_all()->as_array();
- $owner_id = user::active()->id;
+ $owner_id = class_exists("user") ? user::active()->id : null;
$test_images = glob(APPPATH . "tests/images/*.[Jj][Pp][Gg]");