From e674327a2527c365522dde1b89f30acbcfbc7a39 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 20 Aug 2018 22:32:14 +0200 Subject: [PATCH] Remove reserved characters from URL, changes on labels --- bl-kernel/abstract/dblist.class.php | 5 +++++ bl-kernel/admin/views/content.php | 2 +- bl-kernel/admin/views/edit-content.php | 2 +- bl-kernel/admin/views/new-content.php | 2 +- bl-kernel/boot/rules/69.pages.php | 2 +- bl-kernel/boot/variables.php | 3 +++ bl-kernel/helpers/text.class.php | 2 +- bl-kernel/pages.class.php | 4 +++- 8 files changed, 16 insertions(+), 6 deletions(-) diff --git a/bl-kernel/abstract/dblist.class.php b/bl-kernel/abstract/dblist.class.php index 4bb870a8..1fabc6b6 100644 --- a/bl-kernel/abstract/dblist.class.php +++ b/bl-kernel/abstract/dblist.class.php @@ -64,7 +64,12 @@ class dbList extends dbJSON public function generateKey($name) { + global $L; + $key = Text::cleanUrl($name); + if (Text::isEmpty($key)) { + $key = $L->g('empty'); + } while (isset($this->db[$key])) { $key++; } diff --git a/bl-kernel/admin/views/content.php b/bl-kernel/admin/views/content.php index 5048a360..fa5d45de 100644 --- a/bl-kernel/admin/views/content.php +++ b/bl-kernel/admin/views/content.php @@ -118,7 +118,7 @@ function table($type) { .'
-

'.( ((ORDER_BY=='position') || ($type!='published'))?'Position: '.$page->position():$page->relativeTime() ).'

+

'.( ((ORDER_BY=='position') || ($type!='published'))?'Position: '.$page->position():$page->date(MANAGE_CONTENT_DATE_FORMAT) ).'

'; diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index fe6f0be5..2b12462c 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -6,7 +6,7 @@ p('Editor') ?>