Subversion Repositories logviewer

Rev

Rev 2 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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