Patch for user.c (.39 of Oct. 19)
This patch fixes two things:
1. Bug in the Index feature of Pop Accounts. Previously if you clicked on 'I' and
there were users under 'I' it would take you to the last page of pop accounts. It now
sends you to the page with 'H' or 'G' or whatever. Somebody on the list mentioned
this previously causing an Internal Server error. I can't get that to appear on my
machine but this patch very well might fix it anyway.
I am guessing that this error and the Internal Server Error when clicking on Next Page
with no users is that vauth_getall bombs when there are no users to retrieve. I don't
know why certain configs get this and mine doesn't (are you guys using MySQL, somebody
want to comment on this). Since I can't get it to appear on mine it's been pretty
difficult to troubleshoot.
2. When you click Next Page with no users left, now displays the Previous Page button,
Index, Go To User, etc. but no Next Page button. I was getting annoyed with it saying
return to the previous page, but having no button to click on.
If anybody can give me some pointers on what might be happening which those server
errors I'll try and nail em. Also, don't know if they were fixed in the Oct. 19 .39
release.
Hampton
--
SysAdmin / Code Hacker - 101freeway.com
[EMAIL PROTECTED]
Software projects: http://www.xsta.cc/
*** user.c Tue Oct 24 02:39:43 2000
--- user.c.new Tue Oct 24 02:39:39 2000
***************
*** 86,92 ****
if (*Pagenumber && !isdigit(*Pagenumber)) {
pw = vauth_getall(dom,1,1);
for (k=0; pw!=NULL; k++) {
! if ((!Pagenumber[1] && *pw->pw_name == *Pagenumber) ||
((!strcmp(Pagenumber, pw->pw_name)))) {
break;
}
--- 86,92 ----
if (*Pagenumber && !isdigit(*Pagenumber)) {
pw = vauth_getall(dom,1,1);
for (k=0; pw!=NULL; k++) {
! if ((!Pagenumber[1] && *pw->pw_name >= *Pagenumber) ||
((!strcmp(Pagenumber, pw->pw_name)))) {
break;
}
***************
*** 133,139 ****
if (pw == NULL) {
fprintf(actout,"\n");
! fprintf(actout,"<tr><td colspan=5>%s</td></tr>",
get_html_text("NO_USERS_VIEW"));
moreusers = 0;
} else {
--- 133,139 ----
if (pw == NULL) {
fprintf(actout,"\n");
! fprintf(actout,"<tr><td colspan=5>%s</td></tr><tr><td
colspan=5><center>",
get_html_text("NO_USERS_VIEW"));
moreusers = 0;
} else {
***************
*** 177,182 ****
--- 177,183 ----
}
fprintf(actout,"<tr><td colspan=5><center>\n");
+ }
if ( AdminType==SYSTEM_ADMIN || AdminType==DOMAIN_ADMIN ) {
fprintf(actout, "<br><b>%s</b> ", get_html_text("INDEX"));
***************
*** 225,231 ****
CGIPATH, user, dom,mytime,
get_html_text("SET_NO_DEFAULT"));
}
fprintf(actout,"</td></tr><BR>\n");
- }
}
--- 226,231 ----