function hacked_project_load in Hacked! 5
Same name and namespace in other branches
- 6.2 hacked.module \hacked_project_load()
- 6 hacked.module \hacked_project_load()
- 7.2 hacked.module \hacked_project_load()
Menu loader for loading a project from its short name.
In this function we call the calculate function both the update module and our hacked module. This may mean we return FALSE when there is no internet connection.
Parameters
$short_name: The short name of the project to load.
$ensure_downloaded: Should the project be downloaded to the local cache.
4 calls to hacked_project_load()
- drush_hacked_details in ./
hacked.drush.inc - Drush command callback that shows the list of changes/unchanged files in a project.
- drush_hacked_diff in ./
hacked.drush.inc - Drush command callback that shows the list of changes/unchanged files in a project.
- hacked_project_nocache_load in ./
hacked.module - Menu loader for loading a project from its short name.
- _hacked_reports_hacked_details in ./
hacked.module
File
- ./
hacked.module, line 121 - The Hacked! module, shows which project have been changed since download.
Code
function hacked_project_load($short_name, $ensure_downloaded = FALSE) {
$available = update_status_get_available();
$data = update_status_calculate_project_data($available);
foreach ($data as $key => $project) {
if ($project['short_name'] == $short_name) {
$data_truncated = array(
$key => $project,
);
$data_truncated = hacked_calculate_project_data($data_truncated, $ensure_downloaded);
return $data_truncated[$key];
}
}
return FALSE;
}