You are here

function dropbox_client_search_form_submit in Dropbox Client 7.3

Same name and namespace in other branches
  1. 7.4 dropbox_client.module \dropbox_client_search_form_submit()
  2. 7 dropbox_client.module \dropbox_client_search_form_submit()
  3. 7.2 dropbox_client.module \dropbox_client_search_form_submit()

File

./dropbox_client.module, line 460

Code

function dropbox_client_search_form_submit($form, &$form_state) {
  global $user;
  $dropbox = dropbox_client_get_client();
  $query = $form_state['values']['search'];
  $dpath = isset($_GET['dpath']) ? $_GET['dpath'] : '/';
  $results = $dropbox
    ->search($dpath, $query);
  $_SESSION['dropbox_client_results'] = $results;
}