Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 160940 Details for
Bug 251418
Add header and footer support to help.cgi
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
CVS Diffs
diffs.txt (text/plain), 3.57 KB, created by
Nathan Kinder
on 2007-08-08 21:16:23 UTC
(
hide
)
Description:
CVS Diffs
Filename:
MIME Type:
Creator:
Nathan Kinder
Created:
2007-08-08 21:16:23 UTC
Size:
3.57 KB
patch
obsolete
>Index: admserv/cgi-src40/help.c >=================================================================== >RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/help.c,v >retrieving revision 1.9 >diff -u -5 -t -r1.9 help.c >--- admserv/cgi-src40/help.c 22 Jun 2007 01:34:19 -0000 1.9 >+++ admserv/cgi-src40/help.c 8 Aug 2007 21:09:30 -0000 >@@ -72,10 +72,12 @@ > #define LIBRARY_FILE "library.html" > #define CONTENT_FRAME "infotopic" > #define DIR_VAR "HelpDirectory" > #define HELPWIN_VAR "HelpWindow" > #define TOKEN_FILE "index.map" >+#define HEADER_FILE "header.htm" >+#define FOOTER_FILE "footer.htm" > #define HEAD_BLOCK "<head>" > #define FRAME_BLOCK "<frame " > #define TITLE_BLOCK "<title>" > #define DOCLIST_BLOCK "<doclist>" > #define DOC_BLOCK "<document>" >@@ -277,20 +279,44 @@ > static int > no_frame_help(char *name[], char *val[], int cnt, char *product, char *content) > { > char path[PATH_LENGTH]; > char base[PATH_LENGTH]; >- char *dirp; > FILE *file = NULL; > > if (debugPrintout) > { > printf( "New help<P>\n" ); > } > >- /* Open the target file and return the contents */ >+ /* read and flush the header to stdout */ >+ safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, >+ product, FILE_SEP, HEADER_FILE); >+ if (!(file = fopen(path, "r"))) >+ { >+ safe_snprintf(base, sizeof(base), "unable to open file: %s", path); >+ if (debugPrintout) >+ { >+ printf("%s<P>\n", base); >+ fflush( stdout ); >+ } >+ return error_exit(base); >+ } >+ if (debugPrintout) >+ { >+ printf("reading file: %s<P>\n", path); >+ } >+ if (!didContentHeader) >+ { >+ printf("Content-type: text/html\n\n"); >+ } >+ while (fgets(path, PATH_LENGTH, file)) >+ { >+ fputs(path, stdout); >+ } > >+ /* Open the target file and return the contents */ > safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, > product, FILE_SEP, content); > if (!(file = fopen(path, "r"))) > { > safe_snprintf(base, sizeof(base), "unable to open file: %s", path); >@@ -303,26 +329,35 @@ > } > if (debugPrintout) > { > printf("reading file: %s<P>\n", path); > } >+ while (fgets(path, PATH_LENGTH, file)) >+ { >+ fputs(path, stdout); >+ } > >- /* spit out the output, inserting a BASE tag into the HEAD block */ >- if (dirp = strchr(content, FILE_SEP)) { >- safe_snprintf(base, sizeof(base), "<base href=\"/%s/%s/%s/help/%.*s/\">", "manual", locale, product, >- (dirp-content), content); >- } else { >- safe_snprintf(base, sizeof(base), "<base href=\"/%s/%s/%s/help/\">", "manual", locale, product); >+ /* read and flush the footer to stdout */ >+ safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, >+ product, FILE_SEP, FOOTER_FILE); >+ if (!(file = fopen(path, "r"))) >+ { >+ safe_snprintf(base, sizeof(base), "unable to open file: %s", path); >+ if (debugPrintout) >+ { >+ printf("%s<P>\n", base); >+ fflush( stdout ); >+ } >+ return error_exit(base); > } >- if (!didContentHeader) >+ if (debugPrintout) > { >- printf("Content-type: text/html\n\n"); >+ printf("reading file: %s<P>\n", path); > } >- > while (fgets(path, PATH_LENGTH, file)) > { >- fputs(path, stdout); >+ fputs(path, stdout); > } > > /* finished */ > fflush(stdout); > fclose(file);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251418
: 160940