mirror of
https://github.com/friendica/friendica
synced 2024-11-14 19:02:54 +00:00
31 lines
456 B
PHP
31 lines
456 B
PHP
|
<?php
|
||
|
|
||
|
namespace Friendica\Module;
|
||
|
|
||
|
use Friendica\BaseModule;
|
||
|
|
||
|
/**
|
||
|
* Toggles the mobile view (on/off)
|
||
|
*/
|
||
|
class ToggleMobile extends BaseModule
|
||
|
{
|
||
|
public static function content()
|
||
|
{
|
||
|
$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);
|
||
|
}
|
||
|
}
|