diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-06-27 15:55:47 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-06-27 15:55:47 -0700 |
commit | 2fbc03437ac6f861f597778964cf01737968bb94 (patch) | |
tree | 2aed23a35b499bac2814e3aeb6356a93008e2fa6 /modules/digibug/helpers | |
parent | f98b7dc631afc4da595aa149b21b5d38f41afd22 (diff) |
Digibug simplification cleanup. Upgrade digibug module to version 2.
1) Simplify the admin settings page to what most of our users
want. Eliminate basic_ and default_ ids. We just have company_id
and default_id. Advanced users can use advanced settings for now.
2) Fix security in print_photos (didn't get it right in my last commit)
3) Use the regular thumb and full urls if the images are publicly
available to reduce load on the proxy.
4) Simplify proxy expiration code.
5) Eliminate all specialized styles from the admin theme.
Diffstat (limited to 'modules/digibug/helpers')
-rw-r--r-- | modules/digibug/helpers/digibug_installer.php | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/modules/digibug/helpers/digibug_installer.php b/modules/digibug/helpers/digibug_installer.php index f1308fd3..1cd78b44 100644 --- a/modules/digibug/helpers/digibug_installer.php +++ b/modules/digibug/helpers/digibug_installer.php @@ -21,16 +21,28 @@ class digibug_installer { static function install() { Database::instance() ->query("CREATE TABLE {digibug_proxies} ( - `id` int(9) NOT NULL AUTO_INCREMENT, - `uuid` char(32) NOT NULL, - `request_date` TIMESTAMP NOT NULL DEFAULT current_timestamp, - `item_id` int(9) NOT NULL, - PRIMARY KEY (`id`)) - ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + `id` int(9) NOT NULL AUTO_INCREMENT, + `uuid` char(32) NOT NULL, + `request_date` TIMESTAMP NOT NULL DEFAULT current_timestamp, + `item_id` int(9) NOT NULL, + PRIMARY KEY (`id`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - module::set_var("digibug", "default_company_id", "3153"); - module::set_var("digibug", "default_event_id", "8491"); - module::set_version("digibug", 1); + module::set_var("digibug", "company_id", "3153"); + module::set_var("digibug", "event_id", "8491"); + module::set_version("digibug", 2); + } + + static function upgrade($version) { + if ($version == 1) { + module::clear_var("digibug", "default_company_id"); + module::clear_var("digibug", "default_event_id"); + module::clear_var("digibug", "basic_default_company_id"); + module::clear_var("digibug", "basic_event_id"); + module::set_var("digibug", "company_id", "3153"); + module::set_var("digibug", "event_id", "8491"); + module::set_version("digibug", $version = 2); + } } static function uninstall() { |