]> git.mxchange.org Git - friendica.git/blobdiff - mod/localtime.php
Hide the calculation for "previous" and "next" behind a setting
[friendica.git] / mod / localtime.php
index fc500f4dd9b0c6711206bcc5cacb0d9eaa81575c..535308903153af6d3cf81ef4d310ccc8705034db 100644 (file)
@@ -2,8 +2,8 @@
 
 require_once('include/datetime.php');
 
-if(! function_exists('localtime_post')) {
-function localtime_post(&$a) {
+
+function localtime_post(App $a) {
 
        $t = $_REQUEST['time'];
        if(! $t)
@@ -13,11 +13,10 @@ function localtime_post(&$a) {
 
        if($_POST['timezone'])
                $a->data['mod-localtime'] = datetime_convert('UTC',$_POST['timezone'],$t,$bd_format);
-}
+
 }
 
-if(! function_exists('localtime_content')) {
-function localtime_content(&$a) {
+function localtime_content(App $a) {
        $t = $_REQUEST['time'];
        if(! $t)
                $t = 'now';
@@ -37,7 +36,7 @@ function localtime_content(&$a) {
                $o .= '<p>' . sprintf( t('Converted localtime: %s'),$a->data['mod-localtime']) . '</p>';
 
 
-       $o .= '<form action ="' . $a->get_baseurl() . '/localtime?f=&time=' . $t . '" method="post" >';
+       $o .= '<form action ="' . App::get_baseurl() . '/localtime?f=&time=' . $t . '" method="post" >';
 
        $o .= '<p>' . t('Please select your timezone:') . '</p>';
 
@@ -46,5 +45,5 @@ function localtime_content(&$a) {
        $o .= '<input type="submit" name="submit" value="' . t('Submit') . '" /></form>';
 
        return $o;
-}
-}
+
+}
\ No newline at end of file