Skip to content

Commit

Permalink
Merge pull request #1009 from Heroes-Profile/develop
Browse files Browse the repository at this point in the history
Heroes Profile v1.0.9
  • Loading branch information
Zemill authored May 16, 2024
2 parents c25213e + c06d02d commit 62a6c57
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Heroes Profile
[Master Heroes Profile](https://www.heroesprofile.com/)(master branch)

This public repository is the site re-write for [Heroes Profile](https://www.heroesprofile.com/) and is not currently in production.

# Cloning the Heroes Profile repository

- `git clone --recursive https://github.com/Heroes-Profile/heroesprofile.git`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ public function getData(Request $request)

if ($minimum_games && $minimum_games > 0) {
$filteredData = array_filter($returnData, function ($item) use ($minimum_games) {
return $item['games_played'] > $minimum_games;
return $item['games_played'] >= $minimum_games;
});

$returnData = array_values($filteredData);
Expand Down
4 changes: 4 additions & 0 deletions app/Http/Middleware/CheckIfPatreonSupporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public function handle(Request $request, Closure $next): Response
}
}

if($user->flair_adfree_override == 1){
session(['patreonSubscriberAdFree' => true]);
session(['patreonSubscriberSiteFlair' => true]);
}
}

return $next($request);
Expand Down
6 changes: 6 additions & 0 deletions app/Http/Middleware/LogIPAndUserAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cookie;
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Support\Facades\Auth;
use App\Models\BattlenetAccount;

class LogIPAndUserAgent
{
Expand All @@ -17,6 +19,10 @@ class LogIPAndUserAgent
*/
public function handle(Request $request, Closure $next): Response
{

//$user = BattlenetAccount::find(1);
//Auth::login($user);

try {
Cookie::queue(Cookie::forget('additional-battletags'));
$ip = '';
Expand Down
1 change: 1 addition & 0 deletions app/Models/BattlenetAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class BattlenetAccount extends Authenticatable
'updated_at',
'created_at',
'private',
'flair_adfree_override',
];

public function patreonAccount()
Expand Down

0 comments on commit 62a6c57

Please sign in to comment.