Update of /cvsroot/php-blog/serendipity/include/admin/importers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15680/include/admin/importers
Modified Files:
nucleus.inc.php
Log Message:
* Fix "variable pass by reference" error
* Fix nucleus import not resetting variables on new loop
Index: nucleus.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/importers/nucleus.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- nucleus.inc.php 29 Jan 2005 15:45:21 -0000 1.1
+++ nucleus.inc.php 30 Jan 2005 18:23:16 -0000 1.2
@@ -162,6 +162,8 @@
'extended' => strtr($entries[$x]['imore'], $trans_table),
'body' => strtr($entries[$x]['ibody'], $trans_table));
+ $entry['authorid'] = '';
+ $entry['author'] = '';
foreach ($users as $user) {
if ($user['ID'] == $entries[$x]['iauthor']) {
$entry['authorid'] = $user['authorid'];
@@ -194,6 +196,8 @@
while ($a = mysql_fetch_assoc($res)) {
foreach ($entries as $entry) {
if ($entry['inumber'] == $a['citem'] ) {
+ $username = '';
+ $mail = '';
if (!empty($a['cmember'])) {
foreach($users AS $user) {
if ($user['ID'] == $a['cmember']) {
@@ -203,12 +207,12 @@
}
}
}
-
+
if (empty($username) && empty($mail)) {
$username = $a['cuser'];
$mail = $a['cmail'];
}
-
+
$comment = array('entry_id ' => $entry['entryid'],
'parent_id' => 0,
'timestamp' => strtotime($a['ctime']),
|