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:
@@ -115,6 +115,8 @@ if ($userinfo['change_serversettings'] == '1') {
|
|||||||
|
|
||||||
$configpage = '';
|
$configpage = '';
|
||||||
|
|
||||||
|
$distro_editor = $configfiles->distributionEditor;
|
||||||
|
|
||||||
$commands_pre = "";
|
$commands_pre = "";
|
||||||
$commands_file = "";
|
$commands_file = "";
|
||||||
$commands_post = "";
|
$commands_post = "";
|
||||||
|
|||||||
@@ -65,6 +65,12 @@ class ConfigParser {
|
|||||||
*/
|
*/
|
||||||
public $distributionVersion = '';
|
public $distributionVersion = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recommended editor
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $distributionEditor = '/bin/nano';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show if this configuration is deprecated
|
* Show if this configuration is deprecated
|
||||||
* @var bool
|
* @var bool
|
||||||
@@ -106,6 +112,7 @@ class ConfigParser {
|
|||||||
case "name": $this->distributionName = (string)$value; break;
|
case "name": $this->distributionName = (string)$value; break;
|
||||||
case "version": $this->distributionVersion = (string)$value; break;
|
case "version": $this->distributionVersion = (string)$value; break;
|
||||||
case "codename": $this->distributionCodename = (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;
|
case "deprecated": (string)$value == 'true' ? $this->deprecated = true : $this->deprecated = false; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<froxlor>
|
<froxlor>
|
||||||
<distribution name="Gentoo" version="2.2">
|
<distribution name="Gentoo" version="2.2" defaulteditor="/usr/bin/nano">
|
||||||
<services>
|
<services>
|
||||||
<!-- HTTP -->
|
<!-- HTTP -->
|
||||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<froxlor>
|
<froxlor>
|
||||||
<distribution name="Debian" codename="Jessie" version="8.x">
|
<distribution name="Debian" codename="Jessie" version="8.x" defaulteditor="/usr/bin/nano">
|
||||||
<services>
|
<services>
|
||||||
<!-- HTTP -->
|
<!-- HTTP -->
|
||||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<froxlor>
|
<froxlor>
|
||||||
<distribution name="Ubuntu" codename="Precise" version="12.04">
|
<distribution name="Ubuntu" codename="Precise" version="12.04" defaulteditor="/usr/bin/nano">
|
||||||
<services>
|
<services>
|
||||||
<!-- HTTP -->
|
<!-- HTTP -->
|
||||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<froxlor>
|
<froxlor>
|
||||||
<distribution name="RHEL / CentOS" version="7">
|
<distribution name="RHEL / CentOS" version="7" defaulteditor="/usr/bin/nano">
|
||||||
<services>
|
<services>
|
||||||
<!-- HTTP -->
|
<!-- HTTP -->
|
||||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<froxlor>
|
<froxlor>
|
||||||
<distribution name="Ubuntu" codename="Trusty" version="14.04">
|
<distribution name="Ubuntu" codename="Trusty" version="14.04" defaulteditor="/usr/bin/nano">
|
||||||
<services>
|
<services>
|
||||||
<!-- HTTP -->
|
<!-- HTTP -->
|
||||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<froxlor>
|
<froxlor>
|
||||||
<distribution name="Debian" codename="Wheezy" version="7.x">
|
<distribution name="Debian" codename="Wheezy" version="7.x" defaulteditor="/usr/bin/nano">
|
||||||
<services>
|
<services>
|
||||||
<!-- HTTP -->
|
<!-- HTTP -->
|
||||||
<service type="http" title="{{lng.admin.configfiles.http}}">
|
<service type="http" title="{{lng.admin.configfiles.http}}">
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
*/
|
*/
|
||||||
function validatePasswordLogin($userinfo = null, $password = null, $table = 'panel_customers', $uid = 'customerid') {
|
function validatePasswordLogin($userinfo = null, $password = null, $table = 'panel_customers', $uid = 'customerid') {
|
||||||
|
|
||||||
|
global $version;
|
||||||
|
|
||||||
$systype = 3; // SHA256
|
$systype = 3; // SHA256
|
||||||
if (Settings::Get('system.passwordcryptfunc') !== null) {
|
if (Settings::Get('system.passwordcryptfunc') !== null) {
|
||||||
$systype = (int)Settings::Get('system.passwordcryptfunc');
|
$systype = (int)Settings::Get('system.passwordcryptfunc');
|
||||||
@@ -62,8 +64,9 @@ function validatePasswordLogin($userinfo = null, $password = null, $table = 'pan
|
|||||||
|
|
||||||
if ($pwd_hash == $pwd_check) {
|
if ($pwd_hash == $pwd_check) {
|
||||||
|
|
||||||
// check for update of hash
|
// check for update of hash (only if our database is ready to handle the bigger string)
|
||||||
if ($update_hash) {
|
$is_ready = (version_compare2("0.9.33", $version) <= 0 ? true : false);
|
||||||
|
if ($update_hash && $is_ready) {
|
||||||
$upd_stmt = Database::prepare("
|
$upd_stmt = Database::prepare("
|
||||||
UPDATE " . $table . " SET `password` = :newpasswd WHERE `" . $uid . "` = :uid
|
UPDATE " . $table . " SET `password` = :newpasswd WHERE `" . $uid . "` = :uid
|
||||||
");
|
");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="pushbot">
|
<div class="pushbot">
|
||||||
<textarea class="shell" rows="1" readonly>$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>
|
<textarea class="filecontent" rows="<if $numbrows <=20 >{$numbrows}<else>21</if>" readonly>{$file_content}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user