summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/ajax
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-04-09 12:36:10 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-05-18 10:57:52 +0200
commit7a8072e958f6956c131ca12e5b7387bcadef1820 (patch)
tree37b3d34a30e1a09b41deb7d122746e374895c824 /apps/files_sharing/ajax
parent73a3086945b41afa39debd89481c021934dedb67 (diff)
downloadnextcloud-server-7a8072e958f6956c131ca12e5b7387bcadef1820.tar.gz
nextcloud-server-7a8072e958f6956c131ca12e5b7387bcadef1820.zip
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 7685cda9d71..bb8df82775d 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;
}
@@ -70,7 +70,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);
@@ -89,7 +89,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;
}
@@ -106,5 +106,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);
}