From 15bc93c19b3ebb5548d3f76890e82262df75c3df Mon Sep 17 00:00:00 2001 From: Fabrizio Monti Date: Tue, 8 Apr 2014 17:56:30 +0200 Subject: [PATCH 1/2] add --port option to mysql command --- lib/wordmove/deployer/base.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/wordmove/deployer/base.rb b/lib/wordmove/deployer/base.rb index 2adcb52..340c265 100644 --- a/lib/wordmove/deployer/base.rb +++ b/lib/wordmove/deployer/base.rb @@ -196,6 +196,7 @@ def mysql_dump_command(options, save_to_path) def mysql_import_command(dump_path, options) arguments = [ "mysql" ] arguments << "--host=#{options[:host]}" if options[:host].present? + arguments << "--port=#{options[:port]}" if options[:port].present? arguments << "--user=#{options[:user]}" if options[:user].present? arguments << "--password=#{options[:password]}" if options[:password].present? arguments << "--database=#{options[:name]}" From c93b15f0313e8468f04d911a0be6443d21da7a69 Mon Sep 17 00:00:00 2001 From: Fabrizio Monti Date: Tue, 8 Apr 2014 17:57:04 +0200 Subject: [PATCH 2/2] nil should be 'escaped' to empty string in php --- lib/wordmove/deployer/ftp.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/wordmove/deployer/ftp.rb b/lib/wordmove/deployer/ftp.rb index fcfc56f..9c8e12d 100644 --- a/lib/wordmove/deployer/ftp.rb +++ b/lib/wordmove/deployer/ftp.rb @@ -76,6 +76,8 @@ def remote_put(thing, path) end def escape_php(string) + return '' unless string + # replaces \ with \\ # replaces ' with \' string.gsub('\\','\\\\\\').gsub(/[']/, '\\\\\'')