* Added new serendipity['defaultBaseURL'] variable that makes sure
that the baseURL is not overriden when configuring serendipity with a possibly autodetected currentl URL. Patch by Manko10.
This commit is contained in:
parent
56041459b6
commit
c292badf30
@ -4,6 +4,10 @@
|
||||
Version 1.7 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Added new serendipity['defaultBaseURL'] variable that makes sure
|
||||
that the baseURL is not overriden when configuring serendipity
|
||||
with a possibly autodetected currentl URL. Patch by Manko10.
|
||||
|
||||
Version 1.6 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
@ -30,14 +30,14 @@ switch ($_POST['installAction'] && serendipity_checkFormToken()) {
|
||||
$permalinkOld = array(
|
||||
$oldConfig['serendipityHTTPPath'],
|
||||
$oldConfig['serendipityPath'],
|
||||
$oldConfig['baseURL'],
|
||||
$oldConfig['defaultBaseURL'],
|
||||
$oldConfig['indexFile'],
|
||||
$oldConfig['rewrite']);
|
||||
|
||||
$permalinkNew = array(
|
||||
$serendipity['serendipityHTTPPath'],
|
||||
$serendipity['serendipityPath'],
|
||||
$serendipity['baseURL'],
|
||||
$serendipity['defaultBaseURL'],
|
||||
$serendipity['indexFile'],
|
||||
$serendipity['rewrite']);
|
||||
|
||||
|
@ -329,6 +329,12 @@ function serendipity_load_configuration($author = null) {
|
||||
}
|
||||
$config_loaded[$author] = true;
|
||||
|
||||
// Set baseURL to defaultBaseURL
|
||||
if ((empty($author) || empty($serendipity['baseURL'])) && isset($serendipity['defaultBaseURL'])) {
|
||||
$serendipity['baseURL'] = $serendipity['defaultBaseURL'];
|
||||
}
|
||||
|
||||
|
||||
// Store default language
|
||||
$serendipity['default_lang'] = $serendipity['lang'];
|
||||
}
|
||||
|
@ -1000,6 +1000,7 @@ function serendipity_smarty_init($vars = array()) {
|
||||
'blogDescription' => $serendipity['blogDescription'],
|
||||
|
||||
'serendipityHTTPPath' => $serendipity['serendipityHTTPPath'],
|
||||
'serendipityDefaultBaseURL' => $serendipity['defaultBaseURL'],
|
||||
'serendipityBaseURL' => $serendipity['baseURL'],
|
||||
'serendipityRewritePrefix' => $serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '',
|
||||
'serendipityIndexFile' => $serendipity['indexFile'],
|
||||
|
@ -110,7 +110,7 @@
|
||||
'permission' => 'siteConfiguration',
|
||||
'default' => 'uploads/'),
|
||||
|
||||
array('var' => 'baseURL',
|
||||
array('var' => 'defaultBaseURL',
|
||||
'title' => INSTALL_URL,
|
||||
'description' => INSTALL_URL_DESC,
|
||||
'type' => 'string',
|
||||
|
Loading…
x
Reference in New Issue
Block a user