summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/share
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-04-08 15:21:52 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-05-18 11:06:23 +0200
commitdd3d0194a691c0718ec9c91d4e2f18ca0479e4a7 (patch)
tree43303bda3fbdf3354237d684993cd681579f6d30 /apps/files_sharing/lib/share
parent73a3086945b41afa39debd89481c021934dedb67 (diff)
downloadnextcloud-server-dd3d0194a691c0718ec9c91d4e2f18ca0479e4a7.tar.gz
nextcloud-server-dd3d0194a691c0718ec9c91d4e2f18ca0479e4a7.zip
Move files sharing app (mostly) to OCP\DB
Diffstat (limited to 'apps/files_sharing/lib/share')
-rw-r--r--apps/files_sharing/lib/share/file.php2
-rw-r--r--apps/files_sharing/lib/share/folder.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php
index 1822c2468f1..9c09e05408b 100644
--- a/apps/files_sharing/lib/share/file.php
+++ b/apps/files_sharing/lib/share/file.php
@@ -183,7 +183,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
if (isset($source['parent'])) {
$parent = $source['parent'];
while (isset($parent)) {
- $query = \OC_DB::prepare('SELECT `parent`, `uid_owner` FROM `*PREFIX*share` WHERE `id` = ?', 1);
+ $query = \OCP\DB::prepare('SELECT `parent`, `uid_owner` FROM `*PREFIX*share` WHERE `id` = ?', 1);
$item = $query->execute(array($parent))->fetchRow();
if (isset($item['parent'])) {
$parent = $item['parent'];
diff --git a/apps/files_sharing/lib/share/folder.php b/apps/files_sharing/lib/share/folder.php
index d7b7c0c8f30..e18839b577d 100644
--- a/apps/files_sharing/lib/share/folder.php
+++ b/apps/files_sharing/lib/share/folder.php
@@ -64,7 +64,7 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share
* @return mixed parent ID or null
*/
private function getParentId($child) {
- $query = \OC_DB::prepare('SELECT `parent` FROM `*PREFIX*filecache` WHERE `fileid` = ?');
+ $query = \OCP\DB::prepare('SELECT `parent` FROM `*PREFIX*filecache` WHERE `fileid` = ?');
$result = $query->execute(array($child));
$row = $result->fetchRow();
$parent = ($row) ? $row['parent'] : null;
@@ -75,7 +75,7 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share
public function getChildren($itemSource) {
$children = array();
$parents = array($itemSource);
- $query = \OC_DB::prepare('SELECT `id` FROM `*PREFIX*mimetypes` WHERE `mimetype` = ?');
+ $query = \OCP\DB::prepare('SELECT `id` FROM `*PREFIX*mimetypes` WHERE `mimetype` = ?');
$result = $query->execute(array('httpd/unix-directory'));
if ($row = $result->fetchRow()) {
$mimetype = $row['id'];
@@ -84,7 +84,7 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share
}
while (!empty($parents)) {
$parents = "'".implode("','", $parents)."'";
- $query = OC_DB::prepare('SELECT `fileid`, `name`, `mimetype` FROM `*PREFIX*filecache`'
+ $query = \OCP\DB::prepare('SELECT `fileid`, `name`, `mimetype` FROM `*PREFIX*filecache`'
.' WHERE `parent` IN ('.$parents.')');
$result = $query->execute();
$parents = array();