Skip to content

Commit

Permalink
Fixed issue #5831: User name not properly quoted on display
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Feb 23, 2012
1 parent 975449e commit 7d78cfb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion application/controllers/admin/useraction.php
Expand Up @@ -51,12 +51,15 @@ public function index()
$aData['noofsurveys'] = $noofsurveys;
}

$aData['row'] = 0;
if (isset($usrhimself['parent_id']) && $usrhimself['parent_id'] != 0)
{
$aData['row'] = User::model()->findByAttributes(array('uid' => $usrhimself['parent_id']))->users_name;
}


$aData['usrhimself'] = $usrhimself;
// other users
$aData['row'] = 0;
$aData['usr_arr'] = $userlist;
$noofsurveyslist = array();

Expand Down
2 changes: 1 addition & 1 deletion application/helpers/common_helper.php
Expand Up @@ -1330,7 +1330,7 @@ function getUserList($outputformat='fullinfoarray')
)
)
UNION
SELECT * from {{users}} where users.parent_id=$myuid";
SELECT * from {{users}} v where v.parent_id=$myuid";
}
else
{
Expand Down
9 changes: 7 additions & 2 deletions application/views/admin/user/editusers.php
@@ -1,3 +1,6 @@
<?php
$usrhimself=array_map('htmlspecialchars', $usrhimself);
?>
<div class='header ui-widget-header'><?php $clang->eT("User control");?></div><br />
<table id='users' class='users' width='100%' border='0'>
<thead>
Expand Down Expand Up @@ -40,14 +43,16 @@
<?php } ?>

<?php if(isset($usrhimself['parent_id']) && $usrhimself['parent_id']!=0) { ?>
<td align='center'><strong><?php echo $srow['users_name'];?></strong></td>
<td align='center'><strong><?php echo $row;?></strong></td>
<?php } else { ?>
<td align='center'><strong>---</strong></td>
<?php } ?>
</tr>

<?php for($i=1; $i<=count($usr_arr); $i++) {
$usr = $usr_arr[$i]; ?>
$usr = $usr_arr[$i];
$usr=array_map('htmlspecialchars', $usr);
?>
<tr>

<td align='center' style='padding:3px;'>
Expand Down

0 comments on commit 7d78cfb

Please sign in to comment.