Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function sublink($url, $tocheck) |
||
16 | { |
||
17 | $url = str_replace(Application::getDir(), "", $url); |
||
18 | $tocheck = str_replace(Application::getDir(), "", $tocheck); |
||
19 | |||
20 | $url = str_replace(Application::$controller, "", $url); |
||
21 | $tocheck = str_replace(Application::$controller, "", $tocheck); |
||
22 | |||
23 | $url = trim(str_replace("//", "", $url), "/"); |
||
24 | $tocheck = trim(str_replace("//", "", $tocheck), "/"); |
||
25 | |||
26 | return str_starts_with($tocheck, $url) && $url != ""; |
||
27 | } |
||
45 |