OSDN Git Service

FIX: AdminActions::parse_categories()により不要な問い合わせが行われていたのを修正
[nucleus-jp/nucleus-next.git] / nucleus / index.php
index 8c40df6..cad6257 100644 (file)
@@ -44,7 +44,6 @@ if ( $CONF['alertOnSecurityRisk'] == 1 )
        }
        if ( sizeof($aFound) > 0 )
        {
-               sendContentType('text/html', 'startUpError');
                startUpError(
                        _ERRORS_STARTUPERROR1. implode($aFound, '</li><li>')._ERRORS_STARTUPERROR2,
                        _ERRORS_STARTUPERROR3
@@ -79,12 +78,24 @@ if ( $bNeedsLogin )
        $action = 'showlogin';
 }
 
-/* FIXME: Skin class also output this HTTP1.1 headers
-sendContentType('text/html', 'admin-' . $action);
-*/
-
 if ( !Admin::initialize() )
 {
+       /* TODO: this is a bad way... */
+       sendContentType('text/html', 'admin-' . $action);
+       
+       $skin =& $manager->getSkin(0, 'AdminActions', 'AdminSkin');
+       if ( $bNeedsLogin )
+       {
+               $skin->parse('fileparse', $DIR_SKINS . 'admin/showlogin.skn');
+       }
+       else if ($action == 'adminskinieimport' )
+       {
+               Admin::action($action);
+       }
+       else
+       {
+               $skin->parse('importAdmin', $DIR_SKINS . 'admin/defaultimporter.skn');
+       }
        /* TODO: something to handling errors */
        exit;
 }