1de3f186d7
- Adding Friendica\DI class for getting dynamic classes - Replacing BaseObject::getApp() with this class
31 lines
491 B
PHP
31 lines
491 B
PHP
<?php
|
|
|
|
namespace Friendica\Module;
|
|
|
|
use Friendica\BaseModule;
|
|
use Friendica\DI;
|
|
|
|
/**
|
|
* Toggles the mobile view (on/off)
|
|
*/
|
|
class ToggleMobile extends BaseModule
|
|
{
|
|
public static function content(array $parameters = [])
|
|
{
|
|
$a = DI::app();
|
|
|
|
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);
|
|
}
|
|
}
|