Refactor
This commit is contained in:
parent
5de69128fb
commit
521ba07b08
5 changed files with 5 additions and 7 deletions
|
@ -12,8 +12,6 @@ $page = new page(__FILE__, 'Update');
|
||||||
$page->header();
|
$page->header();
|
||||||
$page->navigation();
|
$page->navigation();
|
||||||
|
|
||||||
$user = new User();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update
|
* Update
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,7 +18,6 @@ if (isset($_POST['url'], $_POST['wishlist'])) {
|
||||||
$page = new page(__FILE__, 'Add a product');
|
$page = new page(__FILE__, 'Add a product');
|
||||||
$page->header();
|
$page->header();
|
||||||
$page->navigation();
|
$page->navigation();
|
||||||
$user = new User();
|
|
||||||
?>
|
?>
|
||||||
<main>
|
<main>
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
|
|
@ -19,7 +19,6 @@ $products = array();
|
||||||
* Get wishlist products
|
* Get wishlist products
|
||||||
*/
|
*/
|
||||||
if (isset($_GET['wishlist'])) {
|
if (isset($_GET['wishlist'])) {
|
||||||
$user = new User();
|
|
||||||
$wishlist = $database->query('SELECT * FROM `wishlists`
|
$wishlist = $database->query('SELECT * FROM `wishlists`
|
||||||
WHERE `id` = "' . $_GET['wishlist'] . '"')
|
WHERE `id` = "' . $_GET['wishlist'] . '"')
|
||||||
->fetch();
|
->fetch();
|
||||||
|
|
|
@ -13,8 +13,6 @@ $page = new page(__FILE__, 'Wishlist');
|
||||||
$page->header();
|
$page->header();
|
||||||
$page->navigation();
|
$page->navigation();
|
||||||
|
|
||||||
$user = new User();
|
|
||||||
|
|
||||||
$wishlist = $database->query('SELECT * FROM `wishlists`
|
$wishlist = $database->query('SELECT * FROM `wishlists`
|
||||||
WHERE `hash` = "' . $_GET['wishlist'] . '"')
|
WHERE `hash` = "' . $_GET['wishlist'] . '"')
|
||||||
->fetch();
|
->fetch();
|
||||||
|
|
|
@ -53,6 +53,11 @@ if (
|
||||||
*/
|
*/
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User
|
||||||
|
*/
|
||||||
|
$user = new wishthis\User();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API
|
* API
|
||||||
*/
|
*/
|
||||||
|
@ -75,7 +80,6 @@ define('VERSION', '0.2.0');
|
||||||
if ($options) {
|
if ($options) {
|
||||||
if (-1 === version_compare($options->version, VERSION)) {
|
if (-1 === version_compare($options->version, VERSION)) {
|
||||||
$options->updateAvailable = true;
|
$options->updateAvailable = true;
|
||||||
$page = 'update';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue