diff options
author | doktornotor <notordoktor@gmail.com> | 2017-01-31 20:30:05 +0100 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-01 07:39:16 -0200 |
commit | 4cb6be626d0593194dee00bc929ce0bbe0992ff6 (patch) | |
tree | 73340cccbc1b1158cc247027295923a3ff50ea9e | |
parent | 413cec3156bcee930d99463c2c97d6c3d13d9fb7 (diff) | |
download | pfsense-4cb6be626d0593194dee00bc929ce0bbe0992ff6.zip pfsense-4cb6be626d0593194dee00bc929ce0bbe0992ff6.tar.gz |
Remove unused broken functions
Not sure what was the idea here, but these are not used anywhere, do nothing as they immediately call ```return false;``` plus the second one is also misnamed.
(cherry picked from commit edba33b5a567ab8c9d4827fa26a25bd9649e3fac)
-rw-r--r-- | src/etc/inc/pfsense-utils.inc | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index b0ee605..848159c 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -910,53 +910,6 @@ function merge_config_section($section_name, $new_contents) { } /* - * php_check_syntax($code_tocheck, $errormessage): checks $code_to_check for errors - */ -if (!function_exists('php_check_syntax')) { - global $g; - function php_check_syntax($code_to_check, &$errormessage) { - return false; - $fout = fopen("{$g['tmp_path']}/codetocheck.php", "w"); - $code = $_POST['content']; - $code = str_replace("<?php", "", $code); - $code = str_replace("?>", "", $code); - fwrite($fout, "<?php\n\n"); - fwrite($fout, $code_to_check); - fwrite($fout, "\n\n?>\n"); - fclose($fout); - $command = "/usr/local/bin/php-cgi -l {$g['tmp_path']}/codetocheck.php"; - $output = exec_command($command); - if (stristr($output, "Errors parsing") == false) { - echo "false\n"; - $errormessage = ''; - return(false); - } else { - $errormessage = $output; - return(true); - } - } -} - -/* - * php_check_filename_syntax($filename, $errormessage): checks the file $filename for errors - */ -if (!function_exists('php_check_syntax')) { - function php_check_syntax($code_to_check, &$errormessage) { - return false; - $command = "/usr/local/bin/php-cgi -l " . escapeshellarg($code_to_check); - $output = exec_command($command); - if (stristr($output, "Errors parsing") == false) { - echo "false\n"; - $errormessage = ''; - return(false); - } else { - $errormessage = $output; - return(true); - } - } -} - -/* * rmdir_recursive($path, $follow_links=false) * Recursively remove a directory tree (rm -rf path) * This is for directories _only_ |