Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live #23

Closed
wants to merge 82 commits into from
Closed

Live #23

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
44b62ec
Merge branch 'my_games' of https://github.com/Zer0xFF/TheGamesDBv2 in…
Zer0xFF Nov 4, 2018
3335da9
Merge branch 'misssing_platform_filter' of https://github.com/Zer0xFF…
Zer0xFF Nov 4, 2018
3b09a29
Merge branch 'discord' of https://github.com/Zer0xFF/TheGamesDBv2 int…
Zer0xFF Nov 4, 2018
6998204
Merge branch 'alt_names' of https://github.com/Zer0xFF/TheGamesDBv2 i…
Zer0xFF Nov 4, 2018
9f839b6
during search, take into account alts names
Zer0xFF Nov 4, 2018
95d1b11
cleanup
Zer0xFF Nov 4, 2018
970f189
Fix: missing image for my_games.php
Zer0xFF Nov 4, 2018
27507e9
New Swagger API documentation
Zer0xFF Nov 4, 2018
d149fd7
Cleanup
Zer0xFF Nov 4, 2018
ad266f7
Add link to my games collection
Zer0xFF Nov 4, 2018
db9cd53
Fix: missing semi-colon
Zer0xFF Nov 4, 2018
26a53ef
Fix: missing function
Zer0xFF Nov 4, 2018
da14400
Update userbook mark function
Zer0xFF Nov 4, 2018
5496247
Cleanup
Zer0xFF Nov 4, 2018
e4e3b61
Fix typo
Zer0xFF Nov 4, 2018
c8c183e
html convert user search input, to match html coverted data in database
Zer0xFF Nov 16, 2018
9de869a
Fix warning
Zer0xFF Jan 13, 2019
b382608
/Games/ByGameName v1.1 revision, fixed incorrect response structure
Zer0xFF Jan 13, 2019
90a7f83
Add search games /ByGameSerialID endpoint
Zer0xFF Jan 13, 2019
485ff37
Add user interface to allow serial edits
Zer0xFF Jan 13, 2019
9e3fe41
Fix filter, ignore filter if using invalid platform id range
Zer0xFF Jan 13, 2019
1f3ef3a
fix field names
Zer0xFF Jan 14, 2019
28707fb
Add serial pattern filter
Zer0xFF Jan 15, 2019
2ea962e
fixed serial array to json conversion
Zer0xFF Jan 15, 2019
9715a6c
set platform edit immediately after [NEW] tage
Zer0xFF Jan 18, 2019
44e4551
add Natural search
Zer0xFF Jan 18, 2019
089dfab
add initial backend logic to handle hash addition/update/removal
Zer0xFF Jan 20, 2019
8cd99a4
add search by hash api endpoint
Zer0xFF Jan 20, 2019
cdf3186
move API to prefix /v1/
Zer0xFF Jan 1, 2020
20a6496
update path
Zer0xFF Jan 1, 2020
63e32d8
fix missing closing bracket
Zer0xFF Jan 3, 2020
379fb0d
apply AuthMiddleware to API endpoints only
Zer0xFF Jan 3, 2020
7590760
initial switch to UIDs
Zer0xFF Jan 21, 2019
d8475fa
switch the remaining serial references to UIDs
Zer0xFF Jan 21, 2019
ababc7d
assign pattern type to uid
Zer0xFF Jan 21, 2019
ec7d7bd
adapt array_unique_hashes() to uids as well
Zer0xFF Jan 21, 2019
43af8b8
fix typo hashes
Zer0xFF Jan 21, 2019
4b19917
API allowance_refresh_timer
Zer0xFF Jan 21, 2019
7cfa8ba
keep the switch until serials entry removed from user_edits
Zer0xFF Jan 21, 2019
f520d70
delete request wont have type or subtype
Zer0xFF Jan 21, 2019
d27cbcb
add platform name to game listing
Zer0xFF Jan 21, 2019
183245a
Recently Added Page, index.php pagination
Zer0xFF Jan 21, 2019
5a41a11
Allow mods to see user contribution, will enable to all soon TM
Zer0xFF Jan 21, 2019
79cc89d
Cleanup
Zer0xFF Jan 21, 2019
ff1f64f
Fixed Login
Zer0xFF Feb 22, 2019
2a252d9
fix setting regex
Zer0xFF Feb 22, 2019
69121c9
Fix game control panel layout
Zer0xFF Feb 22, 2019
6229d83
Fix: Display UIDs changes in Discord bot
Zer0xFF Apr 9, 2019
1273eaf
Fix pagination
Zer0xFF Apr 9, 2019
4a72029
Allow Mods to edit game's platform
Zer0xFF Apr 9, 2019
5b5afc8
Cleanup
Zer0xFF Apr 9, 2019
6c16969
Removed Google+
smidley Feb 22, 2019
c010bb3
Remove Google+
smidley Feb 22, 2019
ccda585
Cleanup
Zer0xFF Apr 9, 2019
8754689
enable limit for Devs/publishers, note we're not enabling pagination/…
Zer0xFF Jul 8, 2019
349a530
missing ;
Zer0xFF Jul 8, 2019
00159d3
add notice to all pages... will remove is 1 week
Zer0xFF Feb 4, 2020
e42b20d
change database name reference
Zer0xFF Feb 4, 2020
a3e81c1
make player selection numeric input
Zer0xFF Feb 4, 2020
1aea091
paginate user_contrib page
Zer0xFF Feb 5, 2020
a8f7896
add info to footer
Zer0xFF Feb 5, 2020
498271e
add cdn purge, used for json purge
Zer0xFF Feb 7, 2020
08a32f8
update add_games, fix edit_games player selection display
Zer0xFF Feb 11, 2020
b5c17a8
update swagger specs, thanks to @J-Swift
Zer0xFF Feb 11, 2020
f52bb03
add api limit endpoint
Zer0xFF Feb 11, 2020
ddec8c4
devs/pubs merge interface
Zer0xFF Mar 15, 2020
bb3f467
mods can trigger stats update
Zer0xFF Mar 22, 2020
f6048ef
add mod tools to profile menu
Zer0xFF Mar 22, 2020
6d29339
add option to add devs/pubs
Zer0xFF Apr 6, 2020
0995c44
fix title
Zer0xFF Apr 6, 2020
6495f57
fix typos
Zer0xFF Apr 8, 2020
a49b7bf
Allow upload of title screen
StrAbZ Apr 7, 2020
8612e97
Update the ribbons
StrAbZ Apr 13, 2020
903cd67
fix typo
Zer0xFF May 10, 2020
66622ca
Ensure line breaks works in the game overview
StrAbZ May 16, 2020
440597e
Ensure the last | is not visible on genre
StrAbZ May 16, 2020
c7e57d3
Merge pull request #22 from StrAbZ/small-visual-enhancements
Zer0xFF May 19, 2020
8d3d84b
increase screenshot limit
Zer0xFF May 21, 2020
788a441
Merge pull request #21 from StrAbZ/add-title-screen
Zer0xFF May 21, 2020
80acfb5
Revert "add notice to all pages... will remove is 1 week"
Zer0xFF May 21, 2020
82926cc
fix warning
Zer0xFF Jun 21, 2020
df83194
fix typo
Zer0xFF Jul 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added API/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added API/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 0 additions & 15 deletions API/include/Utils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,6 @@ static function getValidNumericFromArray(array $args, $index)
}
return $IDs;
}

