diff options
author | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2016-10-02 00:41:25 +0200 |
---|---|---|
committer | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2016-10-13 11:27:23 +0200 |
commit | 7b41839ea8f2aad020444c42f2cba89040ca28b8 (patch) | |
tree | acf1495c556a0ce82823e47ebcdfa21377f92b61 /Zotlabs/Storage/File.php | |
parent | 6532972e61a2aa5e8517ebcca3113adb3c8f336d (diff) | |
download | volse-hubzilla-7b41839ea8f2aad020444c42f2cba89040ca28b8.tar.gz volse-hubzilla-7b41839ea8f2aad020444c42f2cba89040ca28b8.tar.bz2 volse-hubzilla-7b41839ea8f2aad020444c42f2cba89040ca28b8.zip |
[TASK] Update Doxyfile and fix Doxygen errors.
Updated Doxyfile to include new folders.
Add a list for @hooks tags.
Fixed some parsing problems for Doxygen.
Diffstat (limited to 'Zotlabs/Storage/File.php')
-rw-r--r-- | Zotlabs/Storage/File.php | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index 5a70a99f1..d2bca3964 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -9,8 +9,8 @@ use Sabre\DAV; * * It provides all functions to work with files in Red's cloud through DAV protocol. * - * @extends \Sabre\DAV\Node - * @implements \Sabre\DAV\IFile + * @extends \\Sabre\\DAV\\Node + * @implements \\Sabre\\DAV\\IFile * * @link http://github.com/friendica/red * @license http://opensource.org/licenses/mit-license.php The MIT License (MIT) @@ -20,20 +20,20 @@ class File extends DAV\Node implements DAV\IFile { /** * The file from attach table. * - * @var array - * data - * flags - * filename (string) - * filetype (string) + * @var array $data + * * data + * * flags + * * filename (string) + * * filetype (string) */ private $data; /** - * @see \Sabre\DAV\Auth\Backend\BackendInterface - * @var \RedMatrix\RedDAV\RedBasicAuth + * @see \\Sabre\\DAV\\Auth\\Backend\\BackendInterface + * @var \\Zotlabs\\Storage\\BasicAuth $auth */ private $auth; /** - * @var string + * @var string $name */ private $name; @@ -65,8 +65,8 @@ class File extends DAV\Node implements DAV\IFile { /** * @brief Renames the file. * - * @throw Sabre\DAV\Exception\Forbidden - * @param string $name The new name of the file. + * @throw "\Sabre\DAV\Exception\Forbidden" + * @param string $newName The new name of the file. * @return void */ public function setName($newName) { @@ -95,7 +95,7 @@ class File extends DAV\Node implements DAV\IFile { $ch = channelx_by_n($this->auth->owner_id); if($ch) { $sync = attach_export_data($ch,$this->data['hash']); - if($sync) + if($sync) build_sync_packet($ch['channel_id'],array('file' => array($sync))); } } @@ -138,7 +138,7 @@ class File extends DAV\Node implements DAV\IFile { $album = $f1[0]['filename']; $direct = $f1[0]; } - } + } $fname = dbunescbin($d[0]['content']); if(strpos($fname,'store') === false) $f = 'store/' . $this->auth->owner_nick . '/' . $fname ; @@ -151,11 +151,11 @@ class File extends DAV\Node implements DAV\IFile { logger('filename: ' . $f . ' size: ' . $size, LOGGER_DEBUG); } $gis = @getimagesize($f); - logger('getimagesize: ' . print_r($gis,true), LOGGER_DATA); + logger('getimagesize: ' . print_r($gis,true), LOGGER_DATA); if(($gis) && ($gis[2] === IMAGETYPE_GIF || $gis[2] === IMAGETYPE_JPEG || $gis[2] === IMAGETYPE_PNG)) { $is_photo = 1; } - } + } else { // this shouldn't happen any more $r = q("UPDATE attach SET content = '%s' WHERE hash = '%s' AND uid = %d", @@ -222,7 +222,7 @@ class File extends DAV\Node implements DAV\IFile { $sync = attach_export_data($c[0],$this->data['hash']); - if($sync) + if($sync) build_sync_packet($c[0]['channel_id'],array('file' => array($sync))); } @@ -322,16 +322,16 @@ class File extends DAV\Node implements DAV\IFile { * This method checks the permissions and then calls attach_delete() function * to actually remove the file. * - * @throw \Sabre\DAV\Exception\Forbidden + * @throw "\Sabre\DAV\Exception\Forbidden" */ public function delete() { logger('delete file ' . basename($this->name), LOGGER_DEBUG); - if ((! $this->auth->owner_id) || (! perm_is_allowed($this->auth->owner_id, $this->auth->observer, 'write_storage'))) { + if((! $this->auth->owner_id) || (! perm_is_allowed($this->auth->owner_id, $this->auth->observer, 'write_storage'))) { throw new DAV\Exception\Forbidden('Permission denied.'); } - if ($this->auth->owner_id !== $this->auth->channel_id) { + if($this->auth->owner_id !== $this->auth->channel_id) { if (($this->auth->observer !== $this->data['creator']) || intval($this->data['is_dir'])) { throw new DAV\Exception\Forbidden('Permission denied.'); } @@ -340,14 +340,14 @@ class File extends DAV\Node implements DAV\IFile { if(get_pconfig($this->auth->owner_id,'system','os_delete_prohibit') && \App::$module == 'dav') { throw new DAV\Exception\Forbidden('Permission denied.'); } - + attach_delete($this->auth->owner_id, $this->data['hash']); $ch = channelx_by_n($this->auth->owner_id); if($ch) { - $sync = attach_export_data($ch,$this->data['hash'],true); - if($sync) - build_sync_packet($ch['channel_id'],array('file' => array($sync))); + $sync = attach_export_data($ch, $this->data['hash'], true); + if($sync) + build_sync_packet($ch['channel_id'], array('file' => array($sync))); } } } |