소스 검색

fix username log issue
alter notice body text for WAL warning

CauseFX 4 년 전
부모
커밋
d6200a69d6
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      api/classes/organizr.class.php

+ 2 - 2
api/classes/organizr.class.php

@@ -2030,7 +2030,7 @@ class Organizr
 				),
 			),
 			'Database' => [
-				$this->settingsOption('notice', '', ['notice' => 'danger', 'title' => 'Warning', 'body' => 'This feature is experimental - You may face unexpected logouts']),
+				$this->settingsOption('notice', '', ['notice' => 'danger', 'title' => 'Warning', 'body' => 'This feature is experimental - You may face unexpected database is locked errors in logs']),
 				$this->settingsOption('html', '', ['label' => 'Journal Mode Status', 'html' => '<script>getJournalMode();</script><h4 class="journal-mode font-bold text-uppercase"><i class="fa fa-spin fa-circle-o-notch"></i></h4>']),
 				$this->settingsOption('blank'),
 				$this->settingsOption('button', '', ['label' => 'Set DELETE Mode (Default)', 'icon' => 'icon-notebook', 'text' => 'Set', 'attr' => 'onclick="setJournalMode(\'DELETE\')"']),
@@ -4248,7 +4248,7 @@ class Organizr
 	{
 		$this->timeExecution = $this->timeExecution($this->timeExecution);
 		$message = $message . ' [Execution Time: ' . $this->formatSeconds($this->timeExecution) . ']';
-		$username = ($username) ? htmlspecialchars($username, ENT_QUOTES) : $this->user['username'];
+		$username = ($username) ? htmlspecialchars($username, ENT_QUOTES) : $this->user['username'] ?? 'SYSTEM';
 		if ($this->checkLog($this->organizrLog)) {
 			$getLog = str_replace("\r\ndate", "date", file_get_contents($this->organizrLog));
 			$gotLog = json_decode($getLog, true);