From: Evan Prodromou Date: Mon, 22 Jun 2009 22:41:52 +0000 (-0700) Subject: functions to check options X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a81350f6559a59921443d9773eccc9f8cfd96ee1;p=quix0rs-gnu-social.git functions to check options --- diff --git a/scripts/commandline.inc b/scripts/commandline.inc index 292005dcaf..8da42873a2 100644 --- a/scripts/commandline.inc +++ b/scripts/commandline.inc @@ -105,3 +105,27 @@ END_OF_DEFAULT; } require_once INSTALLDIR . '/lib/common.php'; + +set_error_handler('common_error_handler'); + +function have_option($str) +{ + global $options; + foreach ($options as $option) { + if ($option[0] == $str) { + return true; + } + } + return false; +} + +function get_option_value($str) +{ + global $options; + foreach ($options as $option) { + if ($option[0] == $str) { + return $option[1]; + } + } + return null; +} \ No newline at end of file