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:
+6
-5
@@ -1,7 +1,8 @@
|
||||
<?
|
||||
<?php
|
||||
require_once('open_db.lib.php');
|
||||
require_once("get_data.lib.php");
|
||||
include_once("Numbers/Words.php");
|
||||
if (stream_resolve_include_path("Numbers/Words.php"))
|
||||
include_once("Numbers/Words.php");
|
||||
|
||||
function sort_options($link) {
|
||||
$queue = get_queue();
|
||||
@@ -64,7 +65,7 @@ function get_pager() {
|
||||
$queue_url = $queue ? 1 : 0;
|
||||
|
||||
$string = '<div class="pager">';
|
||||
$nw = new Numbers_Words();
|
||||
$nw = class_exists('Numbers_Words') ? new Numbers_Words() : NULL;
|
||||
// Are there later stories? Go backwards to them
|
||||
$string .= '<span class="next">';
|
||||
if ($start > 0) {
|
||||
@@ -74,7 +75,7 @@ function get_pager() {
|
||||
if (isset($_GET['show'])) $string .= '&show='.$show;
|
||||
if (isset($_GET['sort'])) $string .= '&sort='.$sort;
|
||||
if (isset($_GET['order'])) $string .= '&order='.$order;
|
||||
$articles = ($show == 1) ? "article" : $nw->toWords($show)." articles";
|
||||
$articles = ($show == 1) ? "article" : ($nw ? $nw->toWords($show) : $show)." articles";
|
||||
$string .= '">« Next '.$articles.'</a>';
|
||||
}
|
||||
$string .= "</span>\n";
|
||||
@@ -88,7 +89,7 @@ function get_pager() {
|
||||
if (isset($_GET['show'])) $string .= '&show='.$show;
|
||||
if (isset($_GET['sort'])) $string .= '&sort='.$sort;
|
||||
if (isset($_GET['order'])) $string .= '&order='.$order;
|
||||
$articles = ($show == 1) ? "article" : $nw->toWords($show)." articles";
|
||||
$articles = ($show == 1) ? "article" : ($nw ? $nw->toWords($show) : $show)." articles";
|
||||
$string .= '">Previous '.$articles.' »</a>';
|
||||
}
|
||||
$string .= "</span>\n";
|
||||
|
||||
Reference in New Issue
Block a user