Revert "Minor improvements (#185)"

This reverts commit cafca1e854.
This commit is contained in:
Roman Kelesidis 2023-06-18 13:30:07 +07:00
parent b53083f8ee
commit ae0566b1eb
12 changed files with 31 additions and 26 deletions

View File

@ -108,7 +108,6 @@ if (!isset($_REQUEST['dosearch']))
'FORUMS_LIST' => $forums_list,
'LASTVISITED_LIST' => $lastvisited_list,
'U_SEARCH_USER' => BB_ROOT . 'search.php?mode=searchuser',
'S_SEARCH_ACTION' => 'admin_user_search.php',
));
}

View File

@ -230,7 +230,7 @@ class ajax_common
{
$this->response['action'] = $this->action;
if (sql_dbg_enabled())
if (DBG_USER && SQL_DEBUG && !empty($_COOKIE['sql_log']))
{
$this->response['sql_log'] = get_sql_log();
}

View File

@ -44,7 +44,7 @@ define('FULL_URL', $server_protocol . $bb_cfg['server_name'] . $server_port . $b
unset($server_protocol, $server_port);
// Debug options
define('DBG_USER', isset($_COOKIE[COOKIE_DBG]));
define('DBG_USER', (isset($_COOKIE[COOKIE_DBG])));
// Board/Tracker shared constants and functions
define('BB_BT_TORRENTS', 'bb_bt_torrents');

View File

@ -34,7 +34,7 @@ elseif (isset($this->request['topic_id']))
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id
LIMIT 1");
if(!$post) $this->ajax_die($lang['INVALID_TOPIC_ID_DB']);
if(!$post) $this->ajax_die('not post');
$is_auth = auth(AUTH_ALL, $post['forum_id'], $userdata, $post);
}

View File

@ -19,7 +19,7 @@ if (!empty($template))
$template->pparse('page_footer');
}
$show_dbg_info = (DBG_USER && !(isset($_GET['pane']) && $_GET['pane'] == 'left'));
$show_dbg_info = (DBG_USER && IS_ADMIN && !(isset($_GET['pane']) && $_GET['pane'] == 'left'));
if(!$bb_cfg['gzip_compress'])
{
@ -75,7 +75,7 @@ echo '
</div><!--/body_container-->
';
if ($show_dbg_info && SQL_DEBUG)
if (DBG_USER && SQL_DEBUG && !(isset($_GET['pane']) && $_GET['pane'] == 'left'))
{
require(INC_DIR . 'page_footer_dev.php');
}

View File

@ -496,7 +496,7 @@ class user_common
{
bb_setcookie(COOKIE_DATA, $c_sdata_curr, COOKIE_PERSIST, true);
}
if (isset($bb_cfg['dbg_users'][$this->data['user_id']]) && !DBG_USER)
if (isset($bb_cfg['dbg_users'][$this->data['user_id']]) && !isset($_COOKIE[COOKIE_DBG]))
{
bb_setcookie(COOKIE_DBG, 1, COOKIE_SESSION);
}

View File

@ -210,13 +210,13 @@ function hl (id, on)
<td class="small tCenter" title="{L_POSTS_SHORT}"><em class="med" style="color: grey">{L_POSTS_SHORT}:</em> {c.f.NUM_POSTS}</td>
<td class="med nowrap tCenter">
&nbsp;
<a class="med" href="{c.f.U_FORUM_EDIT}">{L_EDIT}</a>
<a class="med" href="{c.f.U_FORUM_EDIT}">edit</a>
&nbsp;&middot;&nbsp;
<a class="med" href="{c.f.U_FORUM_PERM}">{L_PERMISSIONS}</a>
<a class="med" href="{c.f.U_FORUM_PERM}">perm</a>
&nbsp;&middot;&nbsp;
<a class="med" href="{c.f.U_FORUM_RESYNC}">{L_SYNC}</a>
<a class="med" href="{c.f.U_FORUM_RESYNC}">sync</a>
&nbsp;&middot;&nbsp;
<a class="med" href="{c.f.U_FORUM_DELETE}">{L_DELETE}</a>
<a class="med" href="{c.f.U_FORUM_DELETE}">x</a>
&nbsp;
</td>
<td class="small" align="center" nowrap="nowrap"><b>{c.f.PRUNE_DAYS}</b></td>

View File

@ -65,7 +65,8 @@
<tr>
<th>{L_RANK_TITLE}</th>
<th>{L_RANK_IMAGE}</th>
<th colspan="2">{L_ACTION}</th>
<th>{L_EDIT}</th>
<th>{L_DELETE}</th>
</tr>
<!-- BEGIN ranks -->
<tr class="{ranks.ROW_CLASS} tCenter">

View File

@ -11,7 +11,7 @@
</tr>
<tr>
<td class="row1">{L_USERNAME}:</td>
<td class="row2"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS} <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
<td class="row2"><input class="post" type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS} <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></td>
</tr>
<tr>
<th colspan="2">{L_UNBAN_USERNAME}</th>

