Subversion Repositories logviewer

Rev

Rev 4 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 9
1
<?php
1
<?php
2
 
2
 
3
/*
3
/*
4
 * ViaThinkSoft LogViewer
4
 * ViaThinkSoft LogViewer
5
 * Copyright 2018-2019 Daniel Marschall, ViaThinkSoft
5
 * Copyright 2018-2022 Daniel Marschall, ViaThinkSoft
6
 *
6
 *
7
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * Licensed under the Apache License, Version 2.0 (the "License");
8
 * you may not use this file except in compliance with the License.
8
 * you may not use this file except in compliance with the License.
9
 * You may obtain a copy of the License at
9
 * You may obtain a copy of the License at
10
 *
10
 *
11
 *     http://www.apache.org/licenses/LICENSE-2.0
11
 *     http://www.apache.org/licenses/LICENSE-2.0
12
 *
12
 *
13
 * Unless required by applicable law or agreed to in writing, software
13
 * Unless required by applicable law or agreed to in writing, software
14
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * distributed under the License is distributed on an "AS IS" BASIS,
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * See the License for the specific language governing permissions and
16
 * See the License for the specific language governing permissions and
17
 * limitations under the License.
17
 * limitations under the License.
18
 */
18
 */
19
 
19
 
20
// Please reply this code with your actual implementation
20
// Please reply this code with your actual implementation
21
 
21
 
22
function logviewer_check_access()/*: void*/ {
22
function logviewer_check_access()/*: void*/ {
23
        // Here you can add some code for general access. If you don't want the user to access LogViewer, throw an Exception here.
23
        // Here you can add some code for general access. If you don't want the user to access LogViewer, throw an Exception here.
24
 
24
 
25
        // if (check_login()) {
25
        // if (check_login()) {
26
        //      throw new Exception("Please login first");
26
        //      throw new Exception("Please login first");
27
        // }
27
        // }
28
}
28
}
29
 
29
 
30
function logviewer_allow_solvemark(): bool {
30
function logviewer_allow_solvemark(): bool {
31
        return true; // allow
31
        return true; // allow
32
}
32
}
33
 
33
 
34
function logviewer_additional_filter(): string {
34
function logviewer_additional_filter(): string {
35
        $filter = ''; // no filter
35
        $filter = ''; // no filter
36
 
36
 
37
        // Example:
37
        // Example:
38
        // $filter = '`text` like '%/home/foobar/%'
38
        // $filter = '`text` like '%/home/foobar/%'
39
 
39
 
40
        return $filter;
40
        return $filter;
41
}
41
}
42
 
42