summaryrefslogtreecommitdiff
path: root/core/controllers/welcome.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-28 05:45:35 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-28 05:45:35 +0000
commit2c86723942c9a2001a4fac6f50328521d21ced1e (patch)
tree8e5eb0706860c42af63b1617d7988ae737efdab1 /core/controllers/welcome.php
parent29966cc4fcd4e9d79936f033524bab67d75d2cac (diff)
Add an easy way to add a bunch of servers from the server side
Diffstat (limited to 'core/controllers/welcome.php')
-rw-r--r--core/controllers/welcome.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php
index 9b2ec19d..a75b225f 100644
--- a/core/controllers/welcome.php
+++ b/core/controllers/welcome.php
@@ -21,6 +21,8 @@ class Welcome_Controller extends Template_Controller {
public $template = "welcome.html";
function index() {
+ Session::instance();
+
$this->template->syscheck = new View("welcome_syscheck.html");
$this->template->syscheck->errors = $this->_get_config_errors();
$this->template->syscheck->modules = array();
@@ -149,6 +151,17 @@ class Welcome_Controller extends Template_Controller {
}
}
+ function add_photos() {
+ $path = $this->input->post("path");
+ cookie::set("add_photos_path", $path);
+
+ foreach (glob("$path/*.[Jj][Pp][Gg]") as $file) {
+ set_time_limit(30);
+ photo::create(1, $file, basename($file), basename($file));
+ }
+ url::redirect("welcome");
+ }
+
function add_albums_and_photos($count) {
srand(time());
$parents = ORM::factory("item")->where("type", "album")->find_all()->as_array();