From 4cd6a23b8c2a5f20f51d2a53b65bd7586e367a3c Mon Sep 17 00:00:00 2001 From: Christian A. Weber Date: Tue, 19 Jun 2018 18:53:09 +0200 Subject: remove bogus function that nobody uses, fix comment of transmogrify() --- it.class | 8 -------- it_text.class | 2 +- tests/it.t | 4 ---- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/it.class b/it.class index 247b50f..a129c09 100644 --- a/it.class +++ b/it.class @@ -1054,14 +1054,6 @@ static function mail($p) return $mail->send($p); } -/** - * Add an extra md5 based directory name on bottom of path. foo/bar -> foo/07/bar - */ -static function add_dir($path) -{ - return dirname($path) . "/" . substr(md5(basename($path)), 0, 2) . "/" . basename($path); -} - /** * Reads a file and returns it as string or in one of several formats. Two params: filename and flags * @param $filename name of file to read or - for stdin diff --git a/it_text.class b/it_text.class index 4481434..a8782ce 100644 --- a/it_text.class +++ b/it_text.class @@ -228,7 +228,7 @@ function set($label, $text = null, $language = null) /** - * Replaces variables of the form {obj.var} with value from $values, e.g. {user.name}, or result of a func, e.g. {LU:foo.html} + * Replaces variables of the form {obj.var} with value from $values, e.g. {user.name}, or result of a func, e.g. {LU(//www/terms)} * NOTE: Invalid object names or non-existing variables are simply deleted. */ function transmogrify($text, $values = null, $label = null, $allowedfuncs = null) diff --git a/tests/it.t b/tests/it.t index ef3dfdb..08640cf 100755 --- a/tests/it.t +++ b/tests/it.t @@ -454,10 +454,6 @@ is(it::map('2*$v', ['foo' => 1, 'bar' => 2], ['keys' => 'foo']), ['foo' => 2, 'b is(it::filter('$v > 2', [1, 5 => 2, 2 => 3]), [2 => 3]); is(it::filter('$k > 2', [1, 5 => 2, 2 => 3]), [5 => 2]); -is(it::add_dir("foo/bar"), "foo/37/bar"); -is(it::add_dir("baz/bar"), "baz/37/bar"); -is(it::add_dir("bar"), "./37/bar"); - is(it::split("b", "aba"), ["a", "a"]); is(it::split("b", "aBa"), ["a", "a"]); is(it::split("b", "abba"), ["a", "", "a"]); -- cgit v1.2.3