disable genurls if www_server is not enabled

This commit is contained in:
Andrew Pamment 2018-01-24 11:39:27 +10:00
parent 4cc992d08e
commit 5c0214c737

View File

@ -803,31 +803,37 @@ void genurls() {
#if defined(ENABLE_WWW) #if defined(ENABLE_WWW)
int i; int i;
char *url; char *url;
for (i=0;i<tagged_count;i++) { if (conf.www_server) {
if (i % 6 == 0 && i != 0) { for (i=0;i<tagged_count;i++) {
// pause if (i % 6 == 0 && i != 0) {
s_printf(get_string(6)); // pause
s_getc(); s_printf(get_string(6));
} s_getc();
}
url = www_create_link(tagged_files[i]->dir, tagged_files[i]->sub, tagged_files[i]->fid); url = www_create_link(tagged_files[i]->dir, tagged_files[i]->sub, tagged_files[i]->fid);
if (url != NULL) { if (url != NULL) {
s_printf(get_string(255), basename(tagged_files[i]->filename)); s_printf(get_string(255), basename(tagged_files[i]->filename));
s_printf(get_string(256), url); s_printf(get_string(256), url);
free(url); free(url);
} else { } else {
s_printf(get_string(257)); s_printf(get_string(257));
}
} }
for (i=0;i<tagged_count;i++) {
free(tagged_files[i]->filename);
free(tagged_files[i]);
}
free(tagged_files);
tagged_count = 0;
s_printf(get_string(6));
s_getc();
} else {
s_printf(get_string(258));
s_printf(get_string(6));
s_getc();
} }
for (i=0;i<tagged_count;i++) {
free(tagged_files[i]->filename);
free(tagged_files[i]);
}
free(tagged_files);
tagged_count = 0;
s_printf(get_string(6));
s_getc();
#else #else
s_printf(get_string(258)); s_printf(get_string(258));
s_printf(get_string(6)); s_printf(get_string(6));