summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-08 21:52:05 -0800
committerZach Copley <zach@status.net>2010-02-08 21:57:29 -0800
commit70d5f39ed66cb277e925ea71dcc24ca580110b3d (patch)
tree9377438348b85c2f9db226d166b90767a66fdb82 /actions
parentbc4e843f396dc450b04b612e7de14246084469d1 (diff)
Better checking for duplicate app names
Diffstat (limited to 'actions')
-rw-r--r--actions/editapplication.php2
-rw-r--r--actions/newapplication.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/actions/editapplication.php b/actions/editapplication.php
index ca5dba1e4..64cf0a574 100644
--- a/actions/editapplication.php
+++ b/actions/editapplication.php
@@ -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;
diff --git a/actions/newapplication.php b/actions/newapplication.php
index c0c520797..0f819b349 100644
--- a/actions/newapplication.php
+++ b/actions/newapplication.php
@@ -290,7 +290,7 @@ class NewApplicationAction extends OwnerDesignAction
function nameExists($name)
{
$app = Oauth_application::staticGet('name', $name);
- return ($app !== false);
+ return !empty($app);
}
}