Fix some bugs
This commit is contained in:
parent
fab791d2e9
commit
a2b5773be0
@ -2,7 +2,6 @@
|
||||
/* Copyright (C) 2021 Alexander Rosenberg
|
||||
* This file is AGPL v3. See LICENSE file for more information
|
||||
*/
|
||||
require 'options.php';
|
||||
|
||||
class Album {
|
||||
private const PATH_PREFIX = 'albums';
|
||||
@ -38,7 +37,11 @@ class Album {
|
||||
$this->title = $root->{'title'};
|
||||
$this->thumbnail = $root->{'thumbnail'};
|
||||
$this->images = $root->{'images'};
|
||||
if (property_exists($root, 'metadata')) {
|
||||
$this->metadata = $root->{'metadata'};
|
||||
} else {
|
||||
$this->metadata = null;
|
||||
}
|
||||
}
|
||||
|
||||
private function invalidate() {
|
||||
|
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2021 Alexander Rosenberg
|
||||
* This file is AGPL v3. See LICENSE file for more information
|
||||
*/
|
||||
require 'options.php';
|
||||
require 'library.php';
|
||||
require 'Album.php';
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
<head>
|
||||
<?php
|
||||
const INITIAL_ALBUMS = 15;
|
||||
require 'options.php';
|
||||
require 'library.php';
|
||||
require 'Album.php';
|
||||
if ($_SERVER['REQUEST_METHOD'] != 'GET' && $_SERVER['REQUEST_METHOD'] != 'HEAD') {
|
||||
|
@ -2,8 +2,6 @@
|
||||
/* Copyright (C) 2021 Alexander Rosenberg
|
||||
* This file is AGPL v3. See LICENSE file for more information
|
||||
*/
|
||||
require 'options.php';
|
||||
|
||||
const CONFIG_PATH = AM_OPTIONS['root'] . '/config.json';
|
||||
|
||||
function display_error_message($msg, $html_tags = '') {
|
||||
|
@ -4,6 +4,7 @@
|
||||
-->
|
||||
<html>
|
||||
<?php
|
||||
require 'options.php';
|
||||
require 'library.php';
|
||||
require 'Album.php';
|
||||
if ($_SERVER['REQUEST_METHOD'] != 'GET' && $_SERVER['REQUEST_METHOD'] != 'HEAD') {
|
||||
|
Loading…
Reference in New Issue
Block a user