Only in b/pdo-for-wordpress/pdo/driver_sqlite: .schema.php.swp diff -uar a/pdo-for-wordpress/pdo/driver_sqlite/pdo_sqlite_driver.php b/pdo-for-wordpress/pdo/driver_sqlite/pdo_sqlite_driver.php --- a/pdo-for-wordpress/pdo/driver_sqlite/pdo_sqlite_driver.php 2010-01-14 12:52:39.000000000 +0100 +++ b/pdo-for-wordpress/pdo/driver_sqlite/pdo_sqlite_driver.php 2012-12-17 00:48:01.407109364 +0100 @@ -61,6 +61,7 @@ //$this->rewrite_md5(); //$this->rewrite_rand(); $this->rewriteRegexp(); + $this->rewriteNullIf(); break; case "insert": $this->stripBackTicks(); @@ -504,7 +505,7 @@ * dummies describe queries */ private function handleDescribeQuery(){ - $this->_query = "select 1=1"; + $this->_query = "SELECT tbl_name FROM sqlite_master WHERE name = '".str_replace("DESCRIBE","",$this->query)."';"; } /** @@ -596,5 +597,10 @@ $pattern = '/\s([^\s]*)\s*regexp\s*(\'.*?\')/im'; $this->_query = preg_replace($pattern, ' regexpp(\1, \2)', $this->_query); } + + private function rewriteNullIf(){ + if(strstr(strtoupper($this->_query) , "NULLIF")) + $this->_query = str_replace( "false" , 0 , strtolower($this->_query)); + } } -?> \ No newline at end of file +?> diff -uar a/pdo-for-wordpress/pdo/driver_sqlite/pdo_sqlite_driver_create.php b/pdo-for-wordpress/pdo/driver_sqlite/pdo_sqlite_driver_create.php --- a/pdo-for-wordpress/pdo/driver_sqlite/pdo_sqlite_driver_create.php 2010-01-14 12:52:39.000000000 +0100 +++ b/pdo-for-wordpress/pdo/driver_sqlite/pdo_sqlite_driver_create.php 2012-08-05 20:00:35.000000000 +0200 @@ -275,7 +275,7 @@ * */ private function rewrite_character_set_(){ - $pattern = '/\\bcharacter\\s*set\\s*(?addQuery(preg_replace($pattern, ' ', $this->getCurrentQuery())); } -} \ No newline at end of file +} diff -uar a/pdo-for-wordpress/pdo/driver_sqlite/schema.php b/pdo-for-wordpress/pdo/driver_sqlite/schema.php --- a/pdo-for-wordpress/pdo/driver_sqlite/schema.php 2010-01-14 12:52:39.000000000 +0100 +++ b/pdo-for-wordpress/pdo/driver_sqlite/schema.php 2012-12-17 00:55:06.795119602 +0100 @@ -10,15 +10,11 @@ */ function installDB(){ + global $wp_queries; require_once PDODIR . 'driver_sqlite/pdo_sqlite_driver_create.php'; ob_end_clean(); echo "installing the database
"; - $pattern = '/\$wp_queries\\s*=\\s*"(.*)";/imsx'; - $contents = file_get_contents(ABSPATH . 'wp-admin/includes/schema.php'); - echo htmlspecialchars($contents); - $wp_queries = preg_match('/\$wp_queries\\s*=\\s*"(.*?)";/imsx', $contents, $match); - echo "
".print_r($match, true);
-	$wp_queries = preg_replace('/\$wpdb\\s*->/imsx', "wp_", $match[1]);
+	$wp_queries = preg_replace('/\$wpdb\\s*->/imsx', "wp_", $wp_queries);
 	$wp_queries = preg_replace('/\$charset_collate/imsx', '', $wp_queries);
 	
 	//add a query to deal with file mods
@@ -53,4 +49,4 @@
 	}
 	return true;
 }
-?>
\ No newline at end of file
+?>
diff -uar a/pdo-for-wordpress/pdo/wp_install.php b/pdo-for-wordpress/pdo/wp_install.php
--- a/pdo-for-wordpress/pdo/wp_install.php	2010-01-14 12:52:39.000000000 +0100
+++ b/pdo-for-wordpress/pdo/wp_install.php	2012-08-05 20:12:31.000000000 +0200
@@ -51,7 +51,7 @@
 	$user_id = username_exists($user_name);
 	if ( !$user_id ) {
 		$random_password = wp_generate_password();
-		$message = __('Note that password carefully! It is a random password that was generated just for you.');
+		$message = __('Note that password carefully! It is a random password that was generated just for you. '.$random_password);
 		$user_id = wp_create_user($user_name, $random_password, $user_email);
 		update_usermeta($user_id, 'default_password_nag', true);
 	} else {
@@ -72,4 +72,4 @@
 
 	return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $random_password, 'password_message' => $message);
 }
-?>
\ No newline at end of file
+?>
Only in a/pdo-for-wordpress: readme.txt