Commit Graph

2521 Commits

Author SHA1 Message Date
Lucas Bickel 7c86991c50 Merge pull request #11 from radiorabe/feature/disable-billing
Problem: Billing is always on
2017-03-04 16:10:50 +01:00
Lucas Bickel e28ad471f9 Rewrite config from /etc/airtime-saas to plain /etc/airtime
This is the results of sed -i -e 's|/etc/airtime-saas/|/etc/airtime/|' `grep -irl 'airtime-saas' airtime_mvc/ python_apps/` :P

It might need more testing, the airtime-saas part never really made sense, zf1 has environments for that, ie you would create a saas env based on production for instance.

I beleive legacy upstream was using this to share configuration between customers (ie. analyser runs only once and writes to a shared S3 bucket). I assume they mount the airtime-saas folder onto individual customers instances with a global config. Like I said, I don't feel that this makes sense since all it does is make hacking at the configs in airtime-saas a bit easier. A serious SaaS operation should be using something like puppet or ansible to achieve this.
2017-03-03 15:57:41 +01:00
Lucas Bickel 6e03863fa1 Problem: Billing is always on
Solution: Make billing configurable through LIBRETIME_ENABLE_BILLING and deactivate it

This should catch all the changes needed to deactive billing in LibreTime.

* [x] only call billing when it is enabled
* [x] let super admins edit their info
* [x] dont link to billing if it is disabled
2017-03-03 15:34:54 +01:00
Lucas Bickel 21a319767f Fix missing AMQPConnection errors in setup
Also fixes them elsewhere, apart from having switched to a vendorized version, I also used one that is already namespaced.

The easy way out here is to use it in the namespaced fashion, it is only used in a few places and I know the library well enough to be certain that nothing much changed apart from the namespacing.
2017-03-02 12:38:44 +01:00
Lucas Bickel 625f92fe44 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-27 17:59:01 +01:00
Robb Ebright 276a69aa1b Porting commits from downloaded zip file of saas-dev branch 2017-02-13 18:22:22 +01:00
Albert Santoni db596d54b5 Fix bug in my last commit 2015-12-11 12:29:59 -05:00
Albert Santoni 2594105a5e Handle unknown plan types more gracefully with the bandwidth limit 2015-12-11 10:19:11 -05:00
Albert Santoni 4cfdda46b4 SAAS-1266: Webstream metadata doesn't show in API or dashboard header 2015-12-03 16:57:18 -05:00
Duncan Sommerville 17a03e088f SAAS-1244 - improve pending podcast episode sweeping; small bugfixes 2015-11-26 15:25:38 -05:00
drigato 34eb7d6e22 Merge branch 'saas-dev' into saas-dev-bandwidth-limits 2015-11-26 11:30:03 -05:00
Duncan Sommerville 24f488cac2 Fix typo in pref keys 2015-11-25 16:08:31 -05:00
Duncan Sommerville 3f241b2f25 SAAS-1229 - add default bandwidth limit values 2015-11-25 15:04:45 -05:00
Duncan Sommerville 82544f34d9 SAAS-1229, SAAS-1230 - initial implementation of station suspend when over bandwidth limit 2015-11-24 13:36:54 -05:00
Duncan Sommerville 553299e9f5 Try to fix some schedule bugs 2015-11-23 14:55:37 -05:00
Duncan Sommerville bac1e553d9 SAAS-1229 - add comments in Preference and set update timer 2015-11-23 10:53:25 -05:00
Duncan Sommerville 6c2d1f008b SAAS-1229 - initial work on bandwidth limit within Airtime; overhaul TaskFactory to get tasks reflectively 2015-11-19 16:08:25 -05:00
Albert Santoni ba832ffe3a Merge branch 'saas-dev-publishing' of github.com:sourcefabric/Airtime into saas-dev-publishing 2015-11-18 12:38:22 -05:00
Albert Santoni 965a78c54a Merge branch 'saas-dev' into saas-dev-publishing
Conflicts:
	airtime_mvc/application/controllers/ApiController.php
