]> git.mxchange.org Git - friendica.git/commitdiff
Refactor deprecated App::getArgumentValue() to DI::args()->get()
authornupplaPhil <admin@philipp.info>
Sun, 15 Dec 2019 23:31:29 +0000 (00:31 +0100)
committernupplaPhil <admin@philipp.info>
Sun, 29 Dec 2019 19:17:44 +0000 (20:17 +0100)
src/App.php
src/Module/Help.php
src/Module/Install.php

index 05d592367d709b3a6472e8e6f151f91da9deedfa..7b0fa07abc93c3446d1c3ec55bd5e77b0ee52377 100644 (file)
@@ -543,16 +543,6 @@ class App
                return Core\Theme::getStylesheetPath($this->getCurrentTheme());
        }
 
-       /**
-        * @deprecated use Arguments->get() instead
-        *
-        * @see        App\Arguments
-        */
-       public function getArgumentValue($position, $default = '')
-       {
-               return $this->args->get($position, $default);
-       }
-
        /**
         * Sets the base url for use in cmdline programs which don't have
         * $_SERVER variables
index 7c1ecd74650b480661adbbf522da1cd30a7ed932..70c99a0a6fd7c47c78c80f8be0d39a8bb54dd814 100644 (file)
@@ -36,7 +36,7 @@ class Help extends BaseModule
                                        $path .= '/';
                                }
 
-                               $path .= $a->getArgumentValue($x);
+                               $path .= DI::args()->get($x);
                        }
                        $title = basename($path);
                        $filename = $path;
index 228f4be44af8e4687b0a29cda18e3507c9a0b28c..10a6176e402e2fba7f3866da298b45f93dfb2888 100644 (file)
@@ -57,8 +57,7 @@ class Install extends BaseModule
 
                // route: install/testrwrite
                // $baseurl/install/testrwrite to test if rewrite in .htaccess is working
-               // @TODO: Replace with parameter from router
-               if ($a->getArgumentValue(1, '') == 'testrewrite') {
+               if (DI::args()->get(1, '') == 'testrewrite') {
                        // Status Code 204 means that it worked without content
                        throw new HTTPException\NoContentException();
                }