Commit Graph

290 Commits

Author SHA1 Message Date
Robb 0abfa7f018 Merge pull request #23 from radiorabe/feature/stop-using-reflection-inproduction-code
stop using reflection in production code
2017-03-04 22:25:34 -05:00
Lucas Bickel 09aea8b747 stop using reflection in prooduction code
Problem: Reflection is a debugging tool and not really meant for use on production. There are easier ways to check if a class implements an interface with `is_a()`.

Solution: Get rid of reflection use and switch to `is_a()` in TaskManager, refactor the Enum thing that does not make sense since it is not being used.

The `is_a()` solution is really straightforward and has been supported in php for ages.

The Enum thing was a copy paste hack from stackoverflow and ignored the simple solution mentioned there while not using the features of the advanced one.
2017-03-03 22:48:19 +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 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
Albert Santoni 09316041c6 Fix unnecessary HTTPS redirect to reduce traffic 2015-12-08 17:47:07 -05:00
Duncan Sommerville 27df10cb5d Mute 'Waiting for Celery task' logging 2015-11-27 17:22:05 -05:00
Duncan Sommerville eff7cd2f07 Fix bug in podcast download 2015-11-27 16:48:44 -05:00
Duncan Sommerville 786b357ed5 Add bandwidth limit for trial plan 2015-11-26 12:37:09 -05:00
Duncan Sommerville e68f6cadd6 Add bandwidth limits for awesome august plan levels 2015-11-26 12:31:59 -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 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 965a78c54a Merge branch 'saas-dev' into saas-dev-publishing
Conflicts:
	airtime_mvc/application/controllers/ApiController.php
2015-11-18 12:38:18 -05:00
Duncan Sommerville e75d614537 Merge branch 'saas-dev-publishing' of github.com:sourcefabric/airtime into saas-dev-publishing 2015-11-17 17:50:20 -05:00
Duncan Sommerville bdddd6f6ce Try to fix iTunes RSS compatibility 2015-11-17 17:50:16 -05:00
Albert Santoni 4fd61cb088 Merge branch 'saas-dev-publishing' of github.com:sourcefabric/Airtime into saas-dev-publishing 2015-11-17 17:34:33 -05:00
Albert Santoni c5d9dfd93d Restrict podcast hosting for some plans. Fixed error page colours. 2015-11-17 17:34:13 -05:00
Duncan Sommerville 30c9c730be Bugfixes and itunes compatibility fix 2015-11-17 17:23:21 -05:00
Duncan Sommerville c12848b2de * SAAS-1212 - fix validation errors in station podcast rss
* Append podcast title to heading in episodes view
2015-11-17 12:26:21 -05:00
Duncan Sommerville 7707378c2b Improve the publish service implementation 2015-11-16 16:18:29 -05:00
Duncan Sommerville 74f7c454b5 * SAAS-1184 - more polish for publishing/podcasting
* Fix some issues with the station podcast feed
* Various small fixes
2015-11-11 16:47:07 -05:00
Duncan Sommerville bb7f8c1ed3 SAAS-1184 - bugfixes and polish 2015-11-10 15:10:36 -05:00
Duncan Sommerville 0360b5e460 * SAAS-1182 - added sanity checks and additional logic to rss import and episode generation
* SAAS-1184 - started work on podcast UI polishing
* Fixed pull request issues
2015-11-09 18:17:49 -05:00
Duncan Sommerville 0be26d621b SAAS-1165 - implement most functionality for left-hand podcast episodes view 2015-11-05 18:15:58 -05:00
Albert Santoni 685134d8bb Better trial suspension notice 2015-11-05 12:45:09 -05:00
Duncan Sommerville def8e7280b * SAAS-1161 - refactor backend so episodes are loaded separately from podcast data to speed up loading and improve API readability
* Decouple imported and station podcast behaviour on the frontend
2015-11-02 18:07:16 -05:00
Duncan Sommerville 4f281a30ed Add SoundCloud update and download tasks to Celery backend; requires airtime-celery reinstall 2015-10-30 16:10:16 -04:00
Duncan Sommerville 9af7f6dcdd Fix tabs bugs and podcast auto-ingest error 2015-10-30 10:29:22 -04:00
Duncan Sommerville d08e19a93a More small TaskManager and auto-ingest fixes 2015-10-29 18:26:20 -04:00
Duncan Sommerville e3feb17f0c * Change the Celery timeout to 15 minutes (from 10) to better accommodate automatic ingest
* Fix various small bugs in auto ingestion and tab implementation
* Update TaskManager run conditions to piggyback on API calls - guarantees a certain frequency of requests and greatly reduces chances of lock contention
2015-10-29 17:53:45 -04: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
Duncan Sommerville ada7212823 Add TaskManager task to fail pending imports over an hour old 2015-10-29 11:03:28 -04:00
Duncan Sommerville cd17a23d13 Fix download counter reset timer 2015-10-29 09:23:41 -04:00
Duncan Sommerville cc9f1ea6d0 * Wrap station podcast feed contents on radio page in displayRssTab check
* Test fix for automatic ingest bug
* Move disable layout code in feeds controller to avoid error case
2015-10-28 10:58:22 -04:00
Duncan Sommerville e8980e7a79 Bugfixes and more work on station podcast frontend 2015-10-22 18:03:38 -04:00
Duncan Sommerville f94e462fe0 Revert polling interval for podcast ingest 2015-10-22 12:22:56 -04:00
Duncan Sommerville 9302027a2b Fix issue with automatic ingest; shift episode ingest to PodcastEpisodesController 2015-10-22 12:12:41 -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 6c0055895c Set auto ingest timestamp when updating 2015-10-21 11:18:33 -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 f79ca8650f Unpaid invoice usability hint and invoice page style fix - SAAS-1134 2015-10-20 15:44:24 -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
Duncan Sommerville be3a3fbd9f * Fix error in automatic podcast ingest
* Switch from text-scrolling to using title attributes to display overflowing text strings
2015-10-19 12:57:18 -04:00
Duncan Sommerville bddc121c2d Initial work on automatic ingest for imported podcasts 2015-10-15 14:44:17 -04:00
Albert Santoni 8b33acacd3 Merge branch 'saas-sessionoptimizations' into saas-3.x-sessionoptimizations
Conflicts:
	airtime_mvc/application/Bootstrap.php
	airtime_mvc/application/configs/constants.php
	airtime_mvc/application/controllers/LoginController.php
	airtime_mvc/application/controllers/UserController.php
	airtime_mvc/public/js/airtime/preferences/preferences.js
