Skip to content

Commit

Permalink
minor internal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pk-fr committed Sep 26, 2015
1 parent 3a3d2eb commit 419b4e7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ function obfuscate($filename) // takes a file_path as input, r

if (isset($conf->strip_indentation) && $conf->strip_indentation) // self-explanatory
{
$tmpfilename = tempnam('/tmp','po-');
file_put_contents($tmpfilename,$code);
$code = php_strip_whitespace($tmpfilename);
unlink($tmpfilename);
$code = remove_whitespaces($code);
}
$endcode = substr($code,6);

Expand Down Expand Up @@ -322,4 +319,13 @@ function shuffle_statements($stmts)
return $stmts;
}

function remove_whitespaces($str)
{
$tmpfilename = tempnam('/tmp','po-');
file_put_contents($tmpfilename,$str);
$str = php_strip_whitespace($tmpfilename); // can remove more whitespaces
unlink($tmpfilename);
return $str;
}

?>

0 comments on commit 419b4e7

Please sign in to comment.