function hackedProjectWebDevDownloader::download_link in Hacked! 7.2
Get download information for the dev release.
Return value
array 'module' => The name of the project. 'giturl' => The upstream URL of the project. 'branch' => The development branch the snapshot was taken from. 'timestamp' => When the project was originally downloaded.
1 call to hackedProjectWebDevDownloader::download_link()
- hackedProjectWebDevDownloader::download in includes/
hackedProjectWebDevDownloader.inc - Download the version of the project to compare.
File
- includes/
hackedProjectWebDevDownloader.inc, line 17
Class
- hackedProjectWebDevDownloader
- Downloads the dev version of a project.
Code
function download_link() {
$info = array();
$project =& $this->project->project_info;
// Get the branch we're on.
$release = strtok($project['existing_version'], '-') . '-' . $project['existing_major'] . '.x-dev';
$branch = $project['releases'][$release]['tag'];
// Assign some information depending on the project type.
if ($project['project_type'] == 'core') {
// Special handling for core.
$info['module'] = 'drupal';
}
else {
// Contrib.
$info['module'] = $project['name'];
}
// Assign all of the other information.
$info['giturl'] = 'https://git.drupal.org/project/' . $project['name'] . '.git';
$info['branch'] = $branch;
$info['timestamp'] = $project['datestamp'];
// Return it.
return $info;
}