sintonia/airtime_mvc/application/configs/constants.php

151 lines
6.1 KiB
PHP
Raw Normal View History

<?php
define('PRODUCT_NAME' , 'Airtime');
define('PRODUCT_SITE_URL' , 'http://airtime.sourcefabric.org');
define('SAAS_PRODUCT_BRANDING_NAME', 'Airtime Pro');
define('SAAS_LOGIN_REFERRER', 'https://www.airtime.pro/');
define('COMPANY_NAME' , 'Sourcefabric');
define('COMPANY_SUFFIX' , 'z.ú.');
define('COMPANY_SITE' , 'Sourcefabric.org');
define('COMPANY_SITE_URL' , 'http://sourcefabric.org/');
define('SUPPORT_EMAIL_ADDRESS', "help@sourcefabric.org");
define("AIRTIMEPRO_API_URL", "https://account.sourcefabric.com:5001/api/");
define('HELP_URL' , 'http://help.sourcefabric.org/');
define('FAQ_URL' , 'https://sourcefabricberlin.zendesk.com/hc/en-us/sections/200994309-Airtime-FAQ');
define('WHOS_USING_URL' , 'http://sourcefabric.org/en/airtime/whosusing');
define('TERMS_AND_CONDITIONS_URL' , 'http://www.sourcefabric.org/en/about/policy/');
define('PRIVACY_POLICY_URL' , 'http://www.sourcefabric.org/en/about/policy/');
define('USER_MANUAL_URL' , 'http://sourcefabric.booktype.pro/airtime-pro-for-broadcasters');
2015-08-19 19:02:14 +02:00
define('ABOUT_AIRTIME_URL' , 'https://www.airtime.pro/support/');
2015-09-21 18:44:00 +02:00
define('AIRTIME_TRANSIFEX_URL' , 'https://www.transifex.com/sourcefabric/airtime/');
2015-07-28 17:47:53 +02:00
define('WHMCS_PASSWORD_RESET_URL' , 'https://account.sourcefabric.com/pwreset.php');
define('SUPPORT_TICKET_URL' , 'https://sourcefabricberlin.zendesk.com/hc/en-us/requests/new');
2015-09-28 23:19:02 +02:00
define('UI_REVAMP_EMBED_URL' , 'https://www.youtube.com/embed/nqpNnCKGluY');
define('UI_REVAMP_YOUTUBE_URL' , 'https://www.youtube.com/watch?v=nqpNnCKGluY&feature=youtu.be');
define('LICENSE_VERSION' , 'GNU AGPL v.3');
define('LICENSE_URL' , 'http://www.gnu.org/licenses/agpl-3.0-standalone.html');
define('AIRTIME_COPYRIGHT_DATE' , '2010-2015');
2012-10-16 20:59:06 +02:00
define('AIRTIME_REST_VERSION' , '1.1');
define('AIRTIME_API_VERSION' , '1.1');
// XXX: it's important that we upgrade this every time we add an upgrade!
2015-11-04 19:21:36 +01:00
define('AIRTIME_CODE_VERSION' , '2.5.16');
Vendorize ZF1, fix PHPUnit and configure travis This a a rather large commit due to the nature of the stuff it is touching. To get PHPUnit up and running again I had to update some deps and I did so by vendorizing them. The vendorizing of zf1 makes sense since distros are already considering to drop it from their repos. * [x] install vendorized zf1 with composer * [x] load composer autoloader before zf1 * [x] Implement headAction for all Zend_Rest_Controller based controllers * [x] switch to yml dataset to get around string only limitations of xml sets (also removed warning in readme) * [x] use year 2044 as hardcoded date for tests since it is in the future and has the same days like previously used 2016 * [x] make tests easier to run when accessing phpunit directly * [x] clean up test helper to always use airtime.conf * [x] switch test dbname to libretime_test * [x] test db username password switched to libretime/libretime * [x] install phpunit with composer in a clear version (make tests easier to reproduce on other platforms) * [x] remove local libs from airtime repo (most of airtime_mvc/library was not needed of in vendor already) * [x] configure composer autoloading and use it (also removed requires that are not needed anymore) * [x] add LibreTime prefix for FileNotFoundException (phing had a similar class and these are all pre-namespace style) * [x] add .travis.yml file * [x] make etc and logdir configurable with LIBRETIME_CONF_DIR and LIBRETIME_LOG_DIR env (so travis can change it) * [x] slight cleanup in config for travis not to fail * [x] add cloud_storage.conf for during test runs * [x] rewrite mvc testing docs and move them to docs/ folder * [x] don't use `static::class` in a class that does not have a parent class, use `__CLASS__` instead. * [x] don't use `<ClassName>::class`, since we already know what class we want `"<ClassName>"` ist just fine. * [x] fix "can't use method in write context" errors on 5.4 (also helps the optimizer) * [x] add build status badge on main README.md Fixes https://github.com/LibreTime/libretime/issues/4 The PHP parts of https://github.com/LibreTime/libretime/pull/10 get obsoleted by this change and it will need rebasing. This also contains https://github.com/LibreTime/libretime/pull/8, the late static binding compat code was broken for no reason and until CentOS drops php 5.4 there is no reason I'm aware of not to support it. I inlined #8 since the test would be failing on php 5.4 without the change. If you want to run tests you need to run `composer install` in the root directory and then `cd airtime_mvc/tests && ../../vendor/bin/phpunit`. For the tests to run the user `libretime` needs to be allowed to create the `libretime_test` database. See `docs/TESTING.md` for more info on getting set up.
2017-02-20 21:47:53 +01:00
// grab values from env (i'll do this everywhere with a small function if we like it)
define('LIBRETIME_CONF_DIR', getenv('LIBRETIME_CONF_DIR') ? getenv('LIBRETIME_CONF_DIR') : '/etc/airtime');
define('LIBRETIME_LOG_DIR', getenv('LIBRETIME_LOG_DIR') ? getenv('LIBRETIME_LOG_DIR') : '/var/log/airtime');
// Defaults
define('DEFAULT_LOGO_PLACEHOLDER', 1);
2015-06-10 22:01:16 +02:00
define('DEFAULT_LOGO_FILE', 'images/airtime_logo.png');
define('DEFAULT_TIMESTAMP_FORMAT', 'Y-m-d H:i:s');
define('DEFAULT_MICROTIME_FORMAT', 'Y-m-d H:i:s.u');
define('DEFAULT_ICECAST_PORT', 8000);
define('DEFAULT_ICECAST_PASS', 'hackme');
define('DEFAULT_SHOW_COLOR', '76aca5');
define('DEFAULT_INTERVAL_FORMAT', 'H:i:s.u');
// Metadata Keys for files
2012-10-16 20:59:06 +02:00
define('MDATA_KEY_FILEPATH' , 'filepath');
define('MDATA_KEY_DIRECTORY' , 'directory');
define('MDATA_KEY_MD5' , 'md5');
define('MDATA_KEY_TITLE' , 'track_title');
define('MDATA_KEY_CREATOR' , 'artist_name');
define('MDATA_KEY_SOURCE' , 'album_title');
define('MDATA_KEY_DURATION' , 'length');
define('MDATA_KEY_MIME' , 'mime');
define('MDATA_KEY_FTYPE' , 'ftype');
define('MDATA_KEY_URL' , 'info_url');
define('MDATA_KEY_GENRE' , 'genre');
define('MDATA_KEY_MOOD' , 'mood');
define('MDATA_KEY_LABEL' , 'label');
define('MDATA_KEY_COMPOSER' , 'composer');
define('MDATA_KEY_DESCRIPTION' , 'description');
define('MDATA_KEY_SAMPLERATE' , 'sample_rate');
define('MDATA_KEY_BITRATE' , 'bit_rate');
define('MDATA_KEY_ENCODER' , 'encoded_by');
define('MDATA_KEY_ISRC' , 'isrc_number');
define('MDATA_KEY_COPYRIGHT' , 'copyright');
define('MDATA_KEY_YEAR' , 'year');
define('MDATA_KEY_BPM' , 'bpm');
define('MDATA_KEY_TRACKNUMBER' , 'track_number');
define('MDATA_KEY_CONDUCTOR' , 'conductor');
define('MDATA_KEY_LANGUAGE' , 'language');
define('MDATA_KEY_REPLAYGAIN' , 'replay_gain');
define('MDATA_KEY_OWNER_ID' , 'owner_id');
define('MDATA_KEY_CUE_IN' , 'cuein');
define('MDATA_KEY_CUE_OUT' , 'cueout');
2012-10-16 20:59:06 +02:00
define('UI_MDATA_VALUE_FORMAT_FILE' , 'File');
define('UI_MDATA_VALUE_FORMAT_STREAM' , 'live stream');
//User types
define('UTYPE_HOST' , 'H');
define('UTYPE_ADMIN' , 'A');
define('UTYPE_SUPERADMIN' , 'S');
define('UTYPE_GUEST' , 'G');
define('UTYPE_PROGRAM_MANAGER' , 'P');
2013-07-23 00:11:44 +02:00
//Constants for playout history template fields
define('TEMPLATE_DATE', 'date');
define('TEMPLATE_TIME', 'time');
define('TEMPLATE_DATETIME', 'datetime');
define('TEMPLATE_STRING', 'string');
define('TEMPLATE_BOOLEAN', 'boolean');
define('TEMPLATE_INT', 'integer');
define('TEMPLATE_FLOAT', 'float');
// Session Keys
define('UI_PLAYLISTCONTROLLER_OBJ_SESSNAME', 'PLAYLISTCONTROLLER_OBJ');
/*define('UI_PLAYLIST_SESSNAME', 'PLAYLIST');
define('UI_BLOCK_SESSNAME', 'BLOCK');*/
//WHMCS integration
define("LIBRETIME_ENABLE_WHMCS", false);
define("WHMCS_API_URL", "https://account.example.org/includes/api.php");
define("SUBDOMAIN_WHMCS_CUSTOM_FIELD_NAME", "Choose your domain");
//LiveChat integration
define('LIBRETIME_ENABLE_LIVECHAT', false);
//Sentry error logging
define('SENTRY_CONFIG_PATH', LIBRETIME_CONF_DIR . '/sentry.airtime_web.ini');
//Provisioning status
define('PROVISIONING_STATUS_SUSPENDED' , 'Suspended');
define('PROVISIONING_STATUS_ACTIVE' , 'Active');
//TuneIn integration
define("TUNEIN_API_URL", "http://air.radiotime.com/Playing.ashx");
// SoundCloud
define('SOUNDCLOUD', 'SoundCloud');
define('DEFAULT_SOUNDCLOUD_LICENSE_TYPE', 'all-rights-reserved');
define('DEFAULT_SOUNDCLOUD_SHARING_TYPE', 'public');
// Celery
define('CELERY_PENDING_STATUS', 'PENDING');
define('CELERY_SUCCESS_STATUS', 'SUCCESS');
define('CELERY_FAILED_STATUS', 'FAILED');
// Celery Services
define('SOUNDCLOUD_SERVICE_NAME', 'soundcloud');
define('PODCAST_SERVICE_NAME', 'podcast');
// Publish Services
define('STATION_PODCAST_SERVICE_NAME', 'station_podcast');
// Podcast Types
2015-09-29 19:04:22 +02:00
//define('STATION_PODCAST', 0);
//define('IMPORTED_PODCAST', 1);
define('ITUNES_XML_NAMESPACE_URL', 'http://www.itunes.com/dtds/podcast-1.0.dtd');
// Billing configuration
define('LIBRETIME_ENABLE_BILLING', false);