Refactor deprecated App::getArgumentValue() to DI::args()->get()

This commit is contained in:
nupplaPhil 2019-12-16 00:31:29 +01:00
parent 8b6e123b3f
commit aedbdc536a
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
3 changed files with 2 additions and 13 deletions

View 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

View file

@ -36,7 +36,7 @@ class Help extends BaseModule
$path .= '/';
}
$path .= $a->getArgumentValue($x);
$path .= DI::args()->get($x);
}
$title = basename($path);
$filename = $path;

View 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();
}