Subversion Repositories oidplus

Rev

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

Rev 1199 Rev 1201
Line 131... Line 131...
131
                try {
131
                try {
132
                        self::checkUploadDir($basepath);
132
                        self::checkUploadDir($basepath);
133
                } catch (\Exception $e) {
133
                } catch (\Exception $e) {
134
                        $error = _L('This functionality is not available due to a misconfiguration');
134
                        $error = _L('This functionality is not available due to a misconfiguration');
135
                        if (OIDplus::authUtils()->isAdminLoggedIn()) {
135
                        if (OIDplus::authUtils()->isAdminLoggedIn()) {
-
 
136
                                $htmlmsg = $e instanceof OIDplusException ? $e->getHtmlMessage() : htmlentities($e->getMessage());
136
                                $error .= ': '.$e->getMessage();
137
                                $error .= ': '.$htmlmsg;
137
                        } else {
138
                        } else {
138
                                $error .= '. '._L('Please notify the system administrator. After they log-in, they can see the reason at this place.');
139
                                $error .= '. '._L('Please notify the system administrator. After they log-in, they can see the reason at this place.');
139
                        }
140
                        }
140
                        throw new OIDplusException($error);
141
                        throw new OIDplusHtmlException($error);
141
                }
142
                }
142
 
143
 
143
                // Get object-specific path
144
                // Get object-specific path
144
                if (!is_null($id)) {
145
                if (!is_null($id)) {
145
                        $obj = OIDplusObject::parse($id);
146
                        $obj = OIDplusObject::parse($id);
Line 475... Line 476...
475
                                $output .= '</form>';
476
                                $output .= '</form>';
476
                                $doshow = true;
477
                                $doshow = true;
477
                        }
478
                        }
478
                } catch (\Exception $e) {
479
                } catch (\Exception $e) {
479
                        $doshow = true;
480
                        $doshow = true;
-
 
481
                        $htmlmsg = $e instanceof OIDplusException ? $e->getHtmlMessage() : htmlentities($e->getMessage());
480
                        $output = '<p>'.$e->getMessage().'</p>';
482
                        $output = '<p>'.$htmlmsg.'</p>';
481
                }
483
                }
482
 
484
 
483
                $output = '<h2>'._L('File attachments').'</h2>' .
485
                $output = '<h2>'._L('File attachments').'</h2>' .
484
                          '<div class="container box">' .
486
                          '<div class="container box">' .
485
                          $output .
487
                          $output .
Line 631... Line 633...
631
                                                throw new OIDplusException(_L('Directory %1 is not writeable. Please check the permissions!', $basepath));
633
                                                throw new OIDplusException(_L('Directory %1 is not writeable. Please check the permissions!', $basepath));
632
                                        }
634
                                        }
633
                                }
635
                                }
634
                        } catch (\Exception $e) {
636
                        } catch (\Exception $e) {
635
                                $error = _L('The file attachments feature is not available due to a misconfiguration');
637
                                $error = _L('The file attachments feature is not available due to a misconfiguration');
-
 
638
                                $htmlmsg = $e instanceof OIDplusException ? $e->getHtmlMessage() : htmlentities($e->getMessage());
636
                                $error .= ': ' . $e->getMessage();
639
                                $error .= ': ' . $htmlmsg;
637
                        }
640
                        }
638
                        if ($error) {
641
                        if ($error) {
639
                                $notifications[] = new OIDplusNotification('WARN', $error);
642
                                $notifications[] = new OIDplusNotification('WARN', $error);
640
                        }
643
                        }
641
                }
644
                }