]> git.mjollnir.org Git - s9y.git/commitdiff
Abstract link generation, b2evo BC fix
authorgarvinhicking <garvinhicking>
Thu, 13 Apr 2006 10:47:35 +0000 (10:47 +0000)
committergarvinhicking <garvinhicking>
Thu, 13 Apr 2006 10:47:35 +0000 (10:47 +0000)
include/admin/importers/b2evolution.inc.php
include/admin/overview.inc.php

index 26a8fb3c263c2d468236371597c9848d5fcb264a..a2571c6a1998db089324fb9e7a51ecb41313f393 100644 (file)
@@ -143,7 +143,7 @@ class Serendipity_Import_b2evolution extends Serendipity_Import {
             $entry = array('title'          => $this->decode($entries[$x]['post_title']),
                            'isdraft'        => ($entries[$x]['post_status'] == 'published') ? 'false' : 'true',
                            'allow_comments' => ($entries[$x]['post_comments'] == 'open' ) ? 'true' : 'false',
-                           'timestamp'      => strtotime($entries[$x]['post_issue_date']),
+                           'timestamp'      => strtotime((isset($entries[$x]['post_issue_date']) ? $entries[$x]['post_issue_date'] : $entries[$x]['post_date'])),
                            'body'           => $this->strtr($entries[$x]['post_content']));
 
             $entry['authorid'] = '';
index 6ba92c3ad2d40910426cab4544ead5c4a4f46a55..92d3e61f68f8643d4547d86533921c1c6d544b7d 100644 (file)
@@ -8,20 +8,36 @@ if (IN_serendipity !== true) {
 }
 
 $user = serendipity_fetchAuthor($serendipity['authorid']);
-?>
-
-<?php echo WELCOME_BACK ?> <?php echo $user[0]['realname'] ?>.
-
-<?php
-echo '<div class="further_links">' . "\n";
-echo '<p>' . FURTHER_LINKS . '</p>' . "\n";
-echo '<ul>' . "\n";
-echo '<li><a href="http://www.s9y.org/">' . FURTHER_LINKS_S9Y . '</a>' . "\n";
-echo '<li><a href="http://www.s9y.org/33.html">' . FURTHER_LINKS_S9Y_DOCS . '</a>' . "\n";
-echo '<li><a href="http://blog.s9y.org/">' . FURTHER_LINKS_S9Y_BLOG . '</a>' . "\n";
-echo '<li><a href="http://www.s9y.org/forums/">' . FURTHER_LINKS_S9Y_FORUMS . '</a>' . "\n";
-echo '<li><a href="http://php-blog.sf.net/">' . FURTHER_LINKS_S9Y_SPARTACUS . '</a>' . "\n";
-echo '</ul>' . "\n";
-echo '</div>' . "\n";
-
-serendipity_plugin_api::hook_event('backend_frontpage_display', $serendipity);
+
+$output = array(
+    'welcome'       => WELCOME_BACK . ' ' . $user[0]['realname'],
+    'show_links'    => true,
+    'links_title'   => FURTHER_LINKS,
+    'links'         => array(
+        '<a href="http://www.s9y.org/">' . FURTHER_LINKS_S9Y . '</a>',
+        '<a href="http://www.s9y.org/33.html">' . FURTHER_LINKS_S9Y_DOCS . '</a>',
+        '<a href="http://blog.s9y.org/">' . FURTHER_LINKS_S9Y_BLOG . '</a>',
+        '<a href="http://www.s9y.org/forums/">' . FURTHER_LINKS_S9Y_FORUMS . '</a>',
+        '<a href="http://php-blog.sf.net/">' . FURTHER_LINKS_S9Y_SPARTACUS . '</a>'
+    ),
+    'links_css'     => 'further_links',
+    'more'          => ''
+);
+
+serendipity_plugin_api::hook_event('backend_frontpage_display', $output);
+
+echo $output['welcome'];
+
+if ($output['show_links']) {
+    echo '<div class="' . $output['links_css'] . '">' . "\n";
+    echo '<p>' . $output['links_title'] . '</p>' . "\n";
+    echo '<ul>' . "\n";
+    foreach($output['links'] AS $link) {
+        echo '<li>' . $link . '</li>' . "\n";
+    }
+    echo '</ul>' . "\n";
+    echo '</div>' . "\n";
+}
+
+echo $output['more'];
+