fix mysqli importer conversion param order change
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
Version 2.1 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Fix importers to use the new mysqli API extension with PHP 5+
|
||||
|
||||
* WIP: Added an internal cache to speedup s9y's site generation. Can
|
||||
be activated by setting use_internal_cache to true in
|
||||
serendipity_config.inc.php. Test feedback needed.
|
||||
@ -58,8 +60,6 @@ Version 2.1 ()
|
||||
Version 2.0.2 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Fix importers to use the new mysqli API extension with PHP 5+
|
||||
|
||||
* Smarty bugfix upgrades to 3.1.27 - please read the changelog.
|
||||
Compilation time was vastly improved.
|
||||
New Features in NEW_FEATURES.txt.
|
||||
|
@ -168,7 +168,7 @@ class Serendipity_Import {
|
||||
function &nativeQuery($query, $db = false) {
|
||||
global $serendipity;
|
||||
|
||||
mysqli_select_db($this->data['name'], $db);
|
||||
mysqli_select_db($db, $this->data['name']);
|
||||
$dbn = false;
|
||||
|
||||
$target = $this->data['charset'];
|
||||
@ -188,11 +188,11 @@ class Serendipity_Import {
|
||||
}
|
||||
|
||||
if ($dbn && $serendipity['dbNames']) {
|
||||
mysqli_query("SET NAMES " . $dbn, $db);
|
||||
mysqli_query($db, "SET NAMES " . $dbn);
|
||||
}
|
||||
|
||||
$return = &mysqli_query($query, $db);
|
||||
mysqli_select_db($serendipity['dbName'], $serendipity['dbConn']);
|
||||
$return = &mysqli_query($db, $query);
|
||||
mysqli_select_db($serendipity['dbConn'], $serendipity['dbName']);
|
||||
serendipity_db_reconnect();
|
||||
return $return;
|
||||
}
|
||||
|
@ -80,11 +80,11 @@ class Serendipity_Import_b2evolution extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$b2db = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$b2db) {
|
||||
if (!$b2db || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($b2db, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($b2db));
|
||||
}
|
||||
|
||||
|
@ -82,11 +82,11 @@ class Serendipity_Import_bblog extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$bblogdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$bblogdb) {
|
||||
if (!$bblogdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($bblogdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($bblogdb));
|
||||
}
|
||||
|
||||
|
@ -80,11 +80,11 @@ class Serendipity_Import_bmachine extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$txpdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$txpdb) {
|
||||
if (!$txpdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($txtdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($txpdb));
|
||||
}
|
||||
|
||||
|
@ -86,11 +86,11 @@ class Serendipity_Import_geeklog extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$gdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$gdb) {
|
||||
if (!$gdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($gdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($gdb));
|
||||
}
|
||||
|
||||
|
@ -80,11 +80,11 @@ class Serendipity_Import_lifetype extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$ltdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$ltdb) {
|
||||
if (!$ltdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($ltdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($ltdb));
|
||||
}
|
||||
|
||||
|
@ -83,11 +83,11 @@ class Serendipity_Import_Nucleus extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$nucdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$nucdb) {
|
||||
if (!$nucdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($nucdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($nucdb));
|
||||
}
|
||||
|
||||
|
@ -80,11 +80,11 @@ class Serendipity_Import_nuke extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$nukedb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$nukedb) {
|
||||
if (!$nukedb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($nukedb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($nukedb));
|
||||
}
|
||||
|
||||
|
@ -82,11 +82,11 @@ class Serendipity_Import_phpbb extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$gdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$gdb) {
|
||||
if (!$gdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($gdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($gdb));
|
||||
}
|
||||
|
||||
|
@ -83,11 +83,11 @@ class Serendipity_Import_pMachine extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$pmdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$pmdb) {
|
||||
if (!$pmdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($pmdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($pmdb));
|
||||
}
|
||||
|
||||
|
@ -447,11 +447,11 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$s9ydb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$s9ydb) {
|
||||
if (!$s9ydb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'], $s9ydb)) {
|
||||
if (!@mysqli_select_db($s9ydb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($s9ydb));
|
||||
}
|
||||
|
||||
|
@ -86,11 +86,11 @@ class Serendipity_Import_smf extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$gdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$gdb) {
|
||||
if (!$gdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($gdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($gdb));
|
||||
}
|
||||
|
||||
|
@ -87,11 +87,11 @@ class Serendipity_Import_sunlog extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$sunlogdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$sunlogdb) {
|
||||
if (!$sunlogdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($sunlogdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($sunlogdb));
|
||||
}
|
||||
|
||||
|
@ -86,11 +86,11 @@ class Serendipity_Import_textpattern extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$txpdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$txpdb) {
|
||||
if (!$txpdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'])) {
|
||||
if (!@mysqli_select_db($txpdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($txpdb));
|
||||
}
|
||||
|
||||
|
@ -93,11 +93,11 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
|
||||
}
|
||||
|
||||
$wpdb = @mysqli_connect($this->data['host'], $this->data['user'], $this->data['pass']);
|
||||
if (!$wpdb) {
|
||||
if (!$wpdb || mysqli_connect_error()) {
|
||||
return sprintf(COULDNT_CONNECT, serendipity_specialchars($this->data['host']));
|
||||
}
|
||||
|
||||
if (!@mysqli_select_db($this->data['name'], $wpdb)) {
|
||||
if (!@mysqli_select_db($wpdb, $this->data['name'])) {
|
||||
return sprintf(COULDNT_SELECT_DB, mysqli_error($wpdb));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user