View File

@ -13,7 +13,7 @@
<th>{L_SEARCH_USERS_ADVANCED}</th>
</tr>
<tr>
<td class="row1"><span class="gen"><b>{L_USERNAME}:</b>&nbsp;<input class="post" type="text" name="username" maxlength="255" size="25" />&nbsp;<input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" onclick="window.open('{U_SEARCH_USER}', '_bbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" />&nbsp;<input type="submit" class="post2" name="search_username" value="{L_SEARCH}" /></span><br /><span class="small">{L_SEARCH_USERNAME_EXPLAIN}</span></td>
<td class="row1"><span class="gen"><b>{L_USERNAME}:</b>&nbsp;<input class="post" type="text" name="username" maxlength="255" size="25" />&nbsp;<input type="submit" class="post2" name="search_username" value="{L_SEARCH}" /></span><br /><span class="small">{L_SEARCH_USERNAME_EXPLAIN}</span></td>
</tr>
<tr>
<td class="row2">&nbsp;</td>
@ -91,7 +91,7 @@
</tr>
<!-- END forums_exist -->
<tr>
<td class="row1"><span class="gen"><select name="misc" class="post"><option value="admins" selected="selected">{L_ADMINISTRATORS}</option><option value="mods">{L_MODERATORS}</option><option value="banned">{L_BANNED_USERS}</option><option value="disabled">{L_DISABLED_USERS}</option></select>&nbsp;<input type="submit" class="post2" name="search_misc" value="{L_SEARCH}" /></span><br /><span class="small">{L_SEARCH_USERS_MISC_EXPLAIN}</span></td>
<td class="row1"><span class="gen"><select name="misc" class="post"><option value="admins" selected="selected">{L_ADMINISTRATORS}</option><option value="mods">{L_MODERATORS}</option><option value="banned">{L_BANNED_USERS}</option><option value="disabled">{L_DISABLED_USERS}</option></select>&nbsp;<input type="submit" class="post2" class="post2" name="search_misc" value="{L_SEARCH}" /></span><br /><span class="small">{L_SEARCH_USERS_MISC_EXPLAIN}</span></td>
</tr>
<tr>
<td class="row2">&nbsp;</td>

View File

@ -149,9 +149,14 @@ ajax.callback.manage_admin = function(data) {
</table>
<br />
<h3>{L_FORUM_STATS}</h3>
<table class="forumline">
<tr>
<th colspan="4">{L_FORUM_STATS}</th>
<th width="25%">{L_STATISTIC}</th>
<th width="25%">{L_VALUE}</th>
<th width="25%">{L_STATISTIC}</th>
<th width="25%">{L_VALUE}</th>
</tr>
<tr>
<td class="row1" nowrap="nowrap">{L_NUMBER_POSTS}:</td>

View File

@ -160,7 +160,7 @@
<!-- ENDIF -->
<div id="board_stats">
<h3 class="cat_title">{L_STATISTICS}</h3>
<h3 class="cat_title">{L_WHOSONLINE}</h3>
<div id="board_stats_wrap">
<table class="forums">