From: <var...@us...> - 2010-06-17 11:37:36
|
Revision: 7542 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7542&view=rev Author: vargenau Date: 2010-06-17 11:37:30 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Remove unused functions: oldFilterThroughCmd_File and oldFilterThroughCmd Modified Paths: -------------- trunk/lib/WikiPluginCached.php Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2010-06-17 11:34:55 UTC (rev 7541) +++ trunk/lib/WikiPluginCached.php 2010-06-17 11:37:30 UTC (rev 7542) @@ -1072,51 +1072,6 @@ } } - function oldFilterThroughCmd_File($input, $commandLine) { - $ext = ".txt"; - $tmpfile = tempnam(getUploadFilePath(), $ext); - $fp = fopen($tmpfile,'wb'); - fwrite($fp, $input); - fclose($fp); - $cat = isWindows() ? 'cat' : 'type'; - $pipe = popen("$cat \"$tmpfile\" | $commandLine", 'r'); - if (!$pipe) { - print "pipe failed."; - return ""; - } - $output = ''; - while (!feof($pipe)) { - $output .= fread($pipe, 1024); - } - pclose($pipe); - unlink($tmpfile); - return $output; - } - - /* PHP versions < 4.3 - * TODO: via temp file looks more promising - */ - function oldFilterThroughCmd($input, $commandLine) { - $input = str_replace ("\\", "\\\\", $input); - $input = str_replace ("\"", "\\\"", $input); - $input = str_replace ("\$", "\\\$", $input); - $input = str_replace ("`", "\`", $input); - $input = str_replace ("'", "\'", $input); - //$input = str_replace (";", "\;", $input); - - $pipe = popen("echo \"$input\" | $commandLine", 'r'); - if (!$pipe) { - print "pipe failed."; - return ""; - } - $output = ''; - while (!feof($pipe)) { - $output .= fread($pipe, 1024); - } - pclose($pipe); - return $output; - } - // run "echo $source | $commandLine" and return result function filterThroughCmd($source, $commandLine) { return $this->newFilterThroughCmd($source, $commandLine); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |