X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/ce951ad9579fd96a7ba185f6d7cbd99bd37b9ec4..882347cba815e99ba8e7ad28d077420aa986e7c5:/edit/page/index.php diff --git a/edit/page/index.php b/edit/page/index.php index cd22216..1daed85 100644 --- a/edit/page/index.php +++ b/edit/page/index.php @@ -1,7 +1,7 @@ admin) abort("geen beheersrechten", '401 unauthorised'); if ($_FILES) { @@ -74,8 +74,8 @@ if (!file_put_contents($filename, $upload)) if (is_writable('../.git')) { $gitmsg = preg_replace('/\.html$/', '', $filename).": edit from {$_SERVER['REMOTE_ADDR']}"; $gitcmd = 'git'; - $gitcmd .= ' -c user.name='.escapeshellarg($User['name']); - $gitcmd .= ' -c user.email='.escapeshellarg("{$User['name']}@lijtweg.nl"); + $gitcmd .= ' -c user.name='.escapeshellarg($User->name ?: $User->login); + $gitcmd .= ' -c user.email='.escapeshellarg($User->email ?: "{$User->login}@lijtweg.nl"); $gitcmd .= ' commit -q'; $gitcmd .= ' -m '.escapeshellarg($gitmsg); $gitcmd .= ' -- '.escapeshellarg($filename);