more and more checkstyle fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -242,50 +242,50 @@ class Cronjob
|
||||
// rebuilding webserver-configuration
|
||||
if ($row['type'] == '1') {
|
||||
$task_desc = $lng['tasks']['rebuild_webserverconfig'];
|
||||
} // adding new user/
|
||||
elseif ($row['type'] == '2') {
|
||||
} elseif ($row['type'] == '2') {
|
||||
// adding new user/
|
||||
$loginname = '';
|
||||
if (is_array($row['data'])) {
|
||||
$loginname = $row['data']['loginname'];
|
||||
}
|
||||
$task_desc = $lng['tasks']['adding_customer'];
|
||||
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
|
||||
} // rebuilding bind-configuration
|
||||
elseif ($row['type'] == '4') {
|
||||
} elseif ($row['type'] == '4') {
|
||||
// rebuilding bind-configuration
|
||||
$task_desc = $lng['tasks']['rebuild_bindconfig'];
|
||||
} // creating ftp-user directory
|
||||
elseif ($row['type'] == '5') {
|
||||
} elseif ($row['type'] == '5') {
|
||||
// creating ftp-user directory
|
||||
$task_desc = $lng['tasks']['creating_ftpdir'];
|
||||
} // deleting user-files
|
||||
elseif ($row['type'] == '6') {
|
||||
} elseif ($row['type'] == '6') {
|
||||
// deleting user-files
|
||||
$loginname = '';
|
||||
if (is_array($row['data'])) {
|
||||
$loginname = $row['data']['loginname'];
|
||||
}
|
||||
$task_desc = $lng['tasks']['deleting_customerfiles'];
|
||||
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
|
||||
} // deleting email-account
|
||||
elseif ($row['type'] == '7') {
|
||||
} elseif ($row['type'] == '7') {
|
||||
// deleting email-account
|
||||
$task_desc = $lng['tasks']['remove_emailacc_files'];
|
||||
} // deleting ftp-account
|
||||
elseif ($row['type'] == '8') {
|
||||
} elseif ($row['type'] == '8') {
|
||||
// deleting ftp-account
|
||||
$task_desc = $lng['tasks']['remove_ftpacc_files'];
|
||||
} // Set FS - quota
|
||||
elseif ($row['type'] == '10') {
|
||||
} elseif ($row['type'] == '10') {
|
||||
// Set FS - quota
|
||||
$task_desc = $lng['tasks']['diskspace_set_quota'];
|
||||
} // deleting user-files
|
||||
elseif ($row['type'] == '20') {
|
||||
} elseif ($row['type'] == '20') {
|
||||
// deleting user-files
|
||||
$loginname = '';
|
||||
if (is_array($row['data'])) {
|
||||
$loginname = $row['data']['loginname'];
|
||||
}
|
||||
$task_desc = $lng['tasks']['backup_customerfiles'];
|
||||
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
|
||||
} // re-generating of cron.d-file
|
||||
elseif ($row['type'] == '99') {
|
||||
} elseif ($row['type'] == '99') {
|
||||
// re-generating of cron.d-file
|
||||
$task_desc = $lng['tasks']['regenerating_crond'];
|
||||
} // unknown
|
||||
else {
|
||||
} else {
|
||||
// unknown
|
||||
$task_desc = "ERROR: Unknown task type '" . $row['type'] . "'";
|
||||
}
|
||||
|
||||
|
||||
@@ -20,24 +20,24 @@ class Crypt
|
||||
$special = Settings::Get('panel.password_special_char');
|
||||
$length = Settings::Get('panel.password_min_length') > 3 ? Settings::Get('panel.password_min_length') : 10;
|
||||
|
||||
$pw = self::special_shuffle($alpha_lower);
|
||||
$pw = self::specialShuffle($alpha_lower);
|
||||
$n = floor(($length) / 4);
|
||||
|
||||
if (Settings::Get('panel.password_alpha_upper')) {
|
||||
$pw .= mb_substr(self::special_shuffle($alpha_upper), 0, $n);
|
||||
$pw .= mb_substr(self::specialShuffle($alpha_upper), 0, $n);
|
||||
}
|
||||
|
||||
if (Settings::Get('panel.password_numeric')) {
|
||||
$pw .= mb_substr(self::special_shuffle($numeric), 0, $n);
|
||||
$pw .= mb_substr(self::specialShuffle($numeric), 0, $n);
|
||||
}
|
||||
|
||||
if (Settings::Get('panel.password_special_char_required') && ! $isSalt) {
|
||||
$pw .= mb_substr(self::special_shuffle($special), 0, $n);
|
||||
$pw .= mb_substr(self::specialShuffle($special), 0, $n);
|
||||
}
|
||||
|
||||
$pw = mb_substr($pw, - $length);
|
||||
|
||||
return self::special_shuffle($pw);
|
||||
return self::specialShuffle($pw);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,7 +47,7 @@ class Crypt
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private static function special_shuffle($str = null)
|
||||
private static function specialShuffle($str = null)
|
||||
{
|
||||
$len = mb_strlen($str);
|
||||
$sploded = array();
|
||||
|
||||
21
lib/Froxlor/System/IgnorantRecursiveDirectoryIterator.php
Normal file
21
lib/Froxlor/System/IgnorantRecursiveDirectoryIterator.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Froxlor\System;
|
||||
|
||||
/**
|
||||
* If you use RecursiveDirectoryIterator with RecursiveIteratorIterator and run
|
||||
* into UnexpectedValueException you may use this little hack to ignore those
|
||||
* directories, such as lost+found on linux.
|
||||
* (User "antennen" @ http://php.net/manual/en/class.recursivedirectoryiterator.php#101654)
|
||||
*/
|
||||
class IgnorantRecursiveDirectoryIterator extends \RecursiveDirectoryIterator
|
||||
{
|
||||
|
||||
public function getChildren()
|
||||
{
|
||||
try {
|
||||
return new IgnorantRecursiveDirectoryIterator($this->getPathname());
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
return new \RecursiveArrayIterator(array());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,4 +40,4 @@ class Mailer extends \PHPMailer\PHPMailer\PHPMailer
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user