Merge pull request #1887 from pixelfed/staging

Update Redis namespace
This commit is contained in:
daniel 2019-12-10 23:08:00 -07:00 committed by GitHub
commit c862412c0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 30 additions and 18 deletions

View file

@ -3,7 +3,7 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Redis; use Illuminate\Support\Facades\Redis;
class Installer extends Command class Installer extends Command
{ {

View file

@ -5,7 +5,7 @@ namespace App\Http\Controllers;
use Auth; use Auth;
use Cache; use Cache;
use Mail; use Mail;
use Redis; use Illuminate\Support\Facades\Redis;
use Carbon\Carbon; use Carbon\Carbon;
use App\Mail\ConfirmEmail; use App\Mail\ConfirmEmail;
use Illuminate\Http\Request; use Illuminate\Http\Request;
@ -264,7 +264,6 @@ class AccountController extends Controller
$pid = $user->id; $pid = $user->id;
Cache::forget("user:filter:list:$pid"); Cache::forget("user:filter:list:$pid");
Cache::forget("feature:discover:posts:$pid");
Cache::forget("api:local:exp:rec:$pid"); Cache::forget("api:local:exp:rec:$pid");
return redirect()->back(); return redirect()->back();

View file

@ -10,7 +10,8 @@ use App\{
Profile, Profile,
UserFilter UserFilter
}; };
use Auth, Cache, Redis; use Auth, Cache;
use Illuminate\Support\Facades\Redis;
use App\Util\Site\Config; use App\Util\Site\Config;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Services\SuggestionService; use App\Services\SuggestionService;

View file

@ -3,7 +3,8 @@
namespace App\Http\Controllers\Settings; namespace App\Http\Controllers\Settings;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Cookie, Redis; use Cookie;
use Illuminate\Support\Facades\Redis;
use App\Services\SuggestionService; use App\Services\SuggestionService;
trait LabsSettings { trait LabsSettings {

View file

@ -8,7 +8,8 @@ use App\{
UserFilter UserFilter
}; };
use App\Services\NotificationService; use App\Services\NotificationService;
use DB, Cache, Log, Redis; use DB, Cache, Log;
use Illuminate\Support\Facades\Redis;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
@ -57,6 +58,7 @@ class CommentPipeline implements ShouldQueue
if ($actor->id === $target->id || $status->comments_disabled == true) { if ($actor->id === $target->id || $status->comments_disabled == true) {
return true; return true;
} }
$filtered = UserFilter::whereUserId($target->id) $filtered = UserFilter::whereUserId($target->id)
->whereFilterableType('App\Profile') ->whereFilterableType('App\Profile')
->whereIn('filter_type', ['mute', 'block']) ->whereIn('filter_type', ['mute', 'block'])

View file

@ -8,7 +8,8 @@ use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
use Cache, Log, Redis; use Cache, Log;
use Illuminate\Support\Facades\Redis;
use League\Fractal; use League\Fractal;
use League\Fractal\Serializer\ArraySerializer; use League\Fractal\Serializer\ArraySerializer;
use App\FollowRequest; use App\FollowRequest;

View file

@ -10,7 +10,7 @@ use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
use Log; use Log;
use Redis; use Illuminate\Support\Facades\Redis;
class FollowPipeline implements ShouldQueue class FollowPipeline implements ShouldQueue
{ {

View file

@ -2,7 +2,8 @@
namespace App\Jobs\LikePipeline; namespace App\Jobs\LikePipeline;
use Cache, Log, Redis; use Cache, Log;
use Illuminate\Support\Facades\Redis;
use App\{Like, Notification}; use App\{Like, Notification};
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;

View file

@ -2,7 +2,8 @@
namespace App\Jobs\SharePipeline; namespace App\Jobs\SharePipeline;
use Cache, Log, Redis; use Cache, Log;
use Illuminate\Support\Facades\Redis;
use App\{Status, Notification}; use App\{Status, Notification};
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;

View file

@ -9,7 +9,7 @@ use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
use Redis; use Illuminate\Support\Facades\Redis;
class NewStatusPipeline implements ShouldQueue class NewStatusPipeline implements ShouldQueue
{ {

View file

@ -2,7 +2,7 @@
namespace App\Services; namespace App\Services;
use Redis; use Illuminate\Support\Facades\Redis;
use App\{ use App\{
Follower, Follower,

View file

@ -2,7 +2,8 @@
namespace App\Services; namespace App\Services;
use Cache, Redis; use Cache;
use Illuminate\Support\Facades\Redis;
use App\{ use App\{
Notification, Notification,
Profile Profile

View file

@ -2,7 +2,8 @@
namespace App\Services; namespace App\Services;
use Cache, Redis; use Cache;
use Illuminate\Support\Facades\Redis;
use App\{ use App\{
Follower, Follower,

View file

@ -2,7 +2,7 @@
namespace App\Services; namespace App\Services;
use Redis; use Illuminate\Support\Facades\Redis;
use App\{ use App\{
Profile, Profile,
Status, Status,

View file

@ -2,7 +2,8 @@
namespace App\Services; namespace App\Services;
use Cache, Redis; use Cache;
use Illuminate\Support\Facades\Redis;
use App\{Status, StatusHashtag}; use App\{Status, StatusHashtag};
use App\Transformer\Api\StatusHashtagTransformer; use App\Transformer\Api\StatusHashtagTransformer;
use League\Fractal; use League\Fractal;

View file

@ -2,7 +2,7 @@
namespace App\Services; namespace App\Services;
use Redis; use Illuminate\Support\Facades\Redis;
use App\Profile; use App\Profile;
class SuggestionService { class SuggestionService {

View file

@ -2,7 +2,8 @@
namespace App\Services; namespace App\Services;
use Cache, Redis; use Cache;
use Illuminate\Support\Facades\Redis;
use App\{ use App\{
Follower, Follower,

View file

@ -95,6 +95,8 @@ class RestrictedNames
'a', 'a',
'app', 'app',
'about', 'about',
'aboutus',
'about-us',
'abuse', 'abuse',
'account', 'account',
'admins', 'admins',