Skip to content

Commit 4f09ed7

Browse files
committed
Fixed issue #152
1 parent 6d7f7bf commit 4f09ed7

File tree

1 file changed

+12
-12
lines changed
  • src/xgp3.0.0/upload/application/controllers/game

1 file changed

+12
-12
lines changed

src/xgp3.0.0/upload/application/controllers/game/buddy.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ private function build_page()
135135
case 3:
136136

137137
$query = parent::$db->queryFetch("SELECT `buddy_id`
138-
FROM " . BUDDY . "
139-
WHERE (`buddy_receiver`='" . intval($this->_current_user['user_id']) . "' AND
140-
`buddy_sender`='" . intval($_POST['user']) . "') OR
141-
(`buddy_receiver`='" . intval($_POST['user']) . "' AND
142-
`buddy_sender`='" . intval($this->_current_user['user_id']) . "')");
138+
FROM " . BUDDY . "
139+
WHERE (`buddy_receiver`='" . intval($this->_current_user['user_id']) . "' AND
140+
`buddy_sender`='" . intval($_POST['user']) . "') OR
141+
(`buddy_receiver`='" . intval($_POST['user']) . "' AND
142+
`buddy_sender`='" . intval($this->_current_user['user_id']) . "')");
143143

144144
if (!$query) {
145145

@@ -148,10 +148,10 @@ private function build_page()
148148
FunctionsLib::sendMessage(intval($_POST['user']), $this->_current_user['user_id'], '', 5, $this->_current_user['user_name'], $this->_lang['bu_to_accept_title'], str_replace('%u', $this->_current_user['user_name'], $this->_lang['bu_to_accept_text']));
149149

150150
parent::$db->query("INSERT INTO " . BUDDY . " SET
151-
`buddy_sender`='" . intval($this->_current_user['user_id']) . "',
152-
`buddy_receiver`='" . intval($_POST['user']) . "',
153-
`buddy_status`='0',
154-
`buddy_request_text`='" . $text . "'");
151+
`buddy_sender`='" . intval($this->_current_user['user_id']) . "',
152+
`buddy_receiver`='" . intval($_POST['user']) . "',
153+
`buddy_status`='0',
154+
`buddy_request_text`='" . $text . "'");
155155

156156
FunctionsLib::redirect('game.php?page=buddy');
157157
} else {
@@ -178,15 +178,15 @@ private function build_page()
178178
} else {
179179
// SEARCH THE PLAYER
180180
$player = parent::$db->queryFetch("SELECT `user_name`
181-
FROM " . USERS . "
182-
WHERE `user_id`='" . intval($user) . "'");
181+
FROM " . USERS . "
182+
WHERE `user_id`='" . intval($user) . "'");
183183

184184
// IF PLAYER EXISTS, PROCEED
185185
if ($player) {
186186
$parse['user'] = $user;
187187
$parse['player'] = $player['user_name'];
188188

189-
parent::$page->display(parent::$page->parseTemplate(parent::$page->getTemplate('buddy/buddy_request'), $parse));
189+
parent::$page->display(parent::$page->parseTemplate(parent::$page->getTemplate('buddy/buddy_request'), $parse), false, '', false);
190190
} else { // EXIT
191191
FunctionsLib::redirect('game.php?page=buddy');
192192
}

0 commit comments

Comments
 (0)