db949bb802
Only define functions if they have not been defined before, e.g. in themes. This makes it possible to override parts of a module and still use the other functions.
18 lines
314 B
PHP
18 lines
314 B
PHP
<?php
|
|
|
|
if(! function_exists('toggle_mobile_init')) {
|
|
function toggle_mobile_init(&$a) {
|
|
|
|
if(isset($_GET['off']))
|
|
$_SESSION['show-mobile'] = false;
|
|
else
|
|
$_SESSION['show-mobile'] = true;
|
|
|
|
if(isset($_GET['address']))
|
|
$address = $_GET['address'];
|
|
else
|
|
$address = $a->get_baseurl();
|
|
|
|
goaway($address);
|
|
}
|
|
}
|