ispCP - Board - Support
no submit (save) button in NewMail Options - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: no submit (save) button in NewMail Options (/thread-6167.html)



no submit (save) button in NewMail Options - womd - 03-24-2009 02:40 AM

hi !

i installed iscp on a debian.lenny box a view days ago.... discovering more and more ....very nice piece of work ! - thank you !

something i cannot discover is:

on my webmail, when i got to options->NewMail Options , i want to activate "Check all boxes, not just INBOX:" - checkbox ... but there is no "submit" or "save" button like in the other option menu's

are these features "disabled" / "in progress" .. or is there something wrong with my installation .. ?

thanks
c


RE: no submit (save) button in NewMail Options - iRaS - 03-24-2009 05:06 PM

that's right i also don't have a submitt button there.

this is the error from the script:
Quote:Warning: dir(../../plugins/newmail/sounds) [function.dir]: failed to open dir: No such file or directory in /var/www/ispcp/gui/tools/webmail/plugins/newmail/newmail_opt.php on line 153

Fatal error: Call to a member function read() on a non-object in /var/www/ispcp/gui/tools/webmail/plugins/newmail/newmail_opt.php on line 154

the error comes just before html tag </select> so it is not visible (using firefox).

it's a bug in the programming style (it will not be checked if the folder exists). i changed this in /var/www/ispcp/gui/tools/webmail/plugins/newmail/newmail_opt.php (chmod u+w before editing):
Code:
$d = dir(SM_PATH . 'plugins/newmail/sounds'));
        while($entry=$d->read()) {
            $fname = get_location () . '/sounds/' . $entry;
            if ($entry != '..' && $entry != '.' && $entry != 'CVS' && $entry != 'index.php') {
                echo '<option ';
                if ($fname == $media) {
                    echo 'selected="selected" ';
                 }
                echo 'value="' . htmlspecialchars($fname) . '">' .
                    htmlspecialchars($entry) . "</option>\n";
            }
        }
        $d->close();
to
Code:
if ($d = dir(SM_PATH . 'plugins/newmail/sounds')) {
        while($entry=$d->read()) {
            $fname = get_location () . '/sounds/' . $entry;
            if ($entry != '..' && $entry != '.' && $entry != 'CVS' && $entry != 'index.php') {
                echo '<option ';
                if ($fname == $media) {
                    echo 'selected="selected" ';
                 }
                echo 'value="' . htmlspecialchars($fname) . '">' .
                    htmlspecialchars($entry) . "</option>\n";
            }
        }
        $d->close();
    }

don't forgott the closing brace after "d->close();"


RE: no submit (save) button in NewMail Options - womd - 03-24-2009 06:56 PM

yes, thank you , that did it !