Some more cleanup and add PHP 8.2 support

This commit is contained in:
Marc Alexander
2023-02-13 20:39:50 +01:00
parent 552ceb2e49
commit 286bd55424
2 changed files with 5 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
"role": "Developer" "role": "Developer"
}], }],
"require": { "require": {
"php": ">=7.1.0,<8.2.0", "php": ">=7.1.0,<8.3.0",
"marc1706/phpbb-text-shortener": "^0.3.0" "marc1706/phpbb-text-shortener": "^0.3.0"
}, },
"extra": { "extra": {

View File

@@ -251,7 +251,7 @@ class fetch_posts
), ),
), ),
'WHERE' => $this->topic_type . ' 'WHERE' => $this->topic_type . '
' . $post_time . ' ' . $this->db->sql_escape($post_time) . '
AND t.topic_status <> ' . ITEM_MOVED . ' AND t.topic_status <> ' . ITEM_MOVED . '
AND t.topic_visibility = 1 AND t.topic_visibility = 1
AND t.topic_moved_id = 0 AND t.topic_moved_id = 0
@@ -266,11 +266,11 @@ class fetch_posts
// Cache queries for 30 seconds // Cache queries for 30 seconds
if ($number_of_posts != 0) if ($number_of_posts != 0)
{ {
$result = $this->db->sql_query_limit($sql, $number_of_posts, $start, 30); $result = $this->db->sql_query_limit($sql, $number_of_posts, $start, 10);
} }
else else
{ {
$result = $this->db->sql_query($sql, 30); $result = $this->db->sql_query($sql, 15);
} }
return $result; return $result;
@@ -634,7 +634,7 @@ class fetch_posts
} }
else else
{ {
$message = str_replace("\n", '<br/> ', $row['post_text']); $message = str_replace("\n", "\r", $row['post_text']);
} }
return $message; return $message;