static function htmlspecialchars_decodeArrayRecursive(&$array)
{
foreach($array as &$sub_array_item)
{
if(is_array($sub_array_item) || is_object($sub_array_item))
{
Utils::htmlspecialchars_decodeArrayRecursive($sub_array_item);
}
else if(!is_numeric($sub_array_item) && !empty($sub_array_item))
{
$sub_array_item = htmlspecialchars_decode($sub_array_item);
}
}
}
}

?>
7 changes: 6 additions & 1 deletion API/include/middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ public function __invoke($request, $response, $next)
{
$monthly_allowance = (!empty($User->monthly_allowance)) ? $User->monthly_allowance : 0;
$monthly_count = (!empty($User->count)) ? $User->count : 0;
if($update_refresh_date = strtotime($User->last_refresh_date) < strtotime('-30 days'))
$refresh = strtotime("+30 days", strtotime($User->last_refresh_date)) - time();
if($update_refresh_date = $refresh < 0)
{
$refresh = strtotime("+30 days", 0);
$monthly_count = 0;
}
$remaining_monthly_allowance = $monthly_allowance - $monthly_count;
Expand All @@ -37,19 +39,22 @@ public function __invoke($request, $response, $next)
$JSON_Response = json_decode($response->getBody(), true);
$JSON_Response['remaining_monthly_allowance'] = $remaining_monthly_allowance + (!$use_extra ? -1 : 0);
$JSON_Response['extra_allowance'] = $User->extra_allowance + ($use_extra ? -1 : 0);
$JSON_Response['allowance_refresh_timer'] = ($User->is_private_key == 1) ? NULL : $refresh;
return $response->withJson($JSON_Response, isset($JSON_Response['code']) ? $JSON_Response['code'] : 200);
}
else
{
$JSON_Response = Utils::getStatus(403);
$JSON_Response['remaining_monthly_allowance'] = 0;
$JSON_Response['allowance_refresh_timer'] = ($User->is_private_key == 1) ? NULL : $refresh;
return $response->withJson($JSON_Response, $JSON_Response['code']);
}
}
else
{
$JSON_Response = Utils::getStatus(401);
$JSON_Response['remaining_monthly_allowance'] = 0;
$JSON_Response['allowance_refresh_timer'] = 0;
return $response->withJson($JSON_Response, $JSON_Response['code']);
}
}
Expand Down
Loading