Update of /cvsroot/php-blog/serendipity/include/admin/importers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11749
Modified Files:
wordpress.inc.php
Log Message:
* I suppose we don't want parse errors? :)
* Fix passing $trans_table as key, it's not needed and looks like a relict from some debugging?
* We only want to set autodiscover off, if the users chose to do so
Index: wordpress.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/importers/wordpress.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- wordpress.inc.php 30 Nov 2004 00:26:15 -0000 1.3
+++ wordpress.inc.php 30 Nov 2004 10:59:07 -0000 1.4
@@ -48,8 +48,8 @@
}
function strtrRecursive($data, $trans_table) {
- foreach ( $data as $key => $val ) {
- if ( is_array([$val]) ) {
+ foreach ($data as $key => $val) {
+ if (is_array($val)) {
$data[$key] = $this->strtrRecursive($val);
}
else {
@@ -65,7 +65,10 @@
// Save this so we can return it to its original value at the end of this method.
$noautodiscovery = isset($serendipity['noautodiscovery']) ? $serendipity['noautodiscovery'] : false;
- $serendipity['noautodiscovery'] = true;
+
+ if ($this->data['autodiscovery'] == 'false') {
+ $serendipity['noautodiscovery'] = 1;
+ }
// We need to convert interesting characters to HTML entities, except for those with special relevance to HTML.
$trans_table = get_html_translation_table(HTML_ENTITIES);
@@ -167,7 +170,7 @@
for ( $x=0 ; $x<mysql_num_rows($res) ; $x++ ) {
$entries[$x] = mysql_fetch_assoc($res);
- $entry = array('title' => $entries[$x]['post_title'], $trans_table, // htmlentities() is called later, so we can leave this.
+ $entry = array('title' => $entries[$x]['post_title'], // htmlentities() is called later, so we can leave this.
'isdraft' => ($entries[$x]['post_status'] == 'publish') ? 'false' : 'true',
'allow_comments' => ($entries[$x]['comment_status '] == 'open ') ? 'true' : 'false',
'timestamp' => strtotime($entries[$x]['post_date']),
|