@@ -220,6 +220,14 @@ function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
220220 <?php
221221}
222222
223+ if ( ini_get ( "mbstring.func_overload " ) ) {
224+ $ fatal = true ;
225+ ?> <li class='error'><strong>Fatal: <a href='http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload'>mbstring.func_overload</a> is active!</strong>
226+ This option causes errors and may corrupt data unpredictably;
227+ you cannot install or use MediaWiki unless this option is disabled.
228+ <?php
229+ }
230+
223231if ( $ fatal ) {
224232 dieout ( "</ul><p>Cannot install wiki.</p> " );
225233}
@@ -373,6 +381,7 @@ function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
373381 $ conf ->DBpassword = importPost ( "DBpassword " );
374382 $ conf ->DBpassword2 = importPost ( "DBpassword2 " );
375383 $ conf ->DBprefix = importPost ( "DBprefix " );
384+ $ conf ->DBmysql5 = (importPost ( "DBmysql5 " ) == "true " ) ? "true " : "false " ;
376385 $ conf ->RootPW = importPost ( "RootPW " );
377386 $ conf ->LanguageCode = importPost ( "LanguageCode " , "en " );
378387 $ conf ->SysopName = importPost ( "SysopName " , "WikiSysop " );
@@ -519,7 +528,7 @@ function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
519528 $ errs ["DBserver " ] = "Connection failed " ;
520529 break ;
521530 default :
522- $ errs ["DBserver " ] = "Couldn't connect to database " ;
531+ $ errs ["DBserver " ] = "Couldn't connect to database ( $ err ) " ;
523532 break ;
524533 }
525534 if ( !$ ok ) continue ;
@@ -543,6 +552,14 @@ function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
543552 <a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
544553 >http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b> " ;
545554 }
555+ if ( $ wgDBmysql5 ) {
556+ if ( $ mysqlNewAuth ) {
557+ print "; enabling MySQL 4.1/5.0 charset mode " ;
558+ } else {
559+ print "; <b class='error'>MySQL 4.1/5.0 charset mode enabled,
560+ but older version detected; will likely fail.</b> " ;
561+ }
562+ }
546563 print "</li> \n" ;
547564
548565 @$ sel = mysql_select_db ( $ wgDBname , $ wgDatabase ->mConn );
@@ -597,7 +614,13 @@ function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
597614 } else {
598615 # FIXME: Check for errors
599616 print "<li>Creating tables... " ;
600- dbsource ( "../maintenance/tables.sql " , $ wgDatabase );
617+ if ( $ wgDBmysql5 ) {
618+ print " using MySQL 5 table defs... " ;
619+ dbsource ( "../maintenance/mysql5/tables.sql " , $ wgDatabase );
620+ } else {
621+ print " using MySQL 3/4 table defs... " ;
622+ dbsource ( "../maintenance/tables.sql " , $ wgDatabase );
623+ }
601624 dbsource ( "../maintenance/interwiki.sql " , $ wgDatabase );
602625 print " done.</li> \n" ;
603626
@@ -824,7 +847,7 @@ function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
824847 use Turck shared memory if the wiki will be running on a single Apache server.
825848 </dl>
826849
827- <h2>E-mail, e-mail notification and authentification setup</h2>
850+ <h2>E-mail, e-mail notification and authentication setup</h2>
828851
829852<dl class="setup">
830853 <dd>
@@ -885,10 +908,8 @@ function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
885908 </ul>
886909 </dd>
887910 <dt>
888- <p>
889- E-mail address authentication uses a scheme to authenticate e-mail addresses of the users. The user who initially enters or who changes his/her stored e-mail address
890- gets a one-time temporary password mailed to that address. The user can use the original password as long as wanted, however, the stored e-mail address
891- is only authenticated at the moment when the user logs in with the one-time temporary password.<p>
911+ <p>E-mail address authentication uses a scheme to authenticate e-mail addresses of the users. The user who initially enters or changes his/her stored e-mail address
912+ gets a link with a token mailed to that address. The stored e-mail address is authenticated at the moment the user comes back to the wiki via the link.</p>
892913
893914 <p>The e-mail address stays authenticated as long as the user does not change it; the time of authentication is indicated
894915 on the user preference page.</p>
@@ -938,6 +959,20 @@ function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
938959
939960 <p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
940961 </dt>
962+
963+ <dd><label class="column">Database charset</label>
964+ <div>Select one:</div>
965+ <ul class="plain">
966+ <li><?php aField ( $ conf , "DBmysql5 " , "Backwards-compatible UTF-8 " , "radio " , "false " ); ?> </li>
967+ <li><?php aField ( $ conf , "DBmysql5 " , "Experimental MySQL 4.1/5.0 UTF-8 " , "radio " , "true " ); ?> </li>
968+ </ul>
969+ </dd>
970+ <dt>
971+ <b>EXPERIMENTAL:</b> You can enable explicit Unicode charset support
972+ for MySQL 4.1 and 5.0 servers. This is not well tested and may
973+ cause things to break. <b>If upgrading an older installation, leave
974+ in backwards-compatible mode.</b>
975+ </dt>
941976
942977 <dd>
943978 <?php
@@ -1135,6 +1170,9 @@ function writeLocalSettings( $conf ) {
11351170# If you're on MySQL 3.x, this next line must be FALSE:
11361171 \$wgDBmysql4 = {$ conf ->DBmysql4 };
11371172
1173+ # Experimental charset support for MySQL 4.1/5.0.
1174+ \$wgDBmysql5 = {$ conf ->DBmysql5 };
1175+
11381176## Shared memory settings
11391177 \$wgMainCacheType = $ cacheType;
11401178 \$wgMemCachedServers = $ mcservers;
0 commit comments