Skip to content

Commit

Permalink
Merge pull request Kunena#444 from xillibit/bugs3
Browse files Browse the repository at this point in the history
Remove setting in userlist to choose between name and usermane
  • Loading branch information
mahagr committed Mar 30, 2012
2 parents 63d5e37 + a4d42d9 commit 3795c89
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ COM_KUNENA_ADMIN_CONFIG_USERLIST_POSTS_DESC="Set to Yes if you want to display t
COM_KUNENA_ADMIN_CONFIG_USERLIST_ROWS="Users Per Page"
COM_KUNENA_ADMIN_CONFIG_USERLIST_ROWS_DESC="Number of userlist rows"
COM_KUNENA_ADMIN_CONFIG_USERLIST_USERLIST_AVATAR_DESC="Set to Yes if you want to display the Avatar of the user."
COM_KUNENA_ADMIN_CONFIG_USERLIST_USERNAME="Show Username"
COM_KUNENA_ADMIN_CONFIG_USERLIST_USERNAME_DESC="Set to Yes if you want to display the username"
COM_KUNENA_ADMIN_CONFIG_USERLIST_USERONLINE="Online Status"
COM_KUNENA_ADMIN_CONFIG_USERLIST_USERONLINE_DESC="Show user's online status"
COM_KUNENA_ADMIN_CONFIG_USERLIST_USERTYPE="Show User Type"
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_kunena/libraries/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class KunenaConfig extends JObject {
public $userlist_online = 1;
public $userlist_avatar = 1;
public $userlist_name = 1;
public $userlist_username = 1;
public $userlist_posts = 1;
public $userlist_karma = 1;
public $userlist_email = 0;
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_kunena/models/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ function getConfiglists() {
$lists ['userlist_online'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_userlist_online', 'class="inputbox" size="1"', 'value', 'text', $this->config->userlist_online );
$lists ['userlist_avatar'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_userlist_avatar', 'class="inputbox" size="1"', 'value', 'text', $this->config->userlist_avatar );
$lists ['userlist_name'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_userlist_name', 'class="inputbox" size="1"', 'value', 'text', $this->config->userlist_name );
$lists ['userlist_username'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_userlist_username', 'class="inputbox" size="1"', 'value', 'text', $this->config->userlist_username );
$lists ['userlist_posts'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_userlist_posts', 'class="inputbox" size="1"', 'value', 'text', $this->config->userlist_posts );
$lists ['userlist_karma'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_userlist_karma', 'class="inputbox" size="1"', 'value', 'text', $this->config->userlist_karma );
$lists ['userlist_email'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_userlist_email', 'class="inputbox" size="1"', 'value', 'text', $this->config->userlist_email );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1173,11 +1173,6 @@ function_exists('php_ini_loaded_file') ? php_ini_loaded_file() : '') ?>
<td align="left" valign="top"><?php echo $this->lists ['userlist_name']; ?></td>
<td align="left" valign="top"><?php echo JText::_('COM_KUNENA_ADMIN_CONFIG_USERLIST_NAME_DESC') ?></td>
</tr>
<tr align="center" valign="middle">
<td align="left" valign="top"><?php echo JText::_('COM_KUNENA_ADMIN_CONFIG_USERLIST_USERNAME') ?></td>
<td align="left" valign="top"><?php echo $this->lists ['userlist_username']; ?></td>
<td align="left" valign="top"><?php echo JText::_('COM_KUNENA_ADMIN_CONFIG_USERLIST_USERNAME_DESC') ?></td>
</tr>
<tr align="center" valign="middle">
<td align="left" valign="top"><?php echo JText::_('COM_KUNENA_ADMIN_CONFIG_USERLIST_POSTS') ?></td>
<td align="left" valign="top"><?php echo $this->lists ['userlist_posts']; ?></td>
Expand Down
4 changes: 2 additions & 2 deletions components/com_kunena/models/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public function getQuerySearch() {
$where = array();
if ($search) {
$db = JFactory::getDBO();
if ($this->config->userlist_name) $where[] = "u.name LIKE '%{$db->getEscaped($search)}%'";
if ($this->config->userlist_username || !$where) $where[] = "u.username LIKE '%{$db->getEscaped($search)}%'";
if (!$this->config->username) $where[] = "u.name LIKE '%{$db->getEscaped($search)}%'";
if ($this->config->username || !$where) $where[] = "u.username LIKE '%{$db->getEscaped($search)}%'";
$where = 'AND ('.implode(' OR ', $where).')';
} else {
$where = '';
Expand Down
4 changes: 2 additions & 2 deletions components/com_kunena/template/blue_eagle/html/user/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ function tableOrdering( order, dir, task ) {
<th><?php echo JText::_('COM_KUNENA_USRL_AVATAR'); ?></th>
<?php endif; ?>

<?php if ($this->config->userlist_name) : ?>
<?php if (!$this->config->username) : ?>
<th class="usersortable"><?php echo JHTML::_( 'grid.sort', 'COM_KUNENA_USRL_NAME', 'name', $this->state->get('list.order_dir'), $this->state->get('list.order')); ?></th>
<?php endif; ?>

<?php if ($this->config->userlist_username) : ?>
<?php if ($this->config->username) : ?>
<th class="usersortable"><?php echo JHTML::_( 'grid.sort', 'COM_KUNENA_USRL_USERNAME', 'username', $this->state->get('list.order_dir'), $this->state->get('list.order')); ?></th>
<?php endif; ?>

Expand Down
4 changes: 2 additions & 2 deletions components/com_kunena/template/mirage/html/user/list_row.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
<?php endif ?>
</div>
<ul class="kuserlist-details">
<?php if ($this->config->userlist_name && !$this->config->username) : ?>
<?php if (!$this->config->username) : ?>
<li class="kdetails-username"><span><?php echo JText::_('COM_KUNENA_USRL_USERNAME') ?>:</span> <?php echo $this->escape($this->user->username) ?></li>
<?php endif; ?>
<?php if ($this->config->userlist_username && $this->config->username) : ?>
<?php if ($this->config->username) : ?>
<li class="kdetails-username"><span><?php echo JText::_('COM_KUNENA_USRL_NAME') ?>:</span> <?php echo $this->escape($this->user->name) ?></li>
<?php endif; ?>
<?php if (!empty($this->email)) : ?>
Expand Down

0 comments on commit 3795c89

Please sign in to comment.