Begin of map search in map list
This commit is contained in:
parent
5b87873aba
commit
750f605d96
@ -350,7 +350,6 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
|||||||
|
|
||||||
if (strstr($actionId, self::ACTION_SHOW_AUTHOR)) {
|
if (strstr($actionId, self::ACTION_SHOW_AUTHOR)) {
|
||||||
$login = str_replace(self::ACTION_SHOW_AUTHOR, '', $actionId);
|
$login = str_replace(self::ACTION_SHOW_AUTHOR, '', $actionId);
|
||||||
$this->maniaControl->getMapManager()->getMapList()->playerCloseWidget($player);
|
|
||||||
$this->showMapListAuthor($login, $player);
|
$this->showMapListAuthor($login, $player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -993,6 +993,25 @@ class MapManager implements CallbackListener, CommunicationListener, UsageInform
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Searches the ManiaControl maps database
|
||||||
|
*
|
||||||
|
* @param $searchString
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function searchMaps($searchString){
|
||||||
|
|
||||||
|
$result = array();
|
||||||
|
foreach($this->maps as $map){
|
||||||
|
if(strpos($map->name,$searchString) || strpos($map->authorLogin,$searchString));{
|
||||||
|
array_push($result,$map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize necessary database tables
|
* Initialize necessary database tables
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user