summaryrefslogtreecommitdiffstats
path: root/settings/admin.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-01-09 00:33:22 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-01-09 00:33:22 +0100
commit6a5f12beca175a0b9a951fa844eacfd21a8df3de (patch)
tree8e1b1b00109daaa1c7dd1f24f3f585d94c7a5b52 /settings/admin.php
parent5311d92c5c9dc0de297e36e4009b1e99f386e6bd (diff)
parentf579f2bd948ca73a1af720e19517af9bdde11748 (diff)
downloadnextcloud-server-6a5f12beca175a0b9a951fa844eacfd21a8df3de.tar.gz
nextcloud-server-6a5f12beca175a0b9a951fa844eacfd21a8df3de.zip
Merge pull request #12988 from owncloud/logfile_download
Logfile download
Diffstat (limited to 'settings/admin.php')
-rw-r--r--settings/admin.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/settings/admin.php b/settings/admin.php
index e8b1fef7b7a..1e0ec57580c 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -10,8 +10,14 @@ OC_App::setActiveNavigationEntry("admin");
$template = new OC_Template('settings', 'admin', 'user');
-$entries = OC_Log_Owncloud::getEntries(3);
-$entriesRemaining = count(OC_Log_Owncloud::getEntries(4)) > 3;
+$showLog = (\OC::$server->getConfig()->getSystemValue('log_type', 'owncloud') === 'owncloud');
+$numEntriesToLoad = 3;
+$entries = OC_Log_Owncloud::getEntries($numEntriesToLoad + 1);
+$entriesRemaining = count($entries) > $numEntriesToLoad;
+$entries = array_slice($entries, 0, $numEntriesToLoad);
+$logFilePath = OC_Log_Owncloud::getLogFilePath();
+$doesLogFileExist = file_exists($logFilePath);
+$logFileSize = filesize($logFilePath);
$config = \OC::$server->getConfig();
$appConfig = \OC::$server->getAppConfig();
@@ -31,6 +37,9 @@ $template->assign('mail_smtpname', $config->getSystemValue("mail_smtpname", ''))
$template->assign('mail_smtppassword', $config->getSystemValue("mail_smtppassword", ''));
$template->assign('entries', $entries);
$template->assign('entriesremain', $entriesRemaining);
+$template->assign('logFileSize', $logFileSize);
+$template->assign('doesLogFileExist', $doesLogFileExist);
+$template->assign('showLog', $showLog);
$template->assign('readOnlyConfigEnabled', OC_Helper::isReadOnlyConfigEnabled());
$template->assign('isLocaleWorking', OC_Util::isSetLocaleWorking());
$template->assign('isPhpCharSetUtf8', OC_Util::isPhpCharSetUtf8());