diff --git a/module/GeebyDeebyLegacy/Module.php b/module/GeebyDeebyLegacy/Module.php index f7f66a8c..d2ee70c1 100644 --- a/module/GeebyDeebyLegacy/Module.php +++ b/module/GeebyDeebyLegacy/Module.php @@ -1,4 +1,5 @@ [ 'routes' => [ diff --git a/module/GeebyDeebyLegacy/src/GeebyDeebyLegacy/Controller/LegacyController.php b/module/GeebyDeebyLegacy/src/GeebyDeebyLegacy/Controller/LegacyController.php index da3f0f8c..da536168 100644 --- a/module/GeebyDeebyLegacy/src/GeebyDeebyLegacy/Controller/LegacyController.php +++ b/module/GeebyDeebyLegacy/src/GeebyDeebyLegacy/Controller/LegacyController.php @@ -1,4 +1,5 @@ params()->fromRoute('filename')); $file = array_pop($path); switch ($file) { - case 'list_articles.php': - case 'list_autos.php': - case 'list_scans.php': - case 'show_ads.php': // TODO: make this visual again - return $this->redirect()->toRoute('files'); - case 'list_categories.php': - return $this->redirect()->toRoute('categories'); - case 'list_countries.php': - return $this->redirect()->toRoute('countries'); - case 'list_items.php': - return $this->redirect()->toRoute('items'); - case 'list_languages.php': - return $this->redirect()->toRoute('languages'); - case 'list_people.php': - return $this->redirect()->toRoute('people'); - case 'list_people_bios.php': - return $this->redirect()->toRoute('people', ['extra' => 'Bios']); - case 'list_publishers.php': - return $this->redirect()->toRoute('publishers'); - case 'list_series.php': - return $this->redirect()->toRoute('series'); - case 'list_types.php': - return $this->redirect()->toRoute('materials'); - case 'list_users.php': - return $this->redirect()->toRoute('users'); - case 'list_years.php': - return $this->redirect()->toRoute('items', ['extra' => 'ByYear']); - case 'new_reviews.php': - return $this->redirect()->toRoute('reviews'); - case 'show_category.php': - return $this->redirect()->toRoute( - 'category', ['id' => $this->params()->fromQuery('id')] - ); - case 'show_checklist.php': - // TODO - break; - case 'show_country.php': - return $this->redirect()->toRoute( - 'country', ['id' => $this->params()->fromQuery('id')] - ); - case 'show_faqs.php': - return $this->redirect()->toRoute('faqs'); - case 'show_isbn_links.php': - return $this->redirect()->toRoute( - 'item', [ + case 'list_articles.php': + case 'list_autos.php': + case 'list_scans.php': + case 'show_ads.php': // TODO: make this visual again + return $this->redirect()->toRoute('files'); + case 'list_categories.php': + return $this->redirect()->toRoute('categories'); + case 'list_countries.php': + return $this->redirect()->toRoute('countries'); + case 'list_items.php': + return $this->redirect()->toRoute('items'); + case 'list_languages.php': + return $this->redirect()->toRoute('languages'); + case 'list_people.php': + return $this->redirect()->toRoute('people'); + case 'list_people_bios.php': + return $this->redirect()->toRoute('people', ['extra' => 'Bios']); + case 'list_publishers.php': + return $this->redirect()->toRoute('publishers'); + case 'list_series.php': + return $this->redirect()->toRoute('series'); + case 'list_types.php': + return $this->redirect()->toRoute('materials'); + case 'list_users.php': + return $this->redirect()->toRoute('users'); + case 'list_years.php': + return $this->redirect()->toRoute('items', ['extra' => 'ByYear']); + case 'new_reviews.php': + return $this->redirect()->toRoute('reviews'); + case 'show_category.php': + return $this->redirect()->toRoute( + 'category', + ['id' => $this->params()->fromQuery('id')] + ); + case 'show_checklist.php': + // TODO + break; + case 'show_country.php': + return $this->redirect()->toRoute( + 'country', + ['id' => $this->params()->fromQuery('id')] + ); + case 'show_faqs.php': + return $this->redirect()->toRoute('faqs'); + case 'show_isbn_links.php': + return $this->redirect()->toRoute( + 'item', + [ 'id' => 'Unknown', 'action' => 'ISBNDetails', - 'extra' => $this->params()->fromQuery('isbn') - ] - ); - case 'show_item.php': - return $this->redirect() + 'extra' => $this->params()->fromQuery('isbn'), + ] + ); + case 'show_item.php': + return $this->redirect() ->toRoute('item', ['id' => $this->params()->fromQuery('id')]); - case 'show_language.php': - return $this->redirect()->toRoute( - 'language', ['id' => $this->params()->fromQuery('id')] - ); - case 'show_links.php': - return $this->redirect()->toRoute('links'); - case 'show_person.php': - return $this->redirect()->toRoute( - 'person', ['id' => $this->params()->fromQuery('id')] - ); - case 'show_platform.php': - return $this->redirect()->toRoute( - 'platform', ['id' => $this->params()->fromQuery('id')] - ); - case 'show_publisher.php': - return $this->redirect()->toRoute( - 'publisher', ['id' => $this->params()->fromQuery('id')] - ); - case 'show_series.php': - $id = $this->params()->fromQuery('id'); - if (!$id) { - $name = $this->params()->fromQuery('name'); - $table = $this->getDbTable('series'); - $record = $table->select(['Series_Name' => $name])->toArray(); - if (isset($record[0]['Series_ID'])) { - $id = $record[0]['Series_ID']; - } else { - break; + case 'show_language.php': + return $this->redirect()->toRoute( + 'language', + ['id' => $this->params()->fromQuery('id')] + ); + case 'show_links.php': + return $this->redirect()->toRoute('links'); + case 'show_person.php': + return $this->redirect()->toRoute( + 'person', + ['id' => $this->params()->fromQuery('id')] + ); + case 'show_platform.php': + return $this->redirect()->toRoute( + 'platform', + ['id' => $this->params()->fromQuery('id')] + ); + case 'show_publisher.php': + return $this->redirect()->toRoute( + 'publisher', + ['id' => $this->params()->fromQuery('id')] + ); + case 'show_series.php': + $id = $this->params()->fromQuery('id'); + if (!$id) { + $name = $this->params()->fromQuery('name'); + $table = $this->getDbTable('series'); + $record = $table->select(['Series_Name' => $name])->toArray(); + if (isset($record[0]['Series_ID'])) { + $id = $record[0]['Series_ID']; + } else { + break; + } } - } - return $this->redirect() + return $this->redirect() ->toRoute('series', ['id' => $id]); - case 'show_series_images.php': - return $this->redirect()->toRoute( - 'series', [ + case 'show_series_images.php': + return $this->redirect()->toRoute( + 'series', + [ 'id' => $this->params()->fromQuery('id'), - 'extra' => 'Images' - ] - ); - case 'show_type.php': - return $this->redirect()->toRoute( - 'material', ['id' => $this->params()->fromQuery('id')] - ); - case 'show_user.php': - return $this->redirect()->toRoute( - 'user', ['id' => $this->params()->fromQuery('id')] - ); - case 'show_user_buyers.php': - return $this->redirect()->toRoute( - 'user', [ + 'extra' => 'Images', + ] + ); + case 'show_type.php': + return $this->redirect()->toRoute( + 'material', + ['id' => $this->params()->fromQuery('id')] + ); + case 'show_user.php': + return $this->redirect()->toRoute( + 'user', + ['id' => $this->params()->fromQuery('id')] + ); + case 'show_user_buyers.php': + return $this->redirect()->toRoute( + 'user', + [ 'id' => $this->params()->fromQuery('id'), - 'extra' => 'Buyers' - ] - ); - case 'show_user_collection.php': - return $this->redirect()->toRoute( - 'user', [ + 'extra' => 'Buyers', + ] + ); + case 'show_user_collection.php': + return $this->redirect()->toRoute( + 'user', + [ 'id' => $this->params()->fromQuery('id'), - 'extra' => 'Collection' - ] - ); - case 'show_user_comments.php': - return $this->redirect()->toRoute( - 'user', [ + 'extra' => 'Collection', + ] + ); + case 'show_user_comments.php': + return $this->redirect()->toRoute( + 'user', + [ 'id' => $this->params()->fromQuery('id'), - 'extra' => 'Comments' - ] - ); - case 'show_user_reviews.php': - $id = $this->params()->fromQuery('id', 'all'); - if ($id === 'all') { - return $this->redirect() + 'extra' => 'Comments', + ] + ); + case 'show_user_reviews.php': + $id = $this->params()->fromQuery('id', 'all'); + if ($id === 'all') { + return $this->redirect() ->toRoute('items', ['extra' => 'Reviews']); - } - return $this->redirect() + } + return $this->redirect() ->toRoute('user', ['id' => $id, 'extra' => 'Reviews']); - case 'show_user_sales.php': - return $this->redirect()->toRoute( - 'user', [ + case 'show_user_sales.php': + return $this->redirect()->toRoute( + 'user', + [ 'id' => $this->params()->fromQuery('id'), - 'extra' => 'Extras' - ] - ); - case 'show_user_sellers.php': - return $this->redirect()->toRoute( - 'user', [ + 'extra' => 'Extras', + ] + ); + case 'show_user_sellers.php': + return $this->redirect()->toRoute( + 'user', + [ 'id' => $this->params()->fromQuery('id'), - 'extra' => 'Sellers' - ] - ); - case 'thanks.php': - return $this->redirect()->toRoute( - 'thanks' - ); + 'extra' => 'Sellers', + ] + ); + case 'thanks.php': + return $this->redirect()->toRoute( + 'thanks' + ); } return $this->forwardTo(__NAMESPACE__ . '\Legacy', 'notfound'); } diff --git a/module/GeebyDeebyLocal/Module.php b/module/GeebyDeebyLocal/Module.php index c6b2e83d..b9c2c6f0 100644 --- a/module/GeebyDeebyLocal/Module.php +++ b/module/GeebyDeebyLocal/Module.php @@ -1,4 +1,5 @@ [ 'siteTitle' => 'Demian\'s Gamebook Web Page', diff --git a/module/GeebyDeebyLocal/src/GeebyDeebyLocal/Controller/AboutController.php b/module/GeebyDeebyLocal/src/GeebyDeebyLocal/Controller/AboutController.php index d266e53b..18b5f1a1 100644 --- a/module/GeebyDeebyLocal/src/GeebyDeebyLocal/Controller/AboutController.php +++ b/module/GeebyDeebyLocal/src/GeebyDeebyLocal/Controller/AboutController.php @@ -1,4 +1,5 @@