Skip to content

Commit

Permalink
Server: removed package versions to save screen space
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B authored and Phylon committed Mar 10, 2014
1 parent 382011a commit 7a2fa37
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions server/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,19 +451,16 @@ function log_error($message, $my_email, $data = null) {
$apps[$i] = "'" . $db->real_escape_string($apps[$i]) . "'";

$package_names = array();
$package_versions = array();
if (count($apps)) {
// Get package names
$sql = "SELECT DISTINCT package_name, package_version, package_version_code";
$sql = "SELECT DISTINCT package_name";
$sql .= " FROM xprivacy_app";
$sql .= " WHERE application_name IN (" . implode(',', $apps) . ")";
$sql .= " ORDER BY package_name, package_version";
$sql .= " ORDER BY package_name";
$result = $db->query($sql);
if ($result) {
while (($row = $result->fetch_object())) {
while (($row = $result->fetch_object()))
$package_names[] = $row->package_name;
$package_versions[] = $row->package_version . ' (' . $row->package_version_code . ')';
}
$result->close();
}
else
Expand All @@ -477,7 +474,6 @@ function log_error($message, $my_email, $data = null) {
for ($i = 0; $i < count($package_names); $i++) {
echo '<a href="/xprivacy?package_name=' . urlencode($package_names[$i]) . '">';
echo htmlentities($package_names[$i], ENT_COMPAT, 'UTF-8') . '</a> ';
echo htmlentities($package_versions[$i]) . ' ';
}
?>
</p>
Expand Down

0 comments on commit 7a2fa37

Please sign in to comment.