From 394468a845b7a45f33adbe2f75925a9a0cfdb678 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 18 May 2015 23:22:05 +0000 Subject: [PATCH] New features --- .htaccess | 12 ++++++---- admin/controllers/edit-page.php | 2 +- admin/views/edit-page.php | 2 +- admin/views/manage-posts.php | 2 +- admin/views/settings.php | 6 +++++ install.php | 23 +++++++++++++++---- kernel/boot/init.php | 1 + kernel/boot/rules/70.build_posts.php | 4 +++- kernel/dbpages.class.php | 21 ++++++++--------- kernel/dbsite.class.php | 7 ++++++ kernel/page.class.php | 29 +++++++++++++++++++----- kernel/post.class.php | 23 ++++++++++++++----- themes/pure/css/blog.css | 27 ++++++++++++++++++++++ themes/pure/php/footer.php | 2 +- themes/pure/php/head.php | 7 +++--- themes/pure/php/page.php | 4 ++-- themes/pure/php/post.php | 2 +- themes/pure/php/sidebar.php | 34 ++++++++++++++++------------ 18 files changed, 151 insertions(+), 57 deletions(-) diff --git a/.htaccess b/.htaccess index e85ab7b5..caea0515 100644 --- a/.htaccess +++ b/.htaccess @@ -1,10 +1,14 @@ AddDefaultCharset UTF-8 -RewriteEngine on - +# Remove the trailing slash from URL DirectorySlash Off -RewriteCond %{REQUEST_FILENAME} !-f -#RewriteCond %{REQUEST_FILENAME} !-d +# Enable rewrite rules +RewriteEngine on +# Deny direct access to .txt files +RewriteRule ^content/(.*)\.txt$ - [R=404,L] + +# All URL process by index.php +RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) index.php [L] \ No newline at end of file diff --git a/admin/controllers/edit-page.php b/admin/controllers/edit-page.php index 9711c638..960d028c 100644 --- a/admin/controllers/edit-page.php +++ b/admin/controllers/edit-page.php @@ -26,7 +26,7 @@ function editPage($args) $dbPages->regenerate(); Alert::set('The page has been saved successfully'); - Redirect::page('admin', 'manage-pages'); + Redirect::page('admin', 'edit-page/'.$args['key']); } else { diff --git a/admin/views/edit-page.php b/admin/views/edit-page.php index 2d48202d..59d03513 100644 --- a/admin/views/edit-page.php +++ b/admin/views/edit-page.php @@ -53,7 +53,7 @@ + +