*) bugfix for my last commit

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5570 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
low012 2009-02-03 21:45:41 +00:00
parent 9d282d2c16
commit 5b79221037

View File

@ -369,22 +369,22 @@ public class Blacklist_p {
// display them // display them
boolean dark = true; boolean dark = true;
int from = 0; int offset = 0;
int size = 50; int size = 50;
int to = sortedlist.length; int to = sortedlist.length;
if (post != null) { if (post != null) {
from = post.getInt("offset", 0); offset = post.getInt("offset", 0);
size = post.getInt("size", 50); size = post.getInt("size", 50);
to = from + size; to = offset + size;
} }
if (from > sortedlist.length || from < 0) { if (offset > sortedlist.length || offset < 0) {
from = 0; offset = 0;
} }
if (to > sortedlist.length || size < 1) { if (to > sortedlist.length || size < 1) {
to = sortedlist.length; to = sortedlist.length;
} }
for (int j = from; j < to; ++j){ for (int j = offset; j < to; ++j){
final String nextEntry = sortedlist[j]; final String nextEntry = sortedlist[j];
if (nextEntry.length() == 0) continue; if (nextEntry.length() == 0) continue;
@ -400,15 +400,20 @@ public class Blacklist_p {
// create selection of sublist // create selection of sublist
entryCount = 0; entryCount = 0;
int end = -1; int end = -1;
int start = -1;
if (sortedlist.length > 0) { if (sortedlist.length > 0) {
while (end < sortedlist.length) { while (end < sortedlist.length) {
prop.put(DISABLED + EDIT + "subListOffset_" + entryCount + "_value", (entryCount * to)); start = entryCount * size;
end = (entryCount + 1) * to; end = (entryCount + 1) * size;
prop.put(DISABLED + EDIT + "subListOffset_" + entryCount + "_value", start);
prop.put(DISABLED + EDIT + "subListOffset_" + entryCount + "_fvalue", start + 1);
if (end > sortedlist.length) { if (end > sortedlist.length) {
end = sortedlist.length; end = sortedlist.length;
} }
prop.put(DISABLED + EDIT + "subListOffset_" + entryCount + "_fvalue", (entryCount * to) + 1);
prop.put(DISABLED + EDIT + "subListOffset_" + entryCount + "_tvalue", end); prop.put(DISABLED + EDIT + "subListOffset_" + entryCount + "_tvalue", end);
if (start == offset) {
prop.put(DISABLED + EDIT + "subListOffset_" + entryCount + "_selected", 1);
}
entryCount++; entryCount++;
} }
} else { } else {