mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 04:38:27 +01:00
#4299: Wrap more potentially undefined constants
In: * Forums * /e107_admin/menus.php
This commit is contained in:
parent
bc1340af12
commit
ccf0f037aa
@ -1200,8 +1200,12 @@ function check_email($email)
|
||||
* @param int $uid
|
||||
* @return bool
|
||||
*/
|
||||
function check_class($var, $userclass = USERCLASS_LIST, $uid = 0)
|
||||
function check_class($var, $userclass = null, $uid = 0)
|
||||
{
|
||||
if ($userclass === null)
|
||||
{
|
||||
$userclass = defset('USERCLASS_LIST', '0');
|
||||
}
|
||||
$e107 = e107::getInstance();
|
||||
if ($var === e_LANGUAGE)
|
||||
{
|
||||
|
@ -1818,7 +1818,7 @@ $columnInfo = array(
|
||||
// See if any mirrors defined
|
||||
// Need to check all the possible mirror names - might have deleted the first one if we're in edit mode
|
||||
|
||||
if(count($_POST['download_mirror_name']))
|
||||
if(is_array($_POST['download_mirror_name']))
|
||||
{
|
||||
foreach ($_POST['download_mirror_name'] as $mn)
|
||||
{
|
||||
|
@ -16,8 +16,8 @@ class forum_dashboard // include plugin-folder in the name.
|
||||
$sql = e107::getDb();
|
||||
$forum_posts = $sql->count('forum_post');
|
||||
|
||||
$var[0]['icon'] = E_16_FORUM;
|
||||
$var[0]['title'] = LAN_PLUGIN_FORUM_POSTS;
|
||||
$var[0]['icon'] = defset('E_16_FORUM');
|
||||
$var[0]['title'] = defset('LAN_PLUGIN_FORUM_POSTS');
|
||||
$var[0]['url'] = e_PLUGIN."forum/forum_admin.php";
|
||||
$var[0]['total'] = $forum_posts;
|
||||
|
||||
@ -30,8 +30,8 @@ class forum_dashboard // include plugin-folder in the name.
|
||||
$sql = e107::getDb();
|
||||
$reported_posts = $sql->count('generic', '(*)', "WHERE gen_type='reported_post' OR gen_type='Reported Forum Post'");
|
||||
|
||||
$var[0]['icon'] = E_16_FORUM;
|
||||
$var[0]['title'] = ADLAN_LAT_6;
|
||||
$var[0]['icon'] = defset('E_16_FORUM');
|
||||
$var[0]['title'] = defset('ADLAN_LAT_6');
|
||||
$var[0]['url'] = e_PLUGIN."forum/forum_admin.php?mode=report&action=list";
|
||||
$var[0]['total'] = $reported_posts;
|
||||
|
||||
|
@ -17,6 +17,7 @@ if (!getperms('P'))
|
||||
}
|
||||
|
||||
|
||||
e107::lan('forum', 'global', true);
|
||||
e107::lan('forum', 'admin', true);
|
||||
e107::lan('forum', 'front', true);
|
||||
|
||||
|
@ -460,7 +460,7 @@ class forumStats
|
||||
$frm = e107::getForm();
|
||||
|
||||
$breadarray = array(
|
||||
array('text'=> e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME), 'url' => e107::url('forum','index') ),
|
||||
array('text'=> e107::pref('forum','title', defset('LAN_PLUGIN_FORUM_NAME')), 'url' => e107::url('forum','index') ),
|
||||
array('text'=>LAN_FORUM_6013, 'url'=>null)
|
||||
);
|
||||
|
||||
|
@ -12,7 +12,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
if(!defined("USER_WIDTH") && !deftrue('BOOTSTRAP')){ define("USER_WIDTH","width:95%;margin-left:auto;margin-right:auto"); }
|
||||
|
||||
$FORUM_PREVIEW = "<div>
|
||||
<table style='".USER_WIDTH."' class='fborder table'>
|
||||
<table style='".defset('USER_WIDTH')."' class='fborder table'>
|
||||
<tr>
|
||||
<td colspan='2' class='fcaption' style='vertical-align:top'>".LAN_FORUM_3005.
|
||||
($action != "nt" ? "</td>" : " ( ".LAN_FORUM_3011.": {PREVIEW_SUBJECT} )</td>")."
|
||||
|
@ -61,7 +61,7 @@ if (isset($_POST['update_theme']))
|
||||
$cfg->set('allow_theme_select', $themeeditclass);
|
||||
$cfg->save(true,true,true);
|
||||
|
||||
$woffle = LAN_UMENU_THEME_8.$pref['allowed_themes'].'[!br!]'.LAN_UMENU_THEME_9.$pref['allow_theme_select'];
|
||||
$woffle = defset('LAN_UMENU_THEME_8').$pref['allowed_themes'].'[!br!]'.defset('LAN_UMENU_THEME_9').$pref['allow_theme_select'];
|
||||
e107::getLog()->add('UTHEME_01',$woffle,E_LOG_INFORMATIVE,'');
|
||||
}
|
||||
}
|
||||
@ -79,7 +79,7 @@ $themeeditclass = varset($pref['allow_theme_select'],e_UC_NOBODY);
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."' id='menu_conf_form'>
|
||||
<fieldset id='core-user_menu-usertheme'>
|
||||
<legend class='e-hideme'>".LAN_UMENU_THEME_6."</legend>
|
||||
<legend class='e-hideme'>".defset('LAN_UMENU_THEME_6')."</legend>
|
||||
<table class='table adminlist'>
|
||||
<colgroup span='2'>
|
||||
<col style='width: 50%' />
|
||||
@ -87,7 +87,7 @@ $text = "
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan='2'>".LAN_UMENU_THEME_4."</th>
|
||||
<th colspan='2'>".defset('LAN_UMENU_THEME_4')."</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>";
|
||||
@ -103,7 +103,7 @@ $text = "
|
||||
}
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>".LAN_UMENU_THEME_7."</td>
|
||||
<td>".defset('LAN_UMENU_THEME_7')."</td>
|
||||
<td>".$e_userclass->uc_dropdown("themeeditclass", $themeeditclass, "main,member,admin,classes,matchclass,nobody")."</td>
|
||||
</tr>";
|
||||
|
||||
@ -118,7 +118,7 @@ $text = "
|
||||
";
|
||||
$mes = e107::getMessage();
|
||||
|
||||
$ns->tablerender(LAN_UMENU_THEME_6,$mes->render().$text);
|
||||
$ns->tablerender(defset('LAN_UMENU_THEME_6'),$mes->render().$text);
|
||||
|
||||
require_once(e_ADMIN."footer.php");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user