################################################################### # # In qmailadmin-1.0.6, the page navigation hyperlinks at the bottom # of the show forwards/aliases screen alway display "next page" # even when there are no more users to display # # By Michael Bowe # ################################################################### --- alias.c.orig Sat Nov 30 12:56:39 2002 +++ alias.c Sat Nov 30 13:00:56 2002 @@ -46,6 +46,7 @@ show_dotqmail_lines(char *user, char *dom, time_t mytime, char *dir) { + int moreusers=0; DIR *mydir; struct dirent *mydirent; FILE *fs; @@ -89,6 +90,7 @@ continue; } if ( k >MAXALIASESPERPAGE + startnumber) { + moreusers=1; break; } @@ -174,9 +176,11 @@ fprintf(actout, "%s", CGIPATH,user,dom,mytime,Pagenumber,get_html_text("136")); fprintf(actout, " | "); - fprintf(actout, "%s", - CGIPATH,user,dom,mytime,atoi(Pagenumber)+1,get_html_text("137")); - fprintf(actout, " ]"); + if (moreusers) { + fprintf(actout, "%s", + CGIPATH,user,dom,mytime,atoi(Pagenumber)+1,get_html_text("137")); + fprintf(actout, " ]"); + } fprintf(actout, ""); } }