} else if (isset($_COOKIE['MobileOverride'])) {
// Cookie override is controlled by link at bottom.
$this->serveMobile = (bool)$_COOKIE['MobileOverride'];
- } else {
+ } elseif (array_key_exists('HTTP_USER_AGENT', $_SERVER)) {
// If they like the WAP 2.0 mimetype, serve them MP
// @fixme $type is undefined, making this if case useless and spewing errors.
// What's the intent?
}
}
- function onEndShowScripts($action)
+ function onEndShowScripts(Action $action)
{
// @todo FIXME: "Show Navigation" / "Hide Navigation" needs i18n
$action->inlineScript('
return $proto.'://'.$serverpart.'/'.$pathpart.$relative;
}
- function onPluginVersion(&$versions)
+ function onPluginVersion(array &$versions)
{
$versions[] = array('name' => 'MobileProfile',
'version' => GNUSOCIAL_VERSION,