Browse Source

Small fixes

- Avoid an intermediate variable
- Use `rawContent()` in `Attach` module
- Small typo
tags/2019.03^2
parent
commit
518f28a7bf
3 changed files with 5 additions and 8 deletions
  1. +1
    -2
      mod/videos.php
  2. +1
    -1
      src/Core/Console/Storage.php
  3. +3
    -5
      src/Module/Attach.php

+ 1
- 2
mod/videos.php View File

@@ -114,8 +114,7 @@ function videos_post(App $a)

$video_id = $_POST['id'];

$r = Attach::exists(['id' => $video_id, 'uid' => local_user()]);
if ($r === true) {
if (Attach::exists(['id' => $video_id, 'uid' => local_user()])) {
// delete the attachment
Attach::delete(['id' => $video_id, 'uid' => local_user()]);



+ 1
- 1
src/Core/Console/Storage.php View File

@@ -22,7 +22,7 @@ Synopsis
Show this help
bin/console storage list
List avaiable storage backends
List available storage backends
bin/console storage set <name>
Set current storage backend


+ 3
- 5
src/Module/Attach.php View File

@@ -18,11 +18,9 @@ use Friendica\Model\Attach as MAttach;
class Attach extends BaseModule
{
/**
* @brief Module initializer
*
* Fetch an attached file given the id
* @brief Return to user an attached file given the id
*/
public static function init()
public static function rawContent()
{
$a = self::getApp();
if ($a->argc != 2) {
@@ -64,4 +62,4 @@ class Attach extends BaseModule
exit();
// NOTREACHED
}
}
}

Loading…
Cancel
Save