From 8f3cc04114b83f9ea808a6c88f2924dd42524b11 Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Sun, 25 Apr 2010 10:21:15 +0000 Subject: [PATCH] =?UTF-8?q?=D0=B0=D0=B2=D1=82=D0=BE=D0=BC=D0=B0=D1=82?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=BE=D0=B5=20=D1=81=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5=20config.local.php=20+=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=20=D0=BB=D0=BE=D0=B3?= =?UTF-8?q?=D0=B8=D0=BD=D0=B0=20=D0=B8=20=D0=BC=D1=8B=D0=BB=D0=B0=20=D0=B0?= =?UTF-8?q?=D0=B4=D0=BC=D0=B8=D0=BD=D0=B0=20=D0=BF=D1=80=D0=B8=20=D0=B8?= =?UTF-8?q?=D0=BD=D1=81=D1=82=D0=B0=D0=BB=D1=8F=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install/index.php b/install/index.php index 18eed419..01d93183 100644 --- a/install/index.php +++ b/install/index.php @@ -972,6 +972,10 @@ class Install { } $sLocalConfigPath = $this->sConfigDir.'/config.local.php'; + if(!file_exists($sLocalConfigPath) or !is_writeable($sLocalConfigPath)) { + // пытаемся создать файл локального конфига + @copy($this->sConfigDir.'/config.local.php.dist',$sLocalConfigPath); + } if(!file_exists($sLocalConfigPath) or !is_writeable($sLocalConfigPath)) { $bOk = false; $this->Assign('validate_local_config', ''.$this->Lang('no').''); @@ -1428,12 +1432,12 @@ class Install { $bOk = true; $aErrors = array(); - if(!$sLogin=$this->GetRequest('install_admin_login',false) or strlen($sLogin)<3) { + if(!$sLogin=$this->GetRequest('install_admin_login',false) or !preg_match("/^[\da-z\_\-]{3,30}$/i",$sLogin)) { $bOk = false; $aErrors[] = $this->Lang('admin_login_invalid'); } - if(!$sMail=$this->GetRequest('install_admin_mail',false) or strlen($sMail)<5) { + if(!$sMail=$this->GetRequest('install_admin_mail',false) or !preg_match("/^[\da-z\_\-\.\+]+@[\da-z_\-\.]+\.[a-z]{2,5}$/i",$sMail)) { $bOk = false; $aErrors[] = $this->Lang('admin_mail_invalid'); }