mirror of
https://github.com/friendica/friendica
synced 2024-12-22 12:29:47 +01:00
Fixed parser error
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
debcdea82a
commit
d0c7ba5257
1 changed files with 5 additions and 1 deletions
|
@ -1978,18 +1978,22 @@ function protect_sprintf($s) {
|
|||
return str_replace('%', '%%', $s);
|
||||
}
|
||||
|
||||
|
||||
/// @TODO Rewrite this
|
||||
function is_a_date_arg($s) {
|
||||
$i = intval($s);
|
||||
|
||||
if ($i > 1900) {
|
||||
$y = date('Y');
|
||||
|
||||
if ($i <= $y + 1 && strpos($s, '-') == 4) {
|
||||
$m = intval(substr($s, 5));
|
||||
|
||||
if ($m > 0 && $m <= 12) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue