Skip to content

Commit

Permalink
fixed dismembered users issue on mass scheduled task creation
Browse files Browse the repository at this point in the history
  • Loading branch information
nightflyza committed Feb 10, 2021
1 parent 81df5e6 commit 5d17625
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 36 deletions.
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.4 rev 7875
1.1.4 rev 7876
72 changes: 37 additions & 35 deletions api/libs/api.dealwithit.php
Original file line number Diff line number Diff line change
Expand Up @@ -1009,9 +1009,8 @@ public function renderDealWithItControl() {
*/
protected function renderUsersSearchResults($logins) {
$result = '';

if (!empty($logins)) {

$availableUsers = zb_UserGetAllStargazerDataAssoc();
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Login'));
$cells .= wf_TableCell(__('Address'));
Expand Down Expand Up @@ -1052,41 +1051,44 @@ protected function renderUsersSearchResults($logins) {
}

foreach ($logins as $login) {
//finance check
$cash = $user_data_arr[$login]['Cash'];
$credit = $user_data_arr[$login]['Credit'];
$passive = $user_data_arr[$login]['Passive'];
$tariff = $user_data_arr[$login]['Tariff'];
$ip = $user_data_arr[$login]['ip'];
// Display user status
$act = '<img src=skins/icon_active.gif>' . __('Yes');
if ($cash < '-' . $credit) {
$act = '<img src=skins/icon_inactive.gif>' . __('No');
}
$act .= $passive ? '<br> <img src=skins/icon_passive.gif>' . __('Freezed') : '';

$cells = wf_TableCell($id);
$cells .= wf_TableCell(wf_Link('?module=userprofile&username=' . $login, web_profile_icon() . $login, false, ''));
$cells .= wf_TableCell(@$allAddress[$login]);
$cells .= wf_TableCell(@$allRealNames[$login]);
$cells .= wf_TableCell($ip);
$cells .= wf_TableCell($tariff);
$cells .= wf_TableCell($act);
$cells .= wf_TableCell($cash);
$cells .= wf_TableCell($credit);
if (isset($tmpArr[$login])) {
$cells_temp = '';
foreach ($tmpArr[$login] as $task) {
$actionIcon = (isset($this->actionIcons[$task])) ? wf_img_sized($this->actionIcons[$task], $this->actionNames[$task], '12', '12') . ' ' : '';
$cells_temp .= $actionIcon . $this->actionNames[$task] . wf_tag('br');
//is this user real?
if (isset($availableUsers[$login])) {
//finance check
$cash = $user_data_arr[$login]['Cash'];
$credit = $user_data_arr[$login]['Credit'];
$passive = $user_data_arr[$login]['Passive'];
$tariff = $user_data_arr[$login]['Tariff'];
$ip = $user_data_arr[$login]['ip'];
// Display user status
$act = '<img src=skins/icon_active.gif>' . __('Yes');
if ($cash < '-' . $credit) {
$act = '<img src=skins/icon_inactive.gif>' . __('No');
}
$cells .= wf_TableCell($cells_temp);
} else {
$cells .= wf_TableCell('');
$act .= $passive ? '<br> <img src=skins/icon_passive.gif>' . __('Freezed') : '';

$cells = wf_TableCell($id);
$cells .= wf_TableCell(wf_Link('?module=userprofile&username=' . $login, web_profile_icon() . $login, false, ''));
$cells .= wf_TableCell(@$allAddress[$login]);
$cells .= wf_TableCell(@$allRealNames[$login]);
$cells .= wf_TableCell($ip);
$cells .= wf_TableCell($tariff);
$cells .= wf_TableCell($act);
$cells .= wf_TableCell($cash);
$cells .= wf_TableCell($credit);
if (isset($tmpArr[$login])) {
$cells_temp = '';
foreach ($tmpArr[$login] as $task) {
$actionIcon = (isset($this->actionIcons[$task])) ? wf_img_sized($this->actionIcons[$task], $this->actionNames[$task], '12', '12') . ' ' : '';
$cells_temp .= $actionIcon . $this->actionNames[$task] . wf_tag('br');
}
$cells .= wf_TableCell($cells_temp);
} else {
$cells .= wf_TableCell('');
}
$cells .= wf_TableCell(wf_CheckInput('_logins[' . $login . ']', '', false, false));
$rows .= wf_TableRow($cells, 'row3');
$id++;
}
$cells .= wf_TableCell(wf_CheckInput('_logins[' . $login . ']', '', false, false));
$rows .= wf_TableRow($cells, 'row3');
$id++;
}

$result .= wf_AjaxLoader();
Expand Down

0 comments on commit 5d17625

Please sign in to comment.