正在显示
3 个修改的文件
包含
7 行增加
和
2 行删除
| @@ -555,3 +555,8 @@ if(!function_exists('curlGet')){ | @@ -555,3 +555,8 @@ if(!function_exists('curlGet')){ | ||
| 555 | return json_decode($access_txt, true); | 555 | return json_decode($access_txt, true); |
| 556 | } | 556 | } |
| 557 | } | 557 | } |
| 558 | + | ||
| 559 | +function ends_with($string, $suffix) | ||
| 560 | +{ | ||
| 561 | + return substr($string, -strlen($suffix)) === $suffix; | ||
| 562 | +} |
| @@ -182,7 +182,7 @@ class CustomTemplateLogic extends BaseLogic | @@ -182,7 +182,7 @@ class CustomTemplateLogic extends BaseLogic | ||
| 182 | ]; | 182 | ]; |
| 183 | $this->setRouteDeleteSave($data); | 183 | $this->setRouteDeleteSave($data); |
| 184 | //"字符串以\"-product\"结尾" | 184 | //"字符串以\"-product\"结尾" |
| 185 | - if (!endsWith($route, "-tag")) { | 185 | + if (!ends_with($route, "-tag")) { |
| 186 | $route = $route."-tag"; | 186 | $route = $route."-tag"; |
| 187 | } | 187 | } |
| 188 | } | 188 | } |
| @@ -216,7 +216,7 @@ class ProductLogic extends BaseLogic | @@ -216,7 +216,7 @@ class ProductLogic extends BaseLogic | ||
| 216 | ]; | 216 | ]; |
| 217 | $this->setRouteDeleteSave($data); | 217 | $this->setRouteDeleteSave($data); |
| 218 | //"字符串以\"-product\"结尾" | 218 | //"字符串以\"-product\"结尾" |
| 219 | - if (!endsWith($route, "-product")) { | 219 | + if (!ends_with($route, "-product")) { |
| 220 | $route = $route."-product"; | 220 | $route = $route."-product"; |
| 221 | } | 221 | } |
| 222 | } | 222 | } |
-
请 注册 或 登录 后发表评论