Subversion Repositories oidplus

Rev

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

Rev 800 Rev 801
Line 87... Line 87...
87
 
87
 
88
                        $ra_email = explode('$',$id)[1];
88
                        $ra_email = explode('$',$id)[1];
89
                        $ra = new OIDplusRA($ra_email);
89
                        $ra = new OIDplusRA($ra_email);
90
 
90
 
91
                        $out['title'] = $ra->isPasswordLess() ? _L('Create password') : _L('Change RA password');
91
                        $out['title'] = $ra->isPasswordLess() ? _L('Create password') : _L('Change RA password');
92
                        $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,true).'img/main_icon.png' : '';
92
                        $out['icon'] = file_exists(__DIR__.'/img/main_icon.png') ? OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png' : '';
93
 
93
 
94
                        if (!OIDplus::authUtils()->isRaLoggedIn($ra_email) && !OIDplus::authUtils()->isAdminLoggedIn()) {
94
                        if (!OIDplus::authUtils()->isRaLoggedIn($ra_email) && !OIDplus::authUtils()->isAdminLoggedIn()) {
95
                                $out['icon'] = 'img/error.png';
95
                                $out['icon'] = 'img/error.png';
96
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as the requested RA %2.',OIDplus::gui()->link('oidplus:login$ra$'.$ra_email),'<b>'.htmlentities($ra_email).'</b>').'</p>';
96
                                $out['text'] = '<p>'._L('You need to <a %1>log in</a> as the requested RA %2.',OIDplus::gui()->link('oidplus:login$ra$'.$ra_email),'<b>'.htmlentities($ra_email).'</b>').'</p>';
97
                                return;
97
                                return;
Line 123... Line 123...
123
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
123
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
124
                if (!$ra_email) return false;
124
                if (!$ra_email) return false;
125
                if (!OIDplus::authUtils()->isRaLoggedIn($ra_email) && !OIDplus::authUtils()->isAdminLoggedIn()) return false;
125
                if (!OIDplus::authUtils()->isRaLoggedIn($ra_email) && !OIDplus::authUtils()->isAdminLoggedIn()) return false;
126
 
126
 
127
                if (file_exists(__DIR__.'/img/main_icon16.png')) {
127
                if (file_exists(__DIR__.'/img/main_icon16.png')) {
128
                        $tree_icon = OIDplus::webpath(__DIR__,true).'img/main_icon16.png';
128
                        $tree_icon = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png';
129
                } else {
129
                } else {
130
                        $tree_icon = null; // default icon (folder)
130
                        $tree_icon = null; // default icon (folder)
131
                }
131
                }
132
 
132
 
133
                $ra = new OIDplusRA($ra_email);
133
                $ra = new OIDplusRA($ra_email);