mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Remove safe_mode condition from admin and install modules
This commit is contained in:
parent
313e7048d5
commit
9aa4e244c2
27 changed files with 2 additions and 170 deletions
|
|
@ -10,8 +10,6 @@
|
|||
<action name="procDBConfig" type="controller" />
|
||||
<action name="procInstall" type="controller" ruleset="install" />
|
||||
<action name="procInstallLicenseAgreement" type="controller" />
|
||||
<action name="procInstallFTP" type="controller" />
|
||||
<action name="procInstallCheckFTP" type="controller" />
|
||||
<action name="procInstallAdminInstall" type="controller" />
|
||||
<action name="procInstallAdminUpdate" type="controller" />
|
||||
<action name="procInstallAdminUpdateIndexModule" type="controller" />
|
||||
|
|
|
|||
|
|
@ -106,10 +106,7 @@ class installAdminController extends install
|
|||
$ftp_info->ftp_root_path = $ftp_root_path.'/';
|
||||
}
|
||||
|
||||
if(ini_get('safe_mode'))
|
||||
{
|
||||
$ftp_info->ftp_password = Context::get('ftp_password');
|
||||
}
|
||||
$ftp_info->ftp_password = Context::get('ftp_password');
|
||||
|
||||
$buff = '<?php if(!defined("__XE__")) exit();'."\n\$ftp_info = new stdClass;\n";
|
||||
foreach($ftp_info as $key => $val)
|
||||
|
|
|
|||
|
|
@ -264,102 +264,6 @@ class installController extends install
|
|||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set FTP Information
|
||||
*/
|
||||
function procInstallFTP()
|
||||
{
|
||||
if(Context::isInstalled()) return new Object(-1, 'msg_already_installed');
|
||||
$ftp_info = Context::gets('ftp_host', 'ftp_user','ftp_password','ftp_port','ftp_root_path');
|
||||
$ftp_info->ftp_port = (int)$ftp_info->ftp_port;
|
||||
if(!$ftp_info->ftp_port) $ftp_info->ftp_port = 21;
|
||||
if(!$ftp_info->ftp_host) $ftp_info->ftp_host = '127.0.0.1';
|
||||
if(!$ftp_info->ftp_root_path) $ftp_info->ftp_root_path = '/';
|
||||
|
||||
$buff = array('<?php if(!defined("__XE__")) exit();');
|
||||
$buff[] = "\$ftp_info = new stdClass();";
|
||||
foreach($ftp_info as $key => $val)
|
||||
{
|
||||
$buff[] = sprintf("\$ftp_info->%s='%s';", $key, str_replace("'","\\'",$val));
|
||||
}
|
||||
|
||||
// If safe_mode
|
||||
if(ini_get('safe_mode'))
|
||||
{
|
||||
if(!$ftp_info->ftp_user || !$ftp_info->ftp_password) return new Object(-1,'msg_safe_mode_ftp_needed');
|
||||
|
||||
$oFtp = new ftp();
|
||||
if(!$oFtp->ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port)) return new Object(-1, sprintf(lang('msg_ftp_not_connected'), $ftp_info->ftp_host));
|
||||
|
||||
if(!$oFtp->ftp_login($ftp_info->ftp_user, $ftp_info->ftp_password))
|
||||
{
|
||||
$oFtp->ftp_quit();
|
||||
return new Object(-1,'msg_ftp_invalid_auth_info');
|
||||
}
|
||||
|
||||
if(!is_dir(_XE_PATH_.'files') && !$oFtp->ftp_mkdir($ftp_info->ftp_root_path.'files'))
|
||||
{
|
||||
$oFtp->ftp_quit();
|
||||
return new Object(-1,'msg_ftp_mkdir_fail');
|
||||
}
|
||||
|
||||
if(!$oFtp->ftp_site("CHMOD 777 ".$ftp_info->ftp_root_path.'files'))
|
||||
{
|
||||
$oFtp->ftp_quit();
|
||||
return new Object(-1,'msg_ftp_chmod_fail');
|
||||
}
|
||||
|
||||
if(!is_dir(_XE_PATH_.'files/config') && !$oFtp->ftp_mkdir($ftp_info->ftp_root_path.'files/config'))
|
||||
{
|
||||
$oFtp->ftp_quit();
|
||||
return new Object(-1,'msg_ftp_mkdir_fail');
|
||||
}
|
||||
|
||||
if(!$oFtp->ftp_site("CHMOD 777 ".$ftp_info->ftp_root_path.'files/config'))
|
||||
{
|
||||
$oFtp->ftp_quit();
|
||||
return new Object(-1,'msg_ftp_chmod_fail');
|
||||
}
|
||||
|
||||
$oFtp->ftp_quit();
|
||||
}
|
||||
|
||||
FileHandler::WriteFile(Context::getFTPConfigFile(), join(PHP_EOL, $buff));
|
||||
}
|
||||
|
||||
function procInstallCheckFtp()
|
||||
{
|
||||
$ftp_info = Context::gets('ftp_user','ftp_password','ftp_port','sftp');
|
||||
$ftp_info->ftp_port = (int)$ftp_info->ftp_port;
|
||||
if(!$ftp_info->ftp_port) $ftp_info->ftp_port = 21;
|
||||
if(!$ftp_info->sftp) $ftp_info->sftp = 'N';
|
||||
|
||||
if(!$ftp_info->ftp_user || !$ftp_info->ftp_password) return new Object(-1,'msg_safe_mode_ftp_needed');
|
||||
|
||||
if($ftp_info->sftp == 'Y')
|
||||
{
|
||||
$connection = ssh2_connect('localhost', $ftp_info->ftp_port);
|
||||
if(!ssh2_auth_password($connection, $ftp_info->ftp_user, $ftp_info->ftp_password))
|
||||
{
|
||||
return new Object(-1,'msg_ftp_invalid_auth_info');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$oFtp = new ftp();
|
||||
if(!$oFtp->ftp_connect('127.0.0.1', $ftp_info->ftp_port)) return new Object(-1, sprintf(lang('msg_ftp_not_connected'), 'localhost'));
|
||||
|
||||
if(!$oFtp->ftp_login($ftp_info->ftp_user, $ftp_info->ftp_password))
|
||||
{
|
||||
$oFtp->ftp_quit();
|
||||
return new Object(-1,'msg_ftp_invalid_auth_info');
|
||||
}
|
||||
$oFtp->ftp_quit();
|
||||
}
|
||||
|
||||
$this->setMessage('msg_ftp_connect_success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Result returned after checking the installation environment
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -102,18 +102,6 @@ class installView extends install
|
|||
Context::set('use_rewrite', $_SESSION['use_rewrite'] = 'Y');
|
||||
}
|
||||
|
||||
// FTP config is disabled in Rhymix.
|
||||
/*
|
||||
if(ini_get('safe_mode') && !Context::isFTPRegisted())
|
||||
{
|
||||
Context::set('progressMenu', '3');
|
||||
Context::set('server_ip_address', $_SERVER['SERVER_ADDR']);
|
||||
Context::set('server_ftp_user', get_current_user());
|
||||
$this->setTemplateFile('ftp');
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
$defaultDatabase = 'mysqli';
|
||||
$disableList = DB::getDisableList();
|
||||
if(is_array($disableList))
|
||||
|
|
@ -128,8 +116,6 @@ class installView extends install
|
|||
}
|
||||
}
|
||||
Context::set('defaultDatabase', $defaultDatabase);
|
||||
|
||||
Context::set('progressMenu', '4');
|
||||
Context::set('error_return_url', getNotEncodedUrl('', 'act', Context::get('act'), 'db_type', Context::get('db_type')));
|
||||
$this->setTemplateFile('db_config');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ $lang->ftp_host = 'FTP-Server hostname';
|
|||
$lang->ftp_port = 'FTP Port';
|
||||
$lang->about_ftp_password = 'Das Passwort des FTPs wird nicht gespeichert.';
|
||||
$lang->cmd_check_ftp_connect = 'Verbindung des FTPs checken';
|
||||
$lang->msg_safe_mode_ftp_needed = 'Zur Installation und Nutzung des Rhymixs muss die Angabe des FTPs festgestellt werden, wenn safe_mode in PHP \'An\' ist.';
|
||||
$lang->msg_safe_mode_ftp_config = 'Die Angabe wird unter <strong>files/config/ftp.config.php</strong> gespeichert. Nach der Installation ist es auch möglich, dass die Angabe von Administrator modifiziert oder gelöscht werden kann.';
|
||||
$lang->msg_ftp_not_connected = 'Ein Verbindungsfehler des FTPs an localhost ist aufgetreten. Bitte FTP_Port checken, oder ob FTP_Service möglich ist.';
|
||||
$lang->msg_ftp_invalid_auth_info = 'Anmeldungsfehler mit der Angabe des FTPs Bitte die Angabe des FTPs festlegen.';
|
||||
$lang->msg_ftp_mkdir_fail = 'Der Befehl von Herstellung des Verzeichnisses durch FTP ist gescheitert. FTP_Server festlegen.';
|
||||
|
|
|
|||
|
|
@ -103,9 +103,6 @@ $lang->ftp_host = 'FTP hostname';
|
|||
$lang->ftp_port = 'FTP server port';
|
||||
$lang->about_ftp_password = 'FTP password will not be stored.';
|
||||
$lang->cmd_check_ftp_connect = 'Check FTP Connection';
|
||||
$lang->msg_safe_mode_ftp_needed = 'When safe_mode setting of PHP is On, you should enter FTP account information to install Rhymix.';
|
||||
$lang->msg_safe_mode_ftp_needed2 = 'Easy installation or update of module is enabled.';
|
||||
$lang->msg_safe_mode_ftp_config = 'This information is stored in <strong>files/config/ftp.config.php</strong>. You can add, change or delete this on the Settings page after the installation.';
|
||||
$lang->msg_ftp_not_connected = 'Connection to the localhost via FTP failed. Please check the port number and whether the FTP service is available.';
|
||||
$lang->msg_ftp_invalid_auth_info = 'Authentication failed. Please check the username and password.';
|
||||
$lang->msg_ftp_mkdir_fail = 'Failed to create a directory using FTP. Please check the permission of FTP account.';
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ $lang->msg_install_failed = 'Ha ocurrido un error al crear el archivo de instala
|
|||
$lang->ftp_form_title = 'Datos de conexión para FTP';
|
||||
$lang->ftp = 'FTP';
|
||||
$lang->cmd_check_ftp_connect = 'conexión de FTP confirmada';
|
||||
$lang->msg_safe_mode_ftp_needed = 'Si la la variable safe_mode está activa[safe_mode=On], debe rellenar los datos de FTP para seguir instalando y usar con normalidad el Rhymix.';
|
||||
$lang->msg_ftp_not_connected = 'Ha ocurrico un error de conexión al FTP del localhost. Verifique el puerto del FTP y/o el funcionamiento del servicio FTP.';
|
||||
$lang->msg_ftp_invalid_auth_info = 'Los datos de login para el FTP no son correctos. Veriféquelos.';
|
||||
$lang->msg_ftp_mkdir_fail = 'Ha fallado el comando de FTP para la creación de directorio. Verifique la configuración del servicio FTP en el servidor';
|
||||
|
|
|
|||
|
|
@ -97,8 +97,6 @@ $lang->ftp_host = 'FTPサーバーアドレス';
|
|||
$lang->ftp_port = 'FTPサーバーポート';
|
||||
$lang->about_ftp_password = 'FTP情報は保存できません。';
|
||||
$lang->cmd_check_ftp_connect = 'FTP接続を確認する';
|
||||
$lang->msg_safe_mode_ftp_needed = 'PHPのsafe_modeがOnの場合、FTP情報を登録することで、Rhymixのインストール及び利用が可能になります。';
|
||||
$lang->msg_safe_mode_ftp_needed2 = 'モジュールのイージーインストール、または更新が可能になります。';
|
||||
$lang->msg_ftp_not_connected = 'localhostへのFTP接続エラーが発生しました。FTPポート(port)番号をはじめ、FTPサービスが可能であるかを確認してください。';
|
||||
$lang->msg_ftp_invalid_auth_info = 'ログインに失敗しました。FTPアクセス情報を再度確認してください。';
|
||||
$lang->msg_ftp_mkdir_fail = 'FTPでのディレクトリ生成に失敗しました。FTPサーバーの設定を再度確認してください。';
|
||||
|
|
|
|||
|
|
@ -103,9 +103,6 @@ $lang->ftp_host = 'FTP 서버 주소';
|
|||
$lang->ftp_port = 'FTP 서버 포트';
|
||||
$lang->about_ftp_password = '비밀번호는 FTP 경로 확인을 위한 FTP 접속 시 필요하며 사용 후 저장하지 않습니다.';
|
||||
$lang->cmd_check_ftp_connect = 'FTP 접속 확인';
|
||||
$lang->msg_safe_mode_ftp_needed = 'PHP의 <strong>safe_mode=On</strong>일 경우 Rhymix의 정상적인 동작을 돕습니다.';
|
||||
$lang->msg_safe_mode_ftp_needed2 = '모듈의 쉬운 설치 또는 업데이트가 가능해 집니다.';
|
||||
$lang->msg_safe_mode_ftp_config = '이 정보는 <strong>files/config/ftp.config.php</strong> 파일에 저장 됩니다. 설치 후 환경설정 페이지에서도 등록, 변경, 제거 할 수 있습니다.';
|
||||
$lang->msg_ftp_not_connected = 'localhost로의 FTP 접속 오류가 발생했습니다. FTP 포트 번호를 확인하거나 FTP 서비스가 가능한지 확인해주세요.';
|
||||
$lang->msg_ftp_invalid_auth_info = '입력한 FTP 정보로 로그인을 하지 못했습니다. FTP정보를 확인해주세요.';
|
||||
$lang->msg_ftp_mkdir_fail = 'FTP를 이용한 디렉토리 생성 명령에 실패했습니다. FTP 서버의 설정을 확인해주세요.';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
$lang->ftp_form_title = 'FTP мэдээлэл оруулах';
|
||||
$lang->ftp = 'FTP';
|
||||
$lang->cmd_check_ftp_connect = 'FTP холболт шалгах';
|
||||
$lang->msg_safe_mode_ftp_needed = 'PHP의 safe_mode가 Onбайх тохиолдолд , FTP мэдээллийг заавал оруулснаар Rhymix идэвжvvлэх болон хэрэглэх боломжтой болно.';
|
||||
$lang->msg_ftp_not_connected = 'localhost-ын FTP холболт амжилтгvй боллоо. FTP дугаараа шалгах буюу эсвэл FTP vйлчилгээг ашиглах боломжтой эсэхээ шалгана уу.';
|
||||
$lang->msg_ftp_invalid_auth_info = 'Таны оруулсан FTP мэдээллээр нэвтэрч чадсангvй. FTPмэдээллээ шалгана уу.';
|
||||
$lang->msg_ftp_mkdir_fail = 'FTP-г ашиглан eгсeн eгeгдлийг биелvvлж чадсангvй. FTP серверийн идэвхжvvлэлтээ шалгана уу.';
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ $lang->ftp_host = 'FTP sistem adı';
|
|||
$lang->ftp_port = 'FTP portu';
|
||||
$lang->about_ftp_password = 'FTP şifresi saklanmayacaktır.';
|
||||
$lang->cmd_check_ftp_connect = 'FTP Bağlantısını kontrol ediniz';
|
||||
$lang->msg_safe_mode_ftp_needed = 'Eğer PHP güvenli mod ayarları etkinse, Rhymix\'yi kurmak için FTP hesap bilgilerini girmelisiniz.';
|
||||
$lang->msg_ftp_not_connected = 'Yerel web alanına FTP bağlantısı sağlanamadı. Lütfen port numarasını ve FTP servisinin mevcut olup-olmadığını kontrol ediniz .';
|
||||
$lang->msg_ftp_invalid_auth_info = 'Kimlik doğrulama başarısız oldu. Lütfen kullanıcı adını ve şifreyi kontrol ediniz.';
|
||||
$lang->msg_ftp_mkdir_fail = 'Dizin oluşturma başarısız oldu. Lütfen FTP hesap iznini kontrol ediniz.';
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ $lang->ftp_host = 'Tên Host FTP';
|
|||
$lang->ftp_port = 'Cổng kết nối';
|
||||
$lang->about_ftp_password = 'Mật khẩu của FTP sẽ không lưu lại';
|
||||
$lang->cmd_check_ftp_connect = 'Kiểm tra kết nối bằng FTP';
|
||||
$lang->msg_safe_mode_ftp_needed = 'Nếu safe_mode của PHP mở, bạn có thể cài đặt các thành phần bổ xung cho Rhymix một cách tự động qua FTP.';
|
||||
$lang->msg_ftp_not_connected = 'Kết nối bằng FTP không thành công. Xin vui lòng kiểm tra lại thông tin tài khoản và cổng kết nối!';
|
||||
$lang->msg_ftp_invalid_auth_info = 'Xác nhận thất bại. Xin vui lòng kiểm tra lại tên sử dụng và mật khẩu.';
|
||||
$lang->msg_ftp_mkdir_fail = 'Lỗi khi tạo thư mục. Xin vui lòng kiểm tra lại quyền truy cập FTP.';
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ $lang->ftp_host = 'FTP服务器名';
|
|||
$lang->ftp_port = 'FTP端口';
|
||||
$lang->about_ftp_password = 'FTP密码不会被保存。';
|
||||
$lang->cmd_check_ftp_connect = '测试FTP连接';
|
||||
$lang->msg_safe_mode_ftp_needed = '当PHP的safe_mode=On时,请必须输入相关FTP信息,否则将无法正常安装或使用Rhymix程序。';
|
||||
$lang->msg_ftp_not_connected = '发生本地(localhost)FTP连接错误。请确认ftp端口号及支持ftp服务与否。';
|
||||
$lang->msg_ftp_invalid_auth_info = 'FTP登录失败。请确认输入的FTP信息。';
|
||||
$lang->msg_ftp_mkdir_fail = '新建文件夹失败。请确认 FTP服务器设置。';
|
||||
|
|
|
|||
|
|
@ -76,9 +76,6 @@ $lang->ftp_host = 'FTP 主機名稱';
|
|||
$lang->ftp_port = 'FTP 埠口';
|
||||
$lang->about_ftp_password = '不會儲存 FTP 密碼';
|
||||
$lang->cmd_check_ftp_connect = '檢查 FTP 連線';
|
||||
$lang->msg_safe_mode_ftp_needed = '當 PHP 的安全模式(safe_mode)開啟時,請輸入相關 FTP 資訊,否則無法正常安裝或使用程式。';
|
||||
$lang->msg_safe_mode_ftp_needed2 = '可用的安裝或更新。';
|
||||
$lang->msg_safe_mode_ftp_config = '此資料會儲存在 <strong>files/config/ftp.config.php</strong> 檔案中。 安裝後可在設定頁面中新增、更改或刪除此資訊。';
|
||||
$lang->msg_ftp_not_connected = '本地(localhost) FTP連線錯誤。請檢查 FTP 埠口並確認是否支援 FTP 功能。';
|
||||
$lang->msg_ftp_invalid_auth_info = 'FTP登入失敗。請確認輸入的 FTP 資訊。';
|
||||
$lang->msg_ftp_mkdir_fail = '新增資料夾失敗。請確認 FTP 主機設置。';
|
||||
|
|
|
|||
|
|
@ -42,11 +42,6 @@
|
|||
<ul id="ftplist"></ul>
|
||||
|
||||
<p class="install_help">{$lang->install_ftp_reason}</p>
|
||||
<ul>
|
||||
<li>{$lang->msg_safe_mode_ftp_needed}</li>
|
||||
<li>{$lang->msg_safe_mode_ftp_needed2}</li>
|
||||
</ul>
|
||||
<p class="install_help">{$lang->msg_safe_mode_ftp_config}</p>
|
||||
</div>
|
||||
<div id="buttons">
|
||||
<div class="align-left">
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
<ul>
|
||||
<li class="active"|cond="($act==''||$act=='dispInstallLicenseAgreement')">{$lang->install_progress_menu['license_agreement']}</li>
|
||||
<li class="active"|cond="$act=='dispInstallCheckEnv'">{$lang->install_progress_menu['condition']}</li>
|
||||
<li cond="ini_get('safe_mode')" class="active"|cond="false && $act=='dispInstallSelectDB' && $progressMenu == '3'">{$lang->install_progress_menu['ftp']}</li>
|
||||
<li class="active"|cond="$act=='dispInstallDBConfig' && $progressMenu == '4'">{$lang->install_progress_menu['dbInfo']}</li>
|
||||
<li class="active"|cond="$act=='dispInstallDBConfig'">{$lang->install_progress_menu['dbInfo']}</li>
|
||||
<li class="active"|cond="$act=='dispInstallAdminConfig'">{$lang->install_progress_menu['adminInfo']}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue