Current time: 11-17-2024, 10:49 PM Hello There, Guest! (LoginRegister)


Post Reply 
no submit (save) button in NewMail Options
Author Message
iRaS Offline
Junior Member
*

Posts: 13
Joined: Mar 2009
Reputation: 0
Post: #2
RE: no submit (save) button in NewMail Options
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();"
03-24-2009 05:06 PM
Find all posts by this user Quote this message in a reply
Post Reply 


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

Forum Jump:


User(s) browsing this thread: 3 Guest(s)