From 3a2e90469739519ca0160d0ed079bfbfa4016ca9 Mon Sep 17 00:00:00 2001 From: Virgil-Adrian Teaca Date: Mon, 13 May 2019 01:55:23 +0300 Subject: [PATCH] Overall improvements --- app/Config.php | 2 +- .../Contacts/Database/Seeds/PostsTableSeeder.php | 8 ++++---- .../Content/Database/Seeds/PostsTableSeeder.php | 16 ++++++++-------- modules/Content/Routes/Web.php | 12 +++++------- .../Content/Views/Admin/Attachments/Index.php | 2 +- modules/Content/Views/Admin/Posts/Edit.php | 2 +- modules/Content/Views/Blocks/Search.php | 2 +- modules/Content/Views/Content/Index.php | 2 +- modules/Content/Views/Content/Page.php | 2 +- modules/Content/Views/Content/Post.php | 2 +- modules/Content/Views/Partials/FileManager.php | 2 +- modules/Content/Widgets/MainMenu.php | 4 ++-- 12 files changed, 27 insertions(+), 29 deletions(-) diff --git a/app/Config.php b/app/Config.php index 203c4040..3d5aa394 100644 --- a/app/Config.php +++ b/app/Config.php @@ -17,7 +17,7 @@ * * PREFER to be used in Database calls or storing Session data, default is 'nova_' */ -define('PREFIX', 'nova_'); +define('PREFIX', 'novapress_'); /** * Setup the Config API Mode. diff --git a/modules/Contacts/Database/Seeds/PostsTableSeeder.php b/modules/Contacts/Database/Seeds/PostsTableSeeder.php index dfe1eb46..4d2c3d52 100644 --- a/modules/Contacts/Database/Seeds/PostsTableSeeder.php +++ b/modules/Contacts/Database/Seeds/PostsTableSeeder.php @@ -32,13 +32,13 @@ public function run() 'comment_status' => 'closed', )); - $block->guid = site_url('content/{0}', $block->id); + $block->guid = site_url($block->id); // Setup the Metadata. $block->saveMeta(array( 'block_show_title' => 0, 'block_visibility_mode' => 'show', - 'block_visibility_path' => 'content/contact-us', + 'block_visibility_path' => 'contact-us', 'block_visibility_filter' => 'any', 'block_widget_position' => 'content-footer', @@ -63,7 +63,7 @@ public function run() 'comment_status' => 'closed', )); - $page->guid = site_url('content/{0}', $page->name); + $page->guid = site_url($page->name); $page->save(); @@ -97,7 +97,7 @@ public function run() 'comment_status' => 'closed', )); - $menuItem->guid = site_url('content/{0}', $name = $menuItem->id); + $menuItem->guid = site_url($name = $menuItem->id); $menuItem->name = $name; diff --git a/modules/Content/Database/Seeds/PostsTableSeeder.php b/modules/Content/Database/Seeds/PostsTableSeeder.php index ee8b7646..f0119070 100644 --- a/modules/Content/Database/Seeds/PostsTableSeeder.php +++ b/modules/Content/Database/Seeds/PostsTableSeeder.php @@ -34,7 +34,7 @@ public function run() 'status' => 'publish', 'menu_order' => 1, 'type' => 'block', - 'guid' => site_url('content/1'), + 'guid' => site_url('1'), 'comment_status' => 'closed', )); @@ -62,7 +62,7 @@ public function run() 'status' => 'publish', 'menu_order' => 2, 'type' => 'block', - 'guid' => site_url('content/2'), + 'guid' => site_url('2'), 'comment_status' => 'closed', )); @@ -90,7 +90,7 @@ public function run() 'status' => 'publish', 'menu_order' => 0, 'type' => 'block', - 'guid' => site_url('content/3'), + 'guid' => site_url('3'), 'comment_status' => 'closed', )); @@ -117,7 +117,7 @@ public function run() 'excerpt' => null, 'status' => 'publish', 'type' => 'post', - 'guid' => site_url('content/sample-post'), + 'guid' => site_url('sample-post'), 'comment_status' => 'open', )); @@ -148,7 +148,7 @@ public function run() 'excerpt' => null, 'status' => 'publish', 'type' => 'page', - 'guid' => site_url('content/sample-page'), + 'guid' => site_url('sample-page'), 'comment_status' => 'closed', )); @@ -180,7 +180,7 @@ public function run() 'status' => 'publish', 'menu_order' => 0, 'type' => 'nav_menu_item', - 'guid' => site_url('content/6'), + 'guid' => site_url('6'), 'comment_status' => 'closed', )); @@ -191,7 +191,7 @@ public function run() 'menu_item_object' => 'custom', 'menu_item_object_id' => $post->id, 'menu_item_target' => null, - 'menu_item_url' => site_url('content'), + 'menu_item_url' => site_url(), )); $post->taxonomies()->attach($taxonomy); @@ -207,7 +207,7 @@ public function run() 'status' => 'publish', 'menu_order' => 7, 'type' => 'nav_menu_item', - 'guid' => site_url('content/7'), + 'guid' => site_url('7'), 'comment_status' => 'closed', )); diff --git a/modules/Content/Routes/Web.php b/modules/Content/Routes/Web.php index 9f3d5011..a9ba32ba 100644 --- a/modules/Content/Routes/Web.php +++ b/modules/Content/Routes/Web.php @@ -16,11 +16,11 @@ // The Media Files serving. -Route::get('content/media/serve/{name}', 'Attachments@serve'); +Route::get('media/serve/{name}', 'Attachments@serve'); // The Content dispatching. -Route::paginate('content/archive/{year}/{month}', array( +Route::paginate('archive/{year}/{month}', array( 'uses' => 'Content@archive', 'where' => array( @@ -31,14 +31,12 @@ Route::paginate('/', 'Content@homepage'); -Route::paginate('content', array('uses' => 'Content@homepage')); - -Route::paginate('content/search', 'Content@search'); +Route::paginate('search', 'Content@search'); // -Route::paginate('content/{type}/{slug}', array('uses' => 'Content@taxonomy'))->where('type', Taxonomies::routePattern(false)); +Route::paginate('{type}/{slug}', array('uses' => 'Content@taxonomy'))->where('type', Taxonomies::routePattern(false)); -Route::get('content/{slug}', array('uses' => 'Content@show'))->order(100); +Route::get('{slug}', array('uses' => 'Content@show'))->order(100); // Content unlocking for the Password Protected pages and posts. Route::post('content/{id}', 'Content@unlock')->where('id', '\d+'); diff --git a/modules/Content/Views/Admin/Attachments/Index.php b/modules/Content/Views/Admin/Attachments/Index.php index 917c71bd..c6377627 100644 --- a/modules/Content/Views/Admin/Attachments/Index.php +++ b/modules/Content/Views/Admin/Attachments/Index.php @@ -88,7 +88,7 @@