]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Better checking for duplicate app names
authorZach Copley <zach@status.net>
Tue, 9 Feb 2010 05:52:05 +0000 (21:52 -0800)
committerZach Copley <zach@status.net>
Tue, 9 Feb 2010 05:52:05 +0000 (21:52 -0800)
actions/editapplication.php
actions/newapplication.php

index ca5dba1e49a15f5f2d47be8327287b812991c433..64cf0a5745d134fcceeb7b214844b45dc86111ec 100644 (file)
@@ -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;
index c0c520797993643672f6b96fd504111ef6f7f54c..0f819b3499881795e3ce597fd1559846875f7f15 100644 (file)
@@ -290,7 +290,7 @@ class NewApplicationAction extends OwnerDesignAction
     function nameExists($name)
     {
         $app = Oauth_application::staticGet('name', $name);
-        return ($app !== false);
+        return !empty($app);
     }
 
 }