Browse Source

兼容PHP8调整

tags/6.0.3
tianya 3 years ago
parent
commit
cd52278315
4 changed files with 8 additions and 31 deletions
  1. +2
    -3
      src/install/index.php
  2. +4
    -6
      src/install/install.inc.php
  3. +1
    -1
      src/install/module-install.php
  4. +1
    -21
      src/install/templates/step-3.html

+ 2
- 3
src/install/index.php View File

@@ -10,8 +10,7 @@
//error_reporting(E_ALL); //error_reporting(E_ALL);
error_reporting(E_ALL || ~E_NOTICE); error_reporting(E_ALL || ~E_NOTICE);


$verMsg = 'V6 UTF8';
$s_lang = 'utf-8';
$verMsg = 'V6';
$dfDbname = 'dedecmsv6utf8'; $dfDbname = 'dedecmsv6utf8';
$errmsg = ''; $errmsg = '';


@@ -22,7 +21,7 @@ $moduleCacheFile = dirname(__FILE__).'/modules.tmp.inc';
define('DEDEINC',dirname(__FILE__).'/../include'); define('DEDEINC',dirname(__FILE__).'/../include');
define('DEDEDATA',dirname(__FILE__).'/../data'); define('DEDEDATA',dirname(__FILE__).'/../data');
define('DEDEROOT',preg_replace("#[\\\\\/]install#", '', dirname(__FILE__))); define('DEDEROOT',preg_replace("#[\\\\\/]install#", '', dirname(__FILE__)));
header("Content-Type: text/html; charset={$s_lang}");
header("Content-Type: text/html; charset=utf-8");


require_once(DEDEROOT.'/install/install.inc.php'); require_once(DEDEROOT.'/install/install.inc.php');
require_once(DEDEINC.'/zip.class.php'); require_once(DEDEINC.'/zip.class.php');


+ 4
- 6
src/install/install.inc.php View File

@@ -9,12 +9,10 @@
*/ */
function RunMagicQuotes(&$str) function RunMagicQuotes(&$str)
{ {
if (!get_magic_quotes_gpc()) {
if (is_array($str))
foreach ($str as $key => $val) $str[$key] = RunMagicQuotes($val);
else
$str = addslashes($str);
}
if (is_array($str))
foreach ($str as $key => $val) $str[$key] = RunMagicQuotes($val);
else
$str = addslashes($str);
return $str; return $str;
} }


+ 1
- 1
src/install/module-install.php View File

@@ -9,7 +9,7 @@
require_once(dirname(__FILE__).'/../include/common.inc.php'); require_once(dirname(__FILE__).'/../include/common.inc.php');
@set_time_limit(0); @set_time_limit(0);


$verMsg = 'V6 UTF8 ';
$verMsg = 'V6';
$errmsg = ''; $errmsg = '';
$insLockfile = dirname(__FILE__).'/install_lock.txt'; $insLockfile = dirname(__FILE__).'/install_lock.txt';
$moduleCacheFile = dirname(__FILE__).'/modules.tmp.inc'; $moduleCacheFile = dirname(__FILE__).'/modules.tmp.inc';


+ 1
- 21
src/install/templates/step-3.html View File

@@ -50,6 +50,7 @@
<div id='postloader' class='waitpage'></div> <div id='postloader' class='waitpage'></div>
<form action="index.php" method="post" name="form1"> <form action="index.php" method="post" name="form1">
<input type="hidden" name="step" value="4" /> <input type="hidden" name="step" value="4" />
<input type="hidden" name="dblang" value="utf8" />
<div class="top"> <div class="top">
<div class="top-logo"> <div class="top-logo">
@@ -122,27 +123,6 @@
<div style='float:left' id='havedbsta'></div> <div style='float:left' id='havedbsta'></div>
</td> </td>
</tr> </tr>
<tr>
<td class="onetd"><strong>数据库编码:</strong></td>
<td>
<?php
if($s_lang=='utf-8')
{
?>
<input type="radio" name="dblang" id="dblang_utf8" value="utf8" checked="checked" /><label for="dblang_latin1">UTF8</label>
<?php
}
else
{
?>
<input type="radio" name="dblang" id="dblang_gbk" value="gbk" checked="checked" /><label for="dblang_gbk">GBK</label>
<input type="radio" name="dblang" id="dblang_latin1" value="latin1" /><label for="dblang_latin1">LATIN1</label>
<?php
}
?>
<small>仅对4.1+以上版本的MySql选择</small>
</td>
</tr>
</table> </table>
<div class="pr-title"><h3>管理员初始密码</h3></div> <div class="pr-title"><h3>管理员初始密码</h3></div>


Loading…
Cancel
Save