For some reason, my alphabet must be wrong... my Pagelist goes thusly:
CD Cookie Linux Sandbox Popup Popup Blocker RAID Welcome Wiki
It's mostly right, but S is wrong. How do I fix this?
we have the same problem with C listing first and G between B and D
Problem is that pagelist.php sorts the files by the base64 filename. To correct this you replace this:
asort($filelist); reset($filelist); $j=$i; while (list($i) = each($filelist)) { $show_page=base64_decode($filelist[$i]); $show_page=str_replace("<","<",$show_page); $show_page=str_replace(">",">",$show_page); print "<a href=\"index.php?page=".rawurlencode(utf8_encode(base64_decode($filelist[$i])))."\">".$show_page."</a><br>\n"; }
With this:
$j=$i;
while(list($i) = each($filelist)){ $filelist[$i] = base64_decode($filelist[$i]); $filelist[$i] = str_replace("<","<",$filelist[$i]); $filelist[$i] = str_replace(">",">",$filelist[$i]); }
asort($filelist); reset($filelist);
while (list($i) = each($filelist)) { print "<a href=\"index.php?page=".rawurlencode(utf8_encode($filelist[$i]))."\">".$filelist[$i]."</a><br>\n"; }
This code will decode the base64 filnames before sorting them. This way it should list the files more correctly. Good luck!
Log in to post a comment.
For some reason, my alphabet must be wrong... my Pagelist goes thusly:
CD
Cookie
Linux
Sandbox
Popup
Popup Blocker
RAID
Welcome
Wiki
It's mostly right, but S is wrong. How do I fix this?
we have the same problem with C listing first and G between B and D
Problem is that pagelist.php sorts the files by the base64 filename. To correct this you replace this:
asort($filelist);
reset($filelist);
$j=$i;
while (list($i) = each($filelist)) {
$show_page=base64_decode($filelist[$i]);
$show_page=str_replace("<","<",$show_page);
$show_page=str_replace(">",">",$show_page);
print "<a href=\"index.php?page=".rawurlencode(utf8_encode(base64_decode($filelist[$i])))."\">".$show_page."</a><br>\n";
}
With this:
$j=$i;
while(list($i) = each($filelist)){
$filelist[$i] = base64_decode($filelist[$i]);
$filelist[$i] = str_replace("<","<",$filelist[$i]);
$filelist[$i] = str_replace(">",">",$filelist[$i]);
}
asort($filelist);
reset($filelist);
while (list($i) = each($filelist)) {
print "<a href=\"index.php?page=".rawurlencode(utf8_encode($filelist[$i]))."\">".$filelist[$i]."</a><br>\n";
}
This code will decode the base64 filnames before sorting them. This way it should list the files more
correctly.
Good luck!