2015-09-29 18:58:55 -04:00
Duncan Sommerville d09941dffa Set TaskManager run interval back to 30 seconds 2015-09-28 14:15:08 -04:00
Albert Santoni 8b6833180d Refactored double Set-Cookie prevention code, and session reopening code 2015-09-25 12:03:10 -04:00
Albert Santoni c03e9cbe9a SAAS-1085: Optimization - Don't start sessions unless we actually need them. 2015-09-25 10:41:51 -04:00
Albert Santoni a86e3ed4a8 Improvements to the preferences screen 2015-09-23 18:21:30 -04:00
Duncan Sommerville ee1ceb9281 Update TaskManager to be a bit easier to extend 2015-09-22 20:21:19 -04:00
Duncan Sommerville f9ace20075 Simplify third-party/celery/soundcloud implementation 2015-09-21 17:03:46 -04:00
Duncan Sommerville be39b6b7c0 * Initial podcast skeleton functionality
* Rename SoundCloud/Celery classes to fit conventions
* Small fixes to Table class functionality
2015-09-18 15:34:55 -04:00
Duncan Sommerville dc840bf25f Fix bad file extension 2015-09-16 15:31:59 -04:00
Duncan Sommerville 9ed3145473 Create oauth controller interface for oauth-specific actions; small refactoring on tabs.js 2015-09-16 15:29:10 -04:00
Duncan Sommerville 7b76c8d6d3 Rename CeleryService to avoid confusion; fix wording and reduce redundancy in task functions 2015-09-15 15:06:03 -04:00
Albert Santoni f6a33802db Merge branch 'saas-dev-tablerefactor' into saas-dev-publishing 2015-09-15 14:21:53 -04:00
Albert Santoni ffdc83dc26 Reusable datatable control that hooks up to any of our REST APIs
* Implements item selection (single, shift, ctrl), pagination, and
  sorting. To be used in the future.
* Added example code for how to use the table widget
* Temporarily added a table test page to the DashboardController
2015-09-15 14:18:35 -04:00
Duncan Sommerville 893d60ed44 Revert "SAAS-1061 - implement podcast list view skeleton; small bugfixes"
This reverts commit 0fcf6a8dac.
2015-09-14 18:29:43 -04:00
Duncan Sommerville 8c65ba8f66 SAAS-1061 - implement podcast list view skeleton; small bugfixes
Conflicts:
	airtime_mvc/public/js/airtime/library/library.js
2015-09-14 18:29:13 -04:00
Duncan Sommerville 0fcf6a8dac SAAS-1061 - implement podcast list view skeleton; small bugfixes 2015-09-14 18:26:28 -04:00
Duncan Sommerville 83cd51de92 Reword usability hint text to match calendar context menu 2015-09-03 15:42:27 -04:00
Duncan Sommerville c020e3449d SAAS-1044 - fix links in usability hints 2015-09-02 12:55:36 -04:00
Albert Santoni a17001a90a Merge branch 'saas' into saas-dev
Conflicts:
	airtime_mvc/application/views/scripts/billing/upgrade.phtml
	airtime_mvc/public/css/billing.css
