diff --git a/bl-kernel/admin/views/settings.php b/bl-kernel/admin/views/settings.php
index ca3ef219..695d569c 100644
--- a/bl-kernel/admin/views/settings.php
+++ b/bl-kernel/admin/views/settings.php
@@ -1,6 +1,6 @@
-'jsform', 'class'=>'tab-content')); ?>
+'jsform', 'class'=>'tab-content', 'action'=>'settings.php')); ?>
diff --git a/bl-kernel/helpers/text.class.php b/bl-kernel/helpers/text.class.php
index 2a53cebd..a8fa0d0d 100644
--- a/bl-kernel/helpers/text.class.php
+++ b/bl-kernel/helpers/text.class.php
@@ -102,8 +102,9 @@ class Text {
public static function endsWith($string, $endsString)
{
- //$length = (-1)*self::length($endsString);
- return (mb_substr($string, -1)===$endsString);
+ $length = self::length($endsString);
+
+ return (mb_substr($string, -$length)===$endsString);
}
public static function endsWithNumeric($string)
diff --git a/bl-kernel/url.class.php b/bl-kernel/url.class.php
index 43b6bbda..79c968d3 100644
--- a/bl-kernel/url.class.php
+++ b/bl-kernel/url.class.php
@@ -78,6 +78,10 @@ class Url
} elseif (!empty($this->slug) && ($filterURI=='/')) {
$this->setWhereAmI('page');
} elseif ($filterName=='admin') {
+ if (Text::endsWith($this->uri, '.php')) {
+ $this->uri = mb_substr($this->uri, 0, -4);
+ $this->slug = mb_substr($this->slug, 0, -4);
+ }
$this->slug = ltrim($this->slug, '/');
}