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
+9 -9
View File
@@ -1,4 +1,4 @@
<? require_once("../session.lib.php"); ?>
<?php require_once("../session.lib.php"); ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@@ -11,12 +11,12 @@
<link rel='stylesheet' type='text/css' href='../publish/style.css' />
<script type="text/javascript" src="../utilities.js"></script>
<link rel="alternate" type="application/rss+xml" title="xxx.org.za RSS feed" href="/feed" />
<? include_once('tinymce_init.inc.php'); ?>
<? if (!$is_admin ) { ?>
<?php include_once('tinymce_init.inc.php'); ?>
<?php if (!$is_admin ) { ?>
<script src="https://www.google.com/recaptcha/api.js"></script>
<? } ?>
<?php } ?>
</head>
<?
<?php
flush();
require_once("../get_data.lib.php");
open_db('open');
@@ -26,13 +26,13 @@
?>
<body>
<div id='container'>
<? include_once("../sidebar.inc.php"); ?>
<?php include_once("../sidebar.inc.php"); ?>
<div id='main'>
<div id='maintext'>
<h1>submit</h1>
<?
<?php
/* Authenticated admin user allowed to: check the queue
edit article on the queue
optionally preview
@@ -84,9 +84,9 @@ switch ($action) {
</div> <!-- maintext -->
</div> <!-- main -->
</div> <!-- container -->
<? include_once("../bottombar.inc.php"); ?>
<?php include_once("../bottombar.inc.php"); ?>
<? open_db('close'); ?>
<?php open_db('close'); ?>
</body>
</html>