summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-05-31 10:31:43 +0300
committerAndrew Dolgov <[email protected]>2019-05-31 10:31:43 +0300
commitd36b64d8a7423c2dd0e9153e1961c99cca007ca5 (patch)
treef9d2eaf11554397c44d42137806e458c157cba1f /classes
parent4a2836ea90c4c471029d189a8c9fe5ec10a9521b (diff)
event log: simplify styles, prevent horizontal scrolling
sql logger: clip context length to 8kb
Diffstat (limited to 'classes')
-rwxr-xr-xclasses/logger/sql.php4
-rw-r--r--classes/pref/system.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/classes/logger/sql.php b/classes/logger/sql.php
index 352d71324..989539e5d 100755
--- a/classes/logger/sql.php
+++ b/classes/logger/sql.php
@@ -12,8 +12,8 @@ class Logger_SQL {
$owner_uid = $_SESSION["uid"] ? $_SESSION["uid"] : null;
- if (DB_TYPE == "mysql")
- $context = substr($context, 0, 65534);
+ // limit context length, DOMDocument dumps entire XML in here sometimes, which may be huge
+ $context = mb_substr($context, 0, 8192);
// passed error message may contain invalid unicode characters, failing to insert an error here
// would break the execution entirely by generating an actual fatal error instead of a E_WARNING etc
diff --git a/classes/pref/system.php b/classes/pref/system.php
index f36fd07bb..d0f8a8273 100644
--- a/classes/pref/system.php
+++ b/classes/pref/system.php
@@ -54,7 +54,7 @@ class Pref_System extends Handler_Protected {
</tr>";
while ($line = $res->fetch()) {
- print "<tr class=\"errrow\">";
+ print "<tr>";
foreach ($line as $k => $v) {
$line[$k] = htmlspecialchars($v);