Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add number formatting to total bounces on listbounces page #245

Merged
merged 1 commit into from Jan 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions public_html/lists/admin/actions/listbounces.php
Expand Up @@ -16,7 +16,7 @@
$req = Sql_Query(sprintf('select id from '.$tables['list'].' where owner = %d and id = %d',
$_SESSION['logindetails']['id'], $listid));
if (!Sql_Affected_Rows()) {
Fatal_Error($GLOBALS['I18N']->get('You do not have enough privileges to view this page'));
Fatal_Error(s('You do not have enough privileges to view this page'));

return;
}
Expand All @@ -30,7 +30,7 @@
case 'none':
default:
if ($listid) {
Fatal_Error($GLOBALS['I18N']->get('You do not have enough privileges to view this page'));
Fatal_Error(s('You do not have enough privileges to view this page'));
$isowner_and = sprintf(' list.owner = 0 and ');
$isowner_where = sprintf(' where list.owner = 0 ');

Expand All @@ -45,18 +45,18 @@
%s umb, %s lm where %s list.id = listuser.listid and listuser.listid = lm.listid and listuser.userid = umb.user group by listuser.listid
order by listuser.listid limit 250', $GLOBALS['tables']['list'], $GLOBALS['tables']['listuser'],
$GLOBALS['tables']['user_message_bounce'], $GLOBALS['tables']['listmessage'], $isowner_and));
$ls = new WebblerListing($GLOBALS['I18N']->get('Choose a list'));
$ls = new WebblerListing(s('Choose a list'));
$ls->setElementHeading('List name');
$some = 0;
while ($row = Sql_Fetch_Array($req)) {
$some = 1;
$element = '<!--'.$GLOBALS['I18N']->get('list').' '.$row['listid'].'-->'.listName($row['listid']);
$element = '<!--'.s('list').' '.$row['listid'].'-->'.listName($row['listid']);
$ls->addElement($element, PageUrl2('listbounces&amp;id='.$row['listid']));
// $ls->addColumn($element,$GLOBALS['I18N']->get('name'),listName($row['listid']),PageUrl2('editlist&amp;id='.$row['listid']));
$ls->addColumn($element, $GLOBALS['I18N']->get('Total bounces'), $row['numusers']);
$ls->addColumn($element, s('Total bounces'), number_format($row['numusers']));
}
if ($some) {
$status = $ls->display();
} else {
$status = '<p>'.$GLOBALS['I18N']->get('None found').'</p>';
$status = '<p>'.s('None found').'</p>';
}