mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2024-10-07 08:32:16 +08:00
Fixed default footer for CLTs
This commit is contained in:
parent
689cb5f26a
commit
7c7f561f90
@ -112,6 +112,11 @@
|
|||||||
NSString* title = uploader.title;
|
NSString* title = uploader.title;
|
||||||
if (title == nil) {
|
if (title == nil) {
|
||||||
title = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
|
title = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
|
if (title == nil) {
|
||||||
|
title = [[NSProcessInfo processInfo] processName];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
NSString* header = uploader.header;
|
NSString* header = uploader.header;
|
||||||
if (header == nil) {
|
if (header == nil) {
|
||||||
@ -127,9 +132,15 @@
|
|||||||
}
|
}
|
||||||
NSString* footer = uploader.footer;
|
NSString* footer = uploader.footer;
|
||||||
if (footer == nil) {
|
if (footer == nil) {
|
||||||
footer = [NSString stringWithFormat:[siteBundle localizedStringForKey:@"FOOTER_FORMAT" value:@"" table:nil],
|
NSString* name = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
|
||||||
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"],
|
NSString* version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||||
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]];
|
#if !TARGET_OS_IPHONE
|
||||||
|
if (!name && !version) {
|
||||||
|
name = @"OS X";
|
||||||
|
version = [[NSProcessInfo processInfo] operatingSystemVersionString];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
footer = [NSString stringWithFormat:[siteBundle localizedStringForKey:@"FOOTER_FORMAT" value:@"" table:nil], name, version];
|
||||||
}
|
}
|
||||||
return [GCDWebServerDataResponse responseWithHTMLTemplate:[siteBundle pathForResource:@"index" ofType:@"html"]
|
return [GCDWebServerDataResponse responseWithHTMLTemplate:[siteBundle pathForResource:@"index" ofType:@"html"]
|
||||||
variables:@{
|
variables:@{
|
||||||
|
Loading…
Reference in New Issue
Block a user