only show 'move to another admin' if current admin can see other admin-resources; append domainid to pagination of email-domain adresses list; check for invalid lockfile in cron management
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -215,9 +215,14 @@ final class MasterCron extends CliCommand
|
||||
|
||||
if (file_exists($this->lockFile)) {
|
||||
$jobinfo = json_decode(file_get_contents($this->lockFile), true);
|
||||
$check_pid_return = null;
|
||||
// get status of process
|
||||
system("kill -CHLD " . (int)$jobinfo['pid'] . " 1> /dev/null 2> /dev/null", $check_pid_return);
|
||||
if ($jobinfo === false || !is_array($jobinfo)) {
|
||||
// looks like an invalid lockfile
|
||||
$check_pid_return = 1;
|
||||
} else {
|
||||
$check_pid_return = null;
|
||||
// get status of process
|
||||
system("kill -CHLD " . (int)$jobinfo['pid'] . " 1> /dev/null 2> /dev/null", $check_pid_return);
|
||||
}
|
||||
if ($check_pid_return == 1) {
|
||||
// Process does not seem to run, most likely it has died
|
||||
$this->unlockJob();
|
||||
|
||||
@@ -316,7 +316,7 @@ final class Froxlor
|
||||
* @param array|null $arr
|
||||
* @return void
|
||||
*/
|
||||
private static function parseVersionArray(array &$arr = null)
|
||||
private static function parseVersionArray(?array &$arr)
|
||||
{
|
||||
// -dev or -beta or -rc ?
|
||||
if (stripos($arr[count($arr) - 1], '-') !== false) {
|
||||
|
||||
@@ -61,7 +61,7 @@ function lng(string $identifier, array $arguments = [])
|
||||
* @param string|null $session
|
||||
* @return mixed|string|null
|
||||
*/
|
||||
function old(string $identifier, string $default = null, string $session = null)
|
||||
function old(string $identifier, ?string $default, ?string $session = null)
|
||||
{
|
||||
if ($session && isset($_SESSION[$session])) {
|
||||
return $_SESSION[$session][$identifier] ?? $default;
|
||||
|
||||
Reference in New Issue
Block a user