* 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 ()
|
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 ()
|
Version 1.6 ()
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -30,14 +30,14 @@ switch ($_POST['installAction'] && serendipity_checkFormToken()) {
|
|||||||
$permalinkOld = array(
|
$permalinkOld = array(
|
||||||
$oldConfig['serendipityHTTPPath'],
|
$oldConfig['serendipityHTTPPath'],
|
||||||
$oldConfig['serendipityPath'],
|
$oldConfig['serendipityPath'],
|
||||||
$oldConfig['baseURL'],
|
$oldConfig['defaultBaseURL'],
|
||||||
$oldConfig['indexFile'],
|
$oldConfig['indexFile'],
|
||||||
$oldConfig['rewrite']);
|
$oldConfig['rewrite']);
|
||||||
|
|
||||||
$permalinkNew = array(
|
$permalinkNew = array(
|
||||||
$serendipity['serendipityHTTPPath'],
|
$serendipity['serendipityHTTPPath'],
|
||||||
$serendipity['serendipityPath'],
|
$serendipity['serendipityPath'],
|
||||||
$serendipity['baseURL'],
|
$serendipity['defaultBaseURL'],
|
||||||
$serendipity['indexFile'],
|
$serendipity['indexFile'],
|
||||||
$serendipity['rewrite']);
|
$serendipity['rewrite']);
|
||||||
|
|
||||||
|
@ -329,6 +329,12 @@ function serendipity_load_configuration($author = null) {
|
|||||||
}
|
}
|
||||||
$config_loaded[$author] = true;
|
$config_loaded[$author] = true;
|
||||||
|
|
||||||
|
// Set baseURL to defaultBaseURL
|
||||||
|
if ((empty($author) || empty($serendipity['baseURL'])) && isset($serendipity['defaultBaseURL'])) {
|
||||||
|
$serendipity['baseURL'] = $serendipity['defaultBaseURL'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Store default language
|
// Store default language
|
||||||
$serendipity['default_lang'] = $serendipity['lang'];
|
$serendipity['default_lang'] = $serendipity['lang'];
|
||||||
}
|
}
|
||||||
|
@ -1000,6 +1000,7 @@ function serendipity_smarty_init($vars = array()) {
|
|||||||
'blogDescription' => $serendipity['blogDescription'],
|
'blogDescription' => $serendipity['blogDescription'],
|
||||||
|
|
||||||
'serendipityHTTPPath' => $serendipity['serendipityHTTPPath'],
|
'serendipityHTTPPath' => $serendipity['serendipityHTTPPath'],
|
||||||
|
'serendipityDefaultBaseURL' => $serendipity['defaultBaseURL'],
|
||||||
'serendipityBaseURL' => $serendipity['baseURL'],
|
'serendipityBaseURL' => $serendipity['baseURL'],
|
||||||
'serendipityRewritePrefix' => $serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '',
|
'serendipityRewritePrefix' => $serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '',
|
||||||
'serendipityIndexFile' => $serendipity['indexFile'],
|
'serendipityIndexFile' => $serendipity['indexFile'],
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
'permission' => 'siteConfiguration',
|
'permission' => 'siteConfiguration',
|
||||||
'default' => 'uploads/'),
|
'default' => 'uploads/'),
|
||||||
|
|
||||||
array('var' => 'baseURL',
|
array('var' => 'defaultBaseURL',
|
||||||
'title' => INSTALL_URL,
|
'title' => INSTALL_URL,
|
||||||
'description' => INSTALL_URL_DESC,
|
'description' => INSTALL_URL_DESC,
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user