minor changes
This commit is contained in:
parent
d3d19f5109
commit
2a47beeae4
|
@ -275,11 +275,9 @@ class dbPages extends dbJSON
|
||||||
$newKey = Text::cleanUrl($parent).'/'.Text::cleanUrl($text);
|
$newKey = Text::cleanUrl($parent).'/'.Text::cleanUrl($text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($newKey!==$oldKey)
|
if($newKey!==$oldKey) {
|
||||||
{
|
// Verify if the key is already been used
|
||||||
// Verify if the key is already been used.
|
if( isset($this->db[$newKey]) ) {
|
||||||
if( isset($this->db[$newKey]) )
|
|
||||||
{
|
|
||||||
if( !Text::endsWithNumeric($newKey) ) {
|
if( !Text::endsWithNumeric($newKey) ) {
|
||||||
$newKey = $newKey.'-0';
|
$newKey = $newKey.'-0';
|
||||||
}
|
}
|
||||||
|
@ -290,8 +288,7 @@ class dbPages extends dbJSON
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($returnSlug)
|
if($returnSlug) {
|
||||||
{
|
|
||||||
$explode = explode('/', $newKey);
|
$explode = explode('/', $newKey);
|
||||||
|
|
||||||
if(isset($explode[1])) {
|
if(isset($explode[1])) {
|
||||||
|
|
Loading…
Reference in New Issue