mirror of
https://github.com/friendica/friendica
synced 2024-11-18 13:03:41 +00:00
Add accessor for App->args in App and BaseModule
This commit is contained in:
parent
5f80180b47
commit
11ad0acd28
2 changed files with 19 additions and 1 deletions
10
src/App.php
10
src/App.php
|
@ -132,6 +132,16 @@ class App
|
|||
*/
|
||||
private $process;
|
||||
|
||||
/**
|
||||
* Returns the arguments of the query
|
||||
*
|
||||
* @return Arguments
|
||||
*/
|
||||
public function getArgs()
|
||||
{
|
||||
return $this->args;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current config cache of this node
|
||||
*
|
||||
|
|
|
@ -120,7 +120,7 @@ abstract class BaseModule extends BaseObject
|
|||
$a = \get_app();
|
||||
|
||||
$x = explode('.', $hash);
|
||||
if (time() > (IntVal($x[0]) + $max_livetime)) {
|
||||
if (time() > (intval($x[0]) + $max_livetime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -155,4 +155,12 @@ abstract class BaseModule extends BaseObject
|
|||
throw new \Friendica\Network\HTTPException\ForbiddenException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return App\Arguments
|
||||
*/
|
||||
protected static function getArgs()
|
||||
{
|
||||
return self::getApp()->getArgs();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue