Refactor
This commit is contained in:
parent
818d76228f
commit
05b5ef1cba
21 changed files with 22 additions and 24 deletions
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\URL;
|
||||
namespace wishthis;
|
||||
|
||||
$api = true;
|
||||
$response = array();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{User, Wish, EmbedCache};
|
||||
namespace wishthis;
|
||||
|
||||
$api = true;
|
||||
$response = array();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{User, Wishlist};
|
||||
namespace wishthis;
|
||||
|
||||
$api = true;
|
||||
$response = array();
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
namespace wishthis;
|
||||
|
||||
use wishthis\{User, URL, Wish};
|
||||
|
||||
enum Navigation: int
|
||||
{
|
||||
case Wishlists = 1;
|
||||
|
@ -122,10 +120,10 @@ class Page
|
|||
|
||||
$ignorePower = array(
|
||||
'home',
|
||||
'login',
|
||||
'register',
|
||||
'install',
|
||||
'login',
|
||||
'maintenance',
|
||||
'register',
|
||||
);
|
||||
if (
|
||||
!isset($_SESSION['user'])
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\Page;
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Home'));
|
||||
$page->header();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{Page, Database};
|
||||
namespace wishthis;
|
||||
|
||||
if ($options && $options->getOption('isInstalled')) {
|
||||
redirect('/?page=home');
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\Page;
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Login as'), 100);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{Page, Email, User};
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Login'));
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\Page;
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Logout'));
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\Page;
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Maintenance'));
|
||||
$page->header();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\Wish;
|
||||
namespace wishthis;
|
||||
|
||||
$scriptPart = '/src/assets/js/parts/wish-add.js';
|
||||
?>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\Wish;
|
||||
namespace wishthis;
|
||||
|
||||
$scriptPart = '/src/assets/js/parts/wishlist-filter.js';
|
||||
?>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\Page;
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Insufficient power'));
|
||||
$page->header();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{Page, User};
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Profile'));
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{Page, User};
|
||||
namespace wishthis;
|
||||
|
||||
$passwordReset = isset($_SESSION['_GET']['password-reset'], $_SESSION['_GET']['token']);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\Page;
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Settings'));
|
||||
$page->header();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{Page, User};
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Update'), 100);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{Page, Wish};
|
||||
namespace wishthis;
|
||||
|
||||
$userIsAuthenticated = false;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{Page, User, Wishlist, Wish};
|
||||
namespace wishthis;
|
||||
|
||||
$wishlist = new Wishlist($_SESSION['_GET']['wishlist']);
|
||||
$page = new Page(__FILE__, $wishlist->getTitle());
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{Page, User, Wishlist};
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('Saved lists'));
|
||||
$page->header();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @author Jay Trees <github.jay@grandel.anonaddy.me>
|
||||
*/
|
||||
|
||||
use wishthis\{Page, User, Wishlist};
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('My lists'));
|
||||
$page->header();
|
||||
|
|
Loading…
Reference in a new issue