mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:10:11 +00:00
date based profile wall filter - backend
This commit is contained in:
parent
75104416e0
commit
24e85c95b6
3 changed files with 42 additions and 11 deletions
|
@ -1541,3 +1541,16 @@ function protect_sprintf($s) {
|
|||
return(str_replace('%','%%',$s));
|
||||
}
|
||||
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue