feat: frequency is now up to 366
feat: change filename of backup file fix: translate: "no category" fix: trim fixer api key fix: add webp support to gd on the container fix: update slovanian translations
This commit is contained in:
parent
76186d45d5
commit
fa99a735cd
@ -6,10 +6,10 @@ WORKDIR /var/www/html
|
|||||||
|
|
||||||
# Update packages and install dependencies
|
# Update packages and install dependencies
|
||||||
RUN apk upgrade --no-cache && \
|
RUN apk upgrade --no-cache && \
|
||||||
apk add --no-cache sqlite-dev libpng libpng-dev libjpeg-turbo libjpeg-turbo-dev freetype freetype-dev curl autoconf libgomp icu-dev nginx dcron tzdata imagemagick imagemagick-dev libzip-dev sqlite && \
|
apk add --no-cache sqlite-dev libpng libpng-dev libjpeg-turbo libjpeg-turbo-dev freetype freetype-dev curl autoconf libgomp icu-dev nginx dcron tzdata imagemagick imagemagick-dev libzip-dev sqlite libwebp-dev && \
|
||||||
docker-php-ext-install pdo pdo_sqlite && \
|
docker-php-ext-install pdo pdo_sqlite && \
|
||||||
docker-php-ext-enable pdo pdo_sqlite && \
|
docker-php-ext-enable pdo pdo_sqlite && \
|
||||||
docker-php-ext-configure gd --with-freetype --with-jpeg && \
|
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \
|
||||||
docker-php-ext-install -j$(nproc) gd intl zip && \
|
docker-php-ext-install -j$(nproc) gd intl zip && \
|
||||||
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
|
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
|
||||||
pecl install imagick && \
|
pecl install imagick && \
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
|
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
|
||||||
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
$newApiKey = isset($_POST["api_key"]) ? $_POST["api_key"] : "";
|
$newApiKey = isset($_POST["api_key"]) ? trim($_POST["api_key"]) : "";
|
||||||
$provider = isset($_POST["provider"]) ? $_POST["provider"] : 0;
|
$provider = isset($_POST["provider"]) ? $_POST["provider"] : 0;
|
||||||
|
|
||||||
$removeOldKey = "DELETE FROM fixer WHERE user_id = :userId";
|
$removeOldKey = "DELETE FROM fixer WHERE user_id = :userId";
|
||||||
|
|||||||
@ -49,11 +49,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$frequencies = array();
|
$frequencies = array();
|
||||||
$query = "SELECT * FROM frequencies";
|
for ($i = 1; $i <= 366; $i++) {
|
||||||
$result = $db->query($query);
|
$frequencies[$i] = array('id' => $i, 'name' => $i);
|
||||||
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
|
|
||||||
$frequencyId = $row['id'];
|
|
||||||
$frequencies[$frequencyId] = $row;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
$version = "v2.1.0";
|
$version = "v2.2.0";
|
||||||
?>
|
?>
|
||||||
|
|||||||
15
index.php
15
index.php
@ -83,6 +83,9 @@
|
|||||||
<div class="filtermenu-submenu-content" id="filter-category">
|
<div class="filtermenu-submenu-content" id="filter-category">
|
||||||
<?php
|
<?php
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
|
if ($category['name'] == "No category") {
|
||||||
|
$category['name'] = translate("no_category", $i18n);
|
||||||
|
}
|
||||||
$selectedClass = '';
|
$selectedClass = '';
|
||||||
if (isset($_GET['category']) && $_GET['category'] == $category['id']) {
|
if (isset($_GET['category']) && $_GET['category'] == $category['id']) {
|
||||||
$selectedClass = 'selected';
|
$selectedClass = 'selected';
|
||||||
@ -252,12 +255,12 @@
|
|||||||
<div class="inline">
|
<div class="inline">
|
||||||
<select id="frequency" name="frequency" placeholder="<?= translate('frequency', $i18n) ?>">
|
<select id="frequency" name="frequency" placeholder="<?= translate('frequency', $i18n) ?>">
|
||||||
<?php
|
<?php
|
||||||
foreach ($frequencies as $frequency) {
|
for ($i = 1; $i <= 366; $i++) {
|
||||||
?>
|
?>
|
||||||
<option value="<?= $frequency['id'] ?>"><?= $frequency['name'] ?></option>
|
<option value="<?= $i ?>"><?= $i ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<select id="cycle" name="cycle" placeholder="Cycle">
|
<select id="cycle" name="cycle" placeholder="Cycle">
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -101,7 +101,14 @@ function backupDB() {
|
|||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
const filename = data.file;
|
const filename = data.file;
|
||||||
link.href = '.tmp/' + filename;
|
link.href = '.tmp/' + filename;
|
||||||
link.download = 'backup.zip';
|
const date = new Date();
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
|
const hours = String(date.getHours()).padStart(2, '0');
|
||||||
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||||
|
const timestamp = `${year}${month}${day}-${hours}${minutes}`;
|
||||||
|
link.download = `Wallos-Backup-${timestamp}.zip`;
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
link.click();
|
link.click();
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
|
|||||||
@ -112,7 +112,7 @@ if (isset($_GET['member'])) {
|
|||||||
if (isset($_GET['category'])) {
|
if (isset($_GET['category'])) {
|
||||||
$conditions[] = "category_id = :category";
|
$conditions[] = "category_id = :category";
|
||||||
$params[':category'] = $_GET['category'];
|
$params[':category'] = $_GET['category'];
|
||||||
$statsSubtitleParts[] = $categories[$_GET['category']]['name'];
|
$statsSubtitleParts[] = $categories[$_GET['category']]['name'] == "No category" ? translate("no_category", $i18n) : $categories[$_GET['category']]['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['payment'])) {
|
if (isset($_GET['payment'])) {
|
||||||
@ -264,6 +264,9 @@ $numberOfElements = 6;
|
|||||||
<div class="filtermenu-submenu-content" id="filter-category">
|
<div class="filtermenu-submenu-content" id="filter-category">
|
||||||
<?php
|
<?php
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
|
if ($category['name'] == "No category") {
|
||||||
|
$category['name'] = translate("no_category", $i18n);
|
||||||
|
}
|
||||||
$selectedClass = '';
|
$selectedClass = '';
|
||||||
if (isset($_GET['category']) && $_GET['category'] == $category['id']) {
|
if (isset($_GET['category']) && $_GET['category'] == $category['id']) {
|
||||||
$selectedClass = 'selected';
|
$selectedClass = 'selected';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user