* Copyright 1999-2001 (c) VA Linux Systems
* Copyright 2003-2004 (c) Guillaume Smet - Open Wide
* Copyright 2010 (c) Franck Villaume - Capgemini
+ * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2012, Franck Villaume - TrivialDev
* http://fusionforge.org/
*
- * This file is part of FusionForge.
- *
- * FusionForge is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
*
* FusionForge is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with FusionForge; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
$feedback = getStringFromRequest('feedback');
if ($group_id) {
- $group =& group_get_object($group_id);
+ $group = group_get_object($group_id);
if (!$group || !is_object($group) || $group->isError()) {
exit_no_group();
}
if(!$mailingList->update(
unInputSpecialChars(getStringFromPost('description')),
- getIntFromPost('is_public', MAIL__MAILING_LIST_IS_PUBLIC)
+ getIntFromPost('is_public', MAIL__MAILING_LIST_IS_PUBLIC),
+ MAIL__MAILING_LIST_IS_UPDATED
)) {
exit_error($mailingList->getErrorMessage(),'mail');
} else {
// Form to add list
//
if(getIntFromGet('add_list')) {
- mail_header(array(
- 'title' => _('Add a Mailing List')));
- printf(_('<p>Lists are named in this manner:<br /><strong>projectname-listname@%1$s</strong></p><p>It will take <span class="important">6-24 Hours</span> for your list to be created.</p>'), forge_get_config('lists_host'));
+ mail_header(array('title' => _('Add a Mailing List')));
+ print '<p>';
+ printf(_('Lists are named in this manner:<br /><strong>projectname-listname@%1$s</strong>'), forge_get_config('lists_host'));
+ print '</p>';
+
+ print '<p>';
+ print _('It will take <span class="important">6-24 Hours</span> for your list to be created.');
+ print '</p>';
$mlFactory = new MailingListFactory($group);
if (!$mlFactory || !is_object($mlFactory) || $mlFactory->isError()) {
exit_error($mlFactory->getErrorMessage(),'mail');
}
- $mlArray =& $mlFactory->getMailingLists();
+ $mlArray = $mlFactory->getMailingLists();
if ($mlFactory->isError()) {
- echo '<h1>'._('Error').' '._('Unable to get the lists') .'</h1>';
- echo '<div class="error">'.$mlFactory->getErrorMessage().'</div>';
+ echo '<p class="error">'._('Error').' '._('Unable to get the lists') .$mlFactory->getErrorMessage().'</p>';
mail_footer(array());
exit;
}
<input type="hidden" name="add_list" value="y" />
<input type="hidden" name="form_key" value="<?php echo form_generate_key();?>" />
<p><strong><?php echo _('Mailing List Name:'); ?></strong><br />
- <strong><?php echo $group->getUnixName(); ?>-<input type="text" name="list_name" value="" size="10" maxlength="12" />@<?php echo forge_get_config('lists_host'); ?></strong><br /></p>
+ <strong><?php echo $group->getUnixName(); ?>-<input type="text" name="list_name" value="" size="10" maxlength="12" />@<?php echo forge_get_config('lists_host'); ?></strong></p>
<p>
<strong><?php echo _('Is Public?'); ?></strong><br />
<input type="radio" name="is_public" value="<?php echo MAIL__MAILING_LIST_IS_PUBLIC; ?>" checked="checked" /> <?php echo _('Yes'); ?><br />
<input type="radio" name="is_public" value="<?php echo MAIL__MAILING_LIST_IS_PRIVATE; ?>" /> <?php echo _('No'); ?></p><p>
<strong><?php echo _('Description:'); ?></strong><br />
- <input type="text" name="description" value="" size="40" maxlength="80" /><br /></p>
+ <input type="text" name="description" value="" size="40" maxlength="80" /></p>
<p>
<input type="submit" name="submit" value="<?php echo _('Add This List'); ?>" /></p>
</form>
<input type="radio" name="is_public" value="<?php echo MAIL__MAILING_LIST_IS_PRIVATE; ?>"<?php echo ($mailingList->isPublic() == MAIL__MAILING_LIST_IS_PRIVATE ? ' checked="checked"' : ''); ?> /> <?php echo _('No'); ?>
</p>
<p><strong><?php echo _('Description:'); ?></strong><br />
- <input type="text" name="description" value="<?php echo inputSpecialChars($mailingList->getDescription()); ?>" size="40" maxlength="80" /><br /></p>
+ <input type="text" name="description" value="<?php echo inputSpecialChars($mailingList->getDescription()); ?>" size="40" maxlength="80" /></p>
<p>
<input type="submit" name="submit" value="<?php echo _('Update'); ?>" /></p>
</form>
'title' => _('Mailing List Administration'))
);
- $mlArray =& $mlFactory->getMailingLists();
+ $mlArray = $mlFactory->getMailingLists();
if ($mlFactory->isError()) {
echo '<p>'._('Error').' '.sprintf(_('Unable to get the list %s'), $group->getPublicName()) .'</p>';
echo '<tr '. $HTML->boxGetAltRowStyle($i) . '><td width="60%">'.
'<strong>'.$currentList->getName().'</strong><br />'.
htmlspecialchars($currentList->getDescription()).'</td>'.
- '<td style="text-align:center"><a href="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&group_list_id='.$currentList->getID().'&change_status=1">'._('Update').'</a></td>' ;
+ '<td style="text-align:center">';
+ if ($currentList->getStatus() != MAIL__MAILING_LIST_PW_RESET_REQUESTED) {
+ echo '<a href="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&group_list_id='.$currentList->getID().'&change_status=1">'._('Update').'</a>';
+ }
+ echo '</td>';
echo '<td style="text-align:center">';
if($currentList->getStatus() == MAIL__MAILING_LIST_IS_REQUESTED) {
echo _('Not activated yet');
} else {
- echo '<a href="'.$currentList->getExternalAdminUrl().'">'._('Administrate').'</a></td>';
+ echo '<a href="'.$currentList->getExternalAdminUrl().'">'._('Administration').'</a>';
}
+ echo '</td>';
echo '<td style="text-align:center">';
if($currentList->getStatus() == MAIL__MAILING_LIST_IS_CONFIGURED) {
print '<a href="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&group_list_id='.$currentList->getID().'&reset_pw=1">'._('Reset admin password').'</a></td>' ;