Update of /cvsroot/php-blog/serendipity/include/admin/importers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13368/include/admin/importers
Modified Files:
textpattern.inc.php
Log Message:
I forgot I used 'txp_' as my prefix so that all tables were called 'txp_txp_users' and then 'txp_textpattern', which would need to be reduced to 'textpattern'.
Index: textpattern.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/importers/textpattern.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- textpattern.inc.php 14 Feb 2005 13:46:40 -0000 1.1
+++ textpattern.inc.php 16 Feb 2005 12:46:49 -0000 1.2
@@ -102,16 +102,16 @@
}
/* Users */
- $res = @mysql_query("SELECT user_id AS ID,
- name AS user_login,
+ $res = @mysql_query("SELECT user_id AS ID,
+ name AS user_login,
`pass` AS user_pass,
- email AS user_email,
+ email AS user_email,
privs AS user_level
FROM {$this->data['prefix']}txp_users", $txpdb);
if (!$res) {
return sprintf(COULDNT_SELECT_USER_INFO, mysql_error($txpdb));
}
-
+
for ($x=0, $max_x = mysql_num_rows($res); $x < $max_x ; $x++ ) {
$users[$x] = mysql_fetch_assoc($res);
@@ -140,7 +140,7 @@
/* Entries */
// Notice: Textpattern doesn't honor the prefix for this table. Wicked system.
- $res = @mysql_query("SELECT * FROM txp_textpattern ORDER BY Posted;", $txpdb);
+ $res = @mysql_query("SELECT * FROM {$this->data['prefix']}textpattern ORDER BY Posted;", $txpdb);
if (!$res) {
return sprintf(COULDNT_SELECT_ENTRY_INFO, mysql_error($txpdb));
}
@@ -241,7 +241,7 @@
$this->categories[] = $row;
$this->importCategories($row['name'], $row['categoryid']);
}
-
+
return true;
}
}
|