Commit 3c11b9af authored by David Libeau's avatar David Libeau

Add basic "@Username" routing support

parent 8c60b1a6
......@@ -35,8 +35,11 @@ class Core{
if(Server::get("route/".$crparam)==$q){
$foundRoute=true;
$route=$currentRoute;
}elseif(Server::get("route/".$crparam)=="/"){
}elseif(substr((string)$q,0,1)=="@"){//Route is @user
if($crparam=="user"){
$foundRoute=true;
$route=$currentRoute->route;
}
}
}
}
......
......@@ -15,6 +15,9 @@ class User{
@params: $id
*/
if(!$this->initDone && !is_null($id)){
if($id[0]=="@"){
$id=substr($id,1);
}
$this->data=simplexml_load_file("../".Server::get("path/user/data")."/".$id.".xml");
if(!$this->data){
//$core->error("404");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment