File tree Expand file tree Collapse file tree 3 files changed +72
-0
lines changed Expand file tree Collapse file tree 3 files changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ if (!function_exists ('ctype_alpha ' )) {
4
+ function ctype_alpha ($ string )
5
+ {
6
+ return preg_match ('/^[a-z]+$/i ' , $ string );
7
+ }
8
+ }
9
+
10
+ if (!function_exists ('ctype_xdigit ' )) {
11
+ function ctype_xdigit ($ string )
12
+ {
13
+ return preg_match ('/^[0-9a-f]+$/i ' , $ string );
14
+ }
15
+ }
16
+
17
+ if (!function_exists ('ctype_space ' )) {
18
+ function ctype_space ($ string )
19
+ {
20
+ return preg_match ('/^[\s]$/ ' , $ string );
21
+ }
22
+ }
23
+
24
+ ?>
Original file line number Diff line number Diff line change @@ -381,6 +381,7 @@ function loadStyles($theme = 'default', &$xml_reponse)
381
381
$ js = '' ;//file_get_contents(dirname(__FILE__).'/client/createstylerule.js');
382
382
$ js .= 'var c = $H(); ' ;
383
383
$ path = $ c ->getFilePathFromTheme ('style.css.php ' );
384
+ require_once dirname (__FILE__ ).'/../lib/ctype/ctype.php ' ; // to keep compatibility for php without ctype support
384
385
require_once dirname (__FILE__ ).'/../lib/csstidy-1.2/class.csstidy.php ' ;
385
386
$ css = new csstidy ();
386
387
$ css ->set_cfg ('preserve_css ' ,false );
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ //
4
+ // TO RUN THIS TESTCASE : PREFIX THE FUNCTIONS NAMES BY my_ IN lib/ctype/ctype.php
5
+ //
6
+
7
+ require_once dirname (__FILE__ ).'/../lib/ctype/ctype.php ' ;
8
+
9
+ // examples for verifying
10
+ $ test [] = "" ;
11
+ $ test [] = "\t" ;
12
+ $ test [] = "\r" ;
13
+ $ test [] = "\n" ;
14
+ $ test [] = " " ;
15
+ $ test [] = "\n- " ;
16
+ $ test [] = " x " ;
17
+ $ test [] = "12 3 " ;
18
+ $ test [] = ". abc " ;
19
+ $ test [] = "abc " ;
20
+ $ test [] = "AzEdFDe " ;
21
+ $ test [] = "ABC9 " ;
22
+ $ test [] = "aBcF4 " ;
23
+ $ test [] = "0123456789ABCDEFabcdef " ;
24
+ $ test [] = "034DEFa5612789ABCbcdef " ;
25
+ $ test [] = "012djgfbbku3456789ABCDEFabcdef " ;
26
+
27
+
28
+ echo "ctype_space() " ."<br /> " ;
29
+ foreach ($ test as $ a )
30
+ {
31
+ echo $ a . " : " . ((my_ctype_space ($ a )) ? "true " : "false " ) ." : " . ((ctype_space ($ a )) ? "true " : "false " ) ."<br /> " ;
32
+ }
33
+
34
+
35
+ echo "ctype_xdigit() " ."<br /> " ;
36
+ foreach ($ test as $ a )
37
+ {
38
+ echo $ a . " : " . ((my_ctype_xdigit ($ a )) ? "true " : "false " ). " : " . ((ctype_xdigit ($ a )) ? "true " : "false " ) ."<br /> " ;
39
+ }
40
+
41
+ echo "ctype_alpha() " ."<br /> " ;
42
+ foreach ($ test as $ a )
43
+ {
44
+ echo $ a . " : " . ((my_ctype_alpha ($ a )) ? "true " : "false " ) ." : " . ((ctype_alpha ($ a )) ? "true " : "false " ) ."<br /> " ;
45
+ }
46
+
47
+ ?>
You can’t perform that action at this time.
0 commit comments