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);
|
||||
}
|
||||
|
||||
if($newKey!==$oldKey)
|
||||
{
|
||||
// Verify if the key is already been used.
|
||||
if( isset($this->db[$newKey]) )
|
||||
{
|
||||
if($newKey!==$oldKey) {
|
||||
// Verify if the key is already been used
|
||||
if( isset($this->db[$newKey]) ) {
|
||||
if( !Text::endsWithNumeric($newKey) ) {
|
||||
$newKey = $newKey.'-0';
|
||||
}
|
||||
|
@ -290,8 +288,7 @@ class dbPages extends dbJSON
|
|||
}
|
||||
}
|
||||
|
||||
if($returnSlug)
|
||||
{
|
||||
if($returnSlug) {
|
||||
$explode = explode('/', $newKey);
|
||||
|
||||
if(isset($explode[1])) {
|
||||
|
|
Loading…
Reference in New Issue