diff --git a/nixtape/data/Server.php b/nixtape/data/Server.php index bfa3b5c..d2f758f 100644 --- a/nixtape/data/Server.php +++ b/nixtape/data/Server.php @@ -603,9 +603,14 @@ class Server { * @return string URL to the user's profile */ static function getUserURL ($username, $component = 'profile', $params = false) { - global $friendly_urls, $base_url; + global $friendly_urls, $base_url, $https_available; if ($component == 'edit') { - return $base_url . '/user-edit.php'; + if($https_available == true) { + $base_url_https = str_replace(array('http://', '//'), 'https://', $base_url); + return $base_url_https . '/user-edit.php'; + } else { + return $base_url . '/user-edit.php'; + } } else if ($component == 'delete') { return $base_url . '/delete-profile.php'; } else if ($friendly_urls) { diff --git a/nixtape/install.php b/nixtape/install.php index a1cda31..1556e48 100644 --- a/nixtape/install.php +++ b/nixtape/install.php @@ -62,7 +62,7 @@ if (isset($_POST['install'])) { $submissions_server = $_POST['submissions_server']; //Write out the configuration - $config = "setConfigDir(array($install_path . '/themes/' . $theme . '/config/', $i $current_lang = preg_replace('/.UTF-8/', '', $current_lang); $smarty->assign('lang_selector_array', array(($current_lang) => 1)); $smarty->assign('base_url', $base_url); +$smarty->assign('base_url_https', str_replace(array('http://','//'),'https://',$base_url)); +$smarty->assign('https_available', $https_available); $smarty->assign('gnufm_key', $gnufm_key); $smarty->assign('default_theme', $default_theme); $smarty->assign('site_name', $site_name); diff --git a/nixtape/themes/gnufm/templates/user-connections.tpl b/nixtape/themes/gnufm/templates/user-connections.tpl index db1de92..0be7e67 100644 --- a/nixtape/themes/gnufm/templates/user-connections.tpl +++ b/nixtape/themes/gnufm/templates/user-connections.tpl @@ -1,6 +1,10 @@ {include file='header.tpl' subheader='user-header.tpl'} -

{t}Edit your profile{/t} | {t}Connections to other services{/t}

+{if $https_available} +

{t}Edit your profile{/t} | {t}Connections to other services{/t}

+{else} +

{t}Edit your profile{/t} | {t}Connections to other services{/t}

+{/if} {if isset($errors)}
diff --git a/nixtape/themes/gnufm/templates/user-edit.tpl b/nixtape/themes/gnufm/templates/user-edit.tpl index 6715c42..29d9dcf 100644 --- a/nixtape/themes/gnufm/templates/user-edit.tpl +++ b/nixtape/themes/gnufm/templates/user-edit.tpl @@ -11,7 +11,11 @@ {/if}
-
+ {if $https_available} + + {else} + + {/if}