]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Widget.php
Unified BBCode conversion, improved proxy functionality
[friendica.git] / src / Content / Widget.php
index 6b44a62eb7dbe9bb6cbdae91665e57c11b3e8f49..c8c0230c688dd7bafc136127ff05afdf88e92fc4 100644 (file)
@@ -472,9 +472,10 @@ class Widget
                        // Set the start and end date to the beginning of the month
                        $cutoffday = $dthen;
                        $thisday = substr($dnow, 4);
+                       $nextday = date('Y-m-d', strtotime($dnow . ' + 1 day'));
+                       $nextday = substr($nextday, 4);
                        $dnow = substr($dnow, 0, 8) . '01';
                        $dthen = substr($dthen, 0, 8) . '01';
-                       
 
                        /*
                         * Starting with the current month, get the first and last days of every
@@ -494,7 +495,6 @@ class Widget
 
                                $ret[$dyear][] = [$str, $end_month, $start_month];
                                $dnow = DateTimeFormat::utc($dnow . ' -1 month', 'Y-m-d');
-                               
                        }
                }
 
@@ -506,7 +506,7 @@ class Widget
                $cutoff_year = intval(DateTimeFormat::localNow('Y')) - $visible_years;
                $cutoff = array_key_exists($cutoff_year, $ret);
 
-               $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/posted_date.tpl'),[
+               $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/posted_date.tpl'), [
                        '$title' => DI::l10n()->t('Archives'),
                        '$size' => $visible_years,
                        '$cutoff_year' => $cutoff_year,
@@ -517,6 +517,7 @@ class Widget
                        '$showmore' => DI::l10n()->t('show more'),
                        '$onthisdate' => DI::l10n()->t('On this date'),
                        '$thisday' => $thisday,
+                       '$nextday' => $nextday,
                        '$cutoffday' => $cutoffday
                ]);
 
@@ -540,7 +541,14 @@ class Widget
                        ['ref' => 'community', 'name' => DI::l10n()->t('Groups')],
                ];
 
-               return self::filter('accounttype', DI::l10n()->t('Account Types'), '',
-                       DI::l10n()->t('All'), $base, $accounts, $accounttype);
+               return self::filter(
+                       'accounttype',
+                       DI::l10n()->t('Account Types'),
+                       '',
+                       DI::l10n()->t('All'),
+                       $base,
+                       $accounts,
+                       $accounttype
+               );
        }
 }