Resolved #151 MX Map update check failed
This commit is contained in:
parent
652f46703b
commit
ba67ea6911
@ -367,6 +367,8 @@ class DirectoryBrowser implements ManialinkPageAnswerListener {
|
||||
$this->maniaControl->getMapManager()->getMXManager()->fetchManiaExchangeMapInformation($map);
|
||||
|
||||
$map->lastUpdate = time();
|
||||
//Update Map Timestamp in Database
|
||||
$this->maniaControl->getMapManager()->updateMapTimestamp($map->uid);
|
||||
|
||||
// Message
|
||||
$message = $player->getEscapedNickname() . ' added ' . $map->getEscapedName() . '!';
|
||||
|
@ -215,12 +215,13 @@ class MapManager implements CallbackListener, CommunicationListener, UsageInform
|
||||
* @param string $uid
|
||||
* @return bool
|
||||
*/
|
||||
private function updateMapTimestamp($uid) {
|
||||
public function updateMapTimestamp($uid) {
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
//TODO mxid was set to 0, verify what for
|
||||
$mapQuery = "UPDATE `" . self::TABLE_MAPS . "` SET
|
||||
mxid = 0,
|
||||
changed = NOW()
|
||||
WHERE 'uid' = ?";
|
||||
`changed` = NOW()
|
||||
WHERE `uid` LIKE ?";
|
||||
|
||||
$mapStatement = $mysqli->prepare($mapQuery);
|
||||
if ($mysqli->error) {
|
||||
trigger_error($mysqli->error);
|
||||
@ -471,7 +472,11 @@ class MapManager implements CallbackListener, CommunicationListener, UsageInform
|
||||
$this->maniaControl->getChat()->sendError('Server Error!', $login);
|
||||
return;
|
||||
}
|
||||
|
||||
$map->lastUpdate = time();
|
||||
//Update TimeStamp in Database
|
||||
$this->updateMapTimestamp($mapInfo->uid);
|
||||
|
||||
|
||||
//TODO messages for communication
|
||||
if ($login) {
|
||||
|
Loading…
Reference in New Issue
Block a user