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

View File

@@ -818,7 +818,7 @@ function closeall() {
tagRemove = popstack(bbtags)
if ( (tagRemove != 'color') ) {
doInsert("[/"+tagRemove+"]", "", false);
eval("document.<?php echo $form?>." + tagRemove + ".value = ' " + tagRemove + " '");
eval("document.<?php echo $form?>." + tagRemove + ".value = ' " + tagRemove.toUpperCase() + " '");
eval(tagRemove + "_open = 0");
} else {
doInsert("[/"+tagRemove+"]", "", false);

View File

@@ -12,8 +12,8 @@ class DBMysqli implements DBInterface
if (mysqli_connect_errno()) {
throw new DatabaseException(mysqli_connect_error());
}
$mysqli->query("SET NAMES UTF8");
$mysqli->query("SET collation_connection = 'utf8_general_ci'");
$mysqli->set_charset("utf8mb4");
$mysqli->query("SET collation_connection = 'utf8mb4_unicode_ci'");
$mysqli->query("SET sql_mode=''");
$mysqli->query("SET time_zone='".date('P')."'");

View File

@@ -109,7 +109,7 @@ if ($Attach->enable_attachment())
if ($orig && !$stop)
{
$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'){
$hasthumb = true;
imagejpeg($thumb, $file_location.".".$ext.".thumb.jpg", $thumbquality_attachment);

View File

@@ -48,7 +48,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST")
if(!$orig)
stderr($lang_bitbucketupload['std_image_processing_failed'],$lang_bitbucketupload['std_sorry_the_uploaded']."$imgtypes[$it]".$lang_bitbucketupload['std_failed_processing']);
$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) {
case 1:
$ret = imagegif($thumb, $tgtfile);

View File

@@ -702,7 +702,6 @@ $search_area = 0;
if (isset($searchstr))
{
if (!isset($_GET['notnewword']) || !$_GET['notnewword']){
insert_suggest($searchstr, $CURUSER['id']);
$notnewword="";
}
else{
@@ -956,6 +955,9 @@ do_log("[TORRENT_COUNT_SQL] $sql", 'debug');
if ($count)
{
if (isset($searchstr) && (!isset($_GET['notnewword']) || !$_GET['notnewword'])){
insert_suggest($searchstr, $CURUSER['id']);
}
if ($addparam != "")
{
if ($pagerlink != "")

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);
}
$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)
{
$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>";

View File

@@ -18,4 +18,4 @@ if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
}
require_once __DIR__.'/public/index.php';
require_once __DIR__.'/public/nexus.php';