instead of env-variable, show ditro editor which is defined in the xml

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2015-08-13 15:37:34 +02:00
parent 161e11a8dd
commit ab9b92112d
10 changed files with 21 additions and 9 deletions

View File

@@ -115,6 +115,8 @@ if ($userinfo['change_serversettings'] == '1') {
$configpage = '';
$distro_editor = $configfiles->distributionEditor;
$commands_pre = "";
$commands_file = "";
$commands_post = "";

View File

@@ -65,6 +65,12 @@ class ConfigParser {
*/
public $distributionVersion = '';
/**
* Recommended editor
* @var string
*/
public $distributionEditor = '/bin/nano';
/**
* Show if this configuration is deprecated
* @var bool
@@ -106,6 +112,7 @@ class ConfigParser {
case "name": $this->distributionName = (string)$value; break;
case "version": $this->distributionVersion = (string)$value; break;
case "codename": $this->distributionCodename = (string)$value; break;
case "defaulteditor": $this->distributionEditor = (string)$value; break;
case "deprecated": (string)$value == 'true' ? $this->deprecated = true : $this->deprecated = false; break;
}
}

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<froxlor>
<distribution name="Gentoo" version="2.2">
<distribution name="Gentoo" version="2.2" defaulteditor="/usr/bin/nano">
<services>
<!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<froxlor>
<distribution name="Debian" codename="Jessie" version="8.x">
<distribution name="Debian" codename="Jessie" version="8.x" defaulteditor="/usr/bin/nano">
<services>
<!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<froxlor>
<distribution name="Ubuntu" codename="Precise" version="12.04">
<distribution name="Ubuntu" codename="Precise" version="12.04" defaulteditor="/usr/bin/nano">
<services>
<!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<froxlor>
<distribution name="RHEL / CentOS" version="7">
<distribution name="RHEL / CentOS" version="7" defaulteditor="/usr/bin/nano">
<services>
<!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<froxlor>
<distribution name="Ubuntu" codename="Trusty" version="14.04">
<distribution name="Ubuntu" codename="Trusty" version="14.04" defaulteditor="/usr/bin/nano">
<services>
<!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<froxlor>
<distribution name="Debian" codename="Wheezy" version="7.x">
<distribution name="Debian" codename="Wheezy" version="7.x" defaulteditor="/usr/bin/nano">
<services>
<!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}">

View File

@@ -32,6 +32,8 @@
*/
function validatePasswordLogin($userinfo = null, $password = null, $table = 'panel_customers', $uid = 'customerid') {
global $version;
$systype = 3; // SHA256
if (Settings::Get('system.passwordcryptfunc') !== null) {
$systype = (int)Settings::Get('system.passwordcryptfunc');
@@ -62,8 +64,9 @@ function validatePasswordLogin($userinfo = null, $password = null, $table = 'pan
if ($pwd_hash == $pwd_check) {
// check for update of hash
if ($update_hash) {
// check for update of hash (only if our database is ready to handle the bigger string)
$is_ready = (version_compare2("0.9.33", $version) <= 0 ? true : false);
if ($update_hash && $is_ready) {
$upd_stmt = Database::prepare("
UPDATE " . $table . " SET `password` = :newpasswd WHERE `" . $uid . "` = :uid
");

View File

@@ -1,4 +1,4 @@
<div class="pushbot">
<textarea class="shell" rows="1" readonly>&dollar;EDITOR {$realname}</textarea>
<textarea class="shell" rows="1" readonly>{$distro_editor} {$realname}</textarea>
<textarea class="filecontent" rows="<if $numbrows <=20 >{$numbrows}<else>21</if>" readonly>{$file_content}</textarea>
</div>