From 10b1640ca1cac1fae4b2adc3a84a2734d51c504c Mon Sep 17 00:00:00 2001 From: thomasb Date: Wed, 29 Sep 2010 08:30:56 +0000 Subject: Pool some code for command line tools; avoid displaying password on shell (#1486947); fix msgexport now using the new imap wrapper git-svn-id: https://svn.roundcube.net/trunk@3998 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/clisetup.php | 90 ++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 roundcubemail/program/include/clisetup.php (limited to 'roundcubemail/program/include') diff --git a/roundcubemail/program/include/clisetup.php b/roundcubemail/program/include/clisetup.php new file mode 100644 index 000000000..fbea98063 --- /dev/null +++ b/roundcubemail/program/include/clisetup.php @@ -0,0 +1,90 @@ + | + +-----------------------------------------------------------------------+ + + $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 -- cgit v1.2.3