Browse code

includes/characterlist.php: Somehow having two copies of the same exact function stops the character list from bugging out when using the category list while using tinyMCE 4.x or newer - also somehow no PHP errors, either...

Clarissa Walker authored on 2026/11/10 20:48:23
Showing 1 changed files
... ...
@@ -7,6 +7,16 @@ include(_BASEDIR."languages/$lang.php");
7 7
 //header("Content-Type: text/html; charset=".CHARSET,true);
8 8
 include("../includes/queries.php");
9 9
 // Checks that the given $num is actually a number.  Used to help prevent XSS attacks.
10
+// Peculiar... Leaving both copies of the same exact function in this file prevents
11
+// breakage of the character list when using the category list for tinyMCE 4.x and newer...
12
+function isNumber($num) {
13
+	if(empty($num)) return false;
14
+	return (preg_match("/^[0-9]+$/", $num) || $num == "-1" ? true : false);
15
+}
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...
10 20
 function isNumber($num) {
11 21
 	if(empty($num)) return false;
12 22
 	return (preg_match("/^[0-9]+$/", $num) || $num == "-1" ? true : false);