improve previous commit: also fix locations
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 26 Mar 2014 13:28:00 +0000 (17:28 +0400)
committerAlexey Andriyanov <alan@al-an.info>
Sun, 20 Apr 2014 09:20:38 +0000 (13:20 +0400)
ChangeLog
wwwroot/inc/interface.php

index 4cf659c..20794f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
 0.20.8
-       bugfix: properly format comment text for racks
+       bugfix: properly format comment text for locations and racks
 0.20.7 2014-03-03
        bugfix: IP tree expansion button was broken when MAX_UNFILTERED_ENTITIES was set
        bugfix: fix URL detection bug introduced in bugfix to #1023 (#1103)
index 9b7bac8..99463c1 100644 (file)
@@ -4052,9 +4052,13 @@ function renderLocationPage ($location_id)
                )
                        $summary['{sticker}' . $record['name']] = formatAttributeValue ($record);
        $summary['tags'] = '';
-       if (strlen ($locationData['comment']))
-               $summary['Comment'] = $locationData['comment'];
        renderEntitySummary ($locationData, 'Summary', $summary);
+       if ($locationData['comment'] != '')
+       {
+               startPortlet ('Comment');
+               echo '<div class=commentblock>' . string_insert_hrefs ($locationData['comment']) . '</div>';
+               finishPortlet ();
+       }
        renderFilesPortlet ('location', $location_id);
        echo '</td>';