1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-09 16:17:14 +02:00

PHP8 Plugin code cleanup

This commit is contained in:
Cameron
2021-01-21 09:38:38 -08:00
parent 9e0d014e39
commit f055b49d91
83 changed files with 753 additions and 675 deletions

View File

@@ -10,7 +10,7 @@
*
*/
require_once("../../class2.php");
require_once(__DIR__.'/../../class2.php');
if (!e107::isInstalled('chatbox_menu') || !getperms("P"))
{

View File

@@ -9,7 +9,7 @@
* e107 chatbox_menu Plugin
*
*/
require_once('../../class2.php');
require_once(__DIR__.'/../../class2.php');
if ( ! e107::isInstalled('chatbox_menu')) {
e107::redirect();
exit;
@@ -19,14 +19,17 @@ e107::lan('chatbox_menu', e_LANGUAGE);
require_once(HEADERF);
$mes = e107::getMessage();
$sql->select('menus', "*", "menu_name='chatbox_menu'");
$row = $sql->fetch();
if($sql->select('menus', "*", "menu_name='chatbox_menu'"))
{
$row = $sql->fetch();
if ( ! check_class((int)$row['menu_class'])) {
$mes->addError(CHATBOX_L24);
$ns->tablerender(LAN_ERROR, $mes->render());
require_once(FOOTERF);
exit;
if(!check_class((int) $row['menu_class']))
{
$mes->addError(CHATBOX_L24);
$ns->tablerender(LAN_ERROR, $mes->render());
require_once(FOOTERF);
exit;
}
}
if ( ! isset($pref['cb_mod'])) {
@@ -102,7 +105,7 @@ $chat_total = $sql->count('chatbox');
$qry_where = (CB_MOD ? "1" : "cb_blocked=0");
$from = 0;
// when coming from search.php calculate page number
if ($fs) {

View File

@@ -15,7 +15,7 @@ if(isset($_POST['chatbox_ajax']))
define('e_MINIMAL', true);
if(!defined('e107_INIT'))
{
require_once('../../class2.php');
require_once(__DIR__.'/../../class2.php');
}
}
@@ -232,7 +232,7 @@ if($emessage !== '')
}
if(!$text = $e107cache->retrieve('nq_chatbox'))
if(!$text = e107::getCache()->retrieve('nq_chatbox'))
{
global $pref, $tp;
@@ -317,7 +317,7 @@ if(!$text = $e107cache->retrieve('nq_chatbox'))
: CHATBOX_L12) . '</a> (' . $total_chats . ')</div>';
}
$e107cache->set('nq_chatbox', $text);
e107::getCache()->set('nq_chatbox', $text);
}