mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-08-29 07:11:50 +00:00
fix API_ENABLED condition
This commit is contained in:
parent
13431008c4
commit
0df47efa8b
@ -9,16 +9,10 @@ require_once('../library/parser.php');
|
|||||||
require_once('../library/mysql.php');
|
require_once('../library/mysql.php');
|
||||||
require_once('../library/sphinxql.php');
|
require_once('../library/sphinxql.php');
|
||||||
|
|
||||||
if (!API_ENABLED) {
|
if (API_ENABLED) {
|
||||||
|
|
||||||
$response = [
|
// Action
|
||||||
'status' => false,
|
switch (!empty($_GET['action']) ? $_GET['action'] : false) {
|
||||||
'message' => _('API requests disabled by the node owner.'),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Action
|
|
||||||
switch (!empty($_GET['action']) ? $_GET['action'] : false) {
|
|
||||||
|
|
||||||
// Search API
|
// Search API
|
||||||
case 'search';
|
case 'search';
|
||||||
@ -78,6 +72,14 @@ switch (!empty($_GET['action']) ? $_GET['action'] : false) {
|
|||||||
'status' => false,
|
'status' => false,
|
||||||
'message' => _('Undefined API action request.'),
|
'message' => _('Undefined API action request.'),
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$response = [
|
||||||
|
'status' => false,
|
||||||
|
'message' => _('API requests disabled by the node owner.'),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
|
Loading…
x
Reference in New Issue
Block a user