- Raids: "Max. Spieler" only whole numbers up to groups x 5 (max. 10 groups / 50), gearscore only a number; fixed +1 Lumipunkt per participation, other values only with the new raids.points permission; pick an existing premade per group when creating a raid; unchanged legacy values no longer block editing - Raid page updates itself every 15 s while visible (raids_live.php, cards rendered by includes/raid_card.php), open editors and confirm dialogs are kept - Restore takes the new raid_id from the bot (archived messages are now deleted in Discord) and moves settings, attendance and awards; website signups send the server display name - Premades: dissolve by leadership needs a reason, lead gets DMs on join/assign/decline/remove (source/actor_id sent to the bot), transfer picker skips players who already lead a group, website accept keeps the one-group rule, no commas in names - Site-wide Lumina dialog (assets/js/confirm-dialog.js) replaces confirm/prompt/alert via data-confirm; error flashes are a dialog you confirm with OK - Calendar: audience per entry (all / leadership takes part / internal) with the new calendar.leadership permission; day cells list all entries and scroll - Gear planner: main-hand picker filtered by the set's class, mismatches marked, "keine Klasse" option, link to an external skill/Daevanion plan per set - Map: correct kisk icons (Elyos on Verteron/Abyss, Altgard fixed), per-map max zoom and bounded panning, German texts, data source note - Tactics: toolbar as a uniform grid, whole-tactic copy, automatic versions with restore and a 90-day trash, official tactics protected - Global thin gold scrollbars, readable hover colours, "Sedes Luminis" spelling, patch notes and README, schema version 34 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
73 lines
3.5 KiB
PHP
73 lines
3.5 KiB
PHP
<?php
|
||
require_once __DIR__ . '/includes/bootstrap.php';
|
||
require_once __DIR__ . '/includes/wiki.php';
|
||
require_permission('wiki.view');
|
||
|
||
$page = wiki_page_by_id((int) ($_GET['id'] ?? 0));
|
||
if (!$page) {
|
||
show_not_found();
|
||
}
|
||
$canManage = wiki_can_manage();
|
||
|
||
$stmt = db()->prepare(
|
||
"SELECT r.id, r.title, r.summary, r.created_at, r.is_wip, CHAR_LENGTH(r.content) AS length,
|
||
COALESCE(NULLIF(u.display_name, ''), u.username) AS editor
|
||
FROM wiki_revisions r LEFT JOIN users u ON u.id = r.edited_by
|
||
WHERE r.page_id = ? ORDER BY r.created_at DESC, r.id DESC"
|
||
);
|
||
$stmt->execute([(int) $page['id']]);
|
||
$revisions = $stmt->fetchAll();
|
||
|
||
// Eine alte Version ansehen
|
||
$shown = null;
|
||
$revisionId = (int) ($_GET['rev'] ?? 0);
|
||
if ($revisionId > 0) {
|
||
$s = db()->prepare('SELECT * FROM wiki_revisions WHERE id = ? AND page_id = ?');
|
||
$s->execute([$revisionId, (int) $page['id']]);
|
||
$shown = $s->fetch() ?: null;
|
||
}
|
||
|
||
$pageTitle = 'Verlauf: ' . $page['title'] . ' - Wiki';
|
||
include __DIR__ . '/includes/header.php';
|
||
?>
|
||
<div class="panel">
|
||
<nav class="wiki-breadcrumb"><a href="/wiki.php">Wiki</a> <span>›</span> <a href="/wiki.php?page=<?= e(rawurlencode($page['slug'])) ?>"><?= e($page['title']) ?></a></nav>
|
||
<h1>Verlauf</h1>
|
||
<p class="text-muted">Jede gespeicherte Änderung dieser Seite. <?= $canManage ? 'Eine ältere Version lässt sich ansehen und wiederherstellen.' : 'Ältere Versionen kannst du dir ansehen.' ?></p>
|
||
|
||
<div class="table-scroll">
|
||
<table>
|
||
<thead><tr><th>Zeitpunkt</th><th>Von</th><th>Änderung</th><th>Länge</th><th></th></tr></thead>
|
||
<tbody>
|
||
<?php foreach ($revisions as $i => $revision): ?>
|
||
<tr<?= $shown && (int) $shown['id'] === (int) $revision['id'] ? ' class="row-pending"' : '' ?>>
|
||
<td><?= e(date('d.m.Y H:i', strtotime($revision['created_at']))) ?><?= $i === 0 ? ' <span class="badge badge-active">aktuell</span>' : '' ?></td>
|
||
<td><?= e($revision['editor'] ?? 'Unbekannt') ?></td>
|
||
<td><?= e($revision['summary'] ?? '') ?><?= $revision['title'] !== $page['title'] ? ' <span class="text-muted">(Titel: ' . e($revision['title']) . ')</span>' : '' ?></td>
|
||
<td class="text-muted"><?= number_format((int) $revision['length'], 0, ',', '.') ?> Zeichen</td>
|
||
<td><?php if ($i > 0): ?><a href="/wiki_history.php?id=<?= (int) $page['id'] ?>&rev=<?= (int) $revision['id'] ?>">ansehen</a><?php endif; ?></td>
|
||
</tr>
|
||
<?php endforeach; ?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
<?php if ($shown): ?>
|
||
<div class="panel wiki-article">
|
||
<div class="raid-header">
|
||
<h2>Version vom <?= e(date('d.m.Y H:i', strtotime($shown['created_at']))) ?> Uhr</h2>
|
||
<?php if ($canManage): ?>
|
||
<form method="post" action="/wiki_action.php" class="inline-form" data-confirm="Die aktuelle Version bleibt im Verlauf erhalten." data-confirm-title="Diese Version wiederherstellen?" data-confirm-ok="Wiederherstellen">
|
||
<?= csrf_field() ?>
|
||
<input type="hidden" name="action" value="restore">
|
||
<input type="hidden" name="revision_id" value="<?= (int) $shown['id'] ?>">
|
||
<button type="submit" class="button-small">Diese Version wiederherstellen</button>
|
||
</form>
|
||
<?php endif; ?>
|
||
</div>
|
||
<h1><?= e($shown['title']) ?></h1>
|
||
<div class="wiki-content"><?= wiki_render($shown['content']) ?></div>
|
||
</div>
|
||
<?php endif; ?>
|
||
<?php include __DIR__ . '/includes/footer.php'; ?>
|