--- a/documents/template.inc.php +++ b/documents/template.inc.php @@ -98,9 +98,12 @@ _gaq.push(['_trackPageview']); (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + var ga = document.createElement('script'); + ga.type = 'text/javascript'; + ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + var s = document.getElementsByTagName('script')[0]; + s.parentNode.insertBefore(ga, s); })(); @@ -146,9 +149,12 @@ function displayLogEntry($row, $idtoname) { $result = ""; $result .= '
'; - $result .= '

: " . truncate($row->value->title, 120).""; - $result .= '(' . $idtoname[$row->value->agencyID] . ')

'; - $result .= "

Title" . $row->value->title . "
" . str_replace("\n", "
", $row->value->description); + $result .= '

: " . truncate($row->value->title, 120) . ""; + $result .= ' (' . $idtoname[$row->value->agencyID] . ')

'; + $result .= "

Title: " . $row->value->title . "
"; + if (isset($row->value->description)) { + $result .= str_replace("\n", "
", preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "",trim($row->value->description))); + } if (isset($row->value->notes)) { $result .= "
Note: " . $row->value->notes; } @@ -157,13 +163,13 @@ if (isset($row->value->links)) { $result .= '

Links/Documents

"; } $result .= " ID: " . strip_tags($row->value->docID) . ""; - $result .= "
"; + $result .= "\n"; return $result; }