Removed global vars from search

This commit is contained in:
Tobias Reich 2014-04-19 20:27:53 +02:00
parent 705a383bec
commit 368f6b59d0
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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'] = '';