Removed global vars from search
This commit is contained in:
parent
705a383bec
commit
368f6b59d0
@ -111,8 +111,8 @@ switch ($_POST['function']) {
|
|||||||
|
|
||||||
// Search Function
|
// Search Function
|
||||||
|
|
||||||
case 'search': if (isset($_POST['term']))
|
case 'search': if (!isset($_POST['term'])) exit();
|
||||||
echo json_encode(search($_POST['term']));
|
echo json_encode(search($database, $settings, $_POST['term']));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Session Function
|
// Session Function
|
||||||
|
@ -39,9 +39,9 @@ function getGraphHeader($database, $photoID) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function search($term) {
|
function search($database, $settings, $term) {
|
||||||
|
|
||||||
global $database, $settings;
|
if (!isset($database, $settings, $term)) return false;
|
||||||
|
|
||||||
$return['albums'] = '';
|
$return['albums'] = '';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user