Skip to content

Commit

Permalink
Updated module_char_rename config option
Browse files Browse the repository at this point in the history
Updated module_char_rename config option to use new name.
Deleted core\class.config.php - no longer used.
Fixed SQL access in rss.php file.
  • Loading branch information
paintballrefjosh committed Mar 17, 2017
1 parent a65442b commit ac977a6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 129 deletions.
4 changes: 2 additions & 2 deletions config/config-protected.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
'db_host' => 'localhost',
'db_port' => '3306',
'db_username' => 'default',
'db_password' => 'ascent',
'db_name' => 'mangos_realmd',
'db_password' => 'default',
'db_name' => 'mangosweb',
'db_encoding' => 'utf8',
);
?>
116 changes: 0 additions & 116 deletions core/class.config.php

This file was deleted.

10 changes: 5 additions & 5 deletions inc/account/account.rename.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

// Initiate the page description
$Page_Desc = $lang['char_rename_desc'];
$PAGE_DESC = str_replace('[COST]', '<font color="blue">'.$mwe_config['module_charrename_pts'].'</font>', $Page_Desc);
$PAGE_DESC = str_replace('[COST]', '<font color="blue">'.$mwe_config['module_char_rename_pts'].'</font>', $Page_Desc);

// Load the accounts character list
$character_list = $Account->getCharacterList($user['id']);
Expand All @@ -52,13 +52,13 @@ function changeName()
return FALSE;
}

if($mwe_config['module_charrename'] == 0)
if($mwe_config['module_char_rename'] == 0)
{
output_message('error', 'Nice try hacking, but not good enough.');
return FALSE;
}

if($user['web_points'] >= $mwe_config['module_charrename_pts'])
if($user['web_points'] >= $mwe_config['module_char_rename_pts'])
{
if($Character->checkNameExists($_POST['newname']) == FALSE)
{
Expand All @@ -67,8 +67,8 @@ function changeName()
if($Character->setName($_POST['id'], $_POST['newname']) == TRUE)
{
$DB->query("UPDATE `mw_account_extend` SET
`web_points`=(`web_points` - ".$mwe_config['module_charrename_pts']."),
`points_spent`=(`points_spent` + ".$mwe_config['module_charrename_pts'].")
`web_points`=(`web_points` - ".$mwe_config['module_char_rename_pts']."),
`points_spent`=(`points_spent` + ".$mwe_config['module_char_rename_pts'].")
WHERE `account_id` = ".$user['id']." LIMIT 1"
);
output_message('success', $lang['char_rename_success'].' Redirecting...<meta http-equiv=refresh content="3;url=?p=account&sub=rename">');
Expand Down
12 changes: 6 additions & 6 deletions rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
// Use our own DATE format constant because the PHP one seems to be bugged in some PHP versions
define('DATE_RFC822_FIXED', 'D, d M Y H:i:s O');

include('core/class.config.php');
include('config/config-protected.php');
include('core/class.database.php');
$DB = new Database(
$mwe_config['db_host'],
$mwe_config['db_port'],
$mwe_config['db_username'],
$mwe_config['db_password'],
$mwe_config['db_name']
$dbconf['db_host'],
$dbconf['db_port'],
$dbconf['db_username'],
$dbconf['db_password'],
$dbconf['db_name']
);

// Get the last time someone added a post (used to determine wheter we should write a new xml or not)
Expand Down

0 comments on commit ac977a6

Please sign in to comment.