Generate identifier even when db entry exists #344
This commit is contained in:
parent
ed3418058e
commit
275e653b1a
@ -14,4 +14,5 @@ VALUES
|
|||||||
('medium','1'),
|
('medium','1'),
|
||||||
('imagick','1'),
|
('imagick','1'),
|
||||||
('dropboxKey',''),
|
('dropboxKey',''),
|
||||||
|
('identifier',''),
|
||||||
('plugins','');
|
('plugins','');
|
@ -54,6 +54,14 @@ if ($result->num_rows===0) {
|
|||||||
Log::error($database, 'update_030001', __LINE__, 'Could not update database (' . $database->error . ')');
|
Log::error($database, 'update_030001', __LINE__, 'Could not update database (' . $database->error . ')');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$identifier = md5(microtime(true));
|
||||||
|
$query = Database::prepare($database, "UPDATE `?` SET `value` = '?' WHERE `key` = 'identifier' LIMIT 1", array(LYCHEE_TABLE_SETTINGS, $identifier));
|
||||||
|
$result = $database->query($query);
|
||||||
|
if (!$result) {
|
||||||
|
Log::error($database, 'update_030001', __LINE__, 'Could not reset public albums (' . $database->error . ')');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set version
|
# Set version
|
||||||
|
Loading…
Reference in New Issue
Block a user