mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Fix short addr collision
This commit is contained in:
parent
fe13bbfdb8
commit
095b7960ca
2 changed files with 7 additions and 1 deletions
|
@ -137,6 +137,12 @@ class Club extends RowModel
|
|||
return false;
|
||||
if(in_array($code, OPENVK_ROOT_CONF["openvk"]["preferences"]["shortcodes"]["forbiddenNames"]))
|
||||
return false;
|
||||
if(\Chandler\MVC\Routing\Router::i()->getMatchingRoute("/$code")[0]->presenter !== "UnknownTextRouteStrategy")
|
||||
return false;
|
||||
|
||||
$pUser = DB::i()->getContext()->table("profiles")->where("shortcode", $code)->fetch();
|
||||
if(!is_null($pUser))
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->stateChanges("shortcode", $code);
|
||||
|
|
|
@ -146,7 +146,7 @@ final class GroupPresenter extends OpenVKPresenter
|
|||
$club->setName(empty($this->postParam("name")) ? $club->getName() : $this->postParam("name"));
|
||||
$club->setAbout(empty($this->postParam("about")) ? NULL : $this->postParam("about"));
|
||||
$club->setShortcode(empty($this->postParam("shortcode")) ? NULL : $this->postParam("shortcode"));
|
||||
$club->setWall(empty($this->postParam("wall")) ? 0 : 1);
|
||||
$club->setWall(empty($this->postParam("wall")) ? 0 : 1);
|
||||
|
||||
if($_FILES["ava"]["error"] === UPLOAD_ERR_OK) {
|
||||
$photo = new Photo;
|
||||
|
|
Loading…
Reference in a new issue