From e10a3470cccd25b4d497d60ae6e0b854ae5d70cd Mon Sep 17 00:00:00 2001 From: Jay Trees Date: Wed, 26 Jan 2022 13:06:36 +0100 Subject: [PATCH] Rename includes to src --- .gitignore | 2 +- README.md | 6 +++--- index.php | 8 ++++---- {includes => src}/api/products.php | 0 {includes => src}/api/wishlists.php | 0 {includes => src}/assets/css/default.css | 0 {includes => src}/assets/css/install.css | 0 {includes => src}/assets/img/home.png | Bin 26719 -> 26718 bytes .../assets/img/wishlist-create.png | Bin 20759 -> 20758 bytes .../assets/img/wishlist-product-add.png | Bin 26260 -> 26259 bytes {includes => src}/assets/js/default.js | 8 ++++---- {includes => src}/assets/js/register.js | 0 {includes => src}/assets/js/wishlist-view.js | 0 {includes => src}/assets/js/wishlist.js | 0 {includes => src}/classes/database.php | 0 {includes => src}/classes/options.php | 0 {includes => src}/classes/page.php | 8 ++++---- {includes => src}/classes/user.php | 0 {includes => src}/classes/wishlist.php | 0 {includes => src}/config/config-sample.php | 0 .../functions/deleteDirectory.php | 0 .../functions/getCurrentSeason.php | 0 {includes => src}/pages/home.php | 0 {includes => src}/pages/install.php | 2 +- {includes => src}/pages/login.php | 0 {includes => src}/pages/logout.php | 0 {includes => src}/pages/power.php | 0 {includes => src}/pages/register.php | 0 {includes => src}/pages/update.php | 0 {includes => src}/pages/wishlist-create.php | 0 .../pages/wishlist-product-add.php | 0 {includes => src}/pages/wishlist-view.php | 0 {includes => src}/pages/wishlist.php | 0 workspace.code-workspace | 3 +++ 34 files changed, 20 insertions(+), 17 deletions(-) rename {includes => src}/api/products.php (100%) rename {includes => src}/api/wishlists.php (100%) rename {includes => src}/assets/css/default.css (100%) rename {includes => src}/assets/css/install.css (100%) rename {includes => src}/assets/img/home.png (99%) rename {includes => src}/assets/img/wishlist-create.png (99%) rename {includes => src}/assets/img/wishlist-product-add.png (99%) rename {includes => src}/assets/js/default.js (95%) rename {includes => src}/assets/js/register.js (100%) rename {includes => src}/assets/js/wishlist-view.js (100%) rename {includes => src}/assets/js/wishlist.js (100%) rename {includes => src}/classes/database.php (100%) rename {includes => src}/classes/options.php (100%) rename {includes => src}/classes/page.php (96%) rename {includes => src}/classes/user.php (100%) rename {includes => src}/classes/wishlist.php (100%) rename {includes => src}/config/config-sample.php (100%) rename {includes => src}/functions/deleteDirectory.php (100%) rename {includes => src}/functions/getCurrentSeason.php (100%) rename {includes => src}/pages/home.php (100%) rename {includes => src}/pages/install.php (99%) rename {includes => src}/pages/login.php (100%) rename {includes => src}/pages/logout.php (100%) rename {includes => src}/pages/power.php (100%) rename {includes => src}/pages/register.php (100%) rename {includes => src}/pages/update.php (100%) rename {includes => src}/pages/wishlist-create.php (100%) rename {includes => src}/pages/wishlist-product-add.php (100%) rename {includes => src}/pages/wishlist-view.php (100%) rename {includes => src}/pages/wishlist.php (100%) diff --git a/.gitignore b/.gitignore index 8adb3b56..f379946c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,4 @@ /node_modules/sax /.vscode -/includes/config/config.php +/src/config/config.php diff --git a/README.md b/README.md index c2e44530..49a2b301 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ Use at your own risk. * PHP 8 ## Screenshots -![Home](/includes/assets/img/home.png "Home") -![Create a wishlist](/includes/assets/img/wishlist-create.png "Create a wishlist") -![Add a product](/includes/assets/img/wishlist-product-add.png "Add a product") +![Home](/src/assets/img/home.png "Home") +![Create a wishlist](/src/assets/img/wishlist-create.png "Create a wishlist") +![Add a product](/src/assets/img/wishlist-product-add.png "Add a product") ## Installation 1. Download the latest [release](https://github.com/grandeljay/wishthis/releases) and upload all files to your server diff --git a/index.php b/index.php index f5e9d5eb..7c817fe8 100644 --- a/index.php +++ b/index.php @@ -13,13 +13,13 @@ define('VERSION', '0.3.0'); */ require 'vendor/autoload.php'; -$include = new Grandel\IncludeDirectory(__DIR__ . '/includes/classes'); -$include = new Grandel\IncludeDirectory(__DIR__ . '/includes/functions'); +$include = new Grandel\IncludeDirectory(__DIR__ . '/src/classes'); +$include = new Grandel\IncludeDirectory(__DIR__ . '/src/functions'); /** * Config */ -$configPath = __DIR__ . '/' . 'includes/config/config.php'; +$configPath = __DIR__ . '/' . 'src/config/config.php'; if (file_exists($configPath)) { require $configPath; @@ -105,7 +105,7 @@ if (!isset($_GET['page']) && isset($_GET['wishlist'])) { if (!isset($page)) { $page = isset($_GET['page']) ? $_GET['page'] : 'home'; } -$pagePath = 'includes/pages/' . $page . '.php'; +$pagePath = 'src/pages/' . $page . '.php'; if (file_exists($pagePath)) { require $pagePath; diff --git a/includes/api/products.php b/src/api/products.php similarity index 100% rename from includes/api/products.php rename to src/api/products.php diff --git a/includes/api/wishlists.php b/src/api/wishlists.php similarity index 100% rename from includes/api/wishlists.php rename to src/api/wishlists.php diff --git a/includes/assets/css/default.css b/src/assets/css/default.css similarity index 100% rename from includes/assets/css/default.css rename to src/assets/css/default.css diff --git a/includes/assets/css/install.css b/src/assets/css/install.css similarity index 100% rename from includes/assets/css/install.css rename to src/assets/css/install.css diff --git a/includes/assets/img/home.png b/src/assets/img/home.png similarity index 99% rename from includes/assets/img/home.png rename to src/assets/img/home.png index 49e825a5582c45ed1b9aa87e63109d8789179735..23d215a2b9ce8d78b76478f1aa06f34f8144e2b7 100644 GIT binary patch delta 15 WcmcbAf$`o2MwZS1KlhESQ5gU^u?9*2 delta 16 Xcmcb2f${zYM%K;%KX=}ZEKwN%KF9`F diff --git a/includes/assets/img/wishlist-create.png b/src/assets/img/wishlist-create.png similarity index 99% rename from includes/assets/img/wishlist-create.png rename to src/assets/img/wishlist-create.png index 1e4df3ac0c8c1e459895ecba22d1318641a7bd3b..fd5e1ebd6959e1bbcc20ee62e8cfe1665881df62 100644 GIT binary patch delta 15 WcmbQfh;iB?MwZS1KlhESLV*A*^aTF^ delta 16 XcmbQXh;jNNM%K;%KX=}ZEJA?*F&_mC diff --git a/includes/assets/img/wishlist-product-add.png b/src/assets/img/wishlist-product-add.png similarity index 99% rename from includes/assets/img/wishlist-product-add.png rename to src/assets/img/wishlist-product-add.png index 5a6aac4dd375456853c6921d488d28492dcd099d..980a74ac3a6df0609eb7f0721663d312a52f9686 100644 GIT binary patch delta 15 WcmbPomT~e~MwZS1KlhES{b>L('; /** Default */ - $stylesheetDefault = 'includes/assets/css/default.css'; + $stylesheetDefault = 'src/assets/css/default.css'; $stylesheetDefaultModified = filemtime($stylesheetDefault); echo ''; /** Page */ - $stylesheetPage = 'includes/assets/css/' . $this->name . '.css'; + $stylesheetPage = 'src/assets/css/' . $this->name . '.css'; if (file_exists($stylesheetPage)) { $stylesheetPageModified = filemtime($stylesheetPage); @@ -96,12 +96,12 @@ class Page echo ''; /** Default */ - $scriptDefault = 'includes/assets/js/default.js'; + $scriptDefault = 'src/assets/js/default.js'; $scriptDefaultModified = filemtime($scriptDefault); echo ''; /** Page */ - $scriptPage = 'includes/assets/js/' . $this->name . '.js'; + $scriptPage = 'src/assets/js/' . $this->name . '.js'; if (file_exists($scriptPage)) { $scriptPageModified = filemtime($scriptPage); diff --git a/includes/classes/user.php b/src/classes/user.php similarity index 100% rename from includes/classes/user.php rename to src/classes/user.php diff --git a/includes/classes/wishlist.php b/src/classes/wishlist.php similarity index 100% rename from includes/classes/wishlist.php rename to src/classes/wishlist.php diff --git a/includes/config/config-sample.php b/src/config/config-sample.php similarity index 100% rename from includes/config/config-sample.php rename to src/config/config-sample.php diff --git a/includes/functions/deleteDirectory.php b/src/functions/deleteDirectory.php similarity index 100% rename from includes/functions/deleteDirectory.php rename to src/functions/deleteDirectory.php diff --git a/includes/functions/getCurrentSeason.php b/src/functions/getCurrentSeason.php similarity index 100% rename from includes/functions/getCurrentSeason.php rename to src/functions/getCurrentSeason.php diff --git a/includes/pages/home.php b/src/pages/home.php similarity index 100% rename from includes/pages/home.php rename to src/pages/home.php diff --git a/includes/pages/install.php b/src/pages/install.php similarity index 99% rename from includes/pages/install.php rename to src/pages/install.php index 4efdeabd..56e40f18 100644 --- a/includes/pages/install.php +++ b/src/pages/install.php @@ -63,7 +63,7 @@ switch ($step) { break; case 2: - $configDirectory = 'includes/config'; + $configDirectory = 'src/config'; $configPath = $configDirectory . '/config.php'; $configSamplePath = $configDirectory . '/config-sample.php'; $configContents = file_get_contents($configSamplePath); diff --git a/includes/pages/login.php b/src/pages/login.php similarity index 100% rename from includes/pages/login.php rename to src/pages/login.php diff --git a/includes/pages/logout.php b/src/pages/logout.php similarity index 100% rename from includes/pages/logout.php rename to src/pages/logout.php diff --git a/includes/pages/power.php b/src/pages/power.php similarity index 100% rename from includes/pages/power.php rename to src/pages/power.php diff --git a/includes/pages/register.php b/src/pages/register.php similarity index 100% rename from includes/pages/register.php rename to src/pages/register.php diff --git a/includes/pages/update.php b/src/pages/update.php similarity index 100% rename from includes/pages/update.php rename to src/pages/update.php diff --git a/includes/pages/wishlist-create.php b/src/pages/wishlist-create.php similarity index 100% rename from includes/pages/wishlist-create.php rename to src/pages/wishlist-create.php diff --git a/includes/pages/wishlist-product-add.php b/src/pages/wishlist-product-add.php similarity index 100% rename from includes/pages/wishlist-product-add.php rename to src/pages/wishlist-product-add.php diff --git a/includes/pages/wishlist-view.php b/src/pages/wishlist-view.php similarity index 100% rename from includes/pages/wishlist-view.php rename to src/pages/wishlist-view.php diff --git a/includes/pages/wishlist.php b/src/pages/wishlist.php similarity index 100% rename from includes/pages/wishlist.php rename to src/pages/wishlist.php diff --git a/workspace.code-workspace b/workspace.code-workspace index 39ad471f..cf778a60 100644 --- a/workspace.code-workspace +++ b/workspace.code-workspace @@ -8,6 +8,9 @@ "php-docblocker.author": { "name": "Jay Trees", "email": "github.jay@grandel.anonaddy.me" + }, + "search.exclude": { + "**/semantic": true } } }