diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-02 22:32:50 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-02 22:32:50 -0400 |
commit | b93e398674b375a3b14718fc6dd2a815aad9b387 (patch) | |
tree | 7c2a8097e1c90a87cc8207b5fe08a064f4fa3ae8 /Zotlabs/Storage/File.php | |
parent | b70c6809648bb3c78e5e26f9293727b3a7aa4025 (diff) | |
parent | f9075e2a2feca0f37fdf568be6e6e53460aa9034 (diff) | |
download | volse-hubzilla-b93e398674b375a3b14718fc6dd2a815aad9b387.tar.gz volse-hubzilla-b93e398674b375a3b14718fc6dd2a815aad9b387.tar.bz2 volse-hubzilla-b93e398674b375a3b14718fc6dd2a815aad9b387.zip |
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'Zotlabs/Storage/File.php')
-rw-r--r-- | Zotlabs/Storage/File.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index d40fee0ea..ecd15cc55 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -124,7 +124,7 @@ class File extends DAV\Node implements DAV\IFile { ); if ($r) { if (intval($r[0]['os_storage'])) { - $d = q("select folder, data from attach where hash = '%s' and uid = %d limit 1", + $d = q("select folder, content from attach where hash = '%s' and uid = %d limit 1", dbesc($this->data['hash']), intval($c[0]['channel_id']) ); @@ -139,7 +139,7 @@ class File extends DAV\Node implements DAV\IFile { $direct = $f1[0]; } } - $fname = dbunescbin($d[0]['data']); + $fname = dbunescbin($d[0]['content']); if(strpos($fname,'store') === false) $f = 'store/' . $this->auth->owner_nick . '/' . $fname ; else @@ -158,12 +158,12 @@ class File extends DAV\Node implements DAV\IFile { } else { // this shouldn't happen any more - $r = q("UPDATE attach SET data = '%s' WHERE hash = '%s' AND uid = %d", + $r = q("UPDATE attach SET content = '%s' WHERE hash = '%s' AND uid = %d", dbescbin(stream_get_contents($data)), dbesc($this->data['hash']), intval($this->data['uid']) ); - $r = q("SELECT length(data) AS fsize FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1", + $r = q("SELECT length(content) AS fsize FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1", dbesc($this->data['hash']), intval($this->data['uid']) ); @@ -236,7 +236,7 @@ class File extends DAV\Node implements DAV\IFile { logger('get file ' . basename($this->name), LOGGER_DEBUG); logger('os_path: ' . $this->os_path, LOGGER_DATA); - $r = q("SELECT data, flags, os_storage, filename, filetype FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1", + $r = q("SELECT content, flags, os_storage, filename, filetype FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1", dbesc($this->data['hash']), intval($this->data['uid']) ); @@ -250,14 +250,14 @@ class File extends DAV\Node implements DAV\IFile { } if (intval($r[0]['os_storage'])) { - $x = dbunescbin($r[0]['data']); + $x = dbunescbin($r[0]['content']); if(strpos($x,'store') === false) $f = 'store/' . $this->auth->owner_nick . '/' . (($this->os_path) ? $this->os_path . '/' : '') . $x; else $f = $x; return fopen($f, 'rb'); } - return dbunescbin($r[0]['data']); + return dbunescbin($r[0]['content']); } } |