From 0ca5fe3abe81f0eba70253a9cb5841e54d0c8535 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sat, 4 May 2024 11:58:21 +0700 Subject: [PATCH] Minor improvements (#1461) * Minor improvements * Update edit_user_profile.php * Update init_bb.php * Update init_bb.php * Update init_bb.php * Update usercp_register.tpl * Update admin_ug_auth.php * Update admin_ug_auth.tpl * Update tpl_config.php * Update viewprofile.php * Update group_membership.php * Update group_membership.php * Update viewtopic.tpl * Update admin_ug_auth.php * Update functions.php * Update admin_ug_auth.php * Update admin_ug_auth.php * Update admin_ug_auth.php * Update admin_forums.php * Update admin_forums.php * Update posting_tpl.php * Update viewforum.php * Update viewforum.tpl * Update admin_forums.php * Update admin_ug_auth.php * Update admin_ug_auth.php * Update usercp_viewprofile.tpl * Update register.php * Update admin_ug_auth.php * Update admin_ug_auth.php * Update posts.php * Update posting_tpl.php * Update viewforum.php * Update admin_forums.php * Update admin_forums.php * Update admin_forumauth.php * Update index_map.tpl * Update index.tpl * Update index.tpl * Update group.php * Update viewtopic.tpl * Update change_torrent.php * Update viewtopic.tpl * Update viewtopic.php * Update viewtopic.php * Update admin_log.php * Update search.php * Update usercp_register.tpl * Update CHANGELOG.md --- CHANGELOG.md | 2 +- admin/admin_forumauth.php | 2 +- admin/admin_forums.php | 34 +++++++++---------- admin/admin_log.php | 6 ++-- admin/admin_ug_auth.php | 22 ++++++------ group.php | 2 +- library/ajax/change_torrent.php | 2 +- library/ajax/edit_user_profile.php | 6 ++-- library/ajax/group_membership.php | 4 +-- library/ajax/posts.php | 4 +-- library/includes/functions.php | 2 +- library/includes/init_bb.php | 16 ++++----- library/includes/posting_tpl.php | 8 ++--- library/includes/ucp/register.php | 2 +- library/includes/ucp/viewprofile.php | 4 +-- search.php | 2 +- styles/templates/admin/admin_ug_auth.tpl | 2 +- styles/templates/default/index.tpl | 4 +-- styles/templates/default/index_map.tpl | 2 +- styles/templates/default/tpl_config.php | 10 +++--- styles/templates/default/usercp_register.tpl | 4 +-- .../templates/default/usercp_viewprofile.tpl | 2 +- styles/templates/default/viewforum.tpl | 10 +++--- styles/templates/default/viewtopic.tpl | 6 ++-- viewforum.php | 6 ++-- viewtopic.php | 4 +-- 26 files changed, 83 insertions(+), 85 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 160300e58..f7a47991a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ - Fixed quote selection for smiles [\#1457](https://github.com/torrentpier/torrentpier/pull/1457) ([belomaxorka](https://github.com/belomaxorka)) - Demo mode: Allow registering torrents by default [\#1440](https://github.com/torrentpier/torrentpier/pull/1440) ([belomaxorka](https://github.com/belomaxorka)) - Code refactoring [\#1441](https://github.com/torrentpier/torrentpier/pull/1441) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1435](https://github.com/torrentpier/torrentpier/pull/1435), [\#1443](https://github.com/torrentpier/torrentpier/pull/1443), [\#1446](https://github.com/torrentpier/torrentpier/pull/1446), [\#1450](https://github.com/torrentpier/torrentpier/pull/1450), [\#1452](https://github.com/torrentpier/torrentpier/pull/1452), [\#1458](https://github.com/torrentpier/torrentpier/pull/1458) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1435](https://github.com/torrentpier/torrentpier/pull/1435), [\#1443](https://github.com/torrentpier/torrentpier/pull/1443), [\#1446](https://github.com/torrentpier/torrentpier/pull/1446), [\#1450](https://github.com/torrentpier/torrentpier/pull/1450), [\#1452](https://github.com/torrentpier/torrentpier/pull/1452), [\#1458](https://github.com/torrentpier/torrentpier/pull/1458), [\#1461](https://github.com/torrentpier/torrentpier/pull/1461) ([belomaxorka](https://github.com/belomaxorka)) - Updated deps [\#1454](https://github.com/torrentpier/torrentpier/pull/1454), [\#1455](https://github.com/torrentpier/torrentpier/pull/1455), [\#1459](https://github.com/torrentpier/torrentpier/pull/1459), [\#1460](https://github.com/torrentpier/torrentpier/pull/1460) ([belomaxorka](https://github.com/belomaxorka)) - New Crowdin updates [\#1444](https://github.com/torrentpier/torrentpier/pull/1444), [\#1447](https://github.com/torrentpier/torrentpier/pull/1447), [\#1453](https://github.com/torrentpier/torrentpier/pull/1453) ([Exileum](https://github.com/Exileum)) diff --git a/admin/admin_forumauth.php b/admin/admin_forumauth.php index 9c0bd2fc1..afd0a48c9 100644 --- a/admin/admin_forumauth.php +++ b/admin/admin_forumauth.php @@ -207,7 +207,7 @@ if (empty($forum_id)) { } $adv_mode = empty($adv) ? '1' : '0'; - $switch_mode = "admin_forumauth.php?f=$forum_id&adv=$adv_mode"; + $switch_mode = "admin_forumauth.php?" . POST_FORUM_URL . "=$forum_id&adv=$adv_mode"; $switch_mode_text = empty($adv) ? $lang['ADVANCED_MODE'] : $lang['SIMPLE_MODE']; $u_switch_mode = '' . $switch_mode_text . ''; diff --git a/admin/admin_forums.php b/admin/admin_forums.php index f367903ac..96e5c8602 100644 --- a/admin/admin_forums.php +++ b/admin/admin_forums.php @@ -223,7 +223,7 @@ if ($mode) { $datastore->update('cat_forums'); CACHE('bb_cache')->rm(); - bb_die($lang['FORUMS_UPDATED'] . '

' . sprintf($lang['CLICK_RETURN_FORUMADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', '')); + bb_die($lang['FORUMS_UPDATED'] . '

' . sprintf($lang['CLICK_RETURN_FORUMADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', '')); break; @@ -312,7 +312,7 @@ if ($mode) { $message = $lang['FORUMS_UPDATED'] . '

'; $message .= $fix ? "$fix

" : ''; - $message .= sprintf($lang['CLICK_RETURN_FORUMADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); + $message .= sprintf($lang['CLICK_RETURN_FORUMADMIN'], '', '') . '

' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); bb_die($message); break; @@ -401,7 +401,7 @@ if ($mode) { // // Show form to delete a forum // - $forum_id = (int)$_GET['f']; + $forum_id = (int)$_GET[POST_FORUM_URL]; $move_to_options = ''; $move_to_options .= sf_get_list('forum', $forum_id, 0); @@ -650,7 +650,7 @@ if ($mode) { break; case 'forum_sync': - \TorrentPier\Legacy\Admin\Common::sync('forum', (int)$_GET['f']); + \TorrentPier\Legacy\Admin\Common::sync('forum', (int)$_GET[POST_FORUM_URL]); $datastore->update('cat_forums'); CACHE('bb_cache')->rm(); @@ -709,7 +709,7 @@ if (!$mode || $show_main_page) { $bgr_class_over = 'prow3'; $template->assign_vars(array( - 'U_ALL_FORUMS' => 'admin_forums.php?c=all', + 'U_ALL_FORUMS' => 'admin_forums.php?' . POST_CAT_URL . '=all', 'FORUMS_COUNT' => $total_forums, )); @@ -723,12 +723,12 @@ if (!$mode || $show_main_page) { 'CAT_ID' => $cat_id, 'CAT_DESC' => htmlCHR($category_rows[$i]['cat_title']), - 'U_CAT_EDIT' => "admin_forums.php?mode=editcat&c=$cat_id", - 'U_CAT_DELETE' => "admin_forums.php?mode=deletecat&c=$cat_id", - 'U_CAT_MOVE_UP' => "admin_forums.php?mode=cat_order&move=-15&c=$cat_id", - 'U_CAT_MOVE_DOWN' => "admin_forums.php?mode=cat_order&move=15&c=$cat_id", - 'U_VIEWCAT' => "admin_forums.php?c=$cat_id", - 'U_CREATE_FORUM' => "admin_forums.php?mode=addforum&c=$cat_id", + 'U_CAT_EDIT' => "admin_forums.php?mode=editcat&" . POST_CAT_URL . "=$cat_id", + 'U_CAT_DELETE' => "admin_forums.php?mode=deletecat&" . POST_CAT_URL . "=$cat_id", + 'U_CAT_MOVE_UP' => "admin_forums.php?mode=cat_order&move=-15&" . POST_CAT_URL . "=$cat_id", + 'U_CAT_MOVE_DOWN' => "admin_forums.php?mode=cat_order&move=15&" . POST_CAT_URL . "=$cat_id", + 'U_VIEWCAT' => "admin_forums.php?" . POST_CAT_URL . "=$cat_id", + 'U_CREATE_FORUM' => "admin_forums.php?mode=addforum&" . POST_CAT_URL . "=$cat_id", )); for ($j = 0; $j < $total_forums; $j++) { @@ -755,12 +755,12 @@ if (!$mode || $show_main_page) { 'FORUM_NAME_CLASS' => $forum_rows[$j]['forum_parent'] ? 'genmed' : 'gen', 'ADD_SUB_HREF' => !$forum_rows[$j]['forum_parent'] ? "admin_forums.php?mode=addforum&forum_parent={$forum_rows[$j]['forum_id']}" : '', 'U_VIEWFORUM' => BB_ROOT . FORUM_URL . $forum_id, - 'U_FORUM_EDIT' => "admin_forums.php?mode=editforum&f=$forum_id", - 'U_FORUM_PERM' => "admin_forumauth.php?f=$forum_id", - 'U_FORUM_DELETE' => "admin_forums.php?mode=deleteforum&f=$forum_id", - 'U_FORUM_MOVE_UP' => "admin_forums.php?mode=forum_order&move=-15&f=$forum_id&c=$req_cat_id", - 'U_FORUM_MOVE_DOWN' => "admin_forums.php?mode=forum_order&move=15&f=$forum_id&c=$req_cat_id", - 'U_FORUM_RESYNC' => "admin_forums.php?mode=forum_sync&f=$forum_id", + 'U_FORUM_EDIT' => "admin_forums.php?mode=editforum&" . POST_FORUM_URL . "=$forum_id", + 'U_FORUM_PERM' => "admin_forumauth.php?" . POST_FORUM_URL . "=$forum_id", + 'U_FORUM_DELETE' => "admin_forums.php?mode=deleteforum&" . POST_FORUM_URL . "=$forum_id", + 'U_FORUM_MOVE_UP' => "admin_forums.php?mode=forum_order&move=-15&" . POST_FORUM_URL . "=$forum_id&" . POST_CAT_URL . "=$req_cat_id", + 'U_FORUM_MOVE_DOWN' => "admin_forums.php?mode=forum_order&move=15&" . POST_FORUM_URL . "=$forum_id&" . POST_CAT_URL . "=$req_cat_id", + 'U_FORUM_RESYNC' => "admin_forums.php?mode=forum_sync&" . POST_FORUM_URL . "=$forum_id", )); } } diff --git a/admin/admin_log.php b/admin/admin_log.php index 2f51d1350..ded30c84d 100644 --- a/admin/admin_log.php +++ b/admin/admin_log.php @@ -36,9 +36,9 @@ $url = basename(__FILE__); // Key names $type_key = 'type'; -$forum_key = 'f'; -$topic_key = 't'; -$user_key = 'u'; +$forum_key = POST_FORUM_URL; +$topic_key = POST_TOPIC_URL; +$user_key = POST_USERS_URL; $datetime_key = 'dt'; // value should be strtotime() time ("2006-06-25" etc.) $daysback_key = 'db'; $sort_key = 'sort'; diff --git a/admin/admin_ug_auth.php b/admin/admin_ug_auth.php index f58e2b16c..90c27f636 100644 --- a/admin/admin_ug_auth.php +++ b/admin/admin_ug_auth.php @@ -87,7 +87,7 @@ if ($submit && $mode == 'user') { \TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id); $message = $lang['AUTH_UPDATED'] . '

'; - $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '', '') . '

'; + $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '', '') . '

'; $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); bb_die($message); @@ -103,7 +103,7 @@ if ($submit && $mode == 'user') { \TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id); $message = $lang['AUTH_UPDATED'] . '

'; - $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '', '') . '

'; + $message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '', '') . '

'; $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); bb_die($message); @@ -131,7 +131,7 @@ if ($submit && $mode == 'user') { $l_auth_return = ($mode == 'user') ? $lang['CLICK_RETURN_USERAUTH'] : $lang['CLICK_RETURN_GROUPAUTH']; $message = $lang['AUTH_UPDATED'] . '

'; - $message .= sprintf($l_auth_return, '', '') . '

'; + $message .= sprintf($l_auth_return, '', '') . '

'; $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); bb_die($message); @@ -159,7 +159,7 @@ elseif ($submit && $mode == 'group' && (!empty($_POST['auth']) && is_array($_POS $l_auth_return = $lang['CLICK_RETURN_GROUPAUTH']; $message = $lang['AUTH_UPDATED'] . '

'; - $message .= sprintf($l_auth_return, '', '') . '

'; + $message .= sprintf($l_auth_return, '', '') . '

'; $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''); bb_die($message); @@ -185,7 +185,7 @@ if ($mode == 'user' && (!empty($_POST['username']) || $user_id)) { $datastore->update('cat_forums'); $forums = $datastore->get('cat_forums'); } - $base_url = basename(__FILE__) . "?mode=user&u=$user_id"; + $base_url = basename(__FILE__) . "?mode=user&" . POST_USERS_URL . "=$user_id"; $ug_data = $this_userdata; $ug_data['session_logged_in'] = 1; @@ -197,7 +197,7 @@ if ($mode == 'user' && (!empty($_POST['username']) || $user_id)) { $template->assign_block_vars('c', array( 'CAT_ID' => $c_id, 'CAT_TITLE' => $forums['cat_title_html'][$c_id], - 'CAT_HREF' => "$base_url&c=$c_id", + 'CAT_HREF' => "$base_url&" . POST_CAT_URL . "=$c_id", )); if (!$c =& $_REQUEST['c'] or !in_array($c, array('all', $c_id)) or empty($c_data['forums'])) { @@ -304,7 +304,7 @@ if ($mode == 'user' && (!empty($_POST['username']) || $user_id)) { $datastore->update('cat_forums'); $forums = $datastore->get('cat_forums'); } - $base_url = basename(__FILE__) . "?mode=group&g=$group_id"; + $base_url = basename(__FILE__) . "?mode=group&" . POST_GROUPS_URL . "=$group_id"; $ug_data = array('group_id' => $group_id); $u_access = auth(AUTH_ALL, AUTH_LIST_ALL, $ug_data); @@ -313,7 +313,7 @@ if ($mode == 'user' && (!empty($_POST['username']) || $user_id)) { $template->assign_block_vars('c', array( 'CAT_ID' => $c_id, 'CAT_TITLE' => $forums['cat_title_html'][$c_id], - 'CAT_HREF' => "$base_url&c=$c_id", + 'CAT_HREF' => "$base_url&" . POST_CAT_URL . "=$c_id", )); if (!($c =& $_REQUEST['c']) || !in_array($c, array('all', $c_id)) || empty($c_data['forums'])) { @@ -381,7 +381,7 @@ if ($mode == 'user' && (!empty($_POST['username']) || $user_id)) { $s_hidden_fields = ' - + '; $template->assign_vars(array( @@ -419,8 +419,8 @@ $template->assign_vars(array( 'YES_SIGN' => $yes_sign, 'NO_SIGN' => $no_sign, 'S_AUTH_ACTION' => 'admin_ug_auth.php', - 'SELECTED_CAT' => !empty($_REQUEST['c']) ? $_REQUEST['c'] : '', - 'U_ALL_FORUMS' => !empty($base_url) ? "$base_url&c=all" : '', + 'SELECTED_CAT' => !empty($_REQUEST[POST_CAT_URL]) ? $_REQUEST[POST_CAT_URL] : '', + 'U_ALL_FORUMS' => !empty($base_url) ? "$base_url&" . POST_CAT_URL . "=all" : '', )); print_page('admin_ug_auth.tpl', 'admin'); diff --git a/group.php b/group.php index 82c824d15..712eb2e05 100644 --- a/group.php +++ b/group.php @@ -396,7 +396,7 @@ if (!$group_id) { 'U_SEARCH_RELEASES' => "tracker.php?srg=$group_id", 'U_GROUP_RELEASES' => GROUP_URL . $group_id . "&view=releases", 'U_GROUP_MEMBERS' => GROUP_URL . $group_id . "&view=members", - 'U_GROUP_CONFIG' => "group_edit.php?g=$group_id", + 'U_GROUP_CONFIG' => "group_edit.php?" . POST_GROUPS_URL . "=$group_id", 'RELEASE_GROUP' => (bool)$group_info['release_group'], 'GROUP_TYPE' => $group_type, diff --git a/library/ajax/change_torrent.php b/library/ajax/change_torrent.php index 5af8b6dfc..d0aa4b01b 100644 --- a/library/ajax/change_torrent.php +++ b/library/ajax/change_torrent.php @@ -96,7 +96,7 @@ switch ($type) { $this->prompt_for_confirm($lang['DEL_MOVE_TORRENT']); } \TorrentPier\Legacy\Torrent::delete_torrent($attach_id); - $url = make_url("modcp.php?t={$torrent['topic_id']}&mode=move&sid={$userdata['session_id']}"); + $url = make_url("modcp.php?" . POST_TOPIC_URL . "={$torrent['topic_id']}&mode=move&sid={$userdata['session_id']}"); break; } diff --git a/library/ajax/edit_user_profile.php b/library/ajax/edit_user_profile.php index 48b61e1a0..886e9f242 100644 --- a/library/ajax/edit_user_profile.php +++ b/library/ajax/edit_user_profile.php @@ -60,9 +60,8 @@ switch ($field) { } if (!isset($lang['GENDER_SELECT'][$value])) { $this->ajax_die($lang['ERROR']); - } else { - $this->response['new_value'] = $lang['GENDER_SELECT'][$value]; } + $this->response['new_value'] = $lang['GENDER_SELECT'][$value]; break; case 'user_birthday': @@ -107,8 +106,7 @@ switch ($field) { case 'user_occ': case 'user_interests': - $value = htmlCHR($value); - $this->response['new_value'] = $value; + $this->response['new_value'] = htmlCHR($value); break; case 'user_regdate': diff --git a/library/ajax/group_membership.php b/library/ajax/group_membership.php index 90ba1ecdd..8cf70eefa 100644 --- a/library/ajax/group_membership.php +++ b/library/ajax/group_membership.php @@ -38,7 +38,7 @@ switch ($mode) { $href = GROUP_URL . $row['group_id']; if (IS_ADMIN) { - $href .= "&u=$user_id"; + $href .= "&" . POST_USERS_URL . "=$user_id"; $link = '' . htmlCHR($row['group_name']) . ''; $html[] = $link; } else { @@ -48,7 +48,7 @@ switch ($mode) { } if ($row['group_moderator'] == $user->id) { $class .= ' selfMod'; - $href .= "&u=$user_id"; // сам юзер модератор этой группы + $href .= "&" . POST_USERS_URL . "=$user_id"; // сам юзер модератор этой группы } $link = '' . htmlCHR($row['group_name']) . ''; $html[] = $link; diff --git a/library/ajax/posts.php b/library/ajax/posts.php index 301e5256b..f62f1f55d 100644 --- a/library/ajax/posts.php +++ b/library/ajax/posts.php @@ -85,7 +85,7 @@ switch ($this->request['type']) { $message = "[quote]" . $post['topic_title'] . "[/quote]\r"; } if (mb_strlen($message, 'UTF-8') > 1000) { - $this->response['redirect'] = make_url(POSTING_URL . '?mode=quote&p=' . $post_id); + $this->response['redirect'] = make_url(POSTING_URL . '?mode=quote&' . POST_POST_URL . '=' . $post_id); } $this->response['quote'] = true; @@ -112,7 +112,7 @@ switch ($this->request['type']) { $this->ajax_die($lang['EDIT_OWN_POSTS']); } if ((mb_strlen($post['post_text'], 'UTF-8') > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id)) { - $this->response['redirect'] = make_url(POSTING_URL . '?mode=editpost&p=' . $post_id); + $this->response['redirect'] = make_url(POSTING_URL . '?mode=editpost&' . POST_POST_URL . '=' . $post_id); } elseif ($this->request['type'] == 'editor') { $text = (string)$this->request['text']; $text = prepare_message($text); diff --git a/library/includes/functions.php b/library/includes/functions.php index c3e8617b2..58a555c7b 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -1844,7 +1844,7 @@ function set_pr_die_append_msg($pr_uid) $template->assign_var('BB_DIE_APPEND_MSG', ' ' . $lang['PROFILE_RETURN'] . '

- ' . $lang['PROFILE_EDIT_RETURN'] . ' + ' . $lang['PROFILE_EDIT_RETURN'] . '

' . $lang['INDEX_RETURN'] . ' '); diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php index fe2b47711..3944f83c0 100644 --- a/library/includes/init_bb.php +++ b/library/includes/init_bb.php @@ -290,19 +290,19 @@ define('PASSWORD_MAX_LENGTH', 24); define('PAGE_HEADER', INC_DIR . '/page_header.php'); define('PAGE_FOOTER', INC_DIR . '/page_footer.php'); -define('CAT_URL', 'index.php?c='); +define('CAT_URL', 'index.php?' . POST_CAT_URL . '='); define('DL_URL', $bb_cfg['dl_url']); -define('FORUM_URL', 'viewforum.php?f='); -define('GROUP_URL', 'group.php?g='); +define('FORUM_URL', 'viewforum.php?' . POST_FORUM_URL . '='); +define('GROUP_URL', 'group.php?' . POST_GROUPS_URL . '='); define('LOGIN_URL', $bb_cfg['login_url']); -define('MODCP_URL', 'modcp.php?f='); +define('MODCP_URL', 'modcp.php?' . POST_FORUM_URL . '='); define('PM_URL', $bb_cfg['pm_url']); -define('POST_URL', 'viewtopic.php?p='); +define('POST_URL', 'viewtopic.php?' . POST_POST_URL . '='); define('POSTING_URL', $bb_cfg['posting_url']); -define('PROFILE_URL', 'profile.php?mode=viewprofile&u='); +define('PROFILE_URL', 'profile.php?mode=viewprofile&' . POST_USERS_URL . '='); define('BONUS_URL', 'profile.php?mode=bonus'); -define('TOPIC_URL', 'viewtopic.php?t='); -define('FILELIST_URL', 'filelist.php?t='); +define('TOPIC_URL', 'viewtopic.php?' . POST_TOPIC_URL . '='); +define('FILELIST_URL', 'filelist.php?' . POST_TOPIC_URL . '='); define('USER_AGENT', strtolower($_SERVER['HTTP_USER_AGENT'])); diff --git a/library/includes/posting_tpl.php b/library/includes/posting_tpl.php index 946fbe439..7f3fe164a 100644 --- a/library/includes/posting_tpl.php +++ b/library/includes/posting_tpl.php @@ -26,7 +26,7 @@ $sql = "SELECT * FROM " . BB_TOPIC_TPL . " WHERE tpl_id = {$f_data['forum_tpl_id if (!$f_data['forum_tpl_id'] || !$tpl_data = DB()->fetch_row($sql)) { if (!$edit_tpl_mode) { - redirect(POSTING_URL . "?mode=newtopic&f=$forum_id"); + redirect(POSTING_URL . "?mode=newtopic&" . POST_FORUM_URL . "=$forum_id"); } } @@ -34,12 +34,12 @@ $template->assign_vars([ 'PAGE_TITLE' => $lang['NEW_RELEASE'], 'FORUM_NAME' => $f_data['forum_name'], 'FORUM_ID' => $forum_id, - 'TPL_FORM_ACTION' => POSTING_URL . "?mode=newtopic&f=$forum_id", - 'REGULAR_TOPIC_HREF' => POSTING_URL . "?mode=newtopic&f=$forum_id", + 'TPL_FORM_ACTION' => POSTING_URL . "?mode=newtopic&" . POST_FORUM_URL . "=$forum_id", + 'REGULAR_TOPIC_HREF' => POSTING_URL . "?mode=newtopic&" . POST_FORUM_URL . "=$forum_id", 'TOR_REQUIRED' => $f_data['allow_reg_tracker'], 'EDIT_TPL' => $edit_tpl_mode, 'CAN_EDIT_TPL' => $can_edit_tpl, - 'EDIT_TPL_URL' => POSTING_URL . "?mode=new_rel&f=$forum_id&edit_tpl=1" + 'EDIT_TPL_URL' => POSTING_URL . "?mode=new_rel&" . POST_FORUM_URL . "=$forum_id&edit_tpl=1" ]); if ($tpl_data) { diff --git a/library/includes/ucp/register.php b/library/includes/ucp/register.php index f955f5a8b..fc5f422fe 100644 --- a/library/includes/ucp/register.php +++ b/library/includes/ucp/register.php @@ -627,7 +627,7 @@ if ($submit && !$errors) { $emailer->set_template('user_activate', $pr_data['user_lang']); $emailer->assign_vars([ 'USERNAME' => html_entity_decode($username), - 'U_ACTIVATE' => make_url("profile.php?mode=activate&u={$pr_data['user_id']}&act_key=$user_actkey"), + 'U_ACTIVATE' => make_url("profile.php?mode=activate&" . POST_USERS_URL . "={$pr_data['user_id']}&act_key=$user_actkey"), ]); $emailer->send(); diff --git a/library/includes/ucp/viewprofile.php b/library/includes/ucp/viewprofile.php index 188395569..ffe1fea0d 100644 --- a/library/includes/ucp/viewprofile.php +++ b/library/includes/ucp/viewprofile.php @@ -193,8 +193,8 @@ if (IS_ADMIN) { $template->assign_vars([ 'EDITABLE_TPLS' => true, 'AJAX_USER_OPT' => $ajax_user_opt, - 'U_MANAGE' => "profile.php?mode=editprofile&u={$profiledata['user_id']}", - 'U_PERMISSIONS' => "admin/admin_ug_auth.php?mode=user&u={$profiledata['user_id']}", + 'U_MANAGE' => "profile.php?mode=editprofile&" . POST_USERS_URL . "={$profiledata['user_id']}", + 'U_PERMISSIONS' => "admin/admin_ug_auth.php?mode=user&" . POST_USERS_URL . "={$profiledata['user_id']}", ]); } diff --git a/search.php b/search.php index d3e8c9ed6..ec939657c 100644 --- a/search.php +++ b/search.php @@ -56,7 +56,7 @@ if (isset($_POST['del_my_post'])) { DB()->query("UPDATE " . BB_POSTS . " SET user_post = 1 WHERE poster_id = {$user->id}"); - redirect("search.php?u={$user->id}"); + redirect("search.php?" . POST_USERS_URL . "={$user->id}"); } $tracking_topics = get_tracks('topic'); diff --git a/styles/templates/admin/admin_ug_auth.tpl b/styles/templates/admin/admin_ug_auth.tpl index 4c55e2ca8..2ff996588 100644 --- a/styles/templates/admin/admin_ug_auth.tpl +++ b/styles/templates/admin/admin_ug_auth.tpl @@ -170,7 +170,7 @@ thead tr { - +
diff --git a/styles/templates/default/index.tpl b/styles/templates/default/index.tpl index c627a6643..64b0bec17 100644 --- a/styles/templates/default/index.tpl +++ b/styles/templates/default/index.tpl @@ -85,7 +85,7 @@ - {c.f.FORUM_FOLDER_ALT} + {c.f.FORUM_FOLDER_ALT} @@ -99,7 +99,7 @@

{L_SUBFORUMS}: - {c.f.sf.SF_NAME} + {c.f.sf.SF_NAME}

diff --git a/styles/templates/default/index_map.tpl b/styles/templates/default/index_map.tpl index 62106d66f..742ac4637 100644 --- a/styles/templates/default/index_map.tpl +++ b/styles/templates/default/index_map.tpl @@ -42,7 +42,7 @@ $(function(){ $.each($('#f-map a'), function(i,a) { var f_id = $(a).attr('href'); $(a) - .attr('href', '{U_FORUM}?f='+ f_id) + .attr('href', '{U_FORUM}?{POST_FORUM_URL}='+ f_id) .before('feed') ; }); diff --git a/styles/templates/default/tpl_config.php b/styles/templates/default/tpl_config.php index 372ef8816..a0901bee0 100644 --- a/styles/templates/default/tpl_config.php +++ b/styles/templates/default/tpl_config.php @@ -139,10 +139,10 @@ if (!empty($page_cfg['load_tpl_vars']) and $vars = array_flip($page_cfg['load_tp 'MC_IMG' => $bb_cfg['text_buttons'] ? '[' . $lang['COMMENT'] . ']' : '[' . $lang['COMMENT'] . ']', 'POLL_IMG' => $bb_cfg['text_buttons'] ? $lang['TOPIC_POLL'] : '' . $lang['TOPIC_POLL'] . '', - 'QUOTE_URL' => BB_ROOT . POSTING_URL . '?mode=quote&p=', - 'EDIT_POST_URL' => BB_ROOT . POSTING_URL . '?mode=editpost&p=', - 'DELETE_POST_URL' => BB_ROOT . POSTING_URL . '?mode=delete&p=', - 'IP_POST_URL' => BB_ROOT . 'modcp.php?mode=ip&p=', + 'QUOTE_URL' => BB_ROOT . POSTING_URL . '?mode=quote&' . POST_POST_URL . '=', + 'EDIT_POST_URL' => BB_ROOT . POSTING_URL . '?mode=editpost&' . POST_POST_URL . '=', + 'DELETE_POST_URL' => BB_ROOT . POSTING_URL . '?mode=delete&' . POST_POST_URL . '=', + 'IP_POST_URL' => BB_ROOT . 'modcp.php?mode=ip&' . POST_POST_URL . '=', 'PROFILE_IMG' => $bb_cfg['text_buttons'] ? $lang['READ_PROFILE_TXTB'] : '' . $lang['READ_PROFILE_TXTB'] . '', 'PM_IMG' => $bb_cfg['text_buttons'] ? $lang['SEND_PM_TXTB'] : '' . $lang['SEND_PM_TXTB'] . '', @@ -150,7 +150,7 @@ if (!empty($page_cfg['load_tpl_vars']) and $vars = array_flip($page_cfg['load_tp 'WWW_IMG' => $bb_cfg['text_buttons'] ? $lang['VISIT_WEBSITE_TXTB'] : '' . $lang['VISIT_WEBSITE_TXTB'] . '', 'ICQ_IMG' => $bb_cfg['text_buttons'] ? $lang['ICQ_TXTB'] : '' . $lang['ICQ_TXTB'] . '', - 'EMAIL_URL' => BB_ROOT . 'profile.php?mode=email&u=', + 'EMAIL_URL' => BB_ROOT . 'profile.php?mode=email&' . POST_USERS_URL . '=', 'FORUM_URL' => BB_ROOT . FORUM_URL, 'PM_URL' => BB_ROOT . PM_URL, 'PROFILE_URL' => BB_ROOT . PROFILE_URL diff --git a/styles/templates/default/usercp_register.tpl b/styles/templates/default/usercp_register.tpl index 76ff25f4d..e582a2636 100644 --- a/styles/templates/default/usercp_register.tpl +++ b/styles/templates/default/usercp_register.tpl @@ -49,13 +49,13 @@ - - + diff --git a/styles/templates/default/usercp_viewprofile.tpl b/styles/templates/default/usercp_viewprofile.tpl index db9e859e1..dfd73d50e 100644 --- a/styles/templates/default/usercp_viewprofile.tpl +++ b/styles/templates/default/usercp_viewprofile.tpl @@ -377,7 +377,7 @@ ajax.callback.index_data = function(data) { [ {L_SEARCH_USER_POSTS} ] [ {L_SEARCH_USER_TOPICS} ] [ {L_SEARCH_RELEASES} ] - [ {L_WATCHED_TOPICS} ] + [ {L_WATCHED_TOPICS} ] [ {FEED_IMG} ]

diff --git a/styles/templates/default/viewforum.tpl b/styles/templates/default/viewforum.tpl index 638706606..01cb75350 100644 --- a/styles/templates/default/viewforum.tpl +++ b/styles/templates/default/viewforum.tpl @@ -630,11 +630,11 @@ td.topic_id { cursor: pointer; } diff --git a/styles/templates/default/viewtopic.tpl b/styles/templates/default/viewtopic.tpl index 5db15cd26..c6f81bff6 100644 --- a/styles/templates/default/viewtopic.tpl +++ b/styles/templates/default/viewtopic.tpl @@ -285,7 +285,7 @@ function build_poll_add_form (src_el)
- + @@ -499,7 +499,7 @@ function build_poll_add_form (src_el)
{PROFILE_IMG}{POST_BTN_SPACER} - {PM_IMG}{POST_BTN_SPACER} + {PM_IMG}{POST_BTN_SPACER}
@@ -513,7 +513,7 @@ function build_poll_add_form (src_el)