Conditions | 6 |
Paths | 5 |
Total Lines | 32 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function showpage($request) |
||
19 | { |
||
20 | $id = (int) $request->param('ID'); |
||
21 | if (!$id) { |
||
22 | return false; |
||
23 | } |
||
24 | $page = SiteTree::get()->byId($id); |
||
25 | |||
26 | // does the page exist? |
||
27 | if (!($page && $page->exists())) { |
||
28 | return $this->httpError(404); |
||
29 | } |
||
30 | |||
31 | // can the page be viewed? |
||
32 | if (!$page->canView()) { |
||
33 | return $this->httpError(403); |
||
34 | } |
||
35 | |||
36 | $viewer = $this->customise([ |
||
37 | 'IsAjax' => $request->isAjax(), |
||
38 | 'SelectedPage' => $page, |
||
39 | 'Children' => $page->Children(), |
||
40 | ]); |
||
41 | |||
42 | if ($request->isAjax()) { |
||
43 | return $viewer->renderWith([ |
||
44 | 'type' => 'Includes', |
||
45 | 'SitemapNodeChildren' |
||
46 | ]); |
||
47 | } |
||
48 | |||
49 | return $viewer; |
||
50 | } |
||
52 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths