parent
7d8b895c8e
commit
6c3770875d
3 changed files with 8 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content', 'action'=>'settings.php')); ?>
|
||||
|
||||
<div class="align-middle">
|
||||
<div class="float-right mt-1">
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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, '/');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue