diff options
author | Christian Schneider | 2021-01-13 16:21:03 +0100 |
---|---|---|
committer | Christian Schneider | 2021-01-13 16:21:03 +0100 |
commit | 4f7f5e4b1fd1077ad134860b32203810ef24c0ce (patch) | |
tree | ad1f7ce97388ff1ac4b11e47960ddebe2ae1fa0f /it.class | |
parent | b1548c21528cc8158f09a3acaf6fb8ef51ae7e5f (diff) | |
download | itools-4f7f5e4b1fd1077ad134860b32203810ef24c0ce.tar.gz itools-4f7f5e4b1fd1077ad134860b32203810ef24c0ce.tar.bz2 itools-4f7f5e4b1fd1077ad134860b32203810ef24c0ce.zip |
Unified join to always use implode
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -54,7 +54,7 @@ static function createconfig($p = array()) $code[] = "static \$$name = " . var_export($value, true) . ";"; $code[] = "}"; - eval(join("\n", $code)); + eval(implode("\n", $code)); } @@ -174,7 +174,7 @@ static function error($p = array(), $extra = null) if ($_SERVER['REMOTE_ADDR']) $url = "http://" . it::replace([':443$' => ""], $_SERVER['HTTP_HOST']) . $_SERVER['REQUEST_URI']; # we ignore https for easier debugging else - $url = $_SERVER['SCRIPT_NAME'] . " " . join(" ", array_slice($GLOBALS['argv'], 1)) . " (pwd " . $_SERVER['PWD'] . ")"; + $url = $_SERVER['SCRIPT_NAME'] . " " . implode(" ", array_slice($GLOBALS['argv'], 1)) . " (pwd " . $_SERVER['PWD'] . ")"; $gods = strtr(trim(@file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>', ')); # NOPHPLINT if (!$p['to']) @@ -709,7 +709,7 @@ static function shell_command(/* $cmd, $values1 = array(), ... */) $parts[] = it::_exec_quotevalue($value, "cmd=$cmd key=$key val=$value"); } - $replacements[$tag] = join(" ", $parts); + $replacements[$tag] = implode(" ", $parts); } $cmd = strtr($cmd, (array)$replacements); # Use strtr behaviour of going through source string once @@ -1136,9 +1136,9 @@ static function file_put($filename, $data, $p = array()) $filename = it::safe_filename($filename); if ($p['keyval']) - $data = join("", it::map('"$k\t$v\n"', $data)); + $data = implode("", it::map('"$k\t$v\n"', $data)); else if ($p['lines']) - $data = count((array)$data) ? join("\n", (array)$data) ."\n" : ""; + $data = count((array)$data) ? implode("\n", (array)$data) ."\n" : ""; if ($p['mkdir'] && $filename != "-") @mkdir(dirname($filename)); |