2015-09-02 10:47:37 -04:00
Duncan Sommerville 37df86723d CC-6127 - Add 'Use station default' option to user settings timezone, don't set user timezone by default when creating the admin user 2015-09-01 16:10:33 -04:00
drigato fa340c3e30 SAAS-976: September 1st: Undo the billing page changes for the August promotion 2015-08-31 13:37:20 -04:00
Duncan Sommerville 294298c9bf CC-6096, CC-6093 - update calendar context menu and usability hint wording; bugfixes 2015-08-27 16:59:21 -04:00
Albert Santoni 98ac8fd851 Major layout work on the smartblock and playlist editors
* CC-6088: Smart Block form needs to have a form layout
* CC-6089: Editor view name fields must be made <input> fields
2015-08-26 13:10:51 -04:00
Albert Santoni b6cf517d10 CC-6093: Review and fix the usability hints text 2015-08-25 16:48:31 -04:00
Albert Santoni 498b3243e0 Fix navbar highlights when navigating via usability hints 2015-08-25 16:43:10 -04:00
Albert Santoni 700c3c4005 Merge branch 'saas-dev' into saas-showbuilder 2015-08-25 13:27:40 -04:00
Duncan Sommerville 32100e2d9b SAAS-948 - frontend tweaks 2015-08-12 16:54:45 -04:00
Albert Santoni 75914b791c Merge branch 'saas-dev' into saas
Conflicts:
	airtime_mvc/application/common/FileDataHelper.php
2015-08-10 09:00:54 -04:00
Albert Santoni e49d337db0 Merge remote-tracking branch 'origin/saas-stream-settings' into saas-dev 2015-08-05 14:50:31 -04:00
Albert Santoni d0d6efd508 Fix m4a uploads in Airtime 2015-07-31 15:02:53 -04:00
Denise Rigato f19b6b4bf2 Merge pull request #123 from sourcefabric/saas-aug-promo
Airtime Billing page - Add support for August promotion plans
2015-07-31 13:55:20 -04:00
Albert Santoni 78327c4f68 Merge branch 'saas' of github.com:sourcefabric/Airtime into saas 2015-07-31 11:44:29 -04:00
Albert Santoni 84c21de578 Fix error logic if no API key passed to provisioning/create API 2015-07-31 11:43:58 -04:00
drigato ff61fab62a SAAS-973: Airtime Billing page - Add support for August promotion plans
Fix to not allow current promo plans to downgrade to another promo plan
Added promo banner to billing page
2015-07-31 10:46:02 -04:00
drigato 48d745bf77 Hide Awesome August 2015 promo plans from billing page 2015-07-30 13:37:15 -04:00
drigato b2fbb27801 SAAS-973: Airtime Billing page - Add support for August promotion plans
Made WHMCS Airtime group id a constant
Check for CSRF token on promo eligibilty ajax check
2015-07-30 13:27:32 -04:00
drigato bccba2f9d5 SAAS-973: Airtime Billing page - Add support for August promotion plans
Front-end changes to price grid, and plan title
2015-07-30 12:53:37 -04:00
drigato d9e2ba0ed3 SAAS-973: Airtime Billing page - Add support for August promotion plans
Un-hardcode product ids
2015-07-30 09:39:50 -04:00
drigato 4ed87de183 SAAS-973: Airtime Billing page - Add support for August promotion plans
Backend side pretty much done
2015-07-29 22:24:17 -04:00
drigato ce7765a8cb Merge branch 'saas' into saas-dev 2015-07-21 11:03:31 -04:00
drigato 6f09ef4af1 Change usability hint wording 2015-07-21 07:27:26 -04:00
drigato 7f4fbf65e1 SAAS-960 Change hint for currently playing linked show 2015-07-17 12:48:57 -04:00
Duncan Sommerville 1816be156f SAAS-922 - change file extensions in pypo based on mime-type, update lists of accepted mime types 2015-07-16 16:26:52 -04:00
drigato e07d62b020 Small comments fix 2015-07-15 10:41:01 -04:00
drigato 7b237a2e65 SAAS-940: Provide usability hints to user
Changed some hint wording
2015-07-14 12:14:00 -04:00
drigato 2de831a37f SAAS-940: Provide usability hints to user
Made hints more specific
2015-07-14 11:45:37 -04:00
drigato 25ef70767b SAAS-940: Provide usability hints to user
Customized hints depending on what page the user is on and what action
they just completed.
2015-07-13 17:02:31 -04:00
Duncan Sommerville 9fdc08f88a SAAS-876 - reset to default settings when using Airtime Pro streaming 2015-07-13 12:28:58 -04:00
drigato 48547ee347 SAAS-940: Provide usability hints to user
Refactored some code
2015-07-13 11:19:04 -04:00
drigato 55999a07ec SAAS-940: Provide usability hints to user 2015-07-13 08:06:41 -04:00
Albert Santoni 1efa591d67 Fixed double HTML encoding on embedded schedule widget 2015-07-09 12:49:49 -04:00
Duncan Sommerville 3cebbaf29a Add aac mime-types into audio mime map 2015-07-07 16:15:35 -04:00
Duncan Sommerville 776596d5b6 SAAS-922 - replace large conditionals with single public mime-type map 2015-07-07 15:48:22 -04:00
Duncan Sommerville e246771af0 SAAS-922 - additional mime-type coverage 2015-07-07 15:09:06 -04:00
Duncan Sommerville 92c9fd30b5 SAAS-922 - expose mime-based file extensions from /rest/media 2015-07-07 13:54:19 -04:00