]> git.mxchange.org Git - friendica-addons.git/blobdiff - blackout/blackout.php
balckout: fail silently if less than PHP 5.3
[friendica-addons.git] / blackout / blackout.php
index 1171b890c818089630715420d7fa9d6ded7381b7..2cb7c041d6cf3dff8f60486a10f2e4a4d879ffd4 100644 (file)
@@ -1,15 +1,15 @@
 <?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 <http://diekershoff.homeunix.net/friendika/~tobias>
+ * Author: Tobias Diekershoff <https://diekershoff.homeunix.net/friendika/~tobias>
  *
  * About
  * =====
  *
- * This plugin will allow you to enter a date/time periode during which
+ * This plugin will allow you to enter a date/time period during which
  * all your ~friendica visitors from the web will be redirected to a page
  * you can configure in the admin panel as well.
  *
@@ -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');