convert html-related functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -25,7 +25,7 @@ class CronConfig
|
||||
if ($num_results > 0) {
|
||||
|
||||
// get all crons and their intervals
|
||||
if (isFreeBSD()) {
|
||||
if (\Froxlor\FileDir::isFreeBSD()) {
|
||||
// FreeBSD does not need a header as we are writing directly to the crontab
|
||||
$cronfile = "\n";
|
||||
} else {
|
||||
@@ -88,7 +88,7 @@ class CronConfig
|
||||
}
|
||||
}
|
||||
|
||||
if (isFreeBSD()) {
|
||||
if (\Froxlor\FileDir::isFreeBSD()) {
|
||||
// FreeBSD handles the cron-stuff in another way. We need to directly
|
||||
// write to the crontab file as there is not cron.d/froxlor file
|
||||
// (settings for system.cronconfig should be set correctly of course)
|
||||
|
||||
@@ -158,7 +158,7 @@ class TasksCron extends \Froxlor\Cron\FroxlorCron
|
||||
// check group members
|
||||
if (isset($groupinfo['members']) && ! in_array(Settings::Get('system.httpuser'), $groupinfo['members'])) {
|
||||
// webserver has no access, add it
|
||||
if (isFreeBSD()) {
|
||||
if (\Froxlor\FileDir::isFreeBSD()) {
|
||||
\Froxlor\FileDir::safe_exec('pw usermod ' . escapeshellarg(Settings::Get('system.httpuser')) . ' -G ' . escapeshellarg(Settings::Get('phpfpm.vhost_httpgroup')));
|
||||
} else {
|
||||
\Froxlor\FileDir::safe_exec('usermod -a -G ' . escapeshellarg(Settings::Get('phpfpm.vhost_httpgroup')) . ' ' . escapeshellarg(Settings::Get('system.httpuser')));
|
||||
|
||||
@@ -137,9 +137,9 @@ class DbManagerMySQL
|
||||
'dbname' => $dbname
|
||||
));
|
||||
|
||||
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
|
||||
$drop_stmt = Database::prepare("DROP USER IF EXISTS :dbname@:host");
|
||||
while ($host = $host_res_stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
|
||||
$drop_stmt = Database::prepare("DROP USER IF EXISTS :dbname@:host");
|
||||
Database::pexecute($drop_stmt, array(
|
||||
'dbname' => $dbname,
|
||||
'host' => $host['Host']
|
||||
|
||||
@@ -609,13 +609,13 @@ class FileDir
|
||||
'used' => $matches[2],
|
||||
'soft' => $matches[3],
|
||||
'hard' => $matches[4],
|
||||
'grace' => (isFreeBSD() ? '0' : $matches[5])
|
||||
'grace' => (self::isFreeBSD() ? '0' : $matches[5])
|
||||
),
|
||||
'file' => array(
|
||||
'used' => $matches[6],
|
||||
'soft' => $matches[7],
|
||||
'hard' => $matches[8],
|
||||
'grace' => (isFreeBSD() ? '0' : $matches[9])
|
||||
'grace' => (self::isFreeBSD() ? '0' : $matches[9])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ function getFormOverviewGroupOutput($groupname, $groupdetails)
|
||||
$activated = true;
|
||||
} else {
|
||||
$option .= $lng['admin']['activated'] . ': ';
|
||||
$option .= makeyesno($fieldname, '1', '0', Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']));
|
||||
$option .= \Froxlor\UI\HTML::makeyesno($fieldname, '1', '0', Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']));
|
||||
$activated = (int) Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ function processForm(&$form, &$input, $url_params = array())
|
||||
} else {
|
||||
$filename = '';
|
||||
}
|
||||
ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array(
|
||||
\Froxlor\UI\HTML::ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array(
|
||||
$question => $question
|
||||
)), $targetname);
|
||||
}
|
||||
@@ -182,7 +182,7 @@ function processFormEx(&$form, &$input, $url_params = array(), $part, $settings_
|
||||
} else {
|
||||
$filename = '';
|
||||
}
|
||||
ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array(
|
||||
\Froxlor\UI\HTML::ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array(
|
||||
$question => $question
|
||||
)), $targetname);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user