Commit Graph

246 Commits

Author SHA1 Message Date
Kyle Robbertze f54b54f711 fix php include for zend file transfer 2021-09-21 21:44:28 +02:00
Lucas Bickel 0f5cb8b1f8 🔥 remove remaining legacy saas code 2019-08-18 16:34:29 +02:00
Robb 842e459de5
Merge branch 'master' into add-podcast-import-date 2019-05-04 11:53:28 -04:00
Robbt e701c2cffe Added last import date to podcast 2019-05-01 17:31:58 -04:00
Robbt 59df8ca6f8 fixed the total count being passed and undid previous commit 2019-05-01 16:00:49 -04:00
Lucas Bickel 54b1a70249 📦 (mvc) switch to zf1s zf1 2019-01-20 14:46:33 +01:00
ryan 15cf291bc9 set auto-generated smartblock and playlist title directly from input 2018-12-14 15:24:28 -06:00
Robbt 6cd5550721 added button to generate smartblock and playlist for podcast 2018-12-12 22:53:28 -05:00
Lucas Bickel d6a5cbd02e Remove assert() from rest module bootstrap
Problem: assert() is Language construct in php 7 and not a function anymore. It also seems to behave silghtly differently with regards to what kind of side effects assertions are allowed to have. This leads to all of the rest endpoints being broken in php 7 since the assertion silently fails and the routes never really get added to the front controllers router.

Solution: Don't wrap the addRouter call in assert(). The way assert was being uses was rather unusual for php code this age. It was also mostly checking zf1 rather than guarding against errors in LibreTime itself.

The php manual clearly states "As a rule of thumb your code should always be able to work correctly if assertion checking is not activated." giving even more reason to ot wrap critical paths in assertions.

There are some other instances of `assert()` being used in non test code, those don't seem to have any negative effects on php7.
2017-06-07 17:33:23 +02:00
Lucas Bickel 0b704e95f1 Use Zend_File_Transfer instead of $_FILES
This should give us more information in the case of an error and is the framework idiomatic way to handle a RESTful file upload.

I'm hoping this helps debug https://github.com/LibreTime/libretime/issues/3
2017-03-04 11:09:06 +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
Duncan Sommerville 7edece1938 Remove station podcast from podcast table count 2015-12-02 12:25:04 -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
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
Albert Santoni c5d9dfd93d Restrict podcast hosting for some plans. Fixed error page colours. 2015-11-17 17:34:13 -05:00
Duncan Sommerville 8e867b522c SAAS-1202 - move station podcast to top-level menu item 2015-11-13 14:57:32 -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
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
drigato 569ea00787 Fix for PodcastController index action when station podcast does not exist 2015-11-03 11:45:01 -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 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 4b11979eff Remove station podcast from podcast datatable; editor now opens from button in podcasts view 2015-10-29 12:17:52 -04:00
Duncan Sommerville e97aa199bd SAAS-1083 - work on publish dialog 2015-10-28 18:54:30 -04:00
Duncan Sommerville 05f51a9a2d Refresh podcast tabs on focus to have better synchronization with auto-ingest backend 2015-10-28 13:43:21 -04:00
Duncan Sommerville e8643e04eb Add colreorder fixed columns to podcast + episodes datatables so checkbox column is fixed 2015-10-28 12:17:29 -04:00
drigato e994033109 Refactor podcast episodes rest controller index action 2015-10-26 11:28:10 -04:00
drigato 58a7b9324b Merge branch 'saas-dev-publishing' of https://github.com/sourcefabric/Airtime into saas-dev-publishing
Conflicts:

airtime_mvc/application/modules/rest/controllers/PodcastEpisodesController.php
2015-10-22 15:03:38 -04:00
drigato 1aee6ba97a SAAS-1140: Paginate station podcast feed episodes
Added pagination to PodcastEpisodes controller
2015-10-22 14:51:39 -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 814fc67e90 Work on station podcast editor view 2015-10-21 19:21:52 -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
Duncan Sommerville a2d725f2b9 Fix podcast episode ingest 2015-10-15 11:33:09 -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
drigato b00ac6750c Testing 2015-09-29 13:04:22 -04:00
Duncan Sommerville 375d83ab43 Update to podcast frontend 2015-09-28 10:40:04 -04:00
Duncan Sommerville 43e9fb59ce SAAS-1071 - more work on celery backend for podcasts; add upgrade to make file_id field in third_party_track_references nullable 2015-09-24 15:57:38 -04:00
Duncan Sommerville ca51dcf3ae SAAS-1071 - more work on backend podcast implementation 2015-09-24 12:58:02 -04:00
Duncan Sommerville 827a83392f Remove unnecessary fields from bulk get, add explicit casting back to podcast item array for testing 2015-09-22 20:24:53 -04:00
drigato d86b00c53e SAAS-1077: REST API for podcast episodes
Empty PUT action
2015-09-22 11:19:39 -04:00
drigato 0fc324f3ba SAAS-1077: REST API for podcast episodes 2015-09-22 11:13:18 -04:00
Duncan Sommerville 6de6e2767c SAAS-1062 - Podcast skeleton work; slight rework to backend functionality 2015-09-18 15:39:12 -04:00
drigato f6f23864ce SAAS-1063: REST API for podcasts
/rest/podcast mostly done
2015-09-18 08:15:48 -04:00
drigato c1899f18af remove comment 2015-09-16 15:07:38 -04:00