Removed the ellipsis function which is not used in anywhere in the FusionPBX project.

This commit is contained in:
FusionPBX
2020-06-19 17:55:46 -06:00
committed by GitHub
parent d7881b7dc5
commit aa9c7c1277

View File

@@ -1029,24 +1029,6 @@ function number_pad($number,$n) {
}
}
// ellipsis nicely truncate long text
if(!function_exists('ellipsis')) {
function ellipsis($string, $max_characters, $preserve_word = true) {
if ($max_characters+$x >= strlen($string)) { return $string; }
if ($preserve_word) {
for ($x = 0; $x < strlen($string); $x++) {
if ($string{$max_characters+$x} == " ") {
return substr($string,0,$max_characters+$x)." ...";
}
else { continue; }
}
}
else {
return substr($string,0,$max_characters)." ...";
}
}
}
//function to convert hexidecimal color value to rgb string/array value
if (!function_exists('hex_to_rgb')) {
function hex_to_rgb($hex, $delim = '') {