aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-13 16:17:45 -0700
committerfriendica <info@friendica.com>2012-06-13 16:17:45 -0700
commitd908c9dd7196276e1364f77abb053aba3dce77af (patch)
tree11a49a7fa1bf2211a265dff9213243cde8601fb1 /include/items.php
parenta424fecdae3b54b47778ed7a52452ff80c2bf631 (diff)
downloadvolse-hubzilla-d908c9dd7196276e1364f77abb053aba3dce77af.tar.gz
volse-hubzilla-d908c9dd7196276e1364f77abb053aba3dce77af.tar.bz2
volse-hubzilla-d908c9dd7196276e1364f77abb053aba3dce77af.zip
disable archive widget for PHP < 5.3
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 35a4396dc..5c797424b 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3436,6 +3436,18 @@ 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')))
+ return $o;
+
$ret = posted_dates($uid,$wall);
if(! count($ret))
return $o;