diff options
Diffstat (limited to 'modules/server_add/helpers')
-rw-r--r-- | modules/server_add/helpers/server_add.php | 2 | ||||
-rw-r--r-- | modules/server_add/helpers/server_add_event.php | 2 | ||||
-rw-r--r-- | modules/server_add/helpers/server_add_installer.php | 25 | ||||
-rw-r--r-- | modules/server_add/helpers/server_add_theme.php | 20 |
4 files changed, 33 insertions, 16 deletions
diff --git a/modules/server_add/helpers/server_add.php b/modules/server_add/helpers/server_add.php index 03869f2d..a412cb38 100644 --- a/modules/server_add/helpers/server_add.php +++ b/modules/server_add/helpers/server_add.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access."); /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2010 Bharat Mediratta + * Copyright (C) 2000-2011 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/modules/server_add/helpers/server_add_event.php b/modules/server_add/helpers/server_add_event.php index fd4ade71..c12ac288 100644 --- a/modules/server_add/helpers/server_add_event.php +++ b/modules/server_add/helpers/server_add_event.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access."); /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2010 Bharat Mediratta + * Copyright (C) 2000-2011 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/modules/server_add/helpers/server_add_installer.php b/modules/server_add/helpers/server_add_installer.php index 676bc3cf..4d8b66cd 100644 --- a/modules/server_add/helpers/server_add_installer.php +++ b/modules/server_add/helpers/server_add_installer.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access."); /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2010 Bharat Mediratta + * Copyright (C) 2000-2011 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,15 +20,17 @@ class server_add_installer { static function install() { $db = Database::instance(); - $db->query("CREATE TABLE {server_add_files} ( + $db->query("CREATE TABLE {server_add_entries} ( `id` int(9) NOT NULL auto_increment, - `file` varchar(255) NOT NULL, + `checked` boolean default 0, + `is_directory` boolean default 0, `item_id` int(9), `parent_id` int(9), + `path` varchar(255) NOT NULL, `task_id` int(9) NOT NULL, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8;"); - module::set_version("server_add", 3); + module::set_version("server_add", 4); server_add::check_config(); } @@ -49,6 +51,21 @@ class server_add_installer { $db->query("ALTER TABLE {server_add_files} ADD COLUMN `parent_id` int(9)"); module::set_version("server_add", $version = 3); } + + if ($version == 3) { + $db->query("DROP TABLE {server_add_files}"); + $db->query("CREATE TABLE {server_add_entries} ( + `id` int(9) NOT NULL auto_increment, + `checked` boolean default 0, + `is_directory` boolean default 0, + `item_id` int(9), + `parent_id` int(9), + `path` varchar(255) NOT NULL, + `task_id` int(9) NOT NULL, + PRIMARY KEY (`id`)) + DEFAULT CHARSET=utf8;"); + module::set_version("server_add", $version = 4); + } } static function deactivate() { diff --git a/modules/server_add/helpers/server_add_theme.php b/modules/server_add/helpers/server_add_theme.php index 53f78772..50c050a8 100644 --- a/modules/server_add/helpers/server_add_theme.php +++ b/modules/server_add/helpers/server_add_theme.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access."); /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2010 Bharat Mediratta + * Copyright (C) 2000-2011 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,24 +20,24 @@ class server_add_theme_Core { static function head($theme) { if (identity::active_user()->admin) { - $theme->css("server_add.css"); - $theme->script("server_add.js"); + return $theme->css("server_add.css") + . $theme->script("server_add.js"); } } static function admin_head($theme) { - $head = array(); + $buf = ""; if (strpos(Router::$current_uri, "admin/server_add") !== false) { - $theme->css("server_add.css"); - $theme->css("jquery.autocomplete.css"); + $buf .= $theme->css("server_add.css") + . $theme->css("jquery.autocomplete.css"); $base = url::site("__ARGS__"); $csrf = access::csrf_token(); - $head[] = "<script type=\"text/javascript\"> var base_url = \"$base\"; var csrf = \"$csrf\";</script>"; + $buf .= "<script type=\"text/javascript\"> var base_url = \"$base\"; var csrf = \"$csrf\";</script>"; - $theme->script("jquery.autocomplete.js"); - $theme->script("admin.js"); + $buf .= $theme->script("jquery.autocomplete.js") + . $theme->script("admin.js"); } - return implode("\n", $head); + return $buf; } }
\ No newline at end of file |