diff --git a/.htaccess b/.htaccess index 5a85c80c..455b2fea 100644 --- a/.htaccess +++ b/.htaccess @@ -1,5 +1,7 @@ AddDefaultCharset UTF-8 +DirectorySlash Off + # Enable rewrite rules diff --git a/install.php b/install.php index de1644aa..f5727f9b 100644 --- a/install.php +++ b/install.php @@ -97,6 +97,10 @@ if(isset($_GET['language'])) { $localeFromHTTP = Sanitize::html($_GET['language']); } +if( !Sanitize::pathFile(PATH_LANGUAGES.$localeFromHTTP) ) { + $localeFromHTTP = 'en_US'; +} + $Language = new dbLanguage($localeFromHTTP); // --- LOCALE --- @@ -187,6 +191,10 @@ function checkSystem() array_push($stdOut, $tmp); } + // Try to create the directory content + @mkdir(PATH_CONTENT, $dirpermissions, true); + + // Check if the directory content is writeable. if(!is_writable(PATH_CONTENT)) { $errorText = 'Writing test failure, check directory content permissions. (ERR_205)'; diff --git a/kernel/boot/rules/99.paginator.php b/kernel/boot/rules/99.paginator.php index 31b99f2b..225e96e6 100644 --- a/kernel/boot/rules/99.paginator.php +++ b/kernel/boot/rules/99.paginator.php @@ -9,6 +9,11 @@ if($Url->whereAmI()=='admin') { $postPerPage = POSTS_PER_PAGE_ADMIN; $numberOfPosts = $dbPosts->numberPost(true); // published and drafts } +elseif($Url->whereAmI()=='tag') { + $postPerPage = $Site->postsPerPage(); + $tagKey = $Url->slug(); + $numberOfPosts = $dbTags->countPostsByTag($tagKey); +} else { $postPerPage = $Site->postsPerPage(); $numberOfPosts = $dbPosts->numberPost(false); // published diff --git a/kernel/helpers/paginator.class.php b/kernel/helpers/paginator.class.php index 4b3bba01..b562c370 100644 --- a/kernel/helpers/paginator.class.php +++ b/kernel/helpers/paginator.class.php @@ -27,6 +27,18 @@ class Paginator { public static function html($textPrevPage=false, $textNextPage=false, $showPageNumber=false) { global $Language; + global $Url; + + $url = trim(DOMAIN_BASE,'/'); + + $filter = ''; + if($Url->whereAmI()=='tag') { + $filter = trim($Url->filters('tag'), '/'); + $url = $url.'/'.$filter.'/'.$Url->slug(); + } + else { + $url = $url.'/'; + } $html = '
'; $html .= '