Merge pull request #214 from tuscanhobbit/master

admin user table now shows the channel list and ID, minor changes to admin summary table
This commit is contained in:
friendica 2013-11-25 03:00:05 -08:00
commit cf3e6a34ae
3 changed files with 16 additions and 15 deletions

View File

@ -474,7 +474,7 @@ function admin_page_hubloc(&$a) {
'$title' => t('Administration'), '$title' => t('Administration'),
'$page' => t('Server'), '$page' => t('Server'),
'$queues' => $queues, '$queues' => $queues,
'$accounts' => $accounts, //'$accounts' => $accounts, /*$accounts is empty here*/
'$pending' => Array( t('Pending registrations'), $pending), '$pending' => Array( t('Pending registrations'), $pending),
'$plugins' => Array( t('Active plugins'), $a->plugins ) '$plugins' => Array( t('Active plugins'), $a->plugins )
)); ));
@ -649,7 +649,10 @@ function admin_page_users(&$a){
if($_REQUEST['order'] === 'expires') if($_REQUEST['order'] === 'expires')
$order = " order by account_expires desc "; $order = " order by account_expires desc ";
$users =q("SELECT `account_id` , `account_email`, `account_lastlog`, `account_created`, `account_expires`, `account_service_class`, ( account_flags & %d ) > 0 as `blocked` FROM `account` where true $serviceclass $order limit %d , %d ", $users =q("SELECT `account_id` , `account_email`, `account_lastlog`, `account_created`, `account_expires`, " . "`account_service_class`, ( account_flags & %d ) > 0 as `blocked`, " .
"(SELECT GROUP_CONCAT( ch.channel_address SEPARATOR ' ') FROM channel as ch " .
"WHERE ch.channel_account_id = ac.account_id) as `channels` " .
"FROM account as ac where true $serviceclass $order limit %d , %d ",
intval(ACCOUNT_BLOCKED), intval(ACCOUNT_BLOCKED),
intval($a->pager['start']), intval($a->pager['start']),
intval($a->pager['itemspage']) intval($a->pager['itemspage'])
@ -689,7 +692,7 @@ function admin_page_users(&$a){
'$unblock' => t('Unblock'), '$unblock' => t('Unblock'),
'$h_users' => t('Users'), '$h_users' => t('Users'),
'$th_users' => array( t('Email'), t('Register date'), t('Last login'), t('Expires'), t('Service Class')), '$th_users' => array( t('ID'), t('Email'), t('All Channels'), t('Register date'), t('Last login'), t('Expires'), t('Service Class')),
'$confirm_delete_multi' => t('Selected users will be deleted!\n\nEverything these users had posted on this site will be permanently deleted!\n\nAre you sure?'), '$confirm_delete_multi' => t('Selected users will be deleted!\n\nEverything these users had posted on this site will be permanently deleted!\n\nAre you sure?'),
'$confirm_delete' => t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'), '$confirm_delete' => t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'),

View File

@ -14,27 +14,23 @@
<dt>{{$users.0}}</dt> <dt>{{$users.0}}</dt>
<dd>{{$users.1}}</dd> <dd>{{$users.1}}</dd>
</dl> </dl>
{{foreach $accounts as $p}} <!-- $accounts is empty
{{foreach $accounts as $p}}
<dl> <dl>
<dt>{{$p.0}}</dt> <dt>{{$p.0}}</dt>
<dd>{{if $p.1}}{{$p.1}}{{else}}0{{/if}}</dd> <dd>{{if $p.1}}{{$p.1}}{{else}}0{{/if}}</dd>
</dl> </dl>
{{/foreach}} {{/foreach}} -->
<dl> <dl>
<dt>{{$plugins.0}}</dt> <dt>{{$plugins.0}}</dt>
<dd>
{{foreach $plugins.1 as $p}} {{foreach $plugins.1 as $p}} {{$p}} {{/foreach}}
<dd>{{$p}}</dd> &nbsp;
{{/foreach}} </dd>
</dl> </dl>
<dl> <dl>
<dt>{{$version.0}}</dt> <dt>{{$version.0}}</dt>
<dd>{{$version.1}} - {{$build}}</dt> <dd>{{$version.1}} - {{$build}}</dd>
</dl> </dl>
</div> </div>

View File

@ -63,11 +63,13 @@
<tbody> <tbody>
{{foreach $users as $u}} {{foreach $users as $u}}
<tr> <tr>
<td class='account_id'>{{$u.account_id}}</td>
<td class='email'>{{if $u.blocked}} <td class='email'>{{if $u.blocked}}
<i>{{$u.account_email}}</i> <i>{{$u.account_email}}</i>
{{else}} {{else}}
<strong>{{$u.account_email}}</strong> <strong>{{$u.account_email}}</strong>
{{/if}}</td> {{/if}}</td>
<td class='channels'>{{$u.channels}}</td>
<td class='register_date'>{{$u.account_created}}</td> <td class='register_date'>{{$u.account_created}}</td>
<td class='login_date'>{{$u.account_lastlog}}</td> <td class='login_date'>{{$u.account_lastlog}}</td>
<td class='account_expires'>{{$u.account_expires}}</td> <td class='account_expires'>{{$u.account_expires}}</td>