The installation fails
[mysql error 1062] Duplicate entry 'smartpocket' for key 'PRIMARY' INSERT INTO piwigotest_config (param,value,comment) VALUES ('smartpocket' , 'a:2:{s:4:\"loop\";b:1;s:8:\"autohide\";i:5000;}' , 'loop#autohide'); #1 my_error /homez.59/strangep/www/piwigo_test/include/dblayer/functions_mysqli.inc.php(109) #2 pwg_query /homez.59/strangep/www/piwigo_test/themes/smartpocket/admin/maintain.inc.php(17) #3 theme_activate /homez.59/strangep/www/piwigo_test/admin/include/themes.class.php(34) #4 DummyTheme_maintain::activate /homez.59/strangep/www/piwigo_test/admin/include/themes.class.php(157) #5 themes::perform_action /homez.59/strangep/www/piwigo_test/admin/include/functions_install.inc.php(84) #6 activate_core_themes /homez.59/strangep/www/piwigo_test/install.php(368)
why don't we use conf_update_param() in upgrade.inc.php, line 13-16 ?
Additionally I don't understand why the query seems to be executed twice
Offline
I also don't understand what is the point if
elseif (count(unserialize( $conf['smartpocket'] ))!=2)
is it a migration task from an older version ? or just a safety test ? (seems useless for me)
Offline
and the same error from maintain.inc.php file
I think we should use my wonderful Theme_maintain class interface :-)
at least you can remove theme_install function, because the same script is always executed if needed, in upgrade.inc.php
Offline
hi
1- conf_update_param() doesn't use the comment column ; as you've seen, conf_update_param is used when needed
2- that's for the future and also an integrity test
3- is there a doc for your class? If we want to push this as a standard, core themes have to use it, indeed.
Offline
1- is it really useful ? I think nobody cares about the comment
but if you don't want to use this method here you MUST test is the parameter does not already exsists in the table
2- ok
3- check skeleton trunk :) (replace PluginMaintain by ThemeMaintain, and of course the method names, the interface is in functions_plugins.inc.php)
Offline
great, no more errors
Offline