1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

PHP8/Bootstrap5 Fixes

This commit is contained in:
Cameron
2021-01-29 20:11:49 -08:00
parent 0610dad19a
commit eee039b616
5 changed files with 18 additions and 8 deletions

View File

@@ -986,7 +986,7 @@ class e_form
* @param $ajax * @param $ajax
* @return string * @return string
*/ */
public function iconpicker($name, $default, $label, $options = array(), $ajax = true) public function iconpicker($name, $default, $label='', $options = array(), $ajax = true)
{ {
//v2.2.0 //v2.2.0
unset($label,$ajax); // no longer used. unset($label,$ajax); // no longer used.
@@ -4064,6 +4064,11 @@ var_dump($select_options);*/
return ''; return '';
} }
if(is_array($value))
{
$value = null;
}
//format data first //format data first
$name = trim($this->name2id($name), '-'); $name = trim($this->name2id($name), '-');
$value = trim(preg_replace('#[^a-zA-Z0-9\-]#', '-', $value), '-'); $value = trim(preg_replace('#[^a-zA-Z0-9\-]#', '-', $value), '-');

View File

@@ -577,6 +577,11 @@ class e_pref extends e_front_model
// $log->logArrayDiffs($new, $old, 'PREFS_02', false); // $log->logArrayDiffs($new, $old, 'PREFS_02', false);
$log->addArray($new,$old); $log->addArray($new,$old);
unset($new, $old); unset($new, $old);
if(deftrue('e_DEBUG'))
{
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2);
$log->logMessage(print_a($backtrace,true), E_MESSAGE_DEBUG);
}
} }

View File

@@ -1411,9 +1411,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
$srch = array('{ICON}', '{CAPTION}'); $srch = array('{ICON}', '{CAPTION}');
$repl = array(varset($extraParms['icon']), $title); $repl = array(varset($extraParms['icon']), $title);
$title = str_replace($srch,$repl, $tmpl['caption']); $title = str_replace($srch,$repl, varset($tmpl['caption']));
$ret = $ns->tablerender($title, $text, 'default', true); $ret = $ns->tablerender($title, $text, 'default', true);
$ns->setUniqueId(null); $ns->setUniqueId(null);

View File

@@ -35,8 +35,10 @@ if($sql->select('menus', "*", "menu_name='chatbox_menu'"))
if ( ! isset($pref['cb_mod'])) { if ( ! isset($pref['cb_mod'])) {
$pref['cb_mod'] = e_UC_ADMIN; $pref['cb_mod'] = e_UC_ADMIN;
} }
if(!defined('CB_MOD'))
define('CB_MOD', check_class($pref['cb_mod'])); {
define('CB_MOD', check_class($pref['cb_mod']));
}
if ( ! empty($_POST['moderate']) && CB_MOD) { if ( ! empty($_POST['moderate']) && CB_MOD) {

View File

@@ -1157,11 +1157,11 @@
); );
$text .= "<li class='text-right'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='delete' data-confirm='".LAN_JSCONFIRM."' data-forum-thread='" . $id . "'>" . LAN_DELETE . " " . $tp->toGlyph('trash') . "</a></li>"; $text .= "<li class='text-right'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='delete' data-confirm='".LAN_JSCONFIRM."' data-forum-thread='" . $id . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
$text .= "<li class='text-right'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='" . $stickUnstick . "' data-forum-thread='" . $id . "'>" . $lan[$stickUnstick] . " " . $icon[$stickUnstick] . "</a></li>"; $text .= "<li class='text-right'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='" . $stickUnstick . "' data-forum-thread='" . $id . "'>" . $lan[$stickUnstick] . " " . $icon[$stickUnstick] . "</a></li>";
$text .= "<li class='text-right'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='" . $lockUnlock . "' data-forum-thread='" . $id . "'>" . $lan[$lockUnlock] . " " . $icon[$lockUnlock] . "</a></li>"; $text .= "<li class='text-right'><a class='dropdown-item' href='" . e_REQUEST_URI . "' data-forum-action='" . $lockUnlock . "' data-forum-thread='" . $id . "'>" . $lan[$lockUnlock] . " " . $icon[$lockUnlock] . "</a></li>";
$text .= "<li class='text-right'><a class='dropdown-item' href='{$moveUrl}'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('move') . "</a></li>"; $text .= "<li class='text-right'><a class='dropdown-item' href='{$moveUrl}'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('fa-arrows') . "</a></li>";
//if(e_DEVELOPER) //if(e_DEVELOPER)
// { // {