From ec0346822df8d115f203f8c90af8b94f788e451a Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Thu, 18 Jul 2013 11:48:44 -0700 Subject: Greg Anderson: Generated with Drush iq --- drush | 3 +++ drush.php | 5 ----- includes/drush.inc | 4 ++-- includes/environment.inc | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drush b/drush index f63b48d..da4abed 100755 --- a/drush +++ b/drush @@ -120,6 +120,9 @@ if [ -n "$PHP_OPTIONS" ] ; then php_options="$php_options $PHP_OPTIONS" fi +# Always disable magic_quotes_gpc and friends +php_options="$php_options -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off" + # Pass in the path to php so that drush knows which one to use if it # re-launches itself to run subcommands. We will also pass in the php options. # Important note: Any options added here must be removed when Drush processes diff --git a/drush.php b/drush.php index 2d1e3eb..3614d40 100755 --- a/drush.php +++ b/drush.php @@ -8,11 +8,6 @@ * @requires PHP CLI 5.2.0, or newer. */ -// Always disable magic_quotes_gpc and friends -ini_set("magic_quotes_gpc", "Off"); -ini_set("magic_quotes_runtime", "Off"); -ini_set("magic_quotes_sybase", "Off"); - require(dirname(__FILE__) . '/includes/bootstrap.inc'); if (drush_bootstrap_prepare() === FALSE) { diff --git a/includes/drush.inc b/includes/drush.inc index 09cdb8c..55dfe12 100644 --- a/includes/drush.inc +++ b/includes/drush.inc @@ -387,7 +387,7 @@ function drush_get_global_options($brief = FALSE) { $options['pipe'] = array('short-form' => 'p', 'description' => "Emit a compact representation of the command for scripting."); $options['help'] = array('short-form' => 'h', 'description' => "This help system."); $options['version'] = array('description' => "Show drush version."); - $options['php'] = array('description' => "The absolute path to your PHP intepreter, if not 'php' in the path.", 'example-value' => '/path/to/file'); + $options['php'] = array('description' => "The absolute path to your PHP intepreter, if not 'php' in the path.", 'example-value' => '/path/to/file', 'never-propagate' => TRUE); $options['interactive'] = array('short-form' => 'ia', 'description' => "Force interactive mode for commands run on multiple targets (e.g. `drush @site1,@site2 cc --ia`)."); if (!$brief) { @@ -413,7 +413,7 @@ function drush_get_global_options($brief = FALSE) { $options['backup-location'] = array('description' => "Specifies the directory where drush will store backups."); $options['confirm-rollback'] = array('description' => 'Wait for confirmation before doing a rollback when something goes wrong.'); $options['complete-debug'] = array('hidden' => TRUE, 'description' => "Turn on debug mode forf completion code"); - $options['php-options'] = array('description' => "Options to pass to php when running drush. Only effective when using the `drush` script."); + $options['php-options'] = array('description' => "Options to pass to php when running drush. Only effective when using the `drush` script.", 'never-propagate' => TRUE); $options['deferred-sanitization'] = array('hidden' => TRUE, 'description' => "Defer calculating the sanitization operations until after the database has been copied. This is done automatically if the source database is remote."); $options['remote-host'] = array('hidden' => TRUE, 'description' => 'Remote site to execute drush command on. Managed by site alias.'); $options['remote-user'] = array('hidden' => TRUE, 'description' => 'User account to use with a remote drush command. Managed by site alias.'); diff --git a/includes/environment.inc b/includes/environment.inc index 1e4f3a1..683d9ea 100644 --- a/includes/environment.inc +++ b/includes/environment.inc @@ -88,7 +88,7 @@ function _drush_postmortem() { * notify the user that a setting change is needed and abort. */ function _drush_environment_check_php_ini() { - $ini_checks = array('safe_mode' => '', 'open_basedir' => '', 'disable_functions' => array('exec', 'system'), 'disable_classes' => '', 'magic_quotes_gpc' => '', 'magic_quotes_runtime' => '', 'magic_quotes_sybase' => ''); + $ini_checks = array('safe_mode' => '', 'open_basedir' => '', 'disable_functions' => array('exec', 'system'), 'disable_classes' => ''); // Test to insure that certain php ini restrictions have not been enabled $prohibited_list = array(); -- 1.7.9.5