rewrote to static approach and if() condition can be simplified.
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
d64dafec63
commit
1514fdaead
11
boot.php
11
boot.php
|
@ -1255,8 +1255,7 @@ class App {
|
||||||
* @return bool Is it a known backend?
|
* @return bool Is it a known backend?
|
||||||
*/
|
*/
|
||||||
function is_backend() {
|
function is_backend() {
|
||||||
/// @Should be made static to speedup things
|
static $backend = array();
|
||||||
$backend = array();
|
|
||||||
$backend[] = "_well_known";
|
$backend[] = "_well_known";
|
||||||
$backend[] = "api";
|
$backend[] = "api";
|
||||||
$backend[] = "dfrn_notify";
|
$backend[] = "dfrn_notify";
|
||||||
|
@ -1277,12 +1276,8 @@ class App {
|
||||||
$backend[] = "statistics_json";
|
$backend[] = "statistics_json";
|
||||||
$backend[] = "xrd";
|
$backend[] = "xrd";
|
||||||
|
|
||||||
/// @TODO Maybe rewrite this part: return (in_array() || $this->backend); ?
|
// Check if current module is in backend or backend flag is set
|
||||||
if (in_array($this->module, $backend)) {
|
return (in_array($this->module, self::$backend) || $this->backend);
|
||||||
return(true);
|
|
||||||
} else {
|
|
||||||
return($this->backend);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue