diff --git a/CHANGELOG b/CHANGELOG index e4a19cf0b..d38bbb9a3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ CHANGELOG Roundcube Webmail =========================== +- Fix msgexport.sh now using the new imap wrapper +- Avoid displaying password on shell (#1486947) - Only lower-case user name if first login attempt failed (#1486393) - Make alias setting in squirrelmail_usercopy plugin configurable (patch by pommi, #1487007) - Prevent from saving a non-existing skin path in user prefs (#1486936) diff --git a/bin/msgexport.sh b/bin/msgexport.sh index 005e2cadf..0aa33b5a8 100755 --- a/bin/msgexport.sh +++ b/bin/msgexport.sh @@ -1,45 +1,10 @@ #!/usr/bin/env php decode_address_list($headers->from, 1, false)); fwrite($out, sprintf("From %s %s UID %d\n", $from['mailto'], $headers->date, $headers->uid)); - fwrite($out, iil_C_FetchPartHeader($IMAP->conn, $mbox, $i, null)); - fwrite($out, iil_C_HandlePartBody($IMAP->conn, $mbox, $i, null, 1)); + fwrite($out, $IMAP->conn->fetchPartHeader($mbox, $i)); + fwrite($out, $IMAP->conn->handlePartBody($mbox, $i)); fwrite($out, "\n\n\n"); progress_update($i, $count); @@ -125,8 +90,7 @@ if (empty($args['user'])) } // prompt for password -vputs("Password: "); -$args['pass'] = trim(fgets(STDIN)); +$args['pass'] = prompt_silent("Password: "); // parse $host URL diff --git a/bin/msgimport.sh b/bin/msgimport.sh index a5161e026..74dc81617 100755 --- a/bin/msgimport.sh +++ b/bin/msgimport.sh @@ -1,45 +1,10 @@ #!/usr/bin/env php | + +-----------------------------------------------------------------------+ + + $Id$ + +*/ + +if (php_sapi_name() != 'cli') { + die('Not on the "shell" (php-cli).'); +} + +require_once 'iniset.php'; + + +/** + * Parse commandline arguments into a hash array + */ +function get_opt($aliases=array()) +{ + $args = array(); + for ($i=1; $i \ No newline at end of file