Merge branch 'develop' of https://github.com/grandeljay/wishthis into develop
This commit is contained in:
commit
3a83e4c958
3 changed files with 37 additions and 16 deletions
27
README.md
27
README.md
|
@ -93,15 +93,18 @@ For more information see: https://fomantic-ui.com/introduction/build-tools.html
|
|||
| PHP | PSR-12 |
|
||||
|
||||
## :construction: Roadmap
|
||||
| Item | Status |
|
||||
| --------------------------------------------- | ------------------- |
|
||||
| Changelog | Planned |
|
||||
| Group wishes by store | Planned |
|
||||
| Price field for wishes | Planned |
|
||||
| Redirect to original target after login | Planned |
|
||||
| Save / bookmark wishlists from other users | Planned |
|
||||
| Temporary undo button after fulfilling a wish | Planned |
|
||||
| Activity feed and friends | Under consideration |
|
||||
| Combined wishes | Under consideration |
|
||||
| Folders / Subcategories for wishlists | Under consideration |
|
||||
| Synchronise Steam wishlist | Under consideration |
|
||||
| Item | Status |
|
||||
| --------------------------------------------------- | ------------------- |
|
||||
| Changelog | Planned |
|
||||
| Group wishes by store | Planned |
|
||||
| Option to show/notify when a wish was fulfilled | Planned |
|
||||
| Price field for wishes | Planned |
|
||||
| Redirect to original target after login | Planned |
|
||||
| Save / bookmark wishlists from other users | Planned |
|
||||
| Temporary undo button after fulfilling a wish | Planned |
|
||||
| Activity feed and friends | Under consideration |
|
||||
| Browser extension to quickly create wishes from url | Under consideration |
|
||||
| Bulk add wishes via link list | Under consideration |
|
||||
| Combined wishes | Under consideration |
|
||||
| Folders / Subcategories for wishlists | Under consideration |
|
||||
| Synchronise Steam wishlist | Under consideration |
|
||||
|
|
|
@ -374,8 +374,8 @@ $(function () {
|
|||
var formData = new URLSearchParams(new FormData(form[0]));
|
||||
|
||||
fetch('/src/api/wishes.php', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
method : 'POST',
|
||||
body : formData
|
||||
})
|
||||
.then(handleFetchError)
|
||||
.then(handleFetchResponse)
|
||||
|
@ -384,8 +384,9 @@ $(function () {
|
|||
|
||||
wishlistsRefresh();
|
||||
|
||||
form.trigger('reset');
|
||||
form.find('.dropdown').dropdown('restore defaults');
|
||||
modalWishlistWishAdd.modal('hide');
|
||||
|
||||
buttonAdd.removeClass('loading');
|
||||
})
|
||||
.catch(handleFetchCatch);
|
||||
|
|
|
@ -10,11 +10,27 @@ function redirect(string $target)
|
|||
{
|
||||
global $user;
|
||||
|
||||
$isDevEnvironment = defined('ENV_IS_DEV') && true === ENV_IS_DEV;
|
||||
|
||||
/**
|
||||
* Redirect user based on channel setting
|
||||
*/
|
||||
$isHostInChannel = false;
|
||||
|
||||
/** Determine if host is a defined channel */
|
||||
foreach (CHANNELS as $channel) {
|
||||
if ($channel['host'] === $_SERVER['HTTP_HOST']) {
|
||||
$isHostInChannel = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/** Determine channel to redirect to */
|
||||
if (
|
||||
defined('CHANNELS')
|
||||
&& is_array(CHANNELS)
|
||||
&& isset($user->channel)
|
||||
&& '127.0.0.1' !== $_SERVER['REMOTE_ADDR']
|
||||
&& !$isDevEnvironment
|
||||
) {
|
||||
$host = null;
|
||||
|
||||
|
@ -22,6 +38,7 @@ function redirect(string $target)
|
|||
if (
|
||||
$channel['branch'] === $user->channel
|
||||
&& $channel['host'] !== $_SERVER['HTTP_HOST']
|
||||
&& $isHostInChannel
|
||||
) {
|
||||
$host = $channel['host'];
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue