Use string clipping feature of printVal.
authorjollytoad <jollytoad>
Thu, 2 Sep 2004 09:01:16 +0000 (09:01 +0000)
committerjollytoad <jollytoad>
Thu, 2 Sep 2004 09:01:16 +0000 (09:01 +0000)
display.php

index cb91eacad2fd9b1182c07e24ed20c3d240704f63..983a8b4ab9b9cc9bb369ff87baa99451afb425c8 100644 (file)
@@ -9,7 +9,7 @@
         * @param $return_desc The return link name
         * @param $page The current page
         *
-        * $Id: display.php,v 1.43 2004/09/02 08:39:17 chriskl Exp $
+        * $Id: display.php,v 1.44 2004/09/02 09:01:16 jollytoad Exp $
         */
 
        // Include application functions
                                        if (isset($_REQUEST['table']) && $k == $data->id && !$conf['show_oids']) continue;
                                        elseif ($v !== null && $v == '') echo "<td class=\"data{$id}\">&nbsp;</td>";
                                        else {
-                                               // Trim strings if over length
-                                               if ($_REQUEST['strings'] == 'collapsed' && strlen($v) > $conf['max_chars']) {
-                                                       $v = substr($v, 0, $conf['max_chars'] - 1) . $lang['strellipsis'];
-                                               }
-                                               echo "<td class=\"data{$id}\" nowrap=\"nowrap\">", $misc->printVal($v, $finfo->type, array('null' => true)), "</td>";
+                                               echo "<td class=\"data{$id}\" nowrap=\"nowrap\">",
+                                                       $misc->printVal($v, $finfo->type, array('null' => true, 'clip' => ($_REQUEST['strings']=='collapsed'))), "</td>";
                                        }
                                }
                                echo "</tr>\n";