From 7cbfb5d40d132b4a86b5088c49d0d770c4435aa8 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 5 Sep 2012 17:29:34 -0400 Subject: [PATCH 1/3] allow Airtime environment to be accessed from CLI --- airtime_mvc/public/index.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/public/index.php b/airtime_mvc/public/index.php index e496f133c..2827b3835 100644 --- a/airtime_mvc/public/index.php +++ b/airtime_mvc/public/index.php @@ -27,7 +27,7 @@ set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_pat set_include_path(APPLICATION_PATH . '/controllers/plugins' . PATH_SEPARATOR . get_include_path()); //Zend framework -if (file_exists('/usr/share/php/libzend-framework-php')){ +if (file_exists('/usr/share/php/libzend-framework-php')) { set_include_path('/usr/share/php/libzend-framework-php' . PATH_SEPARATOR . get_include_path()); } @@ -39,5 +39,13 @@ $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); -$application->bootstrap() + +if (substr($sapi_type, 0, 3) == 'cli') { + set_include_path(APPLICATION_PATH . PATH_SEPARATOR . get_include_path()); + require_once("Bootstrap.php"); +} else { + $application->bootstrap() ->run(); +} + + From b6b4e25a37fdc4d624add3e23a7a5f436787d2f4 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 5 Sep 2012 17:34:12 -0400 Subject: [PATCH 2/3] allow Airtime environment to be accessed from CLI -fixed --- airtime_mvc/public/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/public/index.php b/airtime_mvc/public/index.php index 2827b3835..062e2aed2 100644 --- a/airtime_mvc/public/index.php +++ b/airtime_mvc/public/index.php @@ -40,6 +40,7 @@ $application = new Zend_Application( APPLICATION_PATH . '/configs/application.ini' ); +$sapi_type = php_sapi_name(); if (substr($sapi_type, 0, 3) == 'cli') { set_include_path(APPLICATION_PATH . PATH_SEPARATOR . get_include_path()); require_once("Bootstrap.php"); From 4af9bfaa9d0e57b0207f71f63f76f78e3a141add Mon Sep 17 00:00:00 2001 From: James Date: Wed, 5 Sep 2012 17:41:18 -0400 Subject: [PATCH 3/3] CC-4346: Prepared statements - part 2 - fix spelling --- airtime_mvc/application/common/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/application/common/Database.php b/airtime_mvc/application/common/Database.php index 96e6e6770..9977278c0 100644 --- a/airtime_mvc/application/common/Database.php +++ b/airtime_mvc/application/common/Database.php @@ -1,6 +1,6 @@ prepare($sql); foreach ($paramValueMap as $param => $v) {