balckout: fail silently if less than PHP 5.3
This commit is contained in:
parent
e533312985
commit
d6fd0c9717
BIN
blackout.tgz
BIN
blackout.tgz
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Name: blackout
|
* 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
|
* License: MIT
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Tobias Diekershoff <https://diekershoff.homeunix.net/friendika/~tobias>
|
* Author: Tobias Diekershoff <https://diekershoff.homeunix.net/friendika/~tobias>
|
||||||
|
@ -62,6 +62,10 @@ function blackout_redirect ($a, $b) {
|
||||||
if (local_user()) {
|
if (local_user()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! (version_compare(PHP_VERSION, '5.3.0') >= 0))
|
||||||
|
return true;
|
||||||
|
|
||||||
// else...
|
// else...
|
||||||
$mystart = get_config('blackout','begindate');
|
$mystart = get_config('blackout','begindate');
|
||||||
$myend = get_config('blackout','enddate');
|
$myend = get_config('blackout','enddate');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user