Better detection for the mobile client to avoid "{0}" in notifications.
This commit is contained in:
parent
e02546880f
commit
c89c0916e2
3 changed files with 13 additions and 5 deletions
8
boot.php
8
boot.php
|
@ -379,6 +379,7 @@ if(! class_exists('App')) {
|
|||
public $identities;
|
||||
public $is_mobile;
|
||||
public $is_tablet;
|
||||
public $is_friendica_app;
|
||||
public $performance = array();
|
||||
|
||||
public $nav_sel;
|
||||
|
@ -596,6 +597,9 @@ if(! class_exists('App')) {
|
|||
$this->is_mobile = $mobile_detect->isMobile();
|
||||
$this->is_tablet = $mobile_detect->isTablet();
|
||||
|
||||
// Friendica-Client
|
||||
$this->is_friendica_app = ($_SERVER['HTTP_USER_AGENT'] == "Apache-HttpClient/UNAVAILABLE (java 1.4)");
|
||||
|
||||
/**
|
||||
* register template engines
|
||||
*/
|
||||
|
@ -906,6 +910,10 @@ if(! class_exists('App')) {
|
|||
return(FRIENDICA_PLATFORM." '".FRIENDICA_CODENAME."' ".FRIENDICA_VERSION."-".DB_UPDATE_VERSION."; ".$this->get_baseurl());
|
||||
}
|
||||
|
||||
function is_friendica_app() {
|
||||
return($this->is_friendica_app);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue