Changeset 154

User picture

Author: Mighty Gorgon

(2009/12/16 16:17) About 2 years ago

Bugs fixed:
* Wrong HTTP VARS processing in CMS preventing some CMS functions to work properly
* Removed old FOUNDER constant in CTracker since it is not needed anymore, and changed the code accordingly
* Fixed a bug when moving topics
* Renamed Profile Page to include Username in page title
* Fixed a bug in agreement template
* Added topic title when viewing topics in LOFI

Affected files

Updated ip/trunk/adm/admin_user_ban.php Download diff

153154
141
	}
141
	}
142
142
143
	$email_list = array();
143
	$email_list = array();
144
	if ( isset($_POST['ban_email']) )
144
	if (isset($_POST['ban_email']))
145
	{
145
	{
146
		// CrackerTracker v5.x
146
		// CrackerTracker v5.x
147
		if ( !empty($_POST['ban_email']) )
147
		if (!empty($_POST['ban_email']))
148
		{
148
		{
149
			include_once(IP_ROOT_PATH . 'ctracker/constants.' . PHP_EXT);
149
			include_once(IP_ROOT_PATH . 'ctracker/constants.' . PHP_EXT);
150
			$temp_userdata = get_userdata(CT_FIRST_ADMIN_UID, false);
150
151
			if( !$temp_userdata )
151
			$founder_id = (defined('FOUNDER_ID') ? FOUNDER_ID : get_founder_id());
152
			$temp_userdata = get_userdata($founder_id, false);
153
			if(!$temp_userdata)
152
			{
154
			{
153
				message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
155
				message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
154
			}
156
			}
155
157
156
			if ( $temp_userdata['user_email'] == $_POST['ban_email'] )
158
			if ($temp_userdata['user_email'] == $_POST['ban_email'])
157
			{
159
			{
158
				message_die(GENERAL_MESSAGE, $lang['ctracker_gmb_1stadmin']);
160
				message_die(GENERAL_MESSAGE, $lang['ctracker_gmb_1stadmin']);
159
			}
161
			}

Updated ip/trunk/cms.php Download diff

153154
46
46
47
$cms_type = 'cms_standard';
47
$cms_type = 'cms_standard';
48
48
49
if (!empty($_REQUEST['mode']) && ($_POST['mode'] != $_GET['mode']))
49
if (!empty($_REQUEST['mode']) && !empty($_GET['mode']) && ($_POST['mode'] != $_GET['mode']))
50
{
50
{
51
	$_REQUEST['mode'] = $_GET['mode'];
51
	$_REQUEST['mode'] = $_GET['mode'];
52
	$_POST['mode'] = $_GET['mode'];
52
	$_POST['mode'] = $_GET['mode'];
...
...
55
$mode = request_var('mode', '');
55
$mode = request_var('mode', '');
56
$mode = (in_array($mode, $mode_array) ? $mode : false);
56
$mode = (in_array($mode, $mode_array) ? $mode : false);
57
57
58
if (!empty($_REQUEST['action']) && ($_POST['action'] != $_GET['action']))
58
if (!empty($_REQUEST['action']) && !empty($_GET['action']) && ($_POST['action'] != $_GET['action']))
59
{
59
{
60
	$_REQUEST['action'] = $_GET['action'];
60
	$_REQUEST['action'] = $_GET['action'];
61
	$_POST['action'] = $_GET['action'];
61
	$_POST['action'] = $_GET['action'];

Updated ip/trunk/cms_ads.php Download diff

153154
61
$ad_format_array = array(1, 0);
61
$ad_format_array = array(1, 0);
62
$ad_format_lang_array = array($lang['BBCode'], $lang['HTML']);
62
$ad_format_lang_array = array($lang['BBCode'], $lang['HTML']);
63
63
64
if (!empty($_REQUEST['mode']) && ($_POST['mode'] != $_GET['mode']))
64
if (!empty($_REQUEST['mode']) && !empty($_GET['mode']) && ($_POST['mode'] != $_GET['mode']))
65
{
65
{
66
	$_REQUEST['mode'] = $_GET['mode'];
66
	$_REQUEST['mode'] = $_GET['mode'];
67
	$_POST['mode'] = $_GET['mode'];
67
	$_POST['mode'] = $_GET['mode'];

Updated ip/trunk/cms_menu.php Download diff

153154
38
	redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=cms_menu.' . PHP_EXT . '&admin=1', true));
38
	redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=cms_menu.' . PHP_EXT . '&admin=1', true));
39
}
39
}
40
40
41
if (!empty($_REQUEST['mode']) && ($_POST['mode'] != $_GET['mode']))
41
if (!empty($_REQUEST['mode']) && !empty($_GET['mode']) && ($_POST['mode'] != $_GET['mode']))
42
{
42
{
43
	$_REQUEST['mode'] = $_GET['mode'];
43
	$_REQUEST['mode'] = $_GET['mode'];
44
	$_POST['mode'] = $_GET['mode'];
44
	$_POST['mode'] = $_GET['mode'];
...
...
57
$item_type = isset($_POST['add_cat']) ? 'category_item' : $item_type;
57
$item_type = isset($_POST['add_cat']) ? 'category_item' : $item_type;
58
$item_type = htmlspecialchars($item_type);
58
$item_type = htmlspecialchars($item_type);
59
59
60
if (!empty($_REQUEST['action']) && ($_POST['action'] != $_GET['action']))
60
if (!empty($_REQUEST['action']) && !empty($_GET['action']) && ($_POST['action'] != $_GET['action']))
61
{
61
{
62
	$_REQUEST['action'] = $_GET['action'];
62
	$_REQUEST['action'] = $_GET['action'];
63
	$_POST['action'] = $_GET['action'];
63
	$_POST['action'] = $_GET['action'];

Updated ip/trunk/ctracker/classes/class_ct_database.php Download diff

153154
389
389
390
		if ($user_id != $userdata['user_id'])
390
		if ($user_id != $userdata['user_id'])
391
		{
391
		{
392
			include_once(IP_ROOT_PATH . 'ctracker/constants.' . PHP_EXT);
392
			$founder_id = (defined('FOUNDER_ID') ? FOUNDER_ID : get_founder_id());
393
393
			if ($user_id == $founder_id)
394
			if ($user_id == CT_FIRST_ADMIN_UID)
395
			{
394
			{
396
				message_die(GENERAL_MESSAGE, $lang['ctracker_gmb_1stadmin']);
395
				message_die(GENERAL_MESSAGE, $lang['ctracker_gmb_1stadmin']);
397
			}
396
			}

Updated ip/trunk/ctracker/constants.php Download diff

153154
37
 * Constants we need
37
 * Constants we need
38
 */
38
 */
39
define('CTRACKER_VERSION', '5.0.6');		// CrackerTracker Version
39
define('CTRACKER_VERSION', '5.0.6');		// CrackerTracker Version
40
if (defined('FOUNDER_ID'))
41
{
42
	define('CT_FIRST_ADMIN_UID', FOUNDER_ID);
43
}
44
else
45
{
46
	define('CT_FIRST_ADMIN_UID', '2');		// UserID of the first Admin
47
}
48
40
49
/*
41
/*
50
 * Extended Definitions
42
 * Extended Definitions

Updated ip/trunk/ctracker/constants_full.php Download diff

153154
37
 * Constants we need
37
 * Constants we need
38
 */
38
 */
39
define('CTRACKER_VERSION', '5.0.6');		// CrackerTracker Version
39
define('CTRACKER_VERSION', '5.0.6');		// CrackerTracker Version
40
define('CT_FIRST_ADMIN_UID', '2');			// UserID of the first Admin
41
40
42
/*
41
/*
43
 * Extended Definitions
42
 * Extended Definitions

Updated ip/trunk/includes/usercp_viewprofile.php Download diff

153154
1048
}
1048
}
1049
// MG Cash MOD For IP - END
1049
// MG Cash MOD For IP - END
1050
1050
1051
full_page_generation('profile_view_body.tpl', $lang['Viewing_profile'], '', '');
1051
full_page_generation('profile_view_body.tpl', htmlspecialchars($profiledata['username']), '', '');
1052
1052
1053
?>
1053
?>

Updated ip/trunk/modcp.php Download diff

153154
25
include(IP_ROOT_PATH . 'common.' . PHP_EXT);
25
include(IP_ROOT_PATH . 'common.' . PHP_EXT);
26
include_once(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
26
include_once(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
27
include_once(IP_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
27
include_once(IP_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
28
include_once(IP_ROOT_PATH . 'includes/functions_post.' . PHP_EXT);
28
29
29
@include_once(IP_ROOT_PATH . 'includes/class_topics.' . PHP_EXT);
30
@include_once(IP_ROOT_PATH . 'includes/class_topics.' . PHP_EXT);
30
$class_topics = new class_topics();
31
$class_topics = new class_topics();
...
...
606
607
607
				empty_cache_folders(POSTS_CACHE_FOLDER);
608
				empty_cache_folders(POSTS_CACHE_FOLDER);
608
				empty_cache_folders(FORUMS_CACHE_FOLDER);
609
				empty_cache_folders(FORUMS_CACHE_FOLDER);
610
				sync_topic_details(0, 0, true, false);
609
				sync('forum', $new_forum_id);
611
				sync('forum', $new_forum_id);
610
				sync('forum', $old_forum_id);
612
				sync('forum', $old_forum_id);
611
				$message = ((sizeof($topics) == '1') ? sprintf($lang['Mod_CP_topic_moved'], find_names($old_forum_id), find_names($new_forum_id)) :
sprintf($lang['Mod_CP_topics_moved'], find_names($old_forum_id), find_names($new_forum_id))) .'<br /><br />';
613
				$message = ((sizeof($topics) == '1') ? sprintf($lang['Mod_CP_topic_moved'], find_names($old_forum_id), find_names($new_forum_id)) :
sprintf($lang['Mod_CP_topics_moved'], find_names($old_forum_id), find_names($new_forum_id))) .'<br /><br />';

Updated ip/trunk/templates/common/lofi/lofi_topic.tpl Download diff

153154
80
80
81
<div class="nav"><a href="{U_INDEX}">{L_INDEX}</a>{NAV_CAT_DESC}</div><br />
81
<div class="nav"><a href="{U_INDEX}">{L_INDEX}</a>{NAV_CAT_DESC}</div><br />
82
82
83
<h2><a href="{U_VIEW_TOPIC_BASE}" style="text-decoration: none;">{TOPIC_TITLE}</a></h2>
84
83
<div class="index">
85
<div class="index">
84
	<div class="bottom">
86
	<div class="bottom">
85
		<div class="bottom-left"><a href="{U_POST_REPLY_TOPIC}" class="nav">{L_POST_REPLY_TOPIC}</a>
{LOFI_QUICK_REPLY}</div>
87
		<div class="bottom-left"><a href="{U_POST_REPLY_TOPIC}" class="nav">{L_POST_REPLY_TOPIC}</a>
{LOFI_QUICK_REPLY}</div>

Updated ip/trunk/templates/default/agreement.tpl Download diff

153154
1
<!-- INCLUDE overall_header.tpl -->
2
3
{ERROR_BOX}
1
{ERROR_BOX}
4
<form method="post" action="{S_AGREE_ACTION}">
2
<form method="post" action="{S_AGREE_ACTION}">
5
{IMG_THL}{IMG_THC}<span class="forumlink">{SITENAME} - {REGISTRATION}</span>{IMG_THR}<table class="forumlinenb"
width="100%" cellspacing="0" cellpadding="0">
3
{IMG_THL}{IMG_THC}<span class="forumlink">{SITENAME} - {REGISTRATION}</span>{IMG_THR}<table class="forumlinenb"
width="100%" cellspacing="0" cellpadding="0">
...
...
25
</tr>
23
</tr>
26
</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}
24
</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}
27
</form>
25
</form>
28
29
<!-- INCLUDE overall_footer.tpl -->