Rev 1276 | Rev 1295 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1276 | Rev 1294 | ||
---|---|---|---|
Line 674... | Line 674... | ||
674 | $res .= '</li>'; |
674 | $res .= '</li>'; |
675 | } |
675 | } |
676 | $res .= '</ul>'; |
676 | $res .= '</ul>'; |
677 | return $res; |
677 | return $res; |
678 | } |
678 | } |
- | 679 | ||
- | 680 | /** |
|
- | 681 | * @param mixed $mixed |
|
- | 682 | * @return bool |
|
- | 683 | */ |
|
- | 684 | function oidplus_is_true($mixed): bool { |
|
- | 685 | if (is_null($mixed)) { |
|
- | 686 | return false; |
|
- | 687 | } else if (is_string($mixed)) { |
|
- | 688 | return (strtolower($mixed) == 'true') || ($mixed == '1') || (strtolower($mixed) == 'y') || (strtolower($mixed) == 't'); |
|
- | 689 | } else if (is_bool($mixed)) { |
|
- | 690 | return $mixed; |
|
- | 691 | } else if (is_numeric($mixed)) { |
|
- | 692 | return $mixed != 0; |
|
- | 693 | } else { |
|
- | 694 | return $mixed ? true : false; // let PHP decide... |
|
- | 695 | } |
|
- | 696 | } |
|
679 | 697 |