2015-11-18 12:38:18 -05:00
drigato ceafccd685 Hide podcast from radio page for hobbyist plans 2015-11-18 12:12:57 -05:00
Duncan Sommerville 9a8e80f74b Change station podcast RSS links back to https; style fix for menu in some browsers 2015-11-18 11:10:14 -05:00
Duncan Sommerville eae8c7b638 Temporary fix to make enclosure urls iTunes compatible 2015-11-17 21:06:51 -05:00
Duncan Sommerville 4828e82d2a Change download key parameter regex 2015-11-17 19:51:41 -05:00
Duncan Sommerville 1571887928 Change how station logo default is returned 2015-11-17 18:58:58 -05:00
Duncan Sommerville bdddd6f6ce Try to fix iTunes RSS compatibility 2015-11-17 17:50:16 -05:00
Albert Santoni 591f7d59f0 Slightly better error handling for uploads 2015-11-13 10:53:47 -05:00
Duncan Sommerville c5a5839eff Better errors from podcast 'Add' dialog 2015-11-10 19:26:25 -05:00
Albert Santoni 0e6e82a0c6 Fixed session start issue with new API 2015-11-06 13:04:33 -05:00
Albert Santoni 4a86544738 Skip non-files for XXXX-260 2015-11-06 12:50:30 -05:00
Albert Santoni ee99a7304f XXXX-260 - Recalculate schedule API as part of bugfix
Conflicts:
	airtime_mvc/application/configs/constants.php
	airtime_mvc/application/controllers/ApiController.php
	airtime_mvc/application/models/Scheduler.php
2015-11-06 12:49:53 -05:00
Duncan Sommerville 22f8b0f328 * SAAS-1153 - more work on station podcast frontend. Add delete and edit button functionality for episode table
* Various fixes and backend updates
* Move station podcast creation to id getter in Preferences
2015-11-03 16:23:17 -05:00
Duncan Sommerville 95aae317c6 Merge branch 'saas-dev' into saas-dev-publishing
Conflicts:
	airtime_mvc/application/controllers/plugins/PageLayoutInitPlugin.php
	airtime_mvc/public/css/dashboard.css
	airtime_mvc/public/js/airtime/library/spl.js
2015-10-29 11:21:24 -04:00
drigato 1211e8db7f Fix typo 2015-10-26 15:55:03 -04:00
Duncan Sommerville 6580c12ad3 Add station podcast privacy toggle 2015-10-21 17:30:24 -04:00
Duncan Sommerville 92ffa955c3 SAAS-1081 - implement station podcast download counter that resets monthly 2015-10-21 12:54:50 -04:00
Duncan Sommerville 0b1df6baf3 * SAAS-1084 - initial work on publishing API backend
* More work on automatic ingest
* Add automatic_ingest_timestamp column to ImportedPodcast
2015-10-20 19:03:34 -04:00
Albert Santoni c8e1408dbe Handle error case with bad user timezone strings break advanced search 2015-10-20 11:45:26 -04:00
Albert Santoni f8a6721703 Increase transaction isolation level for track scheduling and moving 2015-10-19 17:31:26 -04:00
Duncan Sommerville 12f6536e74 Merge branch 'saas-dev' into saas-dev-publishing
Conflicts:
	airtime_mvc/application/Bootstrap.php
	airtime_mvc/application/controllers/plugins/Acl_plugin.php
2015-10-19 16:18:19 -04:00
Albert Santoni fb4aef405c Increase transaction isolation level to avoid duplicate shows, SAAS-1111 2015-10-19 15:23:50 -04:00
drigato 14104a93ae SAAS-1080: Station podcast feed 2015-10-19 11:54:53 -04:00
Duncan Sommerville bddc121c2d Initial work on automatic ingest for imported podcasts 2015-10-15 14:44:17 -04:00
drigato 40d0619f10 Override Podcast->fromArray 2015-10-15 08:06:01 -04:00
Albert Santoni 2713bd7beb Merge branch 'saas-dev' into saas-3.x-sessionoptimizations 2015-10-14 14:50:54 -04:00
drigato c166b4f00e Merge branch 'saas-dev-publishing' into saas-dev-publishing-schema-change
Conflicts:
	airtime_mvc/application/models/airtime/Podcast.php
2015-10-14 11:04:41 -04:00
drigato d647bf67ea Refactoring Podcast classes and services 2015-10-14 10:58:13 -04:00
drigato cfb21f8425 Bunch of schema changes 2015-10-13 10:14:23 -04:00
Duncan Sommerville c3c4abdd0c Merge branch 'saas-dev' into saas-dev-publishing
Conflicts:
	airtime_mvc/public/css/dashboard.css
	airtime_mvc/public/css/styles.css
	airtime_mvc/public/js/airtime/library/library.js
	airtime_mvc/public/js/airtime/library/spl.js
2015-09-30 16:26:02 -04:00
Duncan Sommerville ee70a0dbea SAAS-1094 - update backend to prevent removal of items in linked shows while on air 2015-09-30 14:44:48 -04:00
Duncan Sommerville b01fdc6805 SAAS-1094 - update backend to prevent removal of items in linked shows while on air 2015-09-30 14:44:06 -04:00