parent::__construct();
}
- function onStartShowHTML($action)
+ function onStartShowHTML(Action $action)
{
// XXX: This should probably graduate to WAP20Plugin
} 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?
$action->elementEnd('address');
}
- function onStartShowAside($action)
+ function onStartShowAside(Action $action)
{
if ($this->serveMobile) {
return false;
}
}
- function onStartShowLocalNavBlock($action)
+ function onStartShowLocalNavBlock(Action $action)
{
if ($this->serveMobile) {
// @todo FIXME: "Show Navigation" / "Hide Navigation" needs i18n
}
}
- 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,