Commit af004671 authored by Nigel McNie's avatar Nigel McNie
Browse files

Make sure the entries are sorted by score when doing the import.

Found this bug while doing View import. Using uksort passes the keys in
for sorting, which is not what the sorting function was actually
expecting. uasort is what I meant to use.
Signed-off-by: default avatarNigel McNie <>
parent d5583064
......@@ -307,7 +307,7 @@ class PluginImportLeap extends PluginImport {
// TODO: do both usedlists as by key instead of by value for faster checks
$usedlist = $loadedentries = array();
uksort($this->loadmapping, create_function('$a, $b', 'return $a["score"] < $b["score"];'));
uasort($this->loadmapping, create_function('$a, $b', 'return $a["score"] < $b["score"];'));
foreach ($this->loadmapping as $entryid => $strategydata) {
if (in_array($entryid, $usedlist)) {
// TODO: what should we do in this case?
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment