characterlist.php: remove the duplicate isNumber() - Merge this anyway (original reason was the redundant 'None' option for stories), then patch includes/storyform.php
| ... | ... |
@@ -14,14 +14,6 @@ function isNumber($num) {
|
| 14 | 14 |
return (preg_match("/^[0-9]+$/", $num) || $num == "-1" ? true : false);
|
| 15 | 15 |
} |
| 16 | 16 |
|
| 17 |
-// Checks that the given $num is actually a number. Used to help prevent XSS attacks. |
|
| 18 |
-// Peculiar... Leaving both copies of the same exact function in this file prevents |
|
| 19 |
-// breakage of the character list when using the category list for tinyMCE 4.x and newer... |
|
| 20 |
-function isNumber($num) {
|
|
| 21 |
- if(empty($num)) return false; |
|
| 22 |
- return (preg_match("/^[0-9]+$/", $num) || $num == "-1" ? true : false);
|
|
| 23 |
-} |
|
| 24 |
- |
|
| 25 | 17 |
$catid = isset($_GET['catid']) ? explode(",", $_GET['catid']) : array(-1);
|
| 26 | 18 |
$catid = array_filter($catid, "isNumber"); |
| 27 | 19 |
$characters = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_characters WHERE ".(count($catid) > 1 ? "FIND_IN_SET(catid, '".implode(",", $catid)."') > 0" : "catid = '".$catid[0]."'")." ORDER BY charname");
|