forked from GNUsocial/gnu-social
Better checking for duplicate app names
This commit is contained in:
parent
b2e8d8407c
commit
2600ad9643
@ -277,7 +277,7 @@ class EditApplicationAction extends OwnerDesignAction
|
||||
function nameExists($name)
|
||||
{
|
||||
$newapp = Oauth_application::staticGet('name', $name);
|
||||
if (!$newapp) {
|
||||
if (empty($newapp)) {
|
||||
return false;
|
||||
} else {
|
||||
return $newapp->id != $this->app->id;
|
||||
|
@ -290,7 +290,7 @@ class NewApplicationAction extends OwnerDesignAction
|
||||
function nameExists($name)
|
||||
{
|
||||
$app = Oauth_application::staticGet('name', $name);
|
||||
return ($app !== false);
|
||||
return !empty($app);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user