balckout: fail silently if less than PHP 5.3
authorfriendica <info@friendica.com>
Fri, 11 May 2012 10:39:29 +0000 (03:39 -0700)
committerfriendica <info@friendica.com>
Fri, 11 May 2012 10:39:29 +0000 (03:39 -0700)
blackout.tgz
blackout/blackout.php
nsfw.tgz

index ef87ed7..4b5a5d3 100644 (file)
Binary files a/blackout.tgz and b/blackout.tgz differ
index ffd59dc..2cb7c04 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: blackout
- * Description: Blackout your ~friendica node during a given period
+ * Description: Blackout your ~friendica node during a given period, requires PHP >= 5.3
  * License: MIT
  * Version: 1.0
  * Author: Tobias Diekershoff <https://diekershoff.homeunix.net/friendika/~tobias>
@@ -62,6 +62,10 @@ function blackout_redirect ($a, $b) {
     if (local_user()) {
         return true;
     }
+
+       if (! (version_compare(PHP_VERSION, '5.3.0') >= 0))
+               return true;
+
     // else...
     $mystart = get_config('blackout','begindate');
     $myend   = get_config('blackout','enddate');
index ccddb1e..c484aa0 100755 (executable)
Binary files a/nsfw.tgz and b/nsfw.tgz differ