You are here

function dropbox_files_list in Dropbox Client 7.3

Same name and namespace in other branches
  1. 7.4 dropbox_client.module \dropbox_files_list()
1 string reference to 'dropbox_files_list'
dropbox_client_menu in ./dropbox_client.module
Implements hook_menu().

File

./dropbox_client.module, line 46

Code

function dropbox_files_list() {
  global $user;

  //print_r(variable_get( 'dropbox_client_website_oauth_token', 0 ));
  $content = '';
  $dpath = isset($_GET['dpath']) ? $_GET['dpath'] : '/';
  if ($user->uid && variable_get('dropbox_client_account_type', 0) == 2 && isset($user->data['dropbox']['token_secret'])) {
    $content = dropbox_client_metadata($dpath) . l('Link Dropbox to Website with another account', 'dropbox_client/install') . '</span>';
  }
  elseif (variable_get('dropbox_client_account_type', 0) == 1 && is_string(variable_get('dropbox_client_website_oauth_token', 0))) {
    $content = dropbox_client_metadata($dpath);
  }
  elseif (variable_get('dropbox_client_account_type', 0) == 2) {
    $content = l('Click here to add drop box folder', 'dropbox_client/install');
  }
  elseif (variable_get('dropbox_client_account_type', 0) == 1) {
    $content = l('Link Dropbox to Website with another account', 'dropbox_client/install');
  }
  return $content;
}