From 8ac590819f27817fa298a42e52c41dc43574e99a Mon Sep 17 00:00:00 2001 From: Peter Deltchev <peter@deltchev.com> Date: Thu, 31 Dec 2015 18:27:21 -0800 Subject: [PATCH] Fixed incorrect class references. --- .../Controllers/Api/Web/AlbumsController.php | 8 +-- .../Api/Web/PlaylistsController.php | 6 +- .../Controllers/Api/Web/TracksController.php | 3 +- app/Library/CacheBusterAsset.php | 55 ------------------- 4 files changed, 7 insertions(+), 65 deletions(-) delete mode 100644 app/Library/CacheBusterAsset.php diff --git a/app/Http/Controllers/Api/Web/AlbumsController.php b/app/Http/Controllers/Api/Web/AlbumsController.php index fb61be53..a494d28c 100644 --- a/app/Http/Controllers/Api/Web/AlbumsController.php +++ b/app/Http/Controllers/Api/Web/AlbumsController.php @@ -21,18 +21,16 @@ namespace Poniverse\Ponyfm\Http\Controllers\Api\Web; use Illuminate\Database\Eloquent\ModelNotFoundException; -use Illuminate\Support\Facades\File; use Poniverse\Ponyfm\Models\Album; use Poniverse\Ponyfm\Commands\CreateAlbumCommand; use Poniverse\Ponyfm\Commands\DeleteAlbumCommand; use Poniverse\Ponyfm\Commands\EditAlbumCommand; use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase; use Poniverse\Ponyfm\Models\Image; -use Poniverse\Ponyfm\Jobs\EncodeTrackFile; use Poniverse\Ponyfm\Models\ResourceLogItem; -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Input; -use Illuminate\Support\Facades\Response; +use Auth; +use Input; +use Response; use Poniverse\Ponyfm\Models\Track; class AlbumsController extends ApiControllerBase diff --git a/app/Http/Controllers/Api/Web/PlaylistsController.php b/app/Http/Controllers/Api/Web/PlaylistsController.php index e3b92e76..c0ee2c0b 100644 --- a/app/Http/Controllers/Api/Web/PlaylistsController.php +++ b/app/Http/Controllers/Api/Web/PlaylistsController.php @@ -29,9 +29,9 @@ use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase; use Poniverse\Ponyfm\Models\Image; use Poniverse\Ponyfm\Models\Playlist; use Poniverse\Ponyfm\Models\ResourceLogItem; -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Input; -use Illuminate\Support\Facades\Response; +use Auth; +use Input; +use Response; use Poniverse\Ponyfm\Models\Track; class PlaylistsController extends ApiControllerBase diff --git a/app/Http/Controllers/Api/Web/TracksController.php b/app/Http/Controllers/Api/Web/TracksController.php index 123387ec..ad696c5b 100644 --- a/app/Http/Controllers/Api/Web/TracksController.php +++ b/app/Http/Controllers/Api/Web/TracksController.php @@ -22,13 +22,12 @@ namespace Poniverse\Ponyfm\Http\Controllers\Api\Web; use Illuminate\Database\Eloquent\ModelNotFoundException; use File; -use Poniverse\Ponyfm\Exceptions\InvalidEncodeOptionsException; use Poniverse\Ponyfm\Commands\DeleteTrackCommand; use Poniverse\Ponyfm\Commands\EditTrackCommand; use Poniverse\Ponyfm\Commands\UploadTrackCommand; use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase; use Poniverse\Ponyfm\Jobs\EncodeTrackFile; -use Poniverse\Ponyfm\ResourceLogItem; +use Poniverse\Ponyfm\Models\ResourceLogItem; use Poniverse\Ponyfm\Models\TrackFile; use Poniverse\Ponyfm\Models\Track; use Auth; diff --git a/app/Library/CacheBusterAsset.php b/app/Library/CacheBusterAsset.php deleted file mode 100644 index 707088cd..00000000 --- a/app/Library/CacheBusterAsset.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -/** - * Pony.fm - A community for pony fan music. - * Copyright (C) 2015 Peter Deltchev - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -use Assetic\Asset\BaseAsset; -use Assetic\Filter\FilterInterface; - -/** - * Class CacheBusterAsset - * OH GOD IT BUUUUUUURNS - * - * Well, I may as well tell you why this awful class exists. So... Assetic doesn't quite support less's import - * directive. I mean; it supports it insofar as Less itself supports it - but it doesn't take into account the - * last modified time for imported assets. Since we only have one less file that imports everything else... well - * you can see where this is going. This asset will let us override the last modified time for an entire collection - * which allows me to write a custom mechanism for cache busting. - */ -class CacheBusterAsset extends BaseAsset -{ - private $_lastModified; - - /** - * @param int $lastModified - */ - public function __construct($lastModified) - { - $this->_lastModified = $lastModified; - parent::__construct([], '', '', []); - } - - public function load(FilterInterface $additionalFilter = null) - { - } - - public function getLastModified() - { - return $this->_lastModified; - } -}