Subversion Repositories oidplus

Rev

Rev 800 | Rev 830 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 800 Rev 801
Line 39... Line 39...
39
                        @set_time_limit(0);
39
                        @set_time_limit(0);
40
 
40
 
41
 
41
 
42
                        $handled = true;
42
                        $handled = true;
43
                        $out['title'] = _L('VNag version check');
43
                        $out['title'] = _L('VNag version check');
44
                        $out['icon']  = OIDplus::webpath(__DIR__,true).'img/main_icon.png';
44
                        $out['icon']  = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png';
45
 
45
 
46
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
46
                        if (!OIDplus::authUtils()->isAdminLoggedIn()) {
47
                                $out['icon'] = 'img/error.png';
47
                                $out['icon'] = 'img/error.png';
48
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>';
48
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login$admin')).'</p>';
49
                                return;
49
                                return;
Line 57... Line 57...
57
                                $cont = '';
57
                                $cont = '';
58
                        }
58
                        }
59
 
59
 
60
                        $cont = str_replace('%%SYSTEM_URL%%',OIDplus::localpath(),$cont);
60
                        $cont = str_replace('%%SYSTEM_URL%%',OIDplus::localpath(),$cont);
61
                        $cont = str_replace('%%REL_LOC_PATH%%',OIDplus::localpath(__DIR__,true),$cont);
61
                        $cont = str_replace('%%REL_LOC_PATH%%',OIDplus::localpath(__DIR__,true),$cont);
62
                        $cont = str_replace('%%REL_WEB_PATH%%',OIDplus::webpath(__DIR__,true),$cont);
62
                        $cont = str_replace('%%REL_WEB_PATH%%',OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE),$cont);
63
                        $cont = str_replace('%%ABS_LOC_PATH%%',OIDplus::localpath(__DIR__,false),$cont);
63
                        $cont = str_replace('%%ABS_LOC_PATH%%',OIDplus::localpath(__DIR__,false),$cont);
64
                        $cont = str_replace('%%ABS_WEB_PATH%%',OIDplus::webpath(__DIR__,false),$cont);
64
                        $cont = str_replace('%%ABS_WEB_PATH%%',OIDplus::webpath(__DIR__,OIDplus::PATH_ABSOLUTE_CANONICAL),$cont);
65
                        if (OIDplus::config()->getValue('vnag_version_check_password_protected','1') == '1') {
65
                        if (OIDplus::config()->getValue('vnag_version_check_password_protected','1') == '1') {
66
                                $cont = str_replace('%%WEBREADER_PASSWORD%%',self::vnag_password(),$cont);
66
                                $cont = str_replace('%%WEBREADER_PASSWORD%%',self::vnag_password(),$cont);
67
                        } else {
67
                        } else {
68
                                $cont = str_replace('%%WEBREADER_PASSWORD%%','',$cont);
68
                                $cont = str_replace('%%WEBREADER_PASSWORD%%','',$cont);
69
                        }
69
                        }
Line 85... Line 85...
85
 
85
 
86
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
86
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
87
                if (!OIDplus::authUtils()->isAdminLoggedIn()) return false;
87
                if (!OIDplus::authUtils()->isAdminLoggedIn()) return false;
88
 
88
 
89
                if (file_exists(__DIR__.'/img/main_icon16.png')) {
89
                if (file_exists(__DIR__.'/img/main_icon16.png')) {
90
                        $tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png';
90
                        $tree_icon = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png';
91
                } else {
91
                } else {
92
                        $tree_icon = null; // default icon (folder)
92
                        $tree_icon = null; // default icon (folder)
93
                }
93
                }
94
 
94
 
95
                $json[] = array(
95
                $json[] = array(