diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-07-01 08:53:16 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-07-01 08:53:16 +0200 |
commit | 044d2ece07025b9a9cd5fa3c0514c65369ac9e4e (patch) | |
tree | a97fb08e37b0b3dbf31b8e0a3a7e6a2b5a7812f8 /apps/files_trashbin/lib | |
parent | f25b71f70e878886a6f71faa43cd46c836ef13f7 (diff) | |
parent | 7a8072e958f6956c131ca12e5b7387bcadef1820 (diff) | |
download | nextcloud-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_trashbin/lib')
-rw-r--r-- | apps/files_trashbin/lib/trashbin.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index 668a3c51537..2d4ea7adc13 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -160,7 +160,7 @@ class Trashbin { $query = \OC_DB::prepare("INSERT INTO `*PREFIX*files_trash` (`id`,`timestamp`,`location`,`user`) VALUES (?,?,?,?)"); $result = $query->execute(array($ownerFilename, $timestamp, $ownerLocation, $owner)); if (!$result) { - \OC_Log::write('files_trashbin', 'trash bin database couldn\'t be updated for the files owner', \OC_log::ERROR); + \OCP\Util::writeLog('files_trashbin', 'trash bin database couldn\'t be updated for the files owner', \OC_log::ERROR); } } } @@ -216,7 +216,7 @@ class Trashbin { if ($trashStorage->file_exists($trashInternalPath)) { $trashStorage->unlink($trashInternalPath); } - \OC_Log::write('files_trashbin', 'Couldn\'t move ' . $file_path . ' to the trash bin', \OC_log::ERROR); + \OCP\Util::writeLog('files_trashbin', 'Couldn\'t move ' . $file_path . ' to the trash bin', \OC_log::ERROR); } if ($sourceStorage->file_exists($sourceInternalPath)) { // failed to delete the original file, abort @@ -231,7 +231,7 @@ class Trashbin { $query = \OC_DB::prepare("INSERT INTO `*PREFIX*files_trash` (`id`,`timestamp`,`location`,`user`) VALUES (?,?,?,?)"); $result = $query->execute(array($filename, $timestamp, $location, $user)); if (!$result) { - \OC_Log::write('files_trashbin', 'trash bin database couldn\'t be updated', \OC_log::ERROR); + \OCP\Util::writeLog('files_trashbin', 'trash bin database couldn\'t be updated', \OC_log::ERROR); } \OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_moveToTrash', array('filePath' => \OC\Files\Filesystem::normalizePath($file_path), 'trashPath' => \OC\Files\Filesystem::normalizePath($filename . '.d' . $timestamp))); @@ -358,7 +358,7 @@ class Trashbin { if ($timestamp) { $location = self::getLocation($user, $filename, $timestamp); if ($location === false) { - \OC_Log::write('files_trashbin', 'trash bin database inconsistent!', \OC_Log::ERROR); + \OCP\Util::writeLog('files_trashbin', 'trash bin database inconsistent!', \OCP\Util::ERROR); } else { // if location no longer exists, restore file in the root directory if ($location !== '/' && @@ -675,7 +675,7 @@ class Trashbin { foreach ($files as $file) { if ($availableSpace < 0) { $tmp = self::delete($file['name'], $user, $file['mtime']); - \OC_Log::write('files_trashbin', 'remove "' . $file['name'] . '" (' . $tmp . 'B) to meet the limit of trash bin size (50% of available quota)', \OC_log::INFO); + \OCP\Util::writeLog('files_trashbin', 'remove "' . $file['name'] . '" (' . $tmp . 'B) to meet the limit of trash bin size (50% of available quota)', \OC_log::INFO); $availableSpace += $tmp; $size += $tmp; } else { @@ -704,7 +704,7 @@ class Trashbin { if ($timestamp <= $limit) { $count++; $size += self::delete($filename, $user, $timestamp); - \OC_Log::write('files_trashbin', 'remove "' . $filename . '" from trash bin because it is older than ' . $retention_obligation, \OC_log::INFO); + \OCP\Util::writeLog('files_trashbin', 'remove "' . $filename . '" from trash bin because it is older than ' . $retention_obligation, \OCP\Util::INFO); } else { break; } |