Skip to content

Commit 886b003

Browse files
author
Emmanuel Garette
committed
don't create gps databases if already exsists
1 parent 0b99bba commit 886b003

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

maintain.inc.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function plugin_install()
9898

9999
$q = 'UPDATE '.CONFIG_TABLE.' SET `comment` = "Configuration settings for piwigo-openstreetmap plugin" WHERE `param` = "osm_conf";';
100100
pwg_query( $q );
101-
$q = "CREATE TABLE ".$prefixeTable."gps (
101+
$q = "CREATE TABLE IF NOT EXISTS ".$prefixeTable."gps (
102102
`id` int(11) NOT NULL auto_increment,
103103
`category_id` smallint(5) unsigned NOT NULL,
104104
`path` varchar(255) NOT NULL,
@@ -142,7 +142,6 @@ function plugin_uninstall()
142142
function plugin_activate()
143143
{
144144
global $conf;
145-
pwg_query( $q );
146145

147146
if ( (!isset($conf['osm_conf']))
148147
or (count($conf['osm_conf'], COUNT_RECURSIVE) != 25))

0 commit comments

Comments
 (0)