From 3accbbd2d2a12ecd7f77a1e97f033acd7e752d83 Mon Sep 17 00:00:00 2001 From: flyskyko Date: Wed, 24 Oct 2012 06:38:30 +0000 Subject: [PATCH] add state for not config. ftp git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11870 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/autoinstall/autoinstall.admin.model.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/autoinstall/autoinstall.admin.model.php b/modules/autoinstall/autoinstall.admin.model.php index 10e1a60ab..fc5375c69 100644 --- a/modules/autoinstall/autoinstall.admin.model.php +++ b/modules/autoinstall/autoinstall.admin.model.php @@ -161,7 +161,19 @@ */ function getAutoinstallAdminIsAuthed() { - $this->add('is_authed', (int)isset($_SESSION['ftp_password'])); + $is_authed = 0; + + $ftp_info = Context::getFTPInfo(); + if(!$ftp_info->ftp_root_path) + { + $is_authed = -1; + } + else + { + $is_authed = (int)isset($_SESSION['ftp_password']); + } + + $this->add('is_authed', $is_authed); } } ?>