diff options
| author | Stephan Borg <wolff_borg@users.sourceforge.net> | 2006-09-02 10:00:19 +0000 |
|---|---|---|
| committer | Stephan Borg <wolff_borg@users.sourceforge.net> | 2006-09-02 10:00:19 +0000 |
| commit | 2b6d2125d2f3b153861aa2c8993c441e822040a2 (patch) | |
| tree | 950f82a3020ff610eefd610e075deacdd318ad5e /templates | |
| parent | 85f1a690c47fb39efeb9dda82851efd0a4cb1597 (diff) | |
| download | users-2b6d2125d2f3b153861aa2c8993c441e822040a2.tar.gz users-2b6d2125d2f3b153861aa2c8993c441e822040a2.tar.bz2 users-2b6d2125d2f3b153861aa2c8993c441e822040a2.zip | |
Sanity check cookie_path for prefix / and if settings are equal to defaults, to set as empty strings - this prevents problems after upgrades from hardcoded authentication cookie_paths. Settings are displayed correctly in Login Settings screen.
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin_login.tpl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/admin_login.tpl b/templates/admin_login.tpl index 7532e77..89f961a 100644 --- a/templates/admin_login.tpl +++ b/templates/admin_login.tpl @@ -43,7 +43,13 @@ {formlabel label=`$output.label` for=$feature} {forminput} {if $output.type == 'text'} - <input type="text" size="50" name="{$feature}" id="{$feature}" value="{$gBitSystem->getConfig($feature)|escape}" /> + {if $feature eq 'cookie_domain' && $gBitSystem->getConfig($feature) eq ''} + <input type="text" size="50" name="{$feature}" id="{$feature}" value="{$smarty.server.SERVER_NAME}" /> + {elseif $feature eq 'cookie_path' && $gBitSystem->getConfig($feature) eq ''} + <input type="text" size="50" name="{$feature}" id="{$feature}" value="{$smarty.const.BIT_ROOT_URL}" /> + {else} + <input type="text" size="50" name="{$feature}" id="{$feature}" value="{$gBitSystem->getConfig($feature)|escape}" /> + {/if} {else} {html_checkboxes name="$feature" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature} {/if} |
