summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2012-10-28 08:50:25 +0100
committerDominique Martinet <asmadeus@codewreck.org>2015-11-08 14:27:58 +0100
commit22f380ffe6432f576e9349d6eb36f204bb57a9ce (patch)
treeca0eb5f389fac3687854b1521c765b33c5ad7e2a
parentab1aa34b78570584dac18a3d1b19f69ceeaddb05 (diff)
Additem: Can now add someone twice on the same bid win
-rw-r--r--admin/additem.php15
-rw-r--r--templates/default/admin/additem.html19
2 files changed, 9 insertions, 25 deletions
diff --git a/admin/additem.php b/admin/additem.php
index afae707..c49842f 100644
--- a/admin/additem.php
+++ b/admin/additem.php
@@ -388,17 +388,16 @@ class Add_Item extends EQdkp_Admin
'VALUE' => $row['member_name'],
'OPTION' => $row['member_name'])
);
-
- if ( @in_array($row['member_name'], $buyer_source) )
- {
- $tpl->assign_block_vars('buyers_row', array(
- 'VALUE' => $row['member_name'],
- 'OPTION' => $row['member_name'])
- );
- }
}
$db->free_result($result);
+ foreach($buyer_source as $buyer_name) {
+ $tpl->assign_block_vars('buyers_row', array(
+ 'VALUE' => $buyer_name,
+ 'OPTION' => $buyer_name)
+ );
+ }
+
//
// Build raid drop-down
//
diff --git a/templates/default/admin/additem.html b/templates/default/admin/additem.html
index eb66dfd..cef442e 100644
--- a/templates/default/admin/additem.html
+++ b/templates/default/admin/additem.html
@@ -94,23 +94,8 @@ function fnAddMember()
toSize = 0;
}
- // Loop through the item_buyers list, don't add if it's a duplicate
- for ( j = 0, exists = false; j < toSize; j++ )
- {
- // Buyer already exists
- if ( toField.options[ j ].value == memberValue )
- {
- exists = true;
- offset++;
- }
- }
-
- // Buyer doesn't exist, add them
- if ( exists != true )
- {
- toField.options[toSize + i - offset] = new Option(memberText, memberValue);
- toField.options[toSize + i - offset].selected = true;
- }
+ toField.options[toSize + i - offset] = new Option(memberText, memberValue);
+ toField.options[toSize + i - offset].selected = true;
}
// We're done - clear the search box and focus it for the next entry