1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-15 16:29:16 +01:00

Fix - examples: Server-side processing example in data sources directory wasn't showing the server-side processing script.

This commit is contained in:
Allan Jardine 2017-08-31 14:49:38 +01:00
parent 576b38ef96
commit d894dc7fbc
2 changed files with 6 additions and 2 deletions

View File

@ -1 +1 @@
0d5ae813f255bfb5ef587fc33e86efbb09d91aab
aa849bd98f730afa8b1bd42f78759863e94c9d1a

View File

@ -1,8 +1,12 @@
<?php
if ( isset( $_POST['src'] ) && preg_match( '/^scripts\/[a-zA-Z_\-_]+\.php$/', $_POST['src'] ) !== 0 ) {
if ( isset( $_POST['src'] ) && (
preg_match( '/^scripts\/[a-zA-Z_\-_]+\.php$/', $_POST['src'] ) !== 0 ||
preg_match( '/^\.\.\/server_side\/scripts\/[a-zA-Z_\-_]+\.php$/', $_POST['src'] ) !== 0
) ) {
echo htmlspecialchars( file_get_contents( '../server_side/'.$_POST['src'] ) );
}
else {
echo '';
}