diff options
author | friendica <info@friendica.com> | 2012-06-13 20:59:19 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-06-13 20:59:19 -0700 |
commit | edeca6d815a8830d92a42a18199087fc6b1798cd (patch) | |
tree | c26d18343fc62db76b56ec3b8265edad7c844f7a | |
parent | b0a0c1ef4da159293236253e16eb0ba46a590d21 (diff) | |
download | volse-hubzilla-edeca6d815a8830d92a42a18199087fc6b1798cd.tar.gz volse-hubzilla-edeca6d815a8830d92a42a18199087fc6b1798cd.tar.bz2 volse-hubzilla-edeca6d815a8830d92a42a18199087fc6b1798cd.zip |
remove php version restriction on archive widget
-rwxr-xr-x | include/items.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/include/items.php b/include/items.php index 5c797424b..3db1a2802 100755 --- a/include/items.php +++ b/include/items.php @@ -3424,8 +3424,10 @@ function posted_dates($uid,$wall) { $ret = array(); while($dnow >= $dthen) { - $start_month = datetime_convert('','','first day of ' . $dnow,'Y-m-d'); - $end_month = datetime_convert('','','last day of ' . $dnow,'Y-m-d'); + $dstart = substr($dnow,0,8) . '01'; + $dend = substr($dnow,0,8) . get_dim(intval($dnow),intval(substr($dnow,5))); + $start_month = datetime_convert('','',$dstart,'Y-m-d'); + $end_month = datetime_convert('','',$dend,'Y-m-d'); $str = day_translate(datetime_convert('','',$dnow,'F Y')); $ret[] = array($str,$end_month,$start_month); $dnow = datetime_convert('','',$dnow . ' -1 month', 'Y-m-d'); @@ -3437,12 +3439,6 @@ function posted_dates($uid,$wall) { function posted_date_widget($url,$uid,$wall) { $o = ''; - // "first day of " constructs were added in php 5.3 - // TODO: emulate posted_dates() logic for prior releases - - if(version_compare(PHP_VERSION, '5.3.0') < 0) - return $o; - // For former Facebook folks that left because of "timeline" if($wall && intval(get_pconfig($uid,'system','no_wall_archive_widget'))) |