aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-03-15 15:38:38 -0700
committerfriendica <info@friendica.com>2013-03-15 15:38:38 -0700
commit104b41164f609765df15aa5595d07dd0b775ed95 (patch)
tree612ad669e443ac9ab24bff51fc5f1901b5188ecd
parent5a29f511c1fa609f58f50d9148edd1fe77b23d9d (diff)
parentb48c481b9cb1b1c06634139dc0e6c4c91b83d873 (diff)
downloadvolse-hubzilla-104b41164f609765df15aa5595d07dd0b775ed95.tar.gz
volse-hubzilla-104b41164f609765df15aa5595d07dd0b775ed95.tar.bz2
volse-hubzilla-104b41164f609765df15aa5595d07dd0b775ed95.zip
Merge pull request #34 from beardy-unixer/master
Admin panel
-rw-r--r--mod/admin.php23
-rw-r--r--view/tpl/admin_users.tpl10
-rw-r--r--view/tpl/smarty3/admin_users.tpl10
3 files changed, 14 insertions, 29 deletions
diff --git a/mod/admin.php b/mod/admin.php
index aa3d7b294..be8575e4e 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -564,22 +564,10 @@ function admin_page_users(&$a){
$a->set_pager_itemspage(100);
}
-// FIXME this is borked since there is no more user table
-
- $users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`, `lastitem`.`lastitem_date`
- FROM
- (SELECT MAX(`item`.`changed`) as `lastitem_date`, `item`.`uid`
- FROM `item`
- WHERE `item`.`type` = 'wall'
- GROUP BY `item`.`uid`) AS `lastitem`
- RIGHT OUTER JOIN `user` ON `user`.`uid` = `lastitem`.`uid`,
- `contact`
- WHERE
- `user`.`uid` = `contact`.`uid`
- AND `user`.`verified` =1
- AND `contact`.`self` =1
- ORDER BY `contact`.`name` LIMIT %d, %d
- ",
+
+// WEe'll still need to link email addresses to admin/users/channels or some such, but this bit doesn't exist yet.
+// That's where we need to be doing last post/channel flags/etc, not here.
+ $users =q("SELECT `account_id` , `account_email`, `account_lastlog`, `account_created`, `account_service_class` FROM `account`",
intval($a->pager['start']),
intval($a->pager['itemspage'])
);
@@ -591,6 +579,7 @@ function admin_page_users(&$a){
t('Community/Celebrity Account'),
t('Automatic Friend Account')
);
+
$e['page_flags'] = $accounts[$e['page-flags']];
$e['register_date'] = relative_date($e['register_date']);
$e['login_date'] = relative_date($e['login_date']);
@@ -617,7 +606,7 @@ function admin_page_users(&$a){
'$unblock' => t('Unblock'),
'$h_users' => t('Users'),
- '$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account') ),
+ '$th_users' => array( t('Email'), t('Register date'), t('Last login'), 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' => t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'),
diff --git a/view/tpl/admin_users.tpl b/view/tpl/admin_users.tpl
index 727030f5d..6de504e2a 100644
--- a/view/tpl/admin_users.tpl
+++ b/view/tpl/admin_users.tpl
@@ -65,12 +65,10 @@
{{ for $users as $u }}
<tr>
<td><img src="$u.micro" alt="$u.nickname" title="$u.nickname"></td>
- <td class='name'><a href="$u.url" title="$u.nickname" >$u.name</a></td>
- <td class='email'>$u.email</td>
- <td class='register_date'>$u.register_date</td>
- <td class='login_date'>$u.login_date</td>
- <td class='lastitem_date'>$u.lastitem_date</td>
- <td class='login_date'>$u.page_flags</td>
+ <td class='email'>$u.account_email</td>
+ <td class='register_date'>$u.account_created</td>
+ <td class='login_date'>$u.account_lastlog</td>
+ <td class='service_class'>$u.account_service_class</td>
<td class="checkbox"><input type="checkbox" class="users_ckbx" id="id_user_$u.uid" name="user[]" value="$u.uid"/></td>
<td class="tools">
<a href="$baseurl/admin/users/block/$u.uid?t=$form_security_token" title='{{ if $u.blocked }}$unblock{{ else }}$block{{ endif }}'><span class='icon block {{ if $u.blocked==0 }}dim{{ endif }}'></span></a>
diff --git a/view/tpl/smarty3/admin_users.tpl b/view/tpl/smarty3/admin_users.tpl
index 5448a08c4..136ce3c3e 100644
--- a/view/tpl/smarty3/admin_users.tpl
+++ b/view/tpl/smarty3/admin_users.tpl
@@ -70,12 +70,10 @@
{{foreach $users as $u}}
<tr>
<td><img src="{{$u.micro}}" alt="{{$u.nickname}}" title="{{$u.nickname}}"></td>
- <td class='name'><a href="{{$u.url}}" title="{{$u.nickname}}" >{{$u.name}}</a></td>
- <td class='email'>{{$u.email}}</td>
- <td class='register_date'>{{$u.register_date}}</td>
- <td class='login_date'>{{$u.login_date}}</td>
- <td class='lastitem_date'>{{$u.lastitem_date}}</td>
- <td class='login_date'>{{$u.page_flags}}</td>
+ <td class='email'>{{$u.account_email}}</td>
+ <td class='register_date'>{{$u.account_created}}</td>
+ <td class='login_date'>{{$u.account_lastlog}}</td>
+ <td class='service_class'>{{$u.account_service_class}}</td>
<td class="checkbox"><input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
<td class="tools">
<a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title='{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}'><span class='icon block {{if $u.blocked==0}}dim{{/if}}'></span></a>