]> git.mxchange.org Git - friendica-addons.git/commitdiff
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 ef87ed74bd9f55b564194a60aa3c4fd934ffe86c..4b5a5d312d391537ef64ea909cf8ecdcffe15f0c 100644 (file)
Binary files a/blackout.tgz and b/blackout.tgz differ
index ffd59dca64991d1fc131d898e3b3feb54381b7d6..2cb7c041d6cf3dff8f60486a10f2e4a4d879ffd4 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 ccddb1e38a35297ff764d6c8f3a59af9a89ef4c7..c484aa03f77b7275c44b3b9185c3fe05735b888c 100755 (executable)
Binary files a/nsfw.tgz and b/nsfw.tgz differ