function displayTitles() { global $googleFonts, $dataFolder; $settings = readDb("{$dataFolder}/settings-db.json"); $title = $settings->{"title"}; $titleSize = $settings->{"title-size"}; foreach ($googleFonts as $font) { echo "<tr><td>{$font}</td><td>" . "<h1 style=\"font-size: {$titleSize}; font-family: '{$font}'\">{$title}</h1></td></tr>"; } }
function workaroundToUpgradePortfolio() { global $portfolioFolder; foreach (glob("{$portfolioFolder}/*-db.json") as $dbFilename) { $db = readDb($dbFilename); $db->sort = isset($db->sort) ? $db->sort : intval($db->id) * 10000; $db->original = isset($db->original) ? $db->original : $db->{"original-file-name"}; $db->uploaded = isset($db->uploaded) ? $db->uploaded : $db->{"upload-date"}; $db->display = isset($db->display) ? $db->display === "on" || $db->display === true : true; saveDb($dbFilename, $db); } logEvent("portfolio-upgrade-done", "last-image", $db->id, $db); }
function readAccountsDb() { global $accountsDbFile; return readDb($accountsDbFile); }