@@ -336,8 +336,15 @@ class quota extends baseModule {
336336 * @return array Array which contains status messages. Each entry is an array containing the status message parameters.
337337 */
338338 function preDeleteActions () {
339- $ this ->initQuotas ();
340- if (!isset ($ this ->quota ) || !is_array ($ this ->quota )) return array ();
339+ try {
340+ $ this ->initQuotas ();
341+ }
342+ catch (LAMException $ e ) {
343+ return array (array ('ERROR ' , $ e ->getTitle (), $ e ->getMessage ()));
344+ }
345+ if (!isset ($ this ->quota ) || !is_array ($ this ->quota )) {
346+ return array ();
347+ }
341348 // determine if this is a user or group account
342349 if ($ this ->get_scope ()=='user ' ) {
343350 $ attrs = $ this ->getAccountContainer ()->getAccountModule ('posixAccount ' )->getAttributes ();
@@ -427,8 +434,16 @@ class quota extends baseModule {
427434 */
428435 function display_html_attributes () {
429436 $ return = new htmlTable ();
430- $ this ->initQuotas ();
431- if (!is_array ($ this ->quota )) return $ return ;
437+ try {
438+ $ this ->initQuotas ();
439+ }
440+ catch (LAMException $ e ) {
441+ $ return ->addElement (new htmlStatusMessage ('ERROR ' , $ e ->getTitle (), $ e ->getMessage ()));
442+ return $ return ;
443+ }
444+ if (!is_array ($ this ->quota )) {
445+ return $ return ;
446+ }
432447 // get list of lamdaemon servers
433448 $ serverDescriptions = array ();
434449 $ lamdaemonServers = explode ("; " , $ _SESSION ['config ' ]->get_scriptServers ());
@@ -671,8 +686,16 @@ class quota extends baseModule {
671686 * @see baseModule::get_pdfEntries()
672687 */
673688 function get_pdfEntries ($ pdfKeys , $ typeId ) {
674- $ this ->initQuotas ();
675- if (!isset ($ this ->quota ) || !is_array ($ this ->quota )) return array ();
689+ try {
690+ $ this ->initQuotas ();
691+ }
692+ catch (LAMException $ e ) {
693+ logNewMessage (LOG_ERR , $ e ->getTitle (), $ e ->getMessage ());
694+ return array ();
695+ }
696+ if (!isset ($ this ->quota ) || !is_array ($ this ->quota )) {
697+ return array ();
698+ }
676699 if (sizeof ($ this ->quota ) > 0 ) {
677700 $ pdfTable = new PDFTable ();
678701 // get list of lamdaemon servers
@@ -720,8 +743,16 @@ class quota extends baseModule {
720743 * @see baseModule::get_uploadColumns()
721744 */
722745 function get_uploadColumns ($ selectedModules , &$ type ) {
723- $ this ->initQuotas ();
724- if (!isset ($ this ->quota ) || !is_array ($ this ->quota )) return array ();
746+ try {
747+ $ this ->initQuotas ();
748+ }
749+ catch (LAMException $ e ) {
750+ logNewMessage (LOG_ERR , $ e ->getTitle (), $ e ->getMessage ());
751+ return array ();
752+ }
753+ if (!isset ($ this ->quota ) || !is_array ($ this ->quota )) {
754+ return array ();
755+ }
725756 $ return = array ();
726757 if (sizeof ($ this ->quota ) > 0 ) {
727758 // get list of lamdaemon servers
0 commit comments