GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Small collection of scripts to manage wordpress
Homepage: http://people.warp.es/~koke/wordpress-scripts/
Clone URL: git://github.com/koke/wordpress-scripts.git
Fix quotes in mysql command
koke (author)
Wed May 14 12:35:49 -0700 2008
commit  0169b6b05c264cddfae4b88c7df19341663b50e9
tree    eae7575be22950ee0e46dc71fb72107321920bd3
parent  53b8bc3cc4715ccb7a87761db941e1804120ac71
...
28
29
30
31
 
32
33
34
 
...
28
29
30
 
31
32
33
 
34
0
@@ -28,7 +28,7 @@ if (!preg_match('/^http:\/\//', $host_name)) {
0
 }
0
 echo "Changing siteurl to $host_name...\n";
0
 $sql = "UPDATE wp_options SET option_value = '$host_name' WHERE option_name = 'siteurl'";
0
-system(sprintf("mysql -h %s -u %s $popt %s -e '%s'", DB_HOST, DB_USER, DB_NAME, $sql));
0
+system(sprintf("mysql -h %s -u %s $popt %s -e \"%s\"", DB_HOST, DB_USER, DB_NAME, $sql));
0
 echo "Changing siteurl to $host_name...\n";
0
 $sql = "UPDATE wp_options SET option_value = '$host_name' WHERE option_name = 'siteurl'";
0
-system(sprintf("mysql -h %s -u %s $popt %s -e '%s'", DB_HOST, DB_USER, DB_NAME, $sql));
0
+system(sprintf("mysql -h %s -u %s $popt %s -e \"%s\"", DB_HOST, DB_USER, DB_NAME, $sql));

Comments

    No one has commented yet.