diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 8707b725f..59bba6a23 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -72,7 +72,6 @@ jobs:
runs-on: ${{ matrix.runs-on }}
env:
ENVIRONMENT: testing
- LIBRETIME_LOG_DIR: /tmp/log/libretime
steps:
- uses: actions/checkout@v2
@@ -103,10 +102,7 @@ jobs:
${{ runner.os }}-composer-
- name: Run tests
- run: |
- sudo mkdir -p "$LIBRETIME_LOG_DIR"
- sudo chown runner:runner "$LIBRETIME_LOG_DIR"
- make test
+ run: make test
working-directory: legacy
# Start lint the code without failing the entire workflow, should be merged
diff --git a/legacy/application/Bootstrap.php b/legacy/application/Bootstrap.php
index 4b8e6c051..68a494f1d 100644
--- a/legacy/application/Bootstrap.php
+++ b/legacy/application/Bootstrap.php
@@ -1,24 +1,23 @@
true]);
Config::setAirtimeVersion();
-require_once CONFIG_PATH . 'navigation.php';
+require_once CONFIG_PATH . '/navigation.php';
Zend_Validate::setDefaultNamespaces('Zend');
diff --git a/legacy/application/airtime-boot.php b/legacy/application/airtime-boot.php
index f5a54f804..76a181af3 100644
--- a/legacy/application/airtime-boot.php
+++ b/legacy/application/airtime-boot.php
@@ -27,56 +27,46 @@ function exception_error_handler($errno, $errstr, $errfile, $errline)
set_error_handler('exception_error_handler');
-// Define application environment
-defined('APPLICATION_ENV')
- || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
-
-defined('VERBOSE_STACK_TRACE')
- || define('VERBOSE_STACK_TRACE', (getenv('VERBOSE_STACK_TRACE') ? getenv('VERBOSE_STACK_TRACE') : true));
-
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, [
get_include_path(),
realpath(LIB_PATH),
]));
-set_include_path(APPLICATION_PATH . 'common' . PATH_SEPARATOR . get_include_path());
-set_include_path(APPLICATION_PATH . 'common/enum' . PATH_SEPARATOR . get_include_path());
-set_include_path(APPLICATION_PATH . 'common/interface' . PATH_SEPARATOR . get_include_path());
+set_include_path(APPLICATION_PATH . '/common' . PATH_SEPARATOR . get_include_path());
+set_include_path(APPLICATION_PATH . '/common/enum' . PATH_SEPARATOR . get_include_path());
+set_include_path(APPLICATION_PATH . '/common/interface' . PATH_SEPARATOR . get_include_path());
//Propel classes.
-set_include_path(APPLICATION_PATH . 'models' . PATH_SEPARATOR . get_include_path());
+set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
//Controller plugins.
-set_include_path(APPLICATION_PATH . 'controllers' . PATH_SEPARATOR . get_include_path());
+set_include_path(APPLICATION_PATH . '/controllers' . PATH_SEPARATOR . get_include_path());
//Controller plugins.
-set_include_path(APPLICATION_PATH . 'controllers/plugins' . PATH_SEPARATOR . get_include_path());
+set_include_path(APPLICATION_PATH . '/controllers/plugins' . PATH_SEPARATOR . get_include_path());
//Services.
-set_include_path(APPLICATION_PATH . '/services/' . PATH_SEPARATOR . get_include_path());
+set_include_path(APPLICATION_PATH . '/services' . PATH_SEPARATOR . get_include_path());
//cloud storage directory
set_include_path(APPLICATION_PATH . '/cloud_storage' . PATH_SEPARATOR . get_include_path());
//Upgrade directory
-set_include_path(APPLICATION_PATH . '/upgrade/' . PATH_SEPARATOR . get_include_path());
+set_include_path(APPLICATION_PATH . '/upgrade' . PATH_SEPARATOR . get_include_path());
//Common directory
-set_include_path(APPLICATION_PATH . '/common/' . PATH_SEPARATOR . get_include_path());
-
-//Composer's autoloader
-require_once 'autoload.php';
+set_include_path(APPLICATION_PATH . '/common' . PATH_SEPARATOR . get_include_path());
/** Zend_Application */
$application = new Zend_Application(
APPLICATION_ENV,
- CONFIG_PATH . 'application.ini',
+ CONFIG_PATH . '/application.ini',
true
);
-require_once APPLICATION_PATH . 'logging/Logging.php';
-Logging::setLogPath(LIBRETIME_LOG_DIR . '/legacy.log');
+require_once APPLICATION_PATH . '/logging/Logging.php';
+Logging::setLogPath(LIBRETIME_LOG_FILEPATH);
Logging::setupParseErrorLogging();
// Create application, bootstrap, and run
diff --git a/legacy/application/cloud_storage/ProxyStorageBackend.php b/legacy/application/cloud_storage/ProxyStorageBackend.php
index 64fa81ec8..d34c50d12 100644
--- a/legacy/application/cloud_storage/ProxyStorageBackend.php
+++ b/legacy/application/cloud_storage/ProxyStorageBackend.php
@@ -17,7 +17,7 @@ class ProxyStorageBackend extends StorageBackend
{
$CC_CONFIG = Config::getConfig();
- // The storage backend in the airtime.conf directly corresponds to
+ // The storage backend in the config file directly corresponds to
// the name of the class that implements it, so we can create the
// right backend object dynamically:
if ($storageBackend == 'file') {
diff --git a/legacy/application/configs/airtime-conf-production.php b/legacy/application/configs/airtime-conf-production.php
index be89c9da5..a01c29cba 100644
--- a/legacy/application/configs/airtime-conf-production.php
+++ b/legacy/application/configs/airtime-conf-production.php
@@ -5,7 +5,7 @@
/* The original name of this file is airtime-conf.php but since we need to make custom changes
* to it I've renamed it so that our changes aren't removed everytime we regenerate a database schema.
- * our custom changes requires the database parameters to be loaded from /etc/airtime/airtime.conf so
+ * our custom changes requires the database parameters to be loaded from the config file so
* that the user can customize these.
*/
diff --git a/legacy/application/configs/conf.php b/legacy/application/configs/conf.php
index cb9fd5f2c..f2818e30c 100644
--- a/legacy/application/configs/conf.php
+++ b/legacy/application/configs/conf.php
@@ -1,29 +1,18 @@
self::$rootDir,
- ];
-
- //In the unit testing environment, LIBRETIME_CONF_DIR will our local airtime.conf in legacy/application/test/conf:
- $filename = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : LIBRETIME_CONF_DIR . '/airtime.conf';
-
+ $filename = $_SERVER['LIBRETIME_CONFIG_FILEPATH'] ?? LIBRETIME_CONFIG_FILEPATH;
$values = parse_ini_file($filename, true);
+ $CC_CONFIG = [];
+
// Name of the web server user
$CC_CONFIG['webServerUser'] = $values['general']['web_server_user'];
$CC_CONFIG['rabbitmq'] = $values['rabbitmq'];
@@ -97,7 +86,7 @@ class Config
public static function setAirtimeVersion()
{
- $version = @file_get_contents(self::$rootDir . '/../VERSION');
+ $version = @file_get_contents(dirname(ROOT_PATH) . '/VERSION');
if (!$version) {
// fallback to constant from constants.php if no other info is available
$version = LIBRETIME_MAJOR_VERSION;
diff --git a/legacy/application/configs/config-check.php b/legacy/application/configs/config-check.php
index 6b4e4f631..fcf04a428 100644
--- a/legacy/application/configs/config-check.php
+++ b/legacy/application/configs/config-check.php
@@ -140,7 +140,7 @@ $result = $r1 && $r2;
?>">
Make sure you aren't missing any of the Postgres dependencies in the table above.
If your dependencies check out, make sure your database configuration settings in
- /etc/airtime.conf
are correct and the Airtime database was installed correctly.
+ are correct and the Airtime database was installed correctly.
@@ -158,7 +158,7 @@ $result = $r1 && $r2;
">
- Make sure RabbitMQ is installed correctly, and that your settings in /etc/airtime/airtime.conf
+ Make sure RabbitMQ is installed correctly, and that your settings in
are correct. Try using
sudo rabbitmqctl list_users
and sudo rabbitmqctl list_vhosts
to see if the airtime user (or your custom RabbitMQ user) exists, then checking that
sudo rabbitmqctl list_exchanges
contains entries for airtime-pypo and airtime-uploads.
diff --git a/legacy/application/configs/constants.php b/legacy/application/configs/constants.php
index 822889bbc..08d03a5c2 100644
--- a/legacy/application/configs/constants.php
+++ b/legacy/application/configs/constants.php
@@ -1,5 +1,34 @@
_bootstrap->getResource('view');
- $view->addHelperPath(APPLICATION_PATH . 'views/helpers', 'Airtime_View_Helper');
+ $view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'Airtime_View_Helper');
}
protected function _initTitle()
diff --git a/legacy/application/layouts/scripts/layout.phtml b/legacy/application/layouts/scripts/layout.phtml
index 12f3c3eeb..808479d1f 100644
--- a/legacy/application/layouts/scripts/layout.phtml
+++ b/legacy/application/layouts/scripts/layout.phtml
@@ -64,7 +64,7 @@
-
+