"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/setup/common.php" between
wacko.6.1.18.zip and wacko.6.1.19.zip

About: WackoWiki is a multilingual Wiki-engine that supports WYTIWYG-editing, page rights (ACLs), design themes (skins), file upload, email notification and much more.

common.php  (wacko.6.1.18):common.php  (wacko.6.1.19)
<?php <?php
// setup header // setup header
function my_location()
{
global $config;
// run in tls mode?
if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
|| (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] ==
'443')
)
{
$config['base_url'] = str_replace('http://', 'https://', $confi
g['base_url']);
}
[$url, ] = explode('?', $config['base_url']);
return $url;
}
// setup header
function write_config_hidden_nodes($config_parameters) function write_config_hidden_nodes($config_parameters)
{ {
if (is_array($config_parameters)) if (is_array($config_parameters))
{ {
foreach ($config_parameters as $key => $value) foreach ($config_parameters as $key => $value)
{ {
if (is_array($value)) if (is_array($value))
{ {
$value = implode(',', $value); $value = implode(',', $value);
} }
skipping to change at line 46 skipping to change at line 28
} }
function output_error($error_text = '') function output_error($error_text = '')
{ {
echo '<ul class="install_error"><li>' . $error_text . '</li></ul>' . "\n" ; echo '<ul class="install_error"><li>' . $error_text . '</li></ul>' . "\n" ;
} }
// Draws a tick or cross next to a result // Draws a tick or cross next to a result
function output_image($ok) function output_image($ok)
{ {
global $lang; global $lang, $base_path;
return '<img src="' . my_location() . 'setup/image/spacer.png" width="20" height="20" alt="' . ($ok ? $lang['OK'] : $lang['Problem']) . '" title="' . ($o k ? $lang['OK'] : $lang['Problem']) . '" class="tickcross ' . ($ok ? 'tick' : 'c ross') . '">'; return '<img src="' . $base_path . 'setup/image/spacer.png" width="20" he ight="20" alt="' . ($ok ? $lang['OK'] : $lang['Problem']) . '" title="' . ($ok ? $lang['OK'] : $lang['Problem']) . '" class="tickcross ' . ($ok ? 'tick' : 'cros s') . '">';
} }
// TODO: same function as in wacko class // TODO: same function as in wacko class
// site config // site config
function available_languages() function available_languages()
{ {
$lang_list = []; $lang_list = [];
if ($handle = opendir('lang')) if ($handle = opendir('lang'))
{ {
skipping to change at line 208 skipping to change at line 190
} }
$str .= $entries . "];\n"; $str .= $entries . "];\n";
$str .= $arrays; $str .= $arrays;
return $str; return $str;
} }
// TODO: same function as in dbpdo class // TODO: same function as in dbpdo class
// default: mysql_pdo -> Manually string quoting since pdo::quote is double esca ping single quotes which is causing chaos // default: mysql_pdo -> Manually string quoting since pdo::quote is double esca ping single quotes which is causing chaos
function _quote($string) function _q($string)
{ {
$string ??= ''; $string ??= '';
global $config_global, $dblink_global; global $config_global, $dblink_global;
return match ($config_global['db_driver']) { return match ($config_global['db_driver']) {
'mysqli_legacy' => mysqli_real_escape_string($dblink_global, $str ing), 'mysqli_legacy' => mysqli_real_escape_string($dblink_global, $str ing),
default => strtr($string, [ default => strtr($string, [
"\x00" => '\x00', "\x00" => '\x00',
"\n" => '\n', "\n" => '\n',
"\r" => '\r', "\r" => '\r',
 End of changes. 4 change blocks. 
23 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)