Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
I
ISPConfig 3
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 1,524
    • Issues 1,524
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 15
    • Merge Requests 15
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #2543

Closed
Open
Opened Mar 25, 2013 by Drew Clardy@dclardy
  • Report abuse
  • New issue
Report abuse New issue

Mail Error shows blank

While the mail error file is correctly black, it would be nice to include a statement for the user to see that no errors have been found.

I have a corrected the file to allow this to happen.

File: /usr/local/ispconfig/server/lib/classes/monitor_tools.inc.php

Original:

public function monitorMailErrLog() { global $conf;

            /* the id of the server as int */
            $server_id = intval($conf['server_id']);

            /** The type of the data */
            $type = 'log_mail_err';

            /* Get the data of the log */
            $data = 'No mail errors found.';

            /*
             * actually this info has no state.
             * maybe someone knows better...???...
             */
            $state = 'no_state';

            /*
             * Return the Result
             */
            $res['server_id'] = $server_id;
            $res['type'] = $type;
            $res['data'] = $data;
            $res['state'] = $state;
            return $res;
    }

Corrected:

public function monitorMailErrLog() { global $conf;

            /* the id of the server as int */
            $server_id = intval($conf['server_id']);

            /** The type of the data */
            $type = 'log_mail_err';

            /* Get the data of the log */
            if ( $this->_getLogData($type) == ''){
                    $data = 'No mail errors found.';
            } else {
                    $data = $this->_getLogData($type);
            };

            /*
             * actually this info has no state.
             * maybe someone knows better...???...
             */
            $state = 'no_state';

            /*
             * Return the Result
             */
            $res['server_id'] = $server_id;
            $res['type'] = $type;
            $res['data'] = $data;
            $res['state'] = $state;
            return $res;
    }

I know this seems like a trivial fix, but I do think that it is an improvement over the current blank or empty file.

Thanks.

Assignee
Assign to
Planned features
Milestone
Planned features
Assign milestone
Time tracking
None
Due date
No due date
2
Labels
3.0.5.1 Feature Request
Assign labels
  • View project labels
Reference: ispconfig/ispconfig3#2543