From fcd3837484169a331d8b1c1cc7c05f216fb65a9d Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 17 Mar 2010 09:58:22 +0000 Subject: [PATCH] feature 1514: bug fixed, core themes and already used themes are automatically activated. git-svn-id: http://piwigo.org/svn/trunk@5157 68402e56-0260-453c-a942-63ccdbb3a9ee --- install/config.sql | 4 +++ install/db/86-database.php | 69 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 install/db/86-database.php diff --git a/install/config.sql b/install/config.sql index 107accdd2..c8d83a908 100644 --- a/install/config.sql +++ b/install/config.sql @@ -32,3 +32,7 @@ INSERT INTO piwigo_config (param,value,comment) VALUES ('upload_link_everytime', INSERT INTO piwigo_config (param,value,comment) VALUES ('upload_user_access',2 /*ACCESS_CLASSIC*/,'User access level to upload'); INSERT INTO piwigo_config (param,value,comment) VALUES ('extents_for_templates','a:0:{}','Actived template-extension(s)'); INSERT INTO piwigo_config (param,value,comment) VALUES ('blk_menubar','','Menubar options'); + +INSERT INTO piwigo_themes (id) VALUES ('Sylvia'); +INSERT INTO piwigo_themes (id) VALUES ('clear'); +INSERT INTO piwigo_themes (id) VALUES ('dark'); diff --git a/install/db/86-database.php b/install/db/86-database.php new file mode 100644 index 000000000..b063a8d7b --- /dev/null +++ b/install/db/86-database.php @@ -0,0 +1,69 @@ +'; print_r($themes_to_activate); echo ''; exit(); + +foreach ($themes_to_activate as $theme) +{ + $query = ' +INSERT INTO '.PREFIX_TABLE.'themes + SET id = "'.$theme.'" +;'; + pwg_query($query); +} + +echo +"\n" +. $upgrade_description +."\n" +; +?> \ No newline at end of file