mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 12:05:55 +00:00
prefs system: markup cleanup
This commit is contained in:
@@ -139,7 +139,7 @@ class Pref_Labels extends Handler_Protected {
|
|||||||
|
|
||||||
$sth->execute([$caption, $old_caption, $_SESSION['uid']]);
|
$sth->execute([$caption, $old_caption, $_SESSION['uid']]);
|
||||||
|
|
||||||
print clean($_REQUEST["value"]);
|
print clean($_REQUEST["caption"]);
|
||||||
} else {
|
} else {
|
||||||
print $old_caption;
|
print $old_caption;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class Pref_System extends Handler_Protected {
|
|||||||
$info = ob_get_contents();
|
$info = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
print preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', $info);
|
print preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', (string)$info);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function log_viewer(int $page, int $severity) {
|
private function log_viewer(int $page, int $severity) {
|
||||||
@@ -71,87 +71,89 @@ class Pref_System extends Handler_Protected {
|
|||||||
$total_pages = 0;
|
$total_pages = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<div dojoType='dijit.layout.BorderContainer' gutters='false'>";
|
?>
|
||||||
|
<div dojoType='dijit.layout.BorderContainer' gutters='false'>
|
||||||
|
<div region='top' dojoType='fox.Toolbar'>
|
||||||
|
|
||||||
print "<div region='top' dojoType='fox.Toolbar'>";
|
<button dojoType='dijit.form.Button' onclick='Helpers.EventLog.refresh()'>
|
||||||
|
<?php echo __('Refresh') ?>
|
||||||
|
</button>
|
||||||
|
|
||||||
print "<button dojoType='dijit.form.Button'
|
<button dojoType='dijit.form.Button' <?php echo ($page <= 0 ? "disabled" : "") ?>
|
||||||
onclick='Helpers.EventLog.refresh()'>".__('Refresh')."</button>";
|
onclick='Helpers.EventLog.prevPage()'>
|
||||||
|
<?php echo __('<<') ?>
|
||||||
|
</button>
|
||||||
|
|
||||||
$prev_page_disabled = $page <= 0 ? "disabled" : "";
|
<button dojoType='dijit.form.Button' disabled>
|
||||||
|
<?php echo T_sprintf('Page %d of %d', $page+1, $total_pages+1) ?>
|
||||||
|
</button>
|
||||||
|
|
||||||
print "<button dojoType='dijit.form.Button' $prev_page_disabled
|
<button dojoType='dijit.form.Button' <?php echo ($page >= $total_pages ? "disabled" : "") ?>
|
||||||
onclick='Helpers.EventLog.prevPage()'>".__('<<')."</button>";
|
onclick='Helpers.EventLog.nextPage()'>
|
||||||
|
<?php echo __('>>') ?>
|
||||||
|
</button>
|
||||||
|
|
||||||
print "<button dojoType='dijit.form.Button' disabled>".T_sprintf('Page %d of %d', $page+1, $total_pages+1)."</button>";
|
<button dojoType='dijit.form.Button'
|
||||||
|
onclick='Helpers.EventLog.clear()'>
|
||||||
|
<?php echo __('Clear') ?>
|
||||||
|
</button>
|
||||||
|
|
||||||
$next_page_disabled = $page >= $total_pages ? "disabled" : "";
|
<div class='pull-right'>
|
||||||
|
<?php echo __("Severity:") ?>
|
||||||
|
|
||||||
print "<button dojoType='dijit.form.Button' $next_page_disabled
|
<?php print_select_hash("severity", $severity,
|
||||||
onclick='Helpers.EventLog.nextPage()'>".__('>>')."</button>";
|
[
|
||||||
|
E_USER_ERROR => __("Errors"),
|
||||||
|
E_USER_WARNING => __("Warnings"),
|
||||||
|
E_USER_NOTICE => __("Everything")
|
||||||
|
], 'dojoType="fox.form.Select" onchange="Helpers.EventLog.refresh()"') ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
print "<button dojoType='dijit.form.Button'
|
<div style="padding : 0px" dojoType="dijit.layout.ContentPane" region="center">
|
||||||
onclick='Helpers.EventLog.clear()'>".__('Clear')."</button>";
|
|
||||||
|
|
||||||
print "<div class='pull-right'>";
|
<table width='100%' class='event-log'>
|
||||||
|
|
||||||
print __("Severity:") . " ";
|
<tr class='title'>
|
||||||
print_select_hash("severity", $severity,
|
<td width='5%'><?php echo __("Error") ?></td>
|
||||||
[
|
<td><?php echo __("Filename") ?></td>
|
||||||
E_USER_ERROR => __("Errors"),
|
<td><?php echo __("Message") ?></td>
|
||||||
E_USER_WARNING => __("Warnings"),
|
<td width='5%'><?php echo __("User") ?></td>
|
||||||
E_USER_NOTICE => __("Everything")
|
<td width='5%'><?php echo __("Date") ?></td>
|
||||||
], 'dojoType="fox.form.Select" onchange="Helpers.EventLog.refresh()"');
|
</tr>
|
||||||
|
|
||||||
print "</div>"; # pull-right
|
<?php
|
||||||
|
$sth = $this->pdo->prepare("SELECT
|
||||||
|
errno, errstr, filename, lineno, created_at, login, context
|
||||||
|
FROM
|
||||||
|
ttrss_error_log LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id)
|
||||||
|
WHERE
|
||||||
|
$errno_filter_qpart
|
||||||
|
ORDER BY
|
||||||
|
ttrss_error_log.id DESC
|
||||||
|
LIMIT $limit OFFSET $offset");
|
||||||
|
|
||||||
print "</div>"; # toolbar
|
$sth->execute($errno_values);
|
||||||
|
|
||||||
print '<div style="padding : 0px" dojoType="dijit.layout.ContentPane" region="center">';
|
while ($line = $sth->fetch()) {
|
||||||
|
foreach ($line as $k => $v) { $line[$k] = htmlspecialchars($v); }
|
||||||
print "<table width='100%' class='event-log'>";
|
?>
|
||||||
|
<tr>
|
||||||
print "<tr class='title'>
|
<td class='errno'>
|
||||||
<td width='5%'>".__("Error")."</td>
|
<?php echo Logger::$errornames[$line["errno"]] . " (" . $line["errno"] . ")" ?>
|
||||||
<td>".__("Filename")."</td>
|
</td>
|
||||||
<td>".__("Message")."</td>
|
<td class='filename'><?php echo $line["filename"] . ":" . $line["lineno"] ?></td>
|
||||||
<td width='5%'>".__("User")."</td>
|
<td class='errstr'><?php echo $line["errstr"] . "\n" . $line["context"] ?></td>
|
||||||
<td width='5%'>".__("Date")."</td>
|
<td class='login'><?php echo $line["login"] ?></td>
|
||||||
</tr>";
|
<td class='timestamp'>
|
||||||
|
<?php TimeHelper::make_local_datetime($line["created_at"], false) ?>
|
||||||
$sth = $this->pdo->prepare("SELECT
|
</td>
|
||||||
errno, errstr, filename, lineno, created_at, login, context
|
</tr>
|
||||||
FROM
|
<?php } ?>
|
||||||
ttrss_error_log LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id)
|
</table>
|
||||||
WHERE
|
</div>
|
||||||
$errno_filter_qpart
|
</div>
|
||||||
ORDER BY
|
<?php
|
||||||
ttrss_error_log.id DESC
|
|
||||||
LIMIT $limit OFFSET $offset");
|
|
||||||
|
|
||||||
$sth->execute($errno_values);
|
|
||||||
|
|
||||||
while ($line = $sth->fetch()) {
|
|
||||||
print "<tr>";
|
|
||||||
|
|
||||||
foreach ($line as $k => $v) {
|
|
||||||
$line[$k] = htmlspecialchars($v);
|
|
||||||
}
|
|
||||||
|
|
||||||
print "<td class='errno'>" . Logger::$errornames[$line["errno"]] . " (" . $line["errno"] . ")</td>";
|
|
||||||
print "<td class='filename'>" . $line["filename"] . ":" . $line["lineno"] . "</td>";
|
|
||||||
print "<td class='errstr'>" . $line["errstr"] . "\n" . $line["context"] . "</td>";
|
|
||||||
print "<td class='login'>" . $line["login"] . "</td>";
|
|
||||||
|
|
||||||
print "<td class='timestamp'>" .
|
|
||||||
TimeHelper::make_local_datetime($line["created_at"], false) . "</td>";
|
|
||||||
|
|
||||||
print "</tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</table>";
|
|
||||||
print "</div>";
|
|
||||||
print "</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function index() {
|
function index() {
|
||||||
|
|||||||
Reference in New Issue
Block a user