summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorChristian Schneider2021-01-13 16:21:03 +0100
committerChristian Schneider2021-01-13 16:21:03 +0100
commit4f7f5e4b1fd1077ad134860b32203810ef24c0ce (patch)
treead1f7ce97388ff1ac4b11e47960ddebe2ae1fa0f /it.class
parentb1548c21528cc8158f09a3acaf6fb8ef51ae7e5f (diff)
downloaditools-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.class10
1 files changed, 5 insertions, 5 deletions
diff --git a/it.class b/it.class
index 3351002..84e4fde 100644
--- a/it.class
+++ b/it.class
@@ -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));