1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 10:15:55 +00:00

move more globals to more appropriate places

set libxml to always use internal errors
This commit is contained in:
Andrew Dolgov
2019-06-20 08:40:02 +03:00
parent 4fa9aee4e7
commit 088fcf8131
7 changed files with 386 additions and 390 deletions

View File

@@ -362,7 +362,7 @@ class Pref_Users extends Handler_Protected {
print "</div>"; #pane
print "<div style='padding : 0px' dojoType='dijit.layout.ContentPane' region='center'>";
$sort = validate_field($sort,
$sort = $this->validate_field($sort,
["login", "access_level", "created", "num_feeds", "created", "last_login"], "login");
if ($sort != "login") $sort = "$sort DESC";
@@ -435,4 +435,12 @@ class Pref_Users extends Handler_Protected {
print "</div>"; #container
}
}
function validate_field($string, $allowed, $default = "") {
if (in_array($string, $allowed))
return $string;
else
return $default;
}
}