friendica-github/src/Module/ToggleMobile.php

31 lines
467 B
PHP
Raw Normal View History

<?php
namespace Friendica\Module;
use Friendica\BaseModule;
/**
* Toggles the mobile view (on/off)
*/
class ToggleMobile extends BaseModule
{
2019-11-05 20:22:54 +00:00
public static function content($parameters)
{
$a = self::getApp();
if (isset($_GET['off'])) {
$_SESSION['show-mobile'] = false;
} else {
$_SESSION['show-mobile'] = true;
}
if (isset($_GET['address'])) {
$address = $_GET['address'];
} else {
$address = '';
}
$a->redirect($address);
}
}