From 9944effb932ce9e8b6b607e49e178b1cc36f5ed6 Mon Sep 17 00:00:00 2001 From: onli Date: Tue, 4 Jun 2013 18:15:25 +0200 Subject: [PATCH] Further smartify installer by placing the code of serendipity_admin.php into installer.inc.tpl. Also removes php-fallback. --- include/admin/installer.inc.php | 8 +- serendipity_admin.php | 235 +------------------------ templates/2k11/admin/installer.inc.tpl | 69 ++++++++ 3 files changed, 75 insertions(+), 237 deletions(-) diff --git a/include/admin/installer.inc.php b/include/admin/installer.inc.php index f0f46761..8ff1f998 100644 --- a/include/admin/installer.inc.php +++ b/include/admin/installer.inc.php @@ -27,6 +27,8 @@ if (defined('S9Y_DATA_PATH')) { } $data['basedir'] = $basedir; +$data['phpversion'] = phpversion(); +$data['versionInstalled'] = $serendipity['versionInstalled']; /** * Checks a return code constant if it's successfull or an error and return HTML code @@ -384,6 +386,8 @@ if (!is_object($serendipity['smarty'])) { serendipity_smarty_init(); } + + $serendipity['smarty']->assign($data); $tfile = serendipity_getTemplateFile("admin/installer.inc.tpl"); @@ -392,10 +396,6 @@ include $tfile; $content = ob_get_contents(); ob_end_clean(); - -#$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up -#echo $content; - // eval a string template and do not store compiled code echo $serendipity['smarty']->display('eval:'.$content); diff --git a/serendipity_admin.php b/serendipity_admin.php index f9e62846..55f9a34e 100644 --- a/serendipity_admin.php +++ b/serendipity_admin.php @@ -298,239 +298,8 @@ if (!$use_installer && !$_SESSION['no_smarty'] && serendipity_smarty_init()) { $serendipity['smarty']->assignByRef('admin_vars', $admin_vars); $serendipity['smarty']->display(serendipity_getTemplateFile('admin/index.tpl', 'serendipityPath')); -} else { -?> - - - <?php echo SERENDIPITY_ADMIN_SUITE; ?> - - - +} - - - - - - - - - - - - - - - - - - - -
- -

-

- -

- -
- - - -
- - - -

-

- - -
- -
- - - - - - - - - - - - - - - - - -
-
- -

- -
-
    - - - - - - -
- -
    - - - - - - - - - - - - - - - -
- - - -
    - - - - - - - - - - - - - - - -
- - -
    - - - - - - - - - -
- - -
    - - - - - - - - - - - - - - - - - - - -
- -
    - - - - -
- -
- -
- -
- -
- - - -
- - - - + + {$CONST.SERENDIPITY_ADMIN_SUITE} + + + + + + + + + + + + + + + + +
+

{$CONST.SERENDIPITY_INSTALLATION}

+
+
+ {if $is_errors && is_array($errors)} {foreach $errors AS $error} {$error} @@ -259,3 +314,17 @@ {$CONST.ERROR_DETECTED_IN_INSTALL} {/if} {/if} + + +
+
+ +
+ + {$ADMIN_FOOTER_POWERED_BY|sprintf:$versionInstalled:$phpversion} + +
+ +