Ensure the application "koward" gets pushed when called from the CLI.
authorGunnar Wrobel <p@rdus.de>
Wed, 20 May 2009 10:37:40 +0000 (12:37 +0200)
committerGunnar Wrobel <p@rdus.de>
Wed, 20 May 2009 10:37:40 +0000 (12:37 +0200)
koward/lib/Koward/Cli.php

index 81aa3ef..bf426a0 100644 (file)
@@ -68,6 +68,13 @@ class Koward_Cli extends Horde_Controller_Request_Base
          */
         $this->_path = $registry->get('webroot', 'koward') . '/' . $args[0];
 
+        if (is_a(($pushed = $registry->pushApp('koward', false)), 'PEAR_Error')) {
+            if ($pushed->getCode() == 'permission_denied') {
+                echo 'Perission denied!';
+                exit;
+            }
+        }
+
         $this->_cmd_argv = array();
 
         /* Authenticate the user if possible. */