File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change 7
7
$ modal = detaintPath ($ _REQUEST ['modal ' ]);
8
8
$ data = array ();
9
9
10
- ZM \Debug ("Including modals/ $ modal.php " );
11
- # Shouldn't be necessary but at the moment we have last .conf file contents
12
- ob_start ();
13
- @$ result = include ('modals/ ' .$ modal .'.php ' );
14
- $ data ['html ' ] = ob_get_contents ();
15
- ob_end_clean ();
16
- if (!$ result ) {
10
+ if (file_exists (dirname (__FILE__ ).'/modals/ ' .$ modal .'.php ' )) {
11
+ ZM \Debug ("Including modals/ $ modal.php " );
12
+ # Shouldn't be necessary but at the moment we have last .conf file contents
13
+ ob_start ();
14
+ @$ result = include ('modals/ ' .$ modal .'.php ' );
15
+ $ data ['html ' ] = ob_get_contents ();
16
+ ob_end_clean ();
17
+
18
+ if (!$ result ) {
19
+ ajaxError ("Error including ' " .$ modal ."' " );
20
+ return ;
21
+ }
22
+ } else {
17
23
ajaxError ("Unknown modal ' " .$ modal ."' " );
18
24
return ;
19
25
}
20
26
27
+
21
28
ajaxResponse ($ data );
22
29
return ;
23
30
?>
You can’t perform that action at this time.
0 commit comments