PHP 8 compatibility fixes for the installer
This commit is contained in:
parent
7e48e041a2
commit
90dd334327
@ -28,7 +28,7 @@ if (defined('S9Y_DATA_PATH')) {
|
|||||||
|
|
||||||
$data['basedir'] = $basedir;
|
$data['basedir'] = $basedir;
|
||||||
$data['phpversion'] = phpversion();
|
$data['phpversion'] = phpversion();
|
||||||
$data['versionInstalled'] = $serendipity['versionInstalled'];
|
$data['versionInstalled'] = $serendipity['versionInstalled'] ?? null;
|
||||||
$data['templatePath'] = $serendipity['templatePath'];
|
$data['templatePath'] = $serendipity['templatePath'];
|
||||||
$data['installerHTTPPath'] = str_replace('//', '/', dirname($_SERVER['PHP_SELF']) . '/'); // since different OS handlers for enddir
|
$data['installerHTTPPath'] = str_replace('//', '/', dirname($_SERVER['PHP_SELF']) . '/'); // since different OS handlers for enddir
|
||||||
|
|
||||||
@ -93,9 +93,9 @@ if ( sizeof($_POST) > 1 && $serendipity['GET']['step'] == '3' ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['s9yGETstep'] = $serendipity['GET']['step'];
|
$data['s9yGETstep'] = $serendipity['GET']['step'] ?? null;
|
||||||
|
|
||||||
if ( (int)$serendipity['GET']['step'] == 0 ) {
|
if ( (int)($serendipity['GET']['step'] ?? null) == 0 ) {
|
||||||
$data['getstepint0'] = true;
|
$data['getstepint0'] = true;
|
||||||
$data['print_ERRORS_ARE_DISPLAYED_IN'] = sprintf(ERRORS_ARE_DISPLAYED_IN, serendipity_installerResultDiagnose(S9Y_I_ERROR, RED), serendipity_installerResultDiagnose(S9Y_I_WARNING, YELLOW), serendipity_installerResultDiagnose(S9Y_I_SUCCESS, GREEN));
|
$data['print_ERRORS_ARE_DISPLAYED_IN'] = sprintf(ERRORS_ARE_DISPLAYED_IN, serendipity_installerResultDiagnose(S9Y_I_ERROR, RED), serendipity_installerResultDiagnose(S9Y_I_WARNING, YELLOW), serendipity_installerResultDiagnose(S9Y_I_SUCCESS, GREEN));
|
||||||
$data['s9yversion'] = $serendipity['version'];
|
$data['s9yversion'] = $serendipity['version'];
|
||||||
@ -308,12 +308,12 @@ if ( (int)$serendipity['GET']['step'] == 0 ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['showWritableNote'] = $showWritableNote;
|
$data['showWritableNote'] = $showWritableNote ?? null;
|
||||||
$data['errorCount'] = $errorCount;
|
$data['errorCount'] = $errorCount;
|
||||||
|
|
||||||
} elseif ( $serendipity['GET']['step'] == '2a' ) {
|
} elseif ( $serendipity['GET']['step'] == '2a' ) {
|
||||||
$config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE, null, array('simpleInstall'));
|
$config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE, null, array('simpleInstall'));
|
||||||
$data['ob_serendipity_printConfigTemplate'] = serendipity_printConfigTemplate($config, $from, true, false, false);
|
$data['ob_serendipity_printConfigTemplate'] = serendipity_printConfigTemplate($config, $from ?? false, true, false, false);
|
||||||
|
|
||||||
} elseif ( $serendipity['GET']['step'] == '2b' ) {
|
} elseif ( $serendipity['GET']['step'] == '2b' ) {
|
||||||
$config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
|
$config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
|
||||||
@ -321,9 +321,12 @@ if ( (int)$serendipity['GET']['step'] == 0 ) {
|
|||||||
|
|
||||||
} elseif ( $serendipity['GET']['step'] == '3' ) {
|
} elseif ( $serendipity['GET']['step'] == '3' ) {
|
||||||
$serendipity['dbPrefix'] = $_POST['dbPrefix'];
|
$serendipity['dbPrefix'] = $_POST['dbPrefix'];
|
||||||
|
try {
|
||||||
$t = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors", false, 'both', false, false, false, true);
|
$t = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors", false, 'both', false, false, false, true);
|
||||||
$data['authors_query'] = $t;
|
$data['authors_query'] = $t;
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
$t = null;
|
||||||
|
}
|
||||||
|
|
||||||
if ( is_array($t) ) {
|
if ( is_array($t) ) {
|
||||||
// void
|
// void
|
||||||
@ -361,7 +364,7 @@ if ( (int)$serendipity['GET']['step'] == 0 ) {
|
|||||||
|
|
||||||
include_once dirname(dirname(__FILE__)) . "/functions.inc.php";
|
include_once dirname(dirname(__FILE__)) . "/functions.inc.php";
|
||||||
|
|
||||||
if (!is_object($serendipity['smarty'])) {
|
if (!is_object($serendipity['smarty'] ?? null)) {
|
||||||
serendipity_smarty_init();
|
serendipity_smarty_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# All rights reserved. See LICENSE file for licensing details
|
# All rights reserved. See LICENSE file for licensing details
|
||||||
|
|
||||||
// PHP 5.5 compat, no longer use deprecated mysql
|
// PHP 5.5 compat, no longer use deprecated mysql
|
||||||
if ($serendipity['dbType'] == 'mysql' && (version_compare(PHP_VERSION, '5.5.0') >= 0 || !function_exists('mysql_connect'))) {
|
if ($serendipity['dbType'] ?? '' == 'mysql' && (version_compare(PHP_VERSION, '5.5.0') >= 0 || !function_exists('mysql_connect'))) {
|
||||||
$serendipity['dbType'] = 'mysqli';
|
$serendipity['dbType'] = 'mysqli';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force
|
|||||||
} else {
|
} else {
|
||||||
$directories[] = $serendipity['template_backend'] . '/'; # Since 2.0 s9y can have a independent backend theme
|
$directories[] = $serendipity['template_backend'] . '/'; # Since 2.0 s9y can have a independent backend theme
|
||||||
}
|
}
|
||||||
$directories[] = $serendipity['template_engine'] . '/'; # themes can set an engine, which will be used if they do not have the file
|
$directories[] = $serendipity['template_engine'] ?? null . '/'; # themes can set an engine, which will be used if they do not have the file
|
||||||
$directories[] = $serendipity['defaultTemplate'] .'/'; # the default theme is the last place we will look in, serving as pure fallback
|
$directories[] = $serendipity['defaultTemplate'] .'/'; # the default theme is the last place we will look in, serving as pure fallback
|
||||||
$directories = array_unique($directories); # save performance by not checking for file existence multiple times in the same directory
|
$directories = array_unique($directories); # save performance by not checking for file existence multiple times in the same directory
|
||||||
|
|
||||||
@ -674,7 +674,7 @@ function serendipity_load_userdata($username) {
|
|||||||
* @return boolean TRUE when logged in, FALSE when not.
|
* @return boolean TRUE when logged in, FALSE when not.
|
||||||
*/
|
*/
|
||||||
function serendipity_userLoggedIn() {
|
function serendipity_userLoggedIn() {
|
||||||
if ($_SESSION['serendipityAuthedUser'] === true && IS_installed) {
|
if ($_SESSION['serendipityAuthedUser'] ?? false === true && IS_installed) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -798,7 +798,7 @@ function serendipity_deleteCookie($name) {
|
|||||||
function serendipity_is_iframe() {
|
function serendipity_is_iframe() {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
if ($serendipity['GET']['is_iframe'] && is_array($_SESSION['save_entry'])) {
|
if ($serendipity['GET']['is_iframe'] ?? false && is_array($_SESSION['save_entry'])) {
|
||||||
if (!is_object($serendipity['smarty'])) {
|
if (!is_object($serendipity['smarty'])) {
|
||||||
// We need smarty also in the iframe to load a template's config.inc.php and register possible event hooks.
|
// We need smarty also in the iframe to load a template's config.inc.php and register possible event hooks.
|
||||||
serendipity_smarty_init();
|
serendipity_smarty_init();
|
||||||
|
@ -290,7 +290,7 @@ function serendipity_query_default($optname, $default, $usertemplate = false, $t
|
|||||||
function serendipity_parseTemplate($filename, $areas = null, $onlyFlags=null) {
|
function serendipity_parseTemplate($filename, $areas = null, $onlyFlags=null) {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
$userlevel = $serendipity['serendipityUserlevel'];
|
$userlevel = $serendipity['serendipityUserlevel'] ?? null;
|
||||||
|
|
||||||
if ( !IS_installed ) {
|
if ( !IS_installed ) {
|
||||||
$userlevel = USERLEVEL_ADMIN;
|
$userlevel = USERLEVEL_ADMIN;
|
||||||
@ -425,11 +425,10 @@ function serendipity_guessInput($type, $name, $value='', $default='') {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'list':
|
case 'list':
|
||||||
$cval = (string)$value;
|
|
||||||
$default = (array)$default;
|
$default = (array)$default;
|
||||||
foreach ($default as $k => $v) {
|
foreach ($default as $k => $v) {
|
||||||
$selected = ((string)$k == (string)$value);
|
$selected = ($k == $value);
|
||||||
if (empty($cval) && ((string)$k === 'false' || (string)$k === null)) {
|
if (empty($value) && ((string)$k === 'false' || (string)$k === null)) {
|
||||||
$selected = true;
|
$selected = true;
|
||||||
}
|
}
|
||||||
$curOptions[$name][$k]['selected'] = $selected;
|
$curOptions[$name][$k]['selected'] = $selected;
|
||||||
@ -469,7 +468,7 @@ function serendipity_printConfigTemplate($config, $from = false, $noForm = false
|
|||||||
foreach ($config as &$category) {
|
foreach ($config as &$category) {
|
||||||
foreach ($category['items'] as &$item) {
|
foreach ($category['items'] as &$item) {
|
||||||
|
|
||||||
$value = $from[$item['var']];
|
$value = $from[$item['var']] ?? false;
|
||||||
|
|
||||||
/* Calculate value if we are not installed, how clever :) */
|
/* Calculate value if we are not installed, how clever :) */
|
||||||
if ($from == false) {
|
if ($from == false) {
|
||||||
@ -485,7 +484,7 @@ function serendipity_printConfigTemplate($config, $from = false, $noForm = false
|
|||||||
$value = '';
|
$value = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$showDangerous && $item['view'] == 'dangerous') {
|
if (!$showDangerous && ($item['view'] ?? null) == 'dangerous') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -892,7 +891,7 @@ function serendipity_updateConfiguration() {
|
|||||||
|
|
||||||
// Check permission set. Changes to blogConfiguration or siteConfiguration items
|
// Check permission set. Changes to blogConfiguration or siteConfiguration items
|
||||||
// always required authorid = 0, so that it be not specific to a userlogin
|
// always required authorid = 0, so that it be not specific to a userlogin
|
||||||
if ( $serendipity['serendipityUserlevel'] >= $item['userlevel'] || IS_installed === false ) {
|
if ( ($serendipity['serendipityUserlevel'] ?? 0) >= $item['userlevel'] || IS_installed === false ) {
|
||||||
$authorid = 0;
|
$authorid = 0;
|
||||||
} elseif ($item['permission'] == 'blogConfiguration' && serendipity_checkPermission('blogConfiguration')) {
|
} elseif ($item['permission'] == 'blogConfiguration' && serendipity_checkPermission('blogConfiguration')) {
|
||||||
$authorid = 0;
|
$authorid = 0;
|
||||||
@ -904,8 +903,7 @@ function serendipity_updateConfiguration() {
|
|||||||
|
|
||||||
if (is_array($_POST[$item['var']])) {
|
if (is_array($_POST[$item['var']])) {
|
||||||
// Arrays not allowed. Use first index value.
|
// Arrays not allowed. Use first index value.
|
||||||
list($a_key, $a_val) = each($_POST[$item['var']]);
|
$_POST[$item['var']] = array_key_first($_POST[$item['var']]);
|
||||||
$_POST[$item['var']] = $a_key;
|
|
||||||
|
|
||||||
// If it still is an array, munge it all together.
|
// If it still is an array, munge it all together.
|
||||||
if (is_array($_POST[$item['var']])) {
|
if (is_array($_POST[$item['var']])) {
|
||||||
|
@ -492,7 +492,7 @@ function serendipity_buildPermalinks() {
|
|||||||
*/
|
*/
|
||||||
function serendipity_rewriteURL($path, $key='baseURL', $forceNone = false) {
|
function serendipity_rewriteURL($path, $key='baseURL', $forceNone = false) {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
return $serendipity[$key] . ($serendipity['rewrite'] == 'none' || ($serendipity['rewrite'] != 'none' && $forceNone) ? $serendipity['indexFile'] . '?/' : '') . $path;
|
return ($serendipity[$key] ?? null) . ($serendipity['rewrite'] == 'none' || ($serendipity['rewrite'] != 'none' && $forceNone) ? $serendipity['indexFile'] . '?/' : '') . $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -890,7 +890,7 @@ function serendipity_smarty_init($vars = array()) {
|
|||||||
|
|
||||||
if (!isset($serendipity['smarty'])) {
|
if (!isset($serendipity['smarty'])) {
|
||||||
|
|
||||||
$template_dir = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'];
|
$template_dir = $serendipity['serendipityPath'] . $serendipity['templatePath'] . ($serendipity['template'] ?? null);
|
||||||
|
|
||||||
if (!defined('IN_serendipity_admin') && file_exists($template_dir . '/template.inc.php')) {
|
if (!defined('IN_serendipity_admin') && file_exists($template_dir . '/template.inc.php')) {
|
||||||
// If this file exists, a custom template engine will be loaded.
|
// If this file exists, a custom template engine will be loaded.
|
||||||
@ -1013,8 +1013,8 @@ function serendipity_smarty_init($vars = array()) {
|
|||||||
|
|
||||||
// When templates are switched, append a specific version string to make sure the browser does not cache the CSS
|
// When templates are switched, append a specific version string to make sure the browser does not cache the CSS
|
||||||
if (strstr($serendipity['smarty_vars']['head_link_stylesheet'], '?')) {
|
if (strstr($serendipity['smarty_vars']['head_link_stylesheet'], '?')) {
|
||||||
$serendipity['smarty_vars']['head_link_stylesheet'] .= '&v=' . $serendipity['last_template_change'];
|
$serendipity['smarty_vars']['head_link_stylesheet'] .= '&v=' . ($serendipity['last_template_change'] ?? null);
|
||||||
$serendipity['smarty_vars']['head_link_stylesheet_frontend'] .= '&v=' . $serendipity['last_template_change'];
|
$serendipity['smarty_vars']['head_link_stylesheet_frontend'] .= '&v=' . ($serendipity['last_template_change'] ?? null);
|
||||||
} else {
|
} else {
|
||||||
$serendipity['smarty_vars']['head_link_stylesheet'] .= '?v=' . $serendipity['last_template_change'];
|
$serendipity['smarty_vars']['head_link_stylesheet'] .= '?v=' . $serendipity['last_template_change'];
|
||||||
$serendipity['smarty_vars']['head_link_stylesheet_frontend'] .= '?v=' . $serendipity['last_template_change'];
|
$serendipity['smarty_vars']['head_link_stylesheet_frontend'] .= '?v=' . $serendipity['last_template_change'];
|
||||||
@ -1029,7 +1029,7 @@ function serendipity_smarty_init($vars = array()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strstr($serendipity['smarty_vars']['head_link_script'], '?')) {
|
if (strstr($serendipity['smarty_vars']['head_link_script'], '?')) {
|
||||||
$serendipity['smarty_vars']['head_link_script'] .= '&v=' . $serendipity['last_template_change'];
|
$serendipity['smarty_vars']['head_link_script'] .= '&v=' . ($serendipity['last_template_change'] ?? null);
|
||||||
} else {
|
} else {
|
||||||
$serendipity['smarty_vars']['head_link_script'] .= '?v=' . $serendipity['last_template_change'];
|
$serendipity['smarty_vars']['head_link_script'] .= '?v=' . $serendipity['last_template_change'];
|
||||||
}
|
}
|
||||||
@ -1080,20 +1080,20 @@ function serendipity_smarty_init($vars = array()) {
|
|||||||
'use_popups' => $serendipity['enablePopup'] ?? null,
|
'use_popups' => $serendipity['enablePopup'] ?? null,
|
||||||
'use_backendpopups' => $serendipity['enableBackendPopup'] ?? null,
|
'use_backendpopups' => $serendipity['enableBackendPopup'] ?? null,
|
||||||
'force_backendpopups' => $force_backendpopups,
|
'force_backendpopups' => $force_backendpopups,
|
||||||
'is_embedded' => (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) ? false : true,
|
'is_embedded' => $serendipity['embed'] ?? false,
|
||||||
'is_raw_mode' => $serendipity['smarty_raw_mode'] ?? null,
|
'is_raw_mode' => $serendipity['smarty_raw_mode'] ?? null,
|
||||||
'is_logged_in' => serendipity_userLoggedIn(),
|
'is_logged_in' => serendipity_userLoggedIn(),
|
||||||
|
|
||||||
'entry_id' => (isset($serendipity['GET']['id']) && is_numeric($serendipity['GET']['id'])) ? $serendipity['GET']['id'] : false,
|
'entry_id' => (isset($serendipity['GET']['id']) && is_numeric($serendipity['GET']['id'])) ? $serendipity['GET']['id'] : false,
|
||||||
'is_single_entry' => (isset($serendipity['GET']['id']) && is_numeric($serendipity['GET']['id'])),
|
'is_single_entry' => (isset($serendipity['GET']['id']) && is_numeric($serendipity['GET']['id'])),
|
||||||
|
|
||||||
'blogTitle' => $serendipity['blogTitle'],
|
'blogTitle' => $serendipity['blogTitle'] ?? null,
|
||||||
'blogSubTitle' => (!empty($serendipity['blogSubTitle']) ? $serendipity['blogSubTitle'] : ''),
|
'blogSubTitle' => (!empty($serendipity['blogSubTitle']) ? $serendipity['blogSubTitle'] : ''),
|
||||||
'blogDescription' => $serendipity['blogDescription'],
|
'blogDescription' => $serendipity['blogDescription'] ?? null,
|
||||||
|
|
||||||
'serendipityHTTPPath' => $serendipity['serendipityHTTPPath'],
|
'serendipityHTTPPath' => $serendipity['serendipityHTTPPath'] ?? null,
|
||||||
'serendipityDefaultBaseURL' => $serendipity['defaultBaseURL'],
|
'serendipityDefaultBaseURL' => $serendipity['defaultBaseURL'] ?? null,
|
||||||
'serendipityBaseURL' => $serendipity['baseURL'],
|
'serendipityBaseURL' => $serendipity['baseURL'] ?? null,
|
||||||
'serendipityRewritePrefix' => $serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '',
|
'serendipityRewritePrefix' => $serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '',
|
||||||
'serendipityIndexFile' => $serendipity['indexFile'],
|
'serendipityIndexFile' => $serendipity['indexFile'],
|
||||||
'serendipityVersion' => ($serendipity['expose_s9y'] ? $serendipity['version'] : ''),
|
'serendipityVersion' => ($serendipity['expose_s9y'] ? $serendipity['version'] : ''),
|
||||||
@ -1145,7 +1145,7 @@ function serendipity_smarty_init($vars = array()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (is_array($template_loaded_config)) {
|
if (is_array($template_loaded_config ?? null)) {
|
||||||
$template_vars =& $template_loaded_config;
|
$template_vars =& $template_loaded_config;
|
||||||
$serendipity['smarty']->assignByRef('template_option', $template_vars);
|
$serendipity['smarty']->assignByRef('template_option', $template_vars);
|
||||||
} elseif (is_array($template_config)) {
|
} elseif (is_array($template_config)) {
|
||||||
@ -1217,7 +1217,7 @@ function serendipity_smarty_shutdown($serendipity_directory = '') {
|
|||||||
function serendipity_smarty_show($template, $data = null, $debugtype = null, $debug = null) {
|
function serendipity_smarty_show($template, $data = null, $debugtype = null, $debug = null) {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
if (!is_object($serendipity['smarty'])) {
|
if (!is_object($serendipity['smarty'] ?? null)) {
|
||||||
serendipity_smarty_init();
|
serendipity_smarty_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1134,7 +1134,7 @@ class serendipity_plugin_api
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($serendipity['enablePluginACL'] && !serendipity_hasPluginPermissions($event_name)) {
|
if ($serendipity['enablePluginACL'] ?? false && !serendipity_hasPluginPermissions($event_name)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1182,7 +1182,7 @@ class serendipity_plugin_api
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($serendipity['enablePluginACL'] && !serendipity_hasPluginPermissions($plugin)) {
|
if ($serendipity['enablePluginACL'] ?? false && !serendipity_hasPluginPermissions($plugin)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$plugins[$plugin]['p']->event_hook($event_name, $bag, $eventData, $addData);
|
$plugins[$plugin]['p']->event_hook($event_name, $bag, $eventData, $addData);
|
||||||
|
@ -123,7 +123,7 @@ class Serendipity_Smarty extends Smarty
|
|||||||
$template_dirs = array();
|
$template_dirs = array();
|
||||||
|
|
||||||
// first add template path
|
// first add template path
|
||||||
$template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'];
|
$template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . ($serendipity['template'] ?? null);
|
||||||
// then fallback engines (which should never be a comma separated list)
|
// then fallback engines (which should never be a comma separated list)
|
||||||
if ($template_engine) {
|
if ($template_engine) {
|
||||||
$p = explode(',', $template_engine);
|
$p = explode(',', $template_engine);
|
||||||
|
@ -84,7 +84,7 @@ $no_footer = (isset($serendipity['GET']['noFooter']) || isset($serendipity['POST
|
|||||||
|
|
||||||
$use_installer = (!isset($serendipity['serendipityPath']) || IS_installed === false || IS_up2date === false );
|
$use_installer = (!isset($serendipity['serendipityPath']) || IS_installed === false || IS_up2date === false );
|
||||||
|
|
||||||
$post_action = $serendipity['POST']['action'];
|
$post_action = $serendipity['POST']['action'] ?? null;
|
||||||
|
|
||||||
$main_content = '';
|
$main_content = '';
|
||||||
if (!$use_installer && $is_logged_in) {
|
if (!$use_installer && $is_logged_in) {
|
||||||
|
@ -20,11 +20,11 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
<div id="el{$category@index}" class="config_optiongroup{if $config_groupkeys@last} config_optiongroup_last{/if} option_list">
|
<div id="el{$category@index}" class="config_optiongroup{if is_array($config_groupkeys|default:null) and $config_groupkeys@last} config_optiongroup_last{/if} option_list">
|
||||||
<legend class="visuallyhidden">{$category.description}</legend>
|
<legend class="visuallyhidden">{$category.description}</legend>
|
||||||
{foreach $category.items as $item}
|
{foreach $category.items as $item}
|
||||||
{cycle assign='zebra_class' values='odd,even'}
|
{cycle assign='zebra_class' values='odd,even'}
|
||||||
{if $item.guessedInput}
|
{if isset($item.guessedInput) and $item.guessedInput}
|
||||||
{if $item.type == 'bool'}
|
{if $item.type == 'bool'}
|
||||||
<fieldset class="clearfix {$zebra_class}{if $item.description != ''} has_info{/if}">
|
<fieldset class="clearfix {$zebra_class}{if $item.description != ''} has_info{/if}">
|
||||||
<span class="wrap_legend"><legend>{$item.title}{if $item.description != ''} <button class="toggle_info button_link" type="button" data-href="#{$item.var}_info"><span class="icon-info-circled" aria-hidden="true"></span><b>i</b><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</legend></span>
|
<span class="wrap_legend"><legend>{$item.title}{if $item.description != ''} <button class="toggle_info button_link" type="button" data-href="#{$item.var}_info"><span class="icon-info-circled" aria-hidden="true"></span><b>i</b><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</legend></span>
|
||||||
@ -36,15 +36,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{else}
|
{else}
|
||||||
{if $item.ignore}
|
{if $item.ignore|default:false}
|
||||||
{cycle advance=true assign='temp'}
|
{cycle advance=true assign='temp'}
|
||||||
{/if}
|
{/if}
|
||||||
<div class="clearfix {$zebra_class} form_{if $item.type == 'list'}select{elseif $item.type == 'multilist'}multiselect{elseif $item.type == 'textarea'}area{else}field{/if}{if $item.description != ''} has_info{/if}{if $item.ignore} hidden{/if}">
|
<div class="clearfix {$zebra_class} form_{if $item.type == 'list'}select{elseif $item.type == 'multilist'}multiselect{elseif $item.type == 'textarea'}area{else}field{/if}{if $item.description != ''} has_info{/if}{if $item.ignore|default:false} hidden{/if}">
|
||||||
<label for="{$item.var}">{$item.title}{if $item.description != ''} <button class="toggle_info button_link" type="button" data-href="#{$item.var}_info"><span class="icon-info-circled" aria-hidden="true"></span><b>i</b><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label>
|
<label for="{$item.var}">{$item.title}{if $item.description != ''} <button class="toggle_info button_link" type="button" data-href="#{$item.var}_info"><span class="icon-info-circled" aria-hidden="true"></span><b>i</b><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label>
|
||||||
{if $item.description != ''}
|
{if $item.description != ''}
|
||||||
<span id="{$item.var}_info" class="field_info additional_info">{$item.description}</span>
|
<span id="{$item.var}_info" class="field_info additional_info">{$item.description}</span>
|
||||||
{/if}
|
{/if}
|
||||||
{$item.guessedInput}
|
{if isset($item.guessedInput)}{$item.guessedInput}{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -25,14 +25,14 @@
|
|||||||
|
|
||||||
<main class="clearfix serendipityAdminContent installer">
|
<main class="clearfix serendipityAdminContent installer">
|
||||||
<div id="content" class="clearfix">
|
<div id="content" class="clearfix">
|
||||||
{if $is_errors && is_array($errors)}
|
{if isset($is_errors) && $is_errors && is_array($errors)}
|
||||||
<ul class="plainList">
|
<ul class="plainList">
|
||||||
{foreach $errors AS $error}
|
{foreach $errors AS $error}
|
||||||
<li><span class="msg_error">{$error}</span></li>
|
<li><span class="msg_error">{$error}</span></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
{if $getstepint0}
|
{if $getstepint0|default:false}
|
||||||
<h2>{$CONST.WELCOME_TO_INSTALLATION}</h2>
|
<h2>{$CONST.WELCOME_TO_INSTALLATION}</h2>
|
||||||
|
|
||||||
<p>{$CONST.FIRST_WE_TAKE_A_LOOK}</p>
|
<p>{$CONST.FIRST_WE_TAKE_A_LOOK}</p>
|
||||||
@ -262,7 +262,7 @@
|
|||||||
</form>
|
</form>
|
||||||
{elseif $s9yGETstep == '3'}
|
{elseif $s9yGETstep == '3'}
|
||||||
<h3>{$CONST.CHECK_DATABASE_EXISTS}</h3>
|
<h3>{$CONST.CHECK_DATABASE_EXISTS}</h3>
|
||||||
{if is_array($authors_query)}
|
{if is_array($authors_query|default:null)}
|
||||||
<span class="msg_success"><strong>{$CONST.THEY_DO}</strong>, {$CONST.WONT_INSTALL_DB_AGAIN}</span>
|
<span class="msg_success"><strong>{$CONST.THEY_DO}</strong>, {$CONST.WONT_INSTALL_DB_AGAIN}</span>
|
||||||
{else}
|
{else}
|
||||||
<span class="msg_success"><strong>{$CONST.THEY_DONT}</strong></span>
|
<span class="msg_success"><strong>{$CONST.THEY_DONT}</strong></span>
|
||||||
@ -299,7 +299,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer id="meta">
|
<footer id="meta">
|
||||||
<p>{$ADMIN_FOOTER_POWERED_BY|sprintf:$versionInstalled:$phpversion}</p>
|
<p>{$CONST.ADMIN_FOOTER_POWERED_BY|sprintf:$versionInstalled:$phpversion}</p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user