Commit Graph

32 Commits

Author SHA1 Message Date
Lucas Bickel f7ceeedb04 (Amazon S3) drop broken S3 support 2018-10-06 12:45:22 +02:00
Lucas Bickel 440e8ce8c9 Fix legacy constructors
These go way back to php 4 and don't need to be like this for any
reason. Currently error handling is acting up when these throw an
error.
2017-09-08 19:53:29 +02: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
Duncan Sommerville 041053b171 SAAS-922 - urlencode content headers to ensure compatibility 2015-07-16 14:24:07 -04:00
Albert Santoni ffaa076767 Second fix for SAAS-922, file extension improvements for S3 2015-07-15 17:51:37 -04:00
Albert Santoni 064e1bd4e0 Fix SAAS-922 for files on S3 too 2015-07-15 17:33:33 -04:00
Albert Santoni d31de0937f Refactored file storage code slightly to allow multiple download URLs 2015-03-30 11:31:07 -04:00
Albert Santoni 271dc266fa S3 proxy cache support + 1 minor analyzer bugfix 2015-03-26 12:08:52 -04:00
Albert Santoni 7b9efb988f Fixed logic error Amazon_S3StorageBackend 2015-03-20 18:03:23 -04:00
Albert Santoni 8c7ae6c890 Added safety checks to Amazon_S3StorageBackend 2015-03-20 17:23:53 -04:00
Albert Santoni 181db7617a Use Billing::getClientInstanceId() in Amazon_S3StorageBackend 2015-03-04 17:02:30 -05:00
Albert Santoni 3a1141d4c8 Merge branch 'saas' into saas-media-refactor
Conflicts:
	airtime_mvc/application/cloud_storage/ProxyStorageBackend.php
	airtime_mvc/application/controllers/ApiController.php
2015-02-25 13:02:11 -05:00
Albert Santoni 2e2c3d6276 Merge of cc-5709-airtime-analyzer-saas-refactor into saas 2015-02-20 14:27:16 -05:00
drigato 6ccc634782 SAAS-596: Store file size and hash in database
Updated schema and added filesize and md5_hash columns.
Changed getFileSize functions to return the value stored in the
database.
Removed getFileSize from the cloud storage classes.
2015-02-17 14:51:51 -05:00
drigato 44ff8f830f Fixed Amazon S3 Proxy class bug 2015-01-26 16:06:32 -05:00
Albert Santoni 8f59ec0861 ProxyStorageBackend::getFilePrefix() bugfix 2015-01-26 14:18:59 -05:00
Albert Santoni 8cfe2ec839 Fix capitalization of Amazon cloud storage config section 2015-01-26 14:11:41 -05:00
Albert Santoni bd3110b3af Renamed Amazon_S3 class to Amazon_S3StorageBackend 2015-01-26 14:06:03 -05:00
Albert Santoni dbba5a7427 Decouple Billing and S3 cloud storage stuff from Zend 2015-01-26 13:10:10 -05:00
drigato 57a7218a79 SAAS-540: Change the Provisioning Controller's terminate endpoint to reflect new S3 file prefix 2015-01-16 11:09:13 -05:00
drigato 754c7bfc64 Removed code that was deleting the cloud_file database records in the case of
station termination. The database will remain as is in case we have to restore
the files.
2015-01-14 15:15:23 -05:00
drigato 08738cf391 Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer-cloud-storage-saas
Conflicts:
	python_apps/airtime_analyzer/airtime_analyzer/cloud_storage_uploader.py
2015-01-06 15:46:20 -05:00
drigato 8d914bcd13 SAAS-529: Replace Apache Libcloud with Python-Boto SDK 2015-01-06 15:44:34 -05:00
drigato ec1c8669c8 Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer-cloud-storage-saas 2014-12-17 14:14:03 -05:00
Albert Santoni 7059820ca0 Add a comment about the proxy pattern 2014-12-16 14:54:53 -05:00
drigato ab4ebb2969 SAAS-525: Station Termination -> Delete cloud_file table records
Deleted cloud_file records.
Renamed the function that does this.
2014-12-16 14:13:57 -05:00
drigato 891cfdb48e SAAS-517: Create Provisioning controller with a terminate endpoint 2014-12-11 13:35:34 -05:00
drigato 644e6b00d8 SAAS-516: Replace Zend_Service_Amazon_S3 with AWS SDK for PHP 2014-12-09 17:58:36 -05:00
drigato 59ceb11f00 SAAS-510: PYPO -> Files are downloaded even if they already exist in tmp cache dir 2014-12-08 13:21:24 -05:00
drigato bf91677f91 SAAS-505: Extract Amazon_S3 class and have it inherit from a general 'cloud backend' class
Fixed reading credentials in from cloud_storage.conf
2014-12-02 09:06:28 -05:00
drigato 7c0a25be7f SAAS-505: Extract Amazon_S3 class and have it inherit from a general 'cloud backend' class 2014-12-01 21:05:46 -05:00