reuse code in assertBreedFunction
authorAlexey Andriyanov <alan@al-an.info>
Sun, 9 Sep 2012 13:32:55 +0000 (17:32 +0400)
committerAlexey Andriyanov <alan@al-an.info>
Sun, 9 Sep 2012 13:32:55 +0000 (17:32 +0400)
wwwroot/inc/gateways.php

index 8874980..1507484 100644 (file)
@@ -382,7 +382,7 @@ function validBreedFunction ($breed, $command)
 function assertBreedFunction ($breed, $command)
 {
        global $breedfunc;
-       if (! array_key_exists ("${breed}-${command}-main", $breedfunc))
+       if (! validBreedFunction ($breed, $command))
                throw new RTGatewayError ('unsupported command for this breed');
 }