2019-05-18 15:13:19 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Module;
|
|
|
|
|
|
|
|
use Friendica\BaseModule;
|
2019-12-15 16:34:11 -05:00
|
|
|
use Friendica\DI;
|
2019-05-18 15:13:19 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Toggles the mobile view (on/off)
|
|
|
|
*/
|
|
|
|
class ToggleMobile extends BaseModule
|
|
|
|
{
|
2019-11-05 16:48:54 -05:00
|
|
|
public static function content(array $parameters = [])
|
2019-05-18 15:13:19 -04:00
|
|
|
{
|
2019-12-15 16:34:11 -05:00
|
|
|
$a = DI::app();
|
2019-05-18 15:13:19 -04:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|