Port the code to PHP 8.5.

Replace the short open tags and the removed functions (mcrypt, mysql_error,
salt-less crypt). Decode the reCAPTCHA reply as JSON, turn off mysqli
exceptions, drop stripslashes(), and default missing input values.
Fix the misplaced continue in prune_images().
This commit is contained in:
tim
2026-09-25 21:18:58 +02:00
parent 15e81e17cc
commit 00829a0c0d
23 changed files with 145 additions and 130 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
<aside id="sidebar">
<div class="logo">
<a <?
<a <?php
// Match files that use the main x.x.x logo
if (preg_match("#^(/$|/index|/article)#", $_SERVER['REQUEST_URI'])) {
echo 'class="mono" ';
@@ -27,7 +27,7 @@ if (preg_match("#^(/$|/index|/article)#", $_SERVER['REQUEST_URI'])) {
<li><a href="/about">About <span class="xxx">x&middot;x&middot;x</span></a></li>
<li><a href="/article?start=5">Archive</a></li>
<li><a href="/publish">Add</a>/<a href="/publish/edit" class="sidelink">Edit</a></li>
<? if (isset($is_admin) && $is_admin) {
<?php if (isset($is_admin) && $is_admin) {
echo ' <li><a href="/publish/addeditor">Add editor</a></li>'."\n";
echo ' <li><a href="/publish/logout">Logout</a></li>'."\n";
}