*
* Copyright 1999-2001 (c) VA Linux Systems
* Copyright 2002-2004 (c) GForge Team
- * Copyright 2012, Franck Villaume - TrivialDev
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
* http://fusionforge.org/
*
* This file is part of FusionForge. FusionForge is free software;
session_redirect('/frs/admin/?group_id='.$group_id);
}
-$group=group_get_object($group_id);
+$group = group_get_object($group_id);
if (!$group || !is_object($group)) {
exit_no_group();
} elseif ($group->isError()) {
//
$frsp = new FRSPackage($group,$package_id);
if (!$frsp || !is_object($frsp)) {
- exit_error(_('Could Not Get FRSPackage'),'frs');
+ exit_error(_('Could Not Get FRS Package'),'frs');
} elseif ($frsp->isError()) {
exit_error($frsp->getErrorMessage(),'frs');
}
//
$frsr = new FRSRelease($frsp,$release_id);
if (!$frsr || !is_object($frsr)) {
- exit_error(_('Could Not Get FRSRelease'),'frs');
+ exit_error(_('Could Not Get FRS Release'),'frs');
} elseif ($frsr->isError()) {
exit_error($frsr->getErrorMessage(),'frs');
}
$upload_dir = forge_get_config('ftp_upload_dir') . "/" . $group->getUnixName();
-
/*
* Here's where we do the dirty work based on the step the user has chosen
*/
}
}
} else {
- $error_msg .= _('File not deleted: you did not check "I\'m Sure"');
+ $error_msg .= _('File not deleted: you did not check “I am Sure”');
}
// Otherwise update the file information
} else {
<form enctype="multipart/form-data" method="post" action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&release_id=$release_id&package_id=$package_id"; ?>">
<input type="hidden" name="step1" value="1" />
-<table cellpadding="1" cellspacing="1">
+<table>
<tr>
- <td width="10%"><strong><?php echo _('Release date') ?>:</strong></td>
+ <td><strong><?php echo _('Release Date')._(':'); ?></strong></td>
<td><input type="text" name="release_date" value="<?php echo date('Y-m-d H:i',$frsr->getReleaseDate()) ?>" size="16" maxlength="16" /></td>
</tr>
<tr>
- <td><strong><?php echo _('Release name') ?>:</strong></td>
- <td><input type="text" name="release_name" value="<?php echo htmlspecialchars($frsr->getName()); ?>" /></td>
+ <td><strong><?php echo _('Release Name')._(':').utils_requiredField(); ?></strong></td>
+ <td><input type="text" name="release_name" value="<?php echo $frsr->getName(); ?>" required="required" pattern=".{3,}" title="<?php echo _('At least 3 characters') ?>"/></td>
</tr>
<tr>
- <td><strong><?php echo _('Status') ?></strong></td>
+ <td><strong><?php echo _('Status')._(':'); ?></strong></td>
<td>
<?php
echo frs_show_status_popup('status_id',$frsr->getStatus());
<tr>
<td colspan="2">
<br />
- <?php echo _('Edit the Release Notes or Change Log for this release of this package. These changes will apply to all files attached to this release.<br />You can either upload the release notes and change log individually, or paste them in together below.') ?>
+ <?php echo _('Edit the Release Notes or Change Log for this release of this package. These changes will apply to all files attached to this release.') ?>
+ <br />
+ <?php echo _('You can either upload the release notes and change log individually, or paste them in together below.') ?>
</td>
</tr>
<tr>
- <td colspan="2"><strong><?php echo _('Upload Release Notes') ?>:</strong> <?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?></td>
+ <td colspan="2"><strong><?php echo _('Upload Release Notes')._(':'); ?></strong>
+ <?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?></td>
</tr>
<tr>
<td><input type="file" name="uploaded_notes" size="30" /></td>
</tr>
<tr>
- <td colspan="2"><strong><?php echo _('Upload Change Log') ?>:</strong> <?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?></td>
+ <td colspan="2"><strong><?php echo _('Upload Change Log')._(':'); ?></strong>
+ <?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?></td>
</tr>
<tr>
<td><input type="file" name="uploaded_changes" size="30" /></td>
</tr>
<tr>
<td colspan="2">
- <strong><?php echo _('Paste The Notes In') ?>:</strong><br />
+ <strong><?php echo _('Paste The Notes In')._(':'); ?></strong><br />
<textarea name="release_notes" rows="10" cols="60"><?php echo $frsr->getNotes(); ?></textarea>
</td>
</tr>
<tr>
<td colspan="2">
- <strong><?php echo _('Paste The Change Log In') ?>:</strong><br />
+ <strong><?php echo _('Paste The Change Log In')._(':'); ?></strong><br />
<textarea name="release_changes" rows="10" cols="60"><?php echo $frsr->getChanges(); ?></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<br />
- <input type="checkbox" name="preformatted" value="1" <?php echo (($frsr->getPreformatted())?'checked="checked"':''); ?> /> <?php echo _('Preserve my pre-formatted text.') ?>
+ <input type="checkbox" name="preformatted" value="1" <?php echo (($frsr->getPreformatted())?'checked="checked"':''); ?> /> <?php echo _('Preserve my pre-formatted text') ?>
<p>
<input type="submit" name="submit" value="<?php echo _('Submit/Refresh') ?>"/>
</p>
<input type="hidden" name="step2" value="1" />
<fieldset><legend><strong><?php echo _("File Name") ?></strong></legend>
<?php echo _("Upload a new file") ?>: <input type="file" name="userfile" size="30" /> <?php echo('('._('max upload size: '.human_readable_bytes(util_get_maxuploadfilesize())).')') ?>
-<?php if (forge_get_config('use_ftp_uploads')) {
+<?php
+if (forge_get_config('use_ftp_uploads')) {
echo '<p>';
- printf(_('Alternatively, you can use FTP to upload a new file at %1$s.'), forge_get_config('ftp_upload_host'));
+ printf(_('Alternatively, you can use FTP to upload a new file at %s.'), forge_get_config('ftp_upload_host'));
echo '<br />';
echo _('Choose an already uploaded file:').'<br />';
$ftp_files_arr=frs_filterfiles(ls($upload_dir,true));
- echo html_build_select_box_from_arrays($ftp_files_arr,$ftp_files_arr,'ftp_filename',''); ?>
- </p>
-<?php } ?>
+ echo html_build_select_box_from_arrays($ftp_files_arr,$ftp_files_arr,'ftp_filename','');
+ echo '</p>';
+}
-<?php if (forge_get_config('use_manual_uploads')) {
+if (forge_get_config('use_manual_uploads')) {
$incoming = forge_get_config('groupdir_prefix')."/".$group->getUnixName()."/incoming" ;
-
echo '<p>';
printf(_('Alternatively, you can use a file you already uploaded (by SFTP or SCP) to the <a href="%2$s">project\'s incoming directory</a> (%1$s).'),
- $incoming, "sftp://" . forge_get_config ('web_host') . $incoming . "/");
+ $incoming, "sftp://" . forge_get_config ('web_host') . $incoming . "/");
echo ' ' . _('This direct <tt>sftp://</tt> link only works with some browsers, such as Konqueror.') . '<br />';
echo _('Choose an already uploaded file:').'<br />';
$manual_files_arr=frs_filterfiles(ls($incoming,true));
- echo html_build_select_box_from_arrays($manual_files_arr,$manual_files_arr,'manual_filename',''); ?>
- </p>
-<?php } ?>
+ echo html_build_select_box_from_arrays($manual_files_arr,$manual_files_arr,'manual_filename','');
+ echo '</p>';
+}
+?>
</fieldset>
<table width="60%">
<tr>
<td>
-<strong><?php echo _('File Type') ?>:</strong>
+<strong><?php echo _('File Type')._(':'); ?></strong>
<?php
print frs_show_filetype_popup ('type_id');
?>
</td>
<td>
-<strong><?php echo _('Processor Type') ?>:</strong>
+<strong><?php echo _('Processor Type')._(':'); ?></strong>
<?php
print frs_show_processor_popup ('processor_id');
?>
echo '<hr />';
echo '<h2>'._('Edit Files In This Release').'</h2>';
print(_('Once you have added files to this release you <strong>must</strong> update each of these files with the correct information or they will not appear on your download summary page.')."\n");
- $title_arr[]=_('Filename<br />Release').'<br />';
- $title_arr[]=_('Processor<br />Release Date').'<br />';
- $title_arr[]=_('File Type<br />Update').'<br />';
+ $title_arr[]=_('File Name').'<br />'._('Release').'<br />';
+ $title_arr[]=_('Processor').'<br />'._('Release Date').'<br />';
+ $title_arr[]=_('File Type').'<br />'._('Update').'<br />';
echo $GLOBALS['HTML']->listTableTop ($title_arr);
<td> </td>
<td> </td>
<td>
- <input type="submit" name="submit" value="<?php echo _('Delete File') ?> " /> <input type="checkbox" name="im_sure" value="1" /> <?php echo _('I\'m Sure') ?>
+ <input type="submit" name="submit" value="<?php echo _('Delete File') ?> " /> <input type="checkbox" name="im_sure" value="1" /> <?php echo _('I am Sure') ?>
</td>
</tr>
</form>
echo $GLOBALS['HTML']->listTableBottom();
}
-echo '<p>' . sprintf(ngettext('There is %1$s user monitoring this package.', 'There are %1$s users monitoring this package.', $frsp->getMonitorCount()), $frsp->getMonitorCount()) . '</p>';
+echo '<p>' . sprintf(ngettext('There is %s user monitoring this package.', 'There are %s users monitoring this package.', $frsp->getMonitorCount()), $frsp->getMonitorCount()) . '</p>';
frs_admin_footer();