Subversion Repositories oidplus

Rev

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

Rev 1130 Rev 1201
Line 87... Line 87...
87
                                $json_out = OIDplus::gui()->generateContentPage($_REQUEST['id']);
87
                                $json_out = OIDplus::gui()->generateContentPage($_REQUEST['id']);
88
                        } catch (\Exception $e) {
88
                        } catch (\Exception $e) {
89
                                $json_out = array();
89
                                $json_out = array();
90
                                $json_out['title'] = _L('Error');
90
                                $json_out['title'] = _L('Error');
91
                                $json_out['icon'] = 'img/error.png';
91
                                $json_out['icon'] = 'img/error.png';
-
 
92
                                $htmlmsg = $e instanceof OIDplusException ? $e->getHtmlMessage() : htmlentities($e->getMessage());
92
                                $json_out['text'] = $e->getMessage();
93
                                $json_out['text'] = '<p>'.$htmlmsg.'</p>';
93
                        }
94
                        }
94
                        $json_out['status'] = 0;
95
                        $json_out['status'] = 0;
95
                } else if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'tree_search')) {
96
                } else if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'tree_search')) {
96
                        // Action:     tree_search
97
                        // Action:     tree_search
97
                        // Method:     GET / POST
98
                        // Method:     GET / POST
Line 137... Line 138...
137
                }
138
                }
138
        } catch (\Exception $e1) {
139
        } catch (\Exception $e1) {
139
        }
140
        }
140
 
141
 
141
        $errmsg = $e->getMessage();
142
        $errmsg = $e->getMessage();
142
        $errmsg = strip_tags($errmsg);
-
 
143
        $errmsg = html_entity_decode($errmsg, ENT_QUOTES, 'UTF-8');
-
 
144
 
143
 
145
        $json_out = array();
144
        $json_out = array();
146
        $json_out['status'] = -2;
145
        $json_out['status'] = -2;
147
        $json_out['error'] = $errmsg;
146
        $json_out['error'] = $errmsg;
148
        $out = json_encode($json_out);
147
        $out = json_encode($json_out);