summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2017-01-31 20:30:05 +0100
committerGitHub <noreply@github.com>2017-01-31 20:30:05 +0100
commitedba33b5a567ab8c9d4827fa26a25bd9649e3fac (patch)
tree0c550e83bd5878c61a85bfcaff6f0034f35e0a0f /src/etc/inc/pfsense-utils.inc
parent0a609a57f65517c9a39892a5f1af77a870cf84fe (diff)
downloadpfsense-edba33b5a567ab8c9d4827fa26a25bd9649e3fac.zip
pfsense-edba33b5a567ab8c9d4827fa26a25bd9649e3fac.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.
Diffstat (limited to 'src/etc/inc/pfsense-utils.inc')
-rw-r--r--src/etc/inc/pfsense-utils.inc47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc
index 2d090ef..887b53f 100644
--- a/src/etc/inc/pfsense-utils.inc
+++ b/src/etc/inc/pfsense-utils.inc
@@ -818,53 +818,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_
OpenPOWER on IntegriCloud