mirror of
https://github.com/e107inc/e107.git
synced 2025-08-28 08:39:57 +02:00
Fixes #4890 - Quick fix for PHP8 undefined constant error.
This commit is contained in:
@@ -8,25 +8,33 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if(!defined('e107_INIT'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$comments_title = LAN_PLUGIN_DOWNLOAD_NAME;
|
||||
//TODO Rework to v2 standards into e107_plugins/download/e_search.php
|
||||
|
||||
$comments_title = defset('LAN_PLUGIN_DOWNLOAD_NAME');
|
||||
$comments_type_id = '2';
|
||||
$comments_return['download'] = "d.download_id, d.download_name";
|
||||
$comments_table['download'] = "LEFT JOIN #download AS d ON c.comment_type=2 AND d.download_id = c.comment_item_id";
|
||||
/**
|
||||
* @param $row
|
||||
* @return array
|
||||
*/
|
||||
function com_search_2($row) {
|
||||
global $con;
|
||||
$datestamp = $con -> convert_date($row['comment_datestamp'], "long");
|
||||
$res['link'] = "download.php?view.".$row['download_id'];
|
||||
$res['pre_title'] = $row['download_name'] ? LAN_SEARCH_70.": " : "";
|
||||
$res['title'] = $row['download_name'] ? $row['download_name'] : LAN_SEARCH_9;
|
||||
|
||||
/**
|
||||
* @param $row
|
||||
* @return array
|
||||
*/
|
||||
function com_search_2($row)
|
||||
{
|
||||
|
||||
$datestamp = e107::getParser()->toDate($row['comment_datestamp'], "long");
|
||||
$res['link'] = "download.php?view." . $row['download_id'];
|
||||
$res['pre_title'] = !empty($row['download_name']) ? defset('LAN_SEARCH_70') . ": " : "";
|
||||
$res['title'] = !empty($row['download_name']) ? $row['download_name'] : defset('LAN_SEARCH_9');
|
||||
$res['summary'] = $row['comment_comment'];
|
||||
preg_match("/([0-9]+)\.(.*)/", $row['comment_author'], $user);
|
||||
$res['detail'] = LAN_SEARCH_7."<a href='user.php?id.".$user[1]."'>".$user[2]."</a>".LAN_SEARCH_8.$datestamp;
|
||||
$res['detail'] = defset('LAN_SEARCH_7') . "<a href='user.php?id." . $user[1] . "'>" . $user[2] . "</a>" . defset('LAN_SEARCH_8') . $datestamp;
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user