move next and prev around
This commit is contained in:
parent
5a1a834803
commit
0f6af49071
@ -235,7 +235,16 @@ char *www_msgs_messagelist(struct user_record *user, int conference, int area, i
|
||||
}
|
||||
strcat(page, buffer);
|
||||
len += strlen(buffer);
|
||||
|
||||
if (skip + 50 <= mhrs->msg_count) {
|
||||
sprintf(buffer, "<div class=\"msg-summary-next\"><a href=\"%smsgs/%d/%d/?skip=%d\">Next</a></div>\n", conf.www_url, conference, area, skip + 50);
|
||||
if (len + strlen(buffer) > max_len - 1) {
|
||||
max_len += 4096;
|
||||
page = (char *)realloc(page, max_len);
|
||||
}
|
||||
strcat(page, buffer);
|
||||
len += strlen(buffer);
|
||||
}
|
||||
|
||||
if (skip > 0) {
|
||||
if (skip - 50 < 0) {
|
||||
sprintf(buffer, "<div class=\"msg-summary-prev\"><a href=\"%smsgs/%d/%d/\">Prev</a></div>\n", conf.www_url, conference, area);
|
||||
@ -250,15 +259,6 @@ char *www_msgs_messagelist(struct user_record *user, int conference, int area, i
|
||||
len += strlen(buffer);
|
||||
}
|
||||
|
||||
if (skip + 50 <= mhrs->msg_count) {
|
||||
sprintf(buffer, "<div class=\"msg-summary-next\"><a href=\"%smsgs/%d/%d/?skip=%d\">Next</a></div>\n", conf.www_url, conference, area, skip + 50);
|
||||
if (len + strlen(buffer) > max_len - 1) {
|
||||
max_len += 4096;
|
||||
page = (char *)realloc(page, max_len);
|
||||
}
|
||||
strcat(page, buffer);
|
||||
len += strlen(buffer);
|
||||
}
|
||||
free_message_headers(mhrs);
|
||||
return page;
|
||||
}
|
||||
|
Reference in New Issue
Block a user