Begin of map search in map list
This commit is contained in:
		@@ -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
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user