|
...
|
...
|
@@ -56,23 +56,9 @@ class RouteMap extends Base |
|
|
|
$i=1;
|
|
|
|
$sign = generateRoute($title);
|
|
|
|
$route = $sign;
|
|
|
|
if($source == BTemplate::SOURCE_PRODUCT){
|
|
|
|
if(!ends_with($sign,'-product')){
|
|
|
|
$route = $sign.'-product';
|
|
|
|
}
|
|
|
|
}elseif ($source == 5){
|
|
|
|
if(!ends_with($sign,'-tag')) {
|
|
|
|
$route = $sign . '-tag';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
while(self::isExist($route, $source, $source_id, $project_id)){
|
|
|
|
if($source == BTemplate::SOURCE_PRODUCT){
|
|
|
|
$route = $sign .'-'.$i.'-product';
|
|
|
|
}elseif ($source == 5){
|
|
|
|
$route = $sign .'-'.$i.'-tag';
|
|
|
|
}else{
|
|
|
|
$route = $sign .'-'.$i;
|
|
|
|
}
|
|
|
|
$route = $sign .'-'.$i;
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
return $route;
|
|
|
|
}
|
...
|
...
|
|