summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-05-11 14:10:53 +0200
committerczaks <marcin@6irc.net>2014-05-11 14:10:53 +0200
commitfe126cb4bf103b59fe66fe5f0921560c62f80165 (patch)
tree3ca39d3c8e525038a19e194d6be347ffa5f15ba4 /inc/display.php
parent7d29cf9e37c42102fb70a040a997f787ae05b170 (diff)
rewrite filename truncation code; ref #53
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php10
1 files changed, 0 insertions, 10 deletions
diff --git a/inc/display.php b/inc/display.php
index a859fbdb..c836247e 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -253,16 +253,6 @@ function truncate($body, $url, $max_lines = false, $max_chars = false) {
return $body;
}
-function truncate_filename($filename, $length) {
- if (strlen($filename) <= $length) return $filename;
- $matches = array();
- if (!preg_match("/.*(\\..+)/", $filename, $matches)) return $filename // what, no extension
- $length -= strlen($matches[1]);
- if ($length <= 0) return '(...)' . $matches[1]; // lmao
- $filename = substr($filename, 0, $length) . '(...)' . $matches[1];
- return $filename;
-}
-
function bidi_cleanup($data) {
// Closes all embedded RTL and LTR unicode formatting blocks in a string so that
// it can be used inside another without controlling its direction.