summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/ajax
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-07-01 08:53:16 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-07-01 08:53:16 +0200
commit044d2ece07025b9a9cd5fa3c0514c65369ac9e4e (patch)
treea97fb08e37b0b3dbf31b8e0a3a7e6a2b5a7812f8 /apps/files_sharing/ajax
parentf25b71f70e878886a6f71faa43cd46c836ef13f7 (diff)
parent7a8072e958f6956c131ca12e5b7387bcadef1820 (diff)
downloadnextcloud-server-044d2ece07025b9a9cd5fa3c0514c65369ac9e4e.tar.gz
nextcloud-server-044d2ece07025b9a9cd5fa3c0514c65369ac9e4e.zip
Merge pull request #15506 from rullzer/core_apps_oc_log2ocp_util
Move core apps from OC_Log::write to OCP\Util
Diffstat (limited to 'apps/files_sharing/ajax')
-rw-r--r--apps/files_sharing/ajax/list.php2
-rw-r--r--apps/files_sharing/ajax/publicpreview.php12
2 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/ajax/list.php b/apps/files_sharing/ajax/list.php
index 354041fed9d..d09b61fd4ae 100644
--- a/apps/files_sharing/ajax/list.php
+++ b/apps/files_sharing/ajax/list.php
@@ -27,7 +27,7 @@ OCP\JSON::checkAppEnabled('files_sharing');
if(!isset($_GET['t'])){
\OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
- \OC_Log::write('core-preview', 'No token parameter was passed', \OC_Log::DEBUG);
+ \OCP\Util::writeLog('core-preview', 'No token parameter was passed', \OCP\Util::DEBUG);
exit;
}
diff --git a/apps/files_sharing/ajax/publicpreview.php b/apps/files_sharing/ajax/publicpreview.php
index 0734c8c1159..99a5bdaa859 100644
--- a/apps/files_sharing/ajax/publicpreview.php
+++ b/apps/files_sharing/ajax/publicpreview.php
@@ -36,20 +36,20 @@ $keepAspect = array_key_exists('a', $_GET) ? true : false;
if($token === ''){
\OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
- \OC_Log::write('core-preview', 'No token parameter was passed', \OC_Log::DEBUG);
+ \OCP\Util::writeLog('core-preview', 'No token parameter was passed', \OCP\Util::DEBUG);
exit;
}
$linkedItem = \OCP\Share::getShareByToken($token);
if($linkedItem === false || ($linkedItem['item_type'] !== 'file' && $linkedItem['item_type'] !== 'folder')) {
\OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND);
- \OC_Log::write('core-preview', 'Passed token parameter is not valid', \OC_Log::DEBUG);
+ \OCP\Util::writeLog('core-preview', 'Passed token parameter is not valid', \OCP\Util::DEBUG);
exit;
}
if(!isset($linkedItem['uid_owner']) || !isset($linkedItem['file_source'])) {
\OC_Response::setStatus(\OC_Response::STATUS_INTERNAL_SERVER_ERROR);
- \OC_Log::write('core-preview', 'Passed token seems to be valid, but it does not contain all necessary information . ("' . $token . '")', \OC_Log::WARN);
+ \OCP\Util::writeLog('core-preview', 'Passed token seems to be valid, but it does not contain all necessary information . ("' . $token . '")', \OCP\Util::WARN);
exit;
}
@@ -77,7 +77,7 @@ if($linkedItem['item_type'] === 'folder') {
$isValid = \OC\Files\Filesystem::isValidPath($file);
if(!$isValid) {
\OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
- \OC_Log::write('core-preview', 'Passed filename is not valid, might be malicious (file:"' . $file . '";ip:"' . \OC::$server->getRequest()->getRemoteAddress() . '")', \OC_Log::WARN);
+ \OCP\Util::writeLog('core-preview', 'Passed filename is not valid, might be malicious (file:"' . $file . '";ip:"' . \OC::$server->getRequest()->getRemoteAddress() . '")', \OCP\Util::WARN);
exit;
}
$sharedFile = \OC\Files\Filesystem::normalizePath($file);
@@ -96,7 +96,7 @@ if(substr($path, 0, 1) === '/') {
if($maxX === 0 || $maxY === 0) {
\OC_Response::setStatus(\OC_Response::STATUS_BAD_REQUEST);
- \OC_Log::write('core-preview', 'x and/or y set to 0', \OC_Log::DEBUG);
+ \OCP\Util::writeLog('core-preview', 'x and/or y set to 0', \OCP\Util::DEBUG);
exit;
}
@@ -113,5 +113,5 @@ try{
$preview->showPreview();
} catch (\Exception $e) {
\OC_Response::setStatus(\OC_Response::STATUS_INTERNAL_SERVER_ERROR);
- \OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG);
+ \OCP\Util::writeLog('core', $e->getmessage(), \OCP\Util::DEBUG);
}