1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Class Shopware_Controllers_Backend_ViewSnapshots |
||
5 | */ |
||
6 | class Shopware_Controllers_Backend_ViewSnapshots extends Shopware_Controllers_Backend_ExtJs |
||
0 ignored issues
–
show
|
|||
7 | { |
||
8 | |||
9 | public function indexAction() |
||
10 | { |
||
11 | $this->View()->loadTemplate("backend/view_snapshots/app.js"); |
||
12 | } |
||
13 | |||
14 | /** |
||
15 | * @throws \Exception |
||
16 | */ |
||
17 | public function listAction() |
||
18 | { |
||
19 | $limit = (int)$this->Request()->getParam('limit', 20); |
||
20 | $offset = (int)$this->Request()->getParam('start', 0); |
||
21 | |||
22 | $qb = $this->getModelManager()->getDBALQueryBuilder(); |
||
23 | |||
24 | $qb->select( |
||
25 | [ |
||
26 | 'SQL_CALC_FOUND_ROWS id', |
||
27 | 'sessionID', |
||
28 | 'template', |
||
29 | 'step', |
||
30 | ] |
||
31 | ) |
||
32 | ->from('view_snapshots') |
||
33 | ->setMaxResults($limit) |
||
34 | ->setFirstResult($offset) |
||
35 | ->orderBy('id', 'desc') |
||
36 | ->addOrderBy('step', 'desc') |
||
37 | ; |
||
38 | |||
39 | $data = $qb->execute()->fetchAll(); |
||
40 | |||
41 | foreach ($data as &$row) { |
||
42 | $row['url'] = $this->get('router')->assemble( |
||
43 | [ |
||
44 | 'module' => 'frontend', |
||
45 | 'controller' => 'snapshots', |
||
46 | 'action' => 'load', |
||
47 | 'session' => $row['sessionID'], |
||
48 | 'step' => $row['step'], |
||
49 | ] |
||
50 | ); |
||
51 | } |
||
52 | |||
53 | $total = (int)$this->container->get('dbal_connection')->fetchColumn('SELECT FOUND_ROWS()'); |
||
54 | |||
55 | $this->View()->assign( |
||
56 | ['success' => true, 'data' => $data, 'total' => $total] |
||
57 | ); |
||
58 | } |
||
59 | |||
60 | } |
||
61 | |||
62 |
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