]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Widget.php
Merge pull request #13218 from anubis2814/develop
[friendica.git] / src / Content / Widget.php
index 375d4df114f888fa1f49cf92a2ff60275b0b52e9..c18a3041b0568c799a35d10c15954e66a7e1b84d 100644 (file)
@@ -243,6 +243,7 @@ class Widget
                        ['ref' => 'followers', 'name' => DI::l10n()->t('Followers')],
                        ['ref' => 'following', 'name' => DI::l10n()->t('Following')],
                        ['ref' => 'mutuals', 'name' => DI::l10n()->t('Mutual friends')],
+                       ['ref' => 'nothing', 'name' => DI::l10n()->t('No relationship')],
                ];
 
                return self::filter(
@@ -469,8 +470,13 @@ class Widget
 
                if ($dthen) {
                        // 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
@@ -490,6 +496,7 @@ class Widget
 
                                $ret[$dyear][] = [$str, $end_month, $start_month];
                                $dnow = DateTimeFormat::utc($dnow . ' -1 month', 'Y-m-d');
+                               
                        }
                }
 
@@ -509,7 +516,11 @@ class Widget
                        '$url' => $url,
                        '$dates' => $ret,
                        '$showless' => DI::l10n()->t('show less'),
-                       '$showmore' => DI::l10n()->t('show more')
+                       '$showmore' => DI::l10n()->t('show more'),
+                       '$onthisdate' => DI::l10n()->t('On this date'),
+                       '$thisday' => $thisday,
+                       '$nextday' => $nextday,
+                       '$cutoffday' => $cutoffday
                ]);
 
                return $o;
@@ -529,7 +540,7 @@ class Widget
                        ['ref' => 'person', 'name' => DI::l10n()->t('Persons')],
                        ['ref' => 'organisation', 'name' => DI::l10n()->t('Organisations')],
                        ['ref' => 'news', 'name' => DI::l10n()->t('News')],
-                       ['ref' => 'community', 'name' => DI::l10n()->t('Forums')],
+                       ['ref' => 'community', 'name' => DI::l10n()->t('Groups')],
                ];
 
                return self::filter('accounttype', DI::l10n()->t('Account Types'), '',