]> git.mxchange.org Git - friendica.git/commitdiff
Small fixes
authorfabrixxm <fabrix.xm@gmail.com>
Fri, 4 Jan 2019 06:45:08 +0000 (07:45 +0100)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 21 Jan 2019 15:08:09 +0000 (10:08 -0500)
- Avoid an intermediate variable
- Use `rawContent()` in `Attach` module
- Small typo

mod/videos.php
src/Core/Console/Storage.php
src/Module/Attach.php

index a117e0f1a853f283b13b429d73457c5af676be5c..408e2acaa6dfc75ea408a899abc91f87a98fe477 100644 (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()]);
 
index 601019fa8bb03a62e8203d09d7035c1995798129..f9674c4d1981b80e87cefbaefaf1b7d09511fbeb 100644 (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
index eed1275c58cbb52d2729ebae171c7565831189a7..dd4e368058b7c3583424dfed3122aef629f789d1 100644 (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
        }
-}
\ No newline at end of file
+}