You are here

function drupalgap_download_app in DrupalGap 7

Same name and namespace in other branches
  1. 7.2 drupalgap.pages.inc \drupalgap_download_app()

Zip's up the "mobile-application" directory and downloads it for the user.

1 string reference to 'drupalgap_download_app'
drupalgap_menu in ./drupalgap.module
Implements hook_menu().

File

./drupalgap.pages.inc, line 56
Provides page callback functions for DrupalGap.

Code

function drupalgap_download_app() {
  $zipname = 'drupalgap-app.zip';
  DrupalGapZip(variable_get('drupalgap_sdk_dir', 'mobile-application'), $zipname);
  header('Content-Type: application/zip');
  header("Content-Disposition: attachment; filename='{$zipname}'");
  header('Content-Length: ' . filesize($zipname));
  header("Location: " . $GLOBALS['base_path'] . $zipname);
  drupal_exit();
}