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
+6 -6
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,7 +11,7 @@
<script type="text/javascript" src="utilities.js"></script>
<link rel="alternate" type="application/rss+xml" title="xxx.org.za RSS feed" href="/feed" />
</head>
<?
<?php
flush();
$num_stories = 5;
$editable = FALSE;
@@ -21,13 +21,13 @@
?>
<body>
<div id="container">
<? include_once("./sidebar.inc.php"); ?>
<?php include_once("./sidebar.inc.php"); ?>
<main id="main">
<div id="maintext">
<h1 class="logo">x&middot;x&middot;x</h1>
<?
<?php
if (!get_id() && (get_count() > 1))
echo sort_options("article");
echo display_stories();
@@ -36,9 +36,9 @@ echo display_stories();
</div> <!-- .maintext -->
</main> <!-- .main -->
</div> <!-- .container -->
<? include_once("./bottombar.inc.php"); ?>
<?php include_once("./bottombar.inc.php"); ?>
<? open_db('close'); ?>
<?php open_db('close'); ?>
</body>
</html>