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, 'FORUMS_LIST' => $forums_list,
'LASTVISITED_LIST' => $lastvisited_list, 'LASTVISITED_LIST' => $lastvisited_list,
'U_SEARCH_USER' => BB_ROOT . 'search.php?mode=searchuser',
'S_SEARCH_ACTION' => 'admin_user_search.php', 'S_SEARCH_ACTION' => 'admin_user_search.php',
)); ));
} }
@ -1050,4 +1049,4 @@ else
} }
} }
print_page('admin_user_search.tpl', 'admin'); print_page('admin_user_search.tpl', 'admin');

View File

@ -230,7 +230,7 @@ class ajax_common
{ {
$this->response['action'] = $this->action; $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(); $this->response['sql_log'] = get_sql_log();
} }
@ -428,4 +428,4 @@ class ajax_common
{ {
require(AJAX_DIR .'sitemap.php'); require(AJAX_DIR .'sitemap.php');
} }
} }

View File

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

View File

@ -18,7 +18,7 @@ if (isset($this->request['post_id']))
AND f.forum_id = t.forum_id AND f.forum_id = t.forum_id
AND p.post_id = pt.post_id AND p.post_id = pt.post_id
LIMIT 1"); LIMIT 1");
if(!$post) $this->ajax_die('not post'); if(!$post) $this->ajax_die('not post');
$is_auth = auth(AUTH_ALL, $post['forum_id'], $userdata, $post); $is_auth = auth(AUTH_ALL, $post['forum_id'], $userdata, $post);
if ($post['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod']) if ($post['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
@ -34,7 +34,7 @@ elseif (isset($this->request['topic_id']))
WHERE t.topic_id = $topic_id WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id AND f.forum_id = t.forum_id
LIMIT 1"); 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); $is_auth = auth(AUTH_ALL, $post['forum_id'], $userdata, $post);
} }

View File

@ -19,7 +19,7 @@ if (!empty($template))
$template->pparse('page_footer'); $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']) if(!$bb_cfg['gzip_compress'])
{ {
@ -75,7 +75,7 @@ echo '
</div><!--/body_container--> </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'); 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); 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); bb_setcookie(COOKIE_DBG, 1, COOKIE_SESSION);
} }
@ -878,4 +878,4 @@ function session_pagestart ($user_ip = USER_IP, $page_id = 0, $req_login = false
$user->session_start(array('req_login' => $req_login)); $user->session_start(array('req_login' => $req_login));
return $user->data; return $user->data;
} }

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="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"> <td class="med nowrap tCenter">
&nbsp; &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; &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; &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; &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; &nbsp;
</td> </td>
<td class="small" align="center" nowrap="nowrap"><b>{c.f.PRUNE_DAYS}</b></td> <td class="small" align="center" nowrap="nowrap"><b>{c.f.PRUNE_DAYS}</b></td>
@ -241,4 +241,4 @@ function hl (id, on)
<br /> <br />
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / TPL_FORUMS_LIST --> <!-- ENDIF / TPL_FORUMS_LIST -->

View File

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

View File

@ -11,7 +11,7 @@
</tr> </tr>
<tr> <tr>
<td class="row1">{L_USERNAME}:</td> <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>
<tr> <tr>
<th colspan="2">{L_UNBAN_USERNAME}</th> <th colspan="2">{L_UNBAN_USERNAME}</th>

View File

@ -13,7 +13,7 @@
<th>{L_SEARCH_USERS_ADVANCED}</th> <th>{L_SEARCH_USERS_ADVANCED}</th>
</tr> </tr>
<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>
<tr> <tr>
<td class="row2">&nbsp;</td> <td class="row2">&nbsp;</td>
@ -91,7 +91,7 @@
</tr> </tr>
<!-- END forums_exist --> <!-- END forums_exist -->
<tr> <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>
<tr> <tr>
<td class="row2">&nbsp;</td> <td class="row2">&nbsp;</td>
@ -160,4 +160,4 @@
</form> </form>
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / TPL_ADMIN_USER_SEARCH_RESULTS --> <!-- ENDIF / TPL_ADMIN_USER_SEARCH_RESULTS -->

View File

@ -149,9 +149,14 @@ ajax.callback.manage_admin = function(data) {
</table> </table>
<br /> <br />
<h3>{L_FORUM_STATS}</h3>
<table class="forumline"> <table class="forumline">
<tr> <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>
<tr> <tr>
<td class="row1" nowrap="nowrap">{L_NUMBER_POSTS}:</td> <td class="row1" nowrap="nowrap">{L_NUMBER_POSTS}:</td>
@ -219,4 +224,4 @@ ajax.callback.manage_admin = function(data) {
<!-- ENDIF --> <!-- ENDIF -->
<!--========================================================================--> <!--========================================================================-->
<!-- ENDIF / TPL_ADMIN_MAIN --> <!-- ENDIF / TPL_ADMIN_MAIN -->

View File

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