';
- $msg .= 'Go to Google to grant access ';
+ $msg = 'In order to import your blog on Blogger, Serendipity needs to be able to access it via Google\'s Blogger Data APIs.';
+ $msg .= 'Login to your Google/Blogger account and then click the link below.';
+ $msg .= 'Go to Google to grant access';
return $msg;
} else {
return '';
@@ -154,7 +154,7 @@ class Serendipity_Import_Blogger extends Serendipity_Import {
}
// Export success
- echo 'Successfully exported entries from Blogger ';
+ echo 'Successfully exported entries from Blogger';
// Get Serendipity authors list
$authorList = array();
@@ -247,29 +247,32 @@ class Serendipity_Import_Blogger extends Serendipity_Import {
}
// Report on resultant authors
- echo ' Current list of authors: '. join(', ', array_values($authorList)) .'
';
+ echo 'Current list of authors: '. join(', ', array_values($authorList));
// Do cleanup and report on entries
- echo 'The following entries were successfully imported: ';
+ echo 'The following entries were successfully imported:';
+ echo '
';
foreach ($entryList as $eId => $eDetails) {
// Update comment count for entry in s9y
serendipity_db_query("UPDATE ". $serendipity['dbPrefix'] ."entries SET comments = ". $eDetails[2] ." WHERE id = ". $eDetails[0]);
- echo '- '. $eDetails[1] .' comments('. $eDetails[2] .') ';
+ echo '
'. $eDetails[1] .' comments('. $eDetails[2] .')
';
}
- echo ' ';
+ echo '
';
// Report fails
- echo 'The following entries ran into trouble and was not imported: ';
+ echo 'The following entries ran into trouble and was not imported:';
+ echo '
';
#continue;
if (empty($entry['authorid'])) {
$entry['authorid'] = $serendipity['authorid'];
@@ -472,4 +474,4 @@ class Serendipity_Import_MovableType extends Serendipity_Import {
}
}
return 'Serendipity_Import_MovableType';
-?>
\ No newline at end of file
+?>
diff --git a/include/admin/importers/old_blogger.inc.php b/include/admin/importers/old_blogger.inc.php
index 2b42bd73..bcd7ce99 100644
--- a/include/admin/importers/old_blogger.inc.php
+++ b/include/admin/importers/old_blogger.inc.php
@@ -59,7 +59,7 @@ class Serendipity_Import_OldBlogger extends Serendipity_Import {
BLOGGER.COM to SERENDIPITY IMPORT
Version 0.1,( 29/10/2005 )
-
+
1. First go to Blogger.com, login.
2. Go to the templates section. Set the following as your template. You should backup the current template if you want to reset it back after this operation. Click "Save template changes" button to save this new template.
@@ -97,10 +97,8 @@ ENDPOST
9. Now in the box below type in the path to the "index.html" file blogger created under your "blogger" directory. File path should then look something like "/httpdocs/blogger/index.html".
10. This script will create the users as from the blogger blog being imported. However if a user already exists, then that user will be used instead of creating a new user with similar name. For the new users that this script will create, you need to provide a default password. Type it in the box below.
11. Click "Submit". Your posts and comments should be imported to serendipity!
-
If you have questions or problems, feel free to drop me a mail at jaa at technova dot com dot mv.
-
-Jaa
-http://jaa.technova.com.mv
';
+
If you have questions or problems, feel free to drop me a mail at jaa at technova dot com dot mv.
';
} else {
return sprintf(ERROR_NO_DIRECTORY, $this->data['pivot_path']);
}
diff --git a/include/admin/importers/serendipity.inc.php b/include/admin/importers/serendipity.inc.php
index 06ec304c..df5d2e51 100644
--- a/include/admin/importers/serendipity.inc.php
+++ b/include/admin/importers/serendipity.inc.php
@@ -17,12 +17,11 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
function getImportNotes() {
// TODO: I18n!
- return 'This importer is still work in progress. It can currently import most things of the database. HOWEVER it can NOT import previously installed plugins (including their configuration) or any database tables of installed plugins. Those must be migrated manually. Also, you must use FTP to transfer your uploaded images to the new location.
- Please do a test-run first if you are SQL-savvy. If you encounter any errors, save the message output you get - it will definitely help debugging!
-
- This is NOT an importer meant for upgrading Serendipity. This importer assumes that both Serendipity installations use the same version.
- It is strongly advised that you test this importer in an isolated environment first, do not use it on a production blog unless you made sure it works in a cloned installation. Always make a backup of both the source and the target blog.
- After these precautions: The importer code generally works very well for me and my purposes. Your mileage may vary.';
+ return '
This importer is still work in progress. It can currently import most things of the database. HOWEVER it can NOT import previously installed plugins (including their configuration) or any database tables of installed plugins. Those must be migrated manually. Also, you must use FTP to transfer your uploaded images to the new location.
+
Please do a test-run first if you are SQL-savvy. If you encounter any errors, save the message output you get - it will definitely help debugging!
+
This is NOT an importer meant for upgrading Serendipity. This importer assumes that both Serendipity installations use the same version.
+
It is strongly advised that you test this importer in an isolated environment first, do not use it on a production blog unless you made sure it works in a cloned installation. Always make a backup of both the source and the target blog.
+
After these precautions: The importer code generally works very well for me and my purposes. Your mileage may vary.
';
}
function Serendipity_Import_Serendipity ($data) {
@@ -96,7 +95,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
function import_table(&$s9ydb, $table, $primary_keys, $where = null, $dupe_check = false, $fix_relations = false, $skip_dupes = false) {
global $serendipity;
- echo "
Starting with table {$table}... \n";
+ echo "Starting with table {$table}...";
if ($dupe_check) {
$dupes = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}" . $table . " " . $where, false, 'both', false, $dupe_check);
@@ -161,7 +160,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
}
if (!$this->execute && $this->debug) {
- echo "Fix relation from $fix_relation_table.$fix_relation_primary_key={$primary_vals[$fix_relation_primary_key]} to {$row[$primary_key]} (assoc_val: $assoc_val) \n";
+ echo "Fix relation from $fix_relation_table.$fix_relation_primary_key={$primary_vals[$fix_relation_primary_key]} to {$row[$primary_key]} (assoc_val: $assoc_val)";
}
}
}
@@ -170,7 +169,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
if ($insert) {
if ($dupe_check && isset($dupes[$row[$dupe_check]])) {
if ($this->debug) {
- echo "Skipping duplicate:
';
@@ -199,7 +198,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
}
} else {
if ($this->debug && !$this->execute) {
- echo "Ignoring Duplicate. \n";
+ echo "Ignoring Duplicate.";
}
}
}
@@ -207,7 +206,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
if (!$this->execute) {
echo 'Storage on '. $table . ':
' . print_r($this->storage[$table], true) . '
';
} else {
- echo "Finished table {$table} \n";
+ echo "Finished table {$table}";
}
}
@@ -470,4 +469,4 @@ class Serendipity_Import_Serendipity extends Serendipity_Import {
return 'Serendipity_Import_Serendipity';
-/* vim: set sts=4 ts=4 expandtab : */
\ No newline at end of file
+/* vim: set sts=4 ts=4 expandtab : */
diff --git a/include/admin/importers/smf.inc.php b/include/admin/importers/smf.inc.php
index 1a496f68..dc726ffe 100644
--- a/include/admin/importers/smf.inc.php
+++ b/include/admin/importers/smf.inc.php
@@ -13,7 +13,7 @@ class Serendipity_Import_smf extends Serendipity_Import {
var $categories = array();
function getImportNotes() {
- return 'SMF uses salted MD5 passwords that Serendipity cannot import. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to a random string. You need to modify the passwords manually for each user, we are sorry for that inconvenience. ';
+ return '
SMF uses salted MD5 passwords that Serendipity cannot import. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to a random string. You need to modify the passwords manually for each user, we are sorry for that inconvenience.
';
}
function Serendipity_Import_smf($data) {
diff --git a/include/admin/importers/sunlog.inc.php b/include/admin/importers/sunlog.inc.php
index e21fd485..b5121597 100644
--- a/include/admin/importers/sunlog.inc.php
+++ b/include/admin/importers/sunlog.inc.php
@@ -13,9 +13,8 @@ class Serendipity_Import_sunlog extends Serendipity_Import {
var $categories = array();
function getImportNotes() {
- return 'Sunlog uses a crypted string to represent stored passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity and can not be reconstructed. The passwords for all users have been set to "sunlog". You need to modify the passwords manually for each user, we are sorry for that inconvenience. '
- . ' '
- . 'Sunlog has a granular control over access privileges which cannot be migrated to Serendipity. All Users will be migrated as Superusers, you may need to set them to editor or chief users manually after import.';
+ return '
Sunlog uses a crypted string to represent stored passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity and can not be reconstructed. The passwords for all users have been set to "sunlog". You need to modify the passwords manually for each user, we are sorry for that inconvenience.
'
+ . '
Sunlog has a granular control over access privileges which cannot be migrated to Serendipity. All Users will be migrated as Superusers, you may need to set them to editor or chief users manually after import.
';
}
function Serendipity_Import_sunlog($data) {
diff --git a/include/admin/importers/textpattern.inc.php b/include/admin/importers/textpattern.inc.php
index 7b6898b1..5b22bd9b 100644
--- a/include/admin/importers/textpattern.inc.php
+++ b/include/admin/importers/textpattern.inc.php
@@ -13,7 +13,7 @@ class Serendipity_Import_textpattern extends Serendipity_Import {
var $categories = array();
function getImportNotes() {
- return 'Textpattern uses MySQLs native PASSWORD() function to save passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to "txp". You need to modify the passwords manually for each user, we are sorry for that inconvenience. ';
+ return '
Textpattern uses MySQLs native PASSWORD() function to save passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to "txp". You need to modify the passwords manually for each user, we are sorry for that inconvenience.
';
}
function Serendipity_Import_textpattern($data) {
diff --git a/include/admin/importers/voodoopad.inc.php b/include/admin/importers/voodoopad.inc.php
index c27e30be..941761b7 100755
--- a/include/admin/importers/voodoopad.inc.php
+++ b/include/admin/importers/voodoopad.inc.php
@@ -82,7 +82,7 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
// Dependency on static pages
if (!class_exists('serendipity_event_staticpage')) {
- die(IMPORTER_VOODOO_REQUIREMENTFAIL . ' ');
+ die('' . IMPORTER_VOODOO_REQUIREMENTFAIL . '');
}
// The selected file
@@ -160,18 +160,18 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
// Either replace or insert depending on previous existence
if (!isset($thispage['id'])) {
- echo ' '.IMPORTER_VOODOO_CREATINGPAGE.': '. $mykey;
+ echo ''.IMPORTER_VOODOO_CREATINGPAGE.': '. $mykey.'';
serendipity_db_insert('staticpages', $thispage);
$serendipity["POST"]["staticpage"] = serendipity_db_insert_id("staticpages", 'id');
} elseif ($this->data['updateExisting'] == 'true') {
- echo ' '.IMPORTER_VOODOO_UPDATINGPAGE.': '. $mykey;
+ echo ''.IMPORTER_VOODOO_UPDATINGPAGE.': '. $mykey.'';
serendipity_db_update("staticpages", array("id" => $thispage["id"]), $thispage);
} else {
- echo ' '.IMPORTER_VOODOO_NOTUPDATING.': '. $mykey;
+ echo ''.IMPORTER_VOODOO_NOTUPDATING.': '. $mykey.'';
}
} else {
// If its a url, the content is the link instead
- echo ' '.IMPORTER_VOODOO_RECORDURL.': '.$thispage['headline'];
+ echo ''.IMPORTER_VOODOO_RECORDURL.': '.$thispage['headline'].'';
$aliases[$thispage['headline']] = $thispage['content'];
}
break;
@@ -179,7 +179,6 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
}
// Now rewrite the permalinks
- echo ' ';
if ($this->data['shouldWriteLinks'] == 'true') {
Serendipity_Import_VoodooPad::write_links($aliases);
}
@@ -192,7 +191,7 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
global $serendipity;
// **TODO** Change this to pull out only entries for the current wiki
- echo '
'.IMPORTER_VOODOO_WRITEINTRALINKS.'
';
+ echo '
'.IMPORTER_VOODOO_WRITEINTRALINKS.'
';
$pages= &serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}staticpages ORDER BY pagetitle DESC");
@@ -210,7 +209,7 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import {
serendipity_db_update("staticpages", array("id" => $thispage["id"]), $thispage);
}
- echo DONE . ' ';
+ echo '' . DONE . '';
}
// Search and replace avoiding content of links
diff --git a/include/admin/importers/wordpress.inc.php b/include/admin/importers/wordpress.inc.php
index 3c0cba5c..25a06d9c 100644
--- a/include/admin/importers/wordpress.inc.php
+++ b/include/admin/importers/wordpress.inc.php
@@ -110,7 +110,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!$res) {
printf(COULDNT_SELECT_USER_INFO, mysql_error($wpdb));
} else {
- if ($debug) echo "Importing users... \n";
+ if ($debug) echo "Importing users...";
for ($x=0, $c = mysql_num_rows($res) ; $x < $c ; $x++) {
$users[$x] = mysql_fetch_assoc($res);
@@ -137,7 +137,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
// Set association.
$assoc['users'][$users[$x]['ID']] = $users[$x]['authorid'];
}
- if ($debug) echo "Imported users. \n";
+ if ($debug) echo "Imported users.";
// Clean memory
unset($users);
@@ -152,7 +152,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!$res) {
$no_cat = mysql_error($wpdb);
} else {
- if ($debug) echo "Importing categories (WP 2.2 style)... \n";
+ if ($debug) echo "Importing categories (WP 2.2 style)...";
// Get all the info we need
for ($x=0 ; $x\n";
- if ($debug) echo "Rebuilding category tree... \n";
+ if ($debug) echo "Imported categories.";
+ if ($debug) echo "Rebuilding category tree...";
serendipity_rebuildCategoryTree();
- if ($debug) echo "Rebuilt category tree. \n";
+ if ($debug) echo "Rebuilt category tree.";
}
/* Categories (WP >= 2.3 style) */
@@ -219,7 +219,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
$no_cat = mysql_error($wpdb);
} elseif ($res) {
$no_cat = false;
- if ($debug) echo "Importing categories (WP 2.3 style)... \n";
+ if ($debug) echo "Importing categories (WP 2.3 style)...";
// Get all the info we need
for ($x=0 ; $x\n";
- if ($debug) echo "Rebuilding category tree... \n";
+ if ($debug) echo "Imported categories.";
+ if ($debug) echo "Rebuilding category tree...";
serendipity_rebuildCategoryTree();
- if ($debug) echo "Rebuilt category tree. \n";
+ if ($debug) echo "Rebuilt category tree.";
}
if ($no_cat) {
printf(COULDNT_SELECT_CATEGORY_INFO, $no_cat);
@@ -282,7 +282,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!$res) {
printf(COULDNT_SELECT_ENTRY_INFO, mysql_error($wpdb));
} else {
- if ($debug) echo "Importing entries... \n";
+ if ($debug) echo "Importing entries...";
for ($x=0, $c = mysql_num_rows($res) ; $x < $c ; $x++ ) {
$entries[$x] = mysql_fetch_assoc($res);
@@ -300,13 +300,13 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!is_int($entries[$x]['entryid'] = serendipity_updertEntry($entry))) {
printf(COULDNT_SELECT_ENTRY_INFO, mysql_error($wpdb));
- echo "ID: {$entries[$x]['ID']} - {$entry['title']} \n";
+ echo "ID: {$entries[$x]['ID']} - {$entry['title']}";
return $entries[$x]['entryid'];
}
$assoc['entries'][$entries[$x]['ID']] = $entries[$x]['entryid'];
}
- if ($debug) echo "Imported entries... \n";
+ if ($debug) echo "Imported entries...";
// Clean memory
unset($entries);
@@ -318,13 +318,13 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
if (!$res) {
$no_entrycat = mysql_error($wpdb);
} else {
- if ($debug) echo "Importing category associations (WP 2.2 style)... \n";
+ if ($debug) echo "Importing category associations (WP 2.2 style)...";
while ($a = mysql_fetch_assoc($res)) {
$data = array('entryid' => $assoc['entries'][$a['post_id']],
'categoryid' => $assoc['categories'][$a['category_id']]);
serendipity_db_insert('entrycat', $this->strtrRecursive($data));
}
- if ($debug) echo "Imported category associations. \n";
+ if ($debug) echo "Imported category associations.";
}
/* Entry/category (WP > 2.3 style)*/
@@ -335,13 +335,13 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
$no_entrycat = mysql_error($wpdb);
} elseif ($res) {
$no_entrycat = false;
- if ($debug) echo "Importing category associations (WP 2.3 style)... \n";
+ if ($debug) echo "Importing category associations (WP 2.3 style)...";
while ($a = mysql_fetch_assoc($res)) {
$data = array('entryid' => $assoc['entries'][$a['post_id']],
'categoryid' => $assoc['categories'][$a['category_id']]);
serendipity_db_insert('entrycat', $this->strtrRecursive($data));
}
- if ($debug) echo "Imported category associations. \n";
+ if ($debug) echo "Imported category associations.";
}
if ($no_entrycat) {
@@ -354,7 +354,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
printf(COULDNT_SELECT_COMMENT_INFO, mysql_error($wpdb));
} else {
$serendipity['allowSubscriptions'] = false;
- if ($debug) echo "Importing comments... \n";
+ if ($debug) echo "Importing comments...";
while ($a = mysql_fetch_assoc($res)) {
$comment = array('entry_id ' => $assoc['entries'][$a['comment_post_ID']],
'parent_id' => 0,
@@ -373,7 +373,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import {
serendipity_approveComment($cid, $assoc['entries'][$a['comment_post_ID']], true);
}
}
- if ($debug) echo "Imported comments. \n";
+ if ($debug) echo "Imported comments.";
}
$serendipity['noautodiscovery'] = $noautodiscovery;
diff --git a/include/admin/plugins.inc.php b/include/admin/plugins.inc.php
index a640ccc0..d2e38031 100644
--- a/include/admin/plugins.inc.php
+++ b/include/admin/plugins.inc.php
@@ -372,8 +372,8 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
/* Load the new plugin */
$plugin = &serendipity_plugin_api::load_plugin($inst);
if (!is_object($plugin)) {
- echo "DEBUG: Plugin $inst not an object: " . print_r($plugin, true) . ". Input: " . print_r($serendipity['GET'], true) . ".
\n\nThis error can happen if a plugin was not properly downloaded (check your plugins directory if the requested plugin was downloaded) or the inclusion of a file failed (permissions?) \n";
- echo "Backtrace: \n" . implode(" \n", $serendipity['debug']['pluginload']) . " ";
+ echo "
DEBUG: Plugin $inst not an object: " . print_r($plugin, true) . ".
This error can happen if a plugin was not properly downloaded (check your plugins directory if the requested plugin was downloaded) or the inclusion of a file failed (permissions?)
";
}
$bag = new serendipity_property_bag;
$plugin->introspect($bag);
diff --git a/include/admin/upgrader.inc.php b/include/admin/upgrader.inc.php
index b96ccd8e..767d8080 100644
--- a/include/admin/upgrader.inc.php
+++ b/include/admin/upgrader.inc.php
@@ -94,7 +94,7 @@ $tasks = array(array('version' => '0.5.1',
'function' => 'serendipity_removeFiles',
'title' => 'Removal of obsolete files',
'arguments' => array($obsolete_files),
- 'desc' => 'The directory structure has been reworked. The following files will be moved to a folder called "backup". If you made manual changes to those files, be sure to read the file docs/CHANGED_FILES to re-implement your changes.
' . implode(', ', $obsolete_files) . '
'),
+ 'desc' => '
The directory structure has been reworked. The following files will be moved to a folder called "backup". If you made manual changes to those files, be sure to read the file docs/CHANGED_FILES to re-implement your changes.
' . implode(', ', $obsolete_files) . '
'),
array('version' => '0.8-alpha4',
'function' => 'serendipity_removeFiles',
@@ -142,9 +142,9 @@ $tasks = array(array('version' => '0.5.1',
'function' => 'serendipity_fixPlugins',
'arguments' => array('markup_column_names'),
'title' => 'Configuration options of markup plugins',
- 'desc' => 'Because of the latest multilingual improvements in Serendipity, the database key names for certain configuration directives only found in markup plugins need to be renamed. '
- . 'This will be automatically handled by Serendipity for all internally bundled and external plugins. If you are using the external plugins "GeShi" and "Markdown", please make sure you will upgrade to their latest versions! '
- . 'We also advise that you check the plugin configuration of all your markup plugins (like emoticate, nl2br, s9ymarkup, bbcode) and see if the settings you made are all properly migrated.'),
+ 'desc' => '
Because of the latest multilingual improvements in Serendipity, the database key names for certain configuration directives only found in markup plugins need to be renamed.
'
+ . '
This will be automatically handled by Serendipity for all internally bundled and external plugins. If you are using the external plugins "GeShi" and "Markdown", please make sure you will upgrade to their latest versions!
'
+ . '
We also advise that you check the plugin configuration of all your markup plugins (like emoticate, nl2br, s9ymarkup, bbcode) and see if the settings you made are all properly migrated.