added option to add public album
This commit is contained in:
parent
dc6b849ae2
commit
24c91e47d4
@ -9,14 +9,14 @@
|
||||
|
||||
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
|
||||
|
||||
function addAlbum($title) {
|
||||
function addAlbum($title, $public = 0) {
|
||||
|
||||
global $database;
|
||||
|
||||
if (strlen($title)<1||strlen($title)>50) return false;
|
||||
|
||||
$sysdate = date("d.m.Y");
|
||||
$result = $database->query("INSERT INTO lychee_albums (title, sysdate) VALUES ('$title', '$sysdate');");
|
||||
$result = $database->query("INSERT INTO lychee_albums (title, sysdate, public) VALUES ('$title', '$sysdate', '$public');");
|
||||
|
||||
if (!$result) return false;
|
||||
return $database->insert_id;
|
||||
|
Loading…
Reference in New Issue
Block a user