diff options
author | John Keeping | 2015-08-14 12:47:12 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2015-08-14 15:46:51 +0200 |
commit | 51d9176e4bb5c619481355c6b895c6dec30c4f82 (patch) | |
tree | f4a8ca97af15496a2090627c38affc6b86b9be73 /ui-summary.c | |
parent | 764987980ec0e806205b8e075feafd4e010dcbd9 (diff) | |
download | cgit-51d9176e4bb5c619481355c6b895c6dec30c4f82.tar.gz cgit-51d9176e4bb5c619481355c6b895c6dec30c4f82.tar.bz2 cgit-51d9176e4bb5c619481355c6b895c6dec30c4f82.zip |
about: move layout into page functions
Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'ui-summary.c')
-rw-r--r-- | ui-summary.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui-summary.c b/ui-summary.c index a5c7078..cd1fef5 100644 --- a/ui-summary.c +++ b/ui-summary.c | |||
@@ -101,8 +101,9 @@ void cgit_print_repo_readme(char *path) | |||
101 | char *filename, *ref; | 101 | char *filename, *ref; |
102 | int free_filename = 0; | 102 | int free_filename = 0; |
103 | 103 | ||
104 | cgit_print_layout_start(); | ||
104 | if (ctx.repo->readme.nr == 0) | 105 | if (ctx.repo->readme.nr == 0) |
105 | return; | 106 | goto done; |
106 | 107 | ||
107 | filename = ctx.repo->readme.items[0].string; | 108 | filename = ctx.repo->readme.items[0].string; |
108 | ref = ctx.repo->readme.items[0].util; | 109 | ref = ctx.repo->readme.items[0].util; |
@@ -111,7 +112,7 @@ void cgit_print_repo_readme(char *path) | |||
111 | free_filename = 1; | 112 | free_filename = 1; |
112 | filename = append_readme_path(filename, ref, path); | 113 | filename = append_readme_path(filename, ref, path); |
113 | if (!filename) | 114 | if (!filename) |
114 | return; | 115 | goto done; |
115 | } | 116 | } |
116 | 117 | ||
117 | /* Print the calculated readme, either from the git repo or from the | 118 | /* Print the calculated readme, either from the git repo or from the |
@@ -128,4 +129,7 @@ void cgit_print_repo_readme(char *path) | |||
128 | html("</div>"); | 129 | html("</div>"); |
129 | if (free_filename) | 130 | if (free_filename) |
130 | free(filename); | 131 | free(filename); |
132 | |||
133 | done: | ||
134 | cgit_print_layout_end(); | ||
131 | } | 135 | } |