Merge pull request #24435 from owncloud/fix-log-usage
Fix usages of OC\Log\Owncloud
This commit is contained in:
commit
ba99867033
|
@ -89,8 +89,8 @@ class LogSettingsController extends Controller {
|
||||||
*/
|
*/
|
||||||
public function getEntries($count=50, $offset=0) {
|
public function getEntries($count=50, $offset=0) {
|
||||||
return new JSONResponse([
|
return new JSONResponse([
|
||||||
'data' => \OC_Log_Owncloud::getEntries($count, $offset),
|
'data' => \OC\Log\Owncloud::getEntries($count, $offset),
|
||||||
'remain' => count(\OC_Log_Owncloud::getEntries(1, $offset + $count)) !== 0,
|
'remain' => count(\OC\Log\Owncloud::getEntries(1, $offset + $count)) !== 0,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,15 +44,16 @@ OC_Util::addScript('files', 'jquery.fileupload');
|
||||||
|
|
||||||
$showLog = (\OC::$server->getConfig()->getSystemValue('log_type', 'owncloud') === 'owncloud');
|
$showLog = (\OC::$server->getConfig()->getSystemValue('log_type', 'owncloud') === 'owncloud');
|
||||||
$numEntriesToLoad = 3;
|
$numEntriesToLoad = 3;
|
||||||
$entries = OC_Log_Owncloud::getEntries($numEntriesToLoad + 1);
|
$entries = \OC\Log\Owncloud::getEntries($numEntriesToLoad + 1);
|
||||||
$entriesRemaining = count($entries) > $numEntriesToLoad;
|
$entriesRemaining = count($entries) > $numEntriesToLoad;
|
||||||
$entries = array_slice($entries, 0, $numEntriesToLoad);
|
$entries = array_slice($entries, 0, $numEntriesToLoad);
|
||||||
$logFilePath = OC_Log_Owncloud::getLogFilePath();
|
$logFilePath = \OC\Log\Owncloud::getLogFilePath();
|
||||||
$doesLogFileExist = file_exists($logFilePath);
|
$doesLogFileExist = file_exists($logFilePath);
|
||||||
$logFileSize = 0;
|
$logFileSize = 0;
|
||||||
if($doesLogFileExist) {
|
if($doesLogFileExist) {
|
||||||
$logFileSize = filesize($logFilePath);
|
$logFileSize = filesize($logFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = \OC::$server->getConfig();
|
$config = \OC::$server->getConfig();
|
||||||
$appConfig = \OC::$server->getAppConfig();
|
$appConfig = \OC::$server->getAppConfig();
|
||||||
$request = \OC::$server->getRequest();
|
$request = \OC::$server->getRequest();
|
||||||
|
|
Loading…
Reference in New Issue