Merge remote-tracking branch 'refs/remotes/origin/php8' into php8

This commit is contained in:
xiaomlove
2024-09-13 23:49:58 +08:00
7 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -818,7 +818,7 @@ function closeall() {
tagRemove = popstack(bbtags) tagRemove = popstack(bbtags)
if ( (tagRemove != 'color') ) { if ( (tagRemove != 'color') ) {
doInsert("[/"+tagRemove+"]", "", false); doInsert("[/"+tagRemove+"]", "", false);
eval("document.<?php echo $form?>." + tagRemove + ".value = ' " + tagRemove + " '"); eval("document.<?php echo $form?>." + tagRemove + ".value = ' " + tagRemove.toUpperCase() + " '");
eval(tagRemove + "_open = 0"); eval(tagRemove + "_open = 0");
} else { } else {
doInsert("[/"+tagRemove+"]", "", false); doInsert("[/"+tagRemove+"]", "", false);
+2 -2
View File
@@ -12,8 +12,8 @@ class DBMysqli implements DBInterface
if (mysqli_connect_errno()) { if (mysqli_connect_errno()) {
throw new DatabaseException(mysqli_connect_error()); throw new DatabaseException(mysqli_connect_error());
} }
$mysqli->query("SET NAMES UTF8"); $mysqli->set_charset("utf8mb4");
$mysqli->query("SET collation_connection = 'utf8_general_ci'"); $mysqli->query("SET collation_connection = 'utf8mb4_unicode_ci'");
$mysqli->query("SET sql_mode=''"); $mysqli->query("SET sql_mode=''");
$mysqli->query("SET time_zone='".date('P')."'"); $mysqli->query("SET time_zone='".date('P')."'");
+1 -1
View File
@@ -109,7 +109,7 @@ if ($Attach->enable_attachment())
if ($orig && !$stop) if ($orig && !$stop)
{ {
$thumb = imagecreatetruecolor($newwidth, $newheight); $thumb = imagecreatetruecolor($newwidth, $newheight);
imagecopyresized($thumb, $orig, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); imagecopyresampled($thumb, $orig, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
if ($thumbnailtype_attachment == 'createthumb'){ if ($thumbnailtype_attachment == 'createthumb'){
$hasthumb = true; $hasthumb = true;
imagejpeg($thumb, $file_location.".".$ext.".thumb.jpg", $thumbquality_attachment); imagejpeg($thumb, $file_location.".".$ext.".thumb.jpg", $thumbquality_attachment);
+1 -1
View File
@@ -48,7 +48,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST")
if(!$orig) if(!$orig)
stderr($lang_bitbucketupload['std_image_processing_failed'],$lang_bitbucketupload['std_sorry_the_uploaded']."$imgtypes[$it]".$lang_bitbucketupload['std_failed_processing']); stderr($lang_bitbucketupload['std_image_processing_failed'],$lang_bitbucketupload['std_sorry_the_uploaded']."$imgtypes[$it]".$lang_bitbucketupload['std_failed_processing']);
$thumb = imagecreatetruecolor($newwidth, $newheight); $thumb = imagecreatetruecolor($newwidth, $newheight);
imagecopyresized($thumb, $orig, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); imagecopyresampled($thumb, $orig, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
switch ($it) { switch ($it) {
case 1: case 1:
$ret = imagegif($thumb, $tgtfile); $ret = imagegif($thumb, $tgtfile);
+3 -1
View File
@@ -702,7 +702,6 @@ $search_area = 0;
if (isset($searchstr)) if (isset($searchstr))
{ {
if (!isset($_GET['notnewword']) || !$_GET['notnewword']){ if (!isset($_GET['notnewword']) || !$_GET['notnewword']){
insert_suggest($searchstr, $CURUSER['id']);
$notnewword=""; $notnewword="";
} }
else{ else{
@@ -956,6 +955,9 @@ do_log("[TORRENT_COUNT_SQL] $sql", 'debug');
if ($count) if ($count)
{ {
if (isset($searchstr) && (!isset($_GET['notnewword']) || !$_GET['notnewword'])){
insert_suggest($searchstr, $CURUSER['id']);
}
if ($addparam != "") if ($addparam != "")
{ {
if ($pagerlink != "") if ($pagerlink != "")
+1 -1
View File
@@ -238,7 +238,7 @@ if (user_can('userprofile') || $user["id"] == $CURUSER["id"])
tr_small($lang_userdetails['row_ip_address'], $user['ip'].$locationinfo.$seedBoxIcon, 1); tr_small($lang_userdetails['row_ip_address'], $user['ip'].$locationinfo.$seedBoxIcon, 1);
} }
$clientselect = ''; $clientselect = '';
$res = sql_query("SELECT peer_id, agent, ipv4, ipv6, port FROM peers WHERE userid = {$user['id']} GROUP BY agent") or sqlerr(); $res = sql_query("SELECT peer_id, agent, ipv4, ipv6, port FROM peers WHERE userid = {$user['id']} GROUP BY agent, ipv4, ipv6, port") or sqlerr();
if (mysql_num_rows($res) > 0) if (mysql_num_rows($res) > 0)
{ {
$clientselect .= "<table border='1' cellspacing='0' cellpadding='5'><tr><td class='colhead'>Agent</td><td class='colhead'>IPV4</td><td class='colhead'>IPV6</td><td class='colhead'>Port</td></tr>"; $clientselect .= "<table border='1' cellspacing='0' cellpadding='5'><tr><td class='colhead'>Agent</td><td class='colhead'>IPV4</td><td class='colhead'>IPV6</td><td class='colhead'>Port</td></tr>";
+1 -1
View File
@@ -18,4 +18,4 @@ if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false; return false;
} }
require_once __DIR__.'/public/index.php'; require_once __DIR__.'/public/nexus.php';