| 1 |
<?php |
<?php |
| 2 |
// $Id: versioncontrol_release.module,v 1.7 2009/03/07 23:08:20 jpetso Exp $ |
// $Id: versioncontrol_release.module,v 1.8 2009/03/09 04:36:22 jpetso Exp $ |
| 3 |
/** |
/** |
| 4 |
* @file |
* @file |
| 5 |
* Version Control / Release Node integration - Integrates release nodes |
* Version Control / Release Node integration - Integrates release nodes |
| 750 |
// Make sure the file upload UI is gone if this project has a repository set |
// Make sure the file upload UI is gone if this project has a repository set |
| 751 |
// because in that case users should *never* have a way to upload files. |
// because in that case users should *never* have a way to upload files. |
| 752 |
// Otherwise, if no repository is set for this project, keep the upload UI. |
// Otherwise, if no repository is set for this project, keep the upload UI. |
| 753 |
if ((!$file || empty($file->filepath)) |
if (versioncontrol_project_node_uses_versioncontrol($project_node)) { |
| 754 |
&& versioncontrol_project_node_uses_versioncontrol($project_node)) { |
if (!$file || empty($file->filepath)) { |
| 755 |
unset($form['project_release_files']); |
unset($form['project_release_files']); |
| 756 |
|
} |
| 757 |
|
else { |
| 758 |
|
foreach (element_children($form['project_release_files']) as $key) { |
| 759 |
|
$form['project_release_files'][$key]['delete']['#access'] = FALSE; |
| 760 |
|
} |
| 761 |
|
} |
| 762 |
} |
} |
| 763 |
} |
} |