Allow GET hash for API calls

This commit is contained in:
DL6ER
2016-11-20 15:46:05 +01:00
parent 28dd6ed75a
commit f84d54558b
2 changed files with 13 additions and 6 deletions

13
api.php
View File

@@ -1,4 +1,5 @@
<?php
$api = true;
require "php/password.php";
include('data.php');
@@ -31,29 +32,29 @@
$data = array_merge($data, getTopItems());
}
// Requires authorization
// Requires authorization
if (isset($_GET['recentItems']) && $auth) {
if (is_numeric($_GET['recentItems'])) {
$data = array_merge($data, getRecentItems($_GET['recentItems']));
}
}
// Requires authorization
// Requires authorization
if (isset($_GET['getQueryTypes']) && $auth) {
$data = array_merge($data, getIpvType());
}
// Requires authorization
// Requires authorization
if (isset($_GET['getForwardDestinations']) && $auth) {
$data = array_merge($data, getForwardDestinations());
}
// Requires authorization
// Requires authorization
if (isset($_GET['getQuerySources']) && $auth) {
$data = array_merge($data, getQuerySources());
}
// Requires authorization
// Requires authorization
if (isset($_GET['getAllQueries']) && $auth) {
$data = array_merge($data, getAllQueries());
}