Skip to content

Commit

Permalink
Issue #29: Updated to code sign to remove hash symbols, minor UI upda…
Browse files Browse the repository at this point in the history
…tes.
  • Loading branch information
quicksketch committed Oct 31, 2019
1 parent 0d5dc72 commit b3ed711
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions project_code_sign/config/project_code_sign.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_config_name": "project_code_sign.settings",
"enabled_profiles": []
}
4 changes: 2 additions & 2 deletions project_code_sign/project_code_sign.admin.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function project_code_sign_admin_form($form, &$form_state) {
$rows = array();
foreach($signing_profiles as $key => $profile) {
$rows[$key] = array(
'name' => check_plain($profile['#name']),
'crypto_engine' => $profile['#crypto_engine'],
'name' => check_plain($profile['name']),
'crypto_engine' => $profile['crypto_engine'],
'profile_id' => check_plain($key),
);
}
Expand Down
6 changes: 3 additions & 3 deletions project_code_sign/project_code_sign.module
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ function project_code_sign_project_release_release_xml_alter(&$project_meta, $re
$signers = project_code_sign_get_active_signature_profiles();

foreach ($signers as $signer => $signer_info) {
$signature = project_code_sign_sign_url($signer_info['#crypto_engine'], $signer_info['#profile_id'], $release, $project_values['date'], $project_values['download_link']);
$signature = project_code_sign_sign_url($signer_info['crypto_engine'], $signer_info['profile_id'], $release, $project_values['date'], $project_values['download_link']);
if ($signature) {
$sig_list[] = array(
'key' => 'signature',
'value' => array(
'crypto_engine' => $signer_info['#crypto_engine'],
'profile_id' => $signer_info['#profile_id'],
'crypto_engine' => $signer_info['crypto_engine'],
'profile_id' => $signer_info['profile_id'],
'signature_block' => $signature,
),
);
Expand Down
8 changes: 7 additions & 1 deletion project_release/project_release.admin.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@
* An admin page with a button to regenerate the project XML for all projects.
*/
function project_release_admin_regenerate_form($form, &$form_state) {
$form['help'] = array(
'#type' => 'help',
'#markup' => t('Deleting all project release XML files will cause them to be generate next time they are requested. Note this can cause substantial load as new files are generated. This should only be done if all XML release files need to be updated.'),
);

$form['submit'] = array(
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => 'Regenerate Release XML',
'#attributes' => array('class' => array('button-danger')),
);

$form['#submit'][] = 'project_release_admin_regenerate_form_submit';
Expand Down
2 changes: 1 addition & 1 deletion project_release/project_release.module
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ function _project_release_node_save(Node $node) {
// Determine the download file size if not provided.
$is_new = empty($node->original);
$update_download_size = FALSE;
if (is_null($node->project_release['download_size']) || $node->project_release['download_size'] === '') {
if (!isset($node->project_release['download_size']) || $node->project_release['download_size'] === '') {
$update_download_size = TRUE;
}
if (!$is_new && $node->original->project_release['download_link'] !== $node->project_release['download_link']) {
Expand Down

0 comments on commit b3ed711

Please sign in to comment.