From 4cb6be626d0593194dee00bc929ce0bbe0992ff6 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Tue, 31 Jan 2017 20:30:05 +0100 Subject: 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) --- src/etc/inc/pfsense-utils.inc | 47 ------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'src/etc') 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("", "", $code); - fwrite($fout, "\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_ -- cgit v1.1