Skip to content

Instantly share code, notes, and snippets.

@xurizaemon
Created February 4, 2011 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xurizaemon/810531 to your computer and use it in GitHub Desktop.
Save xurizaemon/810531 to your computer and use it in GitHub Desktop.
zipcart debug
dpm($zipfunction, 'zipfunction');
dpm($files, 'files');
if ( !function_exists($zipfunction) ) {
drupal_set_message(t('Function !zipfunction not available - look for an issue at !project_url.', array('!zipfunction' => $zipfunction, '!project_url' => l('the ZipCart project page', 'http://drupal.org/project/zipcart'))), 'error');
return 'Download failed - Zip function not supported.';
}
else {
if ( !$zipfunction($files) ) {
return 'Download failed.' ;
}
else {
drupal_set_message('Zip downloaded');
return TRUE ;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment