1 | <?php |
||
10 | class LogController extends AdminOnlyController |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Override parent implementation in order to force POST for the logEvent |
||
15 | * action |
||
16 | * @return array the filters for this controller |
||
17 | */ |
||
18 | public function filters() |
||
19 | { |
||
20 | return array_merge(parent::filters(), array( |
||
21 | 'postOnly + logEvent', |
||
22 | )); |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Override parent implementation so the user can check the logs even when |
||
27 | * a backend is not yet configured |
||
28 | * @param CFilterChain $filterChain |
||
29 | */ |
||
30 | public function filterCheckConfiguration($filterChain) |
||
34 | |||
35 | /** |
||
36 | * Override parent implementation to allow anyone to post log events |
||
37 | * @return array the access rules for this controller |
||
38 | */ |
||
39 | public function accessRules() |
||
47 | |||
48 | /** |
||
49 | * Flushes the system log and redirects to the admin page |
||
50 | */ |
||
51 | public function actionFlush() |
||
57 | |||
58 | /** |
||
59 | * AJAX-only action which logs the event described in the POST data. Used |
||
60 | * to log link clicks using JavaScript. |
||
61 | * @throws CHttpException if the request is invalid |
||
62 | */ |
||
63 | public function actionLogEvent() |
||
73 | |||
74 | /** |
||
75 | * Displays the specified log item in its fullness |
||
76 | * @param int $id the item primary key |
||
77 | */ |
||
78 | public function actionView($id) |
||
86 | |||
87 | } |
||
88 |