|
@@ -441,7 +441,7 @@ class Album extends Module {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- public function setPublic($password, $visible) {
|
|
|
|
|
|
+ public function setPublic($password, $visible, $downloadable) {
|
|
|
|
|
|
# Check dependencies
|
|
# Check dependencies
|
|
self::dependencies(isset($this->database, $this->albumIDs));
|
|
self::dependencies(isset($this->database, $this->albumIDs));
|
|
@@ -460,8 +460,11 @@ class Album extends Module {
|
|
# Convert visible
|
|
# Convert visible
|
|
$visible = ($visible==='true' ? 1 : 0);
|
|
$visible = ($visible==='true' ? 1 : 0);
|
|
|
|
|
|
|
|
+ # Convert downloadable
|
|
|
|
+ $downloadable = ($downloadable==='true' ? 1 : 0);
|
|
|
|
+
|
|
# Set public
|
|
# Set public
|
|
- $result = $this->database->query("UPDATE lychee_albums SET public = '$public', visible = '$visible', password = NULL WHERE id = '$album->id';");
|
|
|
|
|
|
+ $result = $this->database->query("UPDATE lychee_albums SET public = '$public', visible = '$visible', downloadable = '$downloadable', password = NULL WHERE id = '$album->id';");
|
|
if (!$result) {
|
|
if (!$result) {
|
|
Log::error($this->database, __METHOD__, __LINE__, $this->database->error);
|
|
Log::error($this->database, __METHOD__, __LINE__, $this->database->error);
|
|
return false;
|
|
return false;
|