r13645 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13644‎ | r13645 | r13646 >
Date:20:58, 14 April 2006
Author:hashar
Status:old
Tags:
Comment:
Some minor changes to the installer after I reinstalled MW from scracth:
* show realpath when asking to chmod g+w ./config
* hide errors returned when trying to dl() mysql.so / pgsql.so
* cleanly outputbuffer when dieing out
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/config/index.php (modified) (history)
  • /trunk/phase3/install-utils.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/config/index.php
@@ -163,7 +163,7 @@
164164 <p>To make the directory writable on a Unix/Linux system:</p>
165165
166166 <pre>
167 - cd <i>/path/to/wiki</i>
 167+ cd <i>$IP</i>
168168 chmod a+w config
169169 </pre>" );
170170 }
@@ -1309,7 +1309,8 @@
13101310 }
13111311
13121312 function dieout( $text ) {
1313 - die( $text . "\n\n</body>\n</html>" );
 1313+ outputFooter( $text );
 1314+ die();
13141315 }
13151316
13161317 function importVar( &$var, $name, $default = "" ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -68,6 +68,9 @@
6969 anchor identifiers
7070 * (bug 5519) Allow sidebar cache to be disabled; disable it by default.
7171 * Maintenance script to import the contents of a text file into a wiki page
 72+* installer: show realpath when asking to chmod g+w ./config
 73+* installer: hide errors returned when trying to dl() mysql.so / pgsql.so
 74+* installer: cleanly outputbuffer when dieing out
7275
7376 == Compatibility ==
7477
Index: trunk/phase3/install-utils.inc
@@ -17,15 +17,20 @@
1818
1919 $gotdatabase = 0;
2020 ## XXX We should quiet the warnings thrown here
21 - if (extension_loaded('mysql') or dl('mysql.so')) {
 21+ if (extension_loaded('mysql') or @dl('mysql.so')) {
2222 $gotdatabase = 'mysql';
2323 }
24 - else if (extension_loaded('pgsql') or dl('pgsql.so')) {
 24+ else if (extension_loaded('pgsql') or @dl('pgsql.so')) {
2525 $gotdatabase = 'pg';
2626 }
2727 if (!$gotdatabase) {
28 - print "Could not load the MySQL or the PostgreSQL driver! Please compile ".
29 - "php with either --with-mysql or --with-pgsql, or install the mysql.so or pg.so module.\n";
 28+ global $wgCommandLineMode;
 29+
 30+ $error ="Could not load the MySQL or the PostgreSQL driver! Please compile ".
 31+ "php with either --with-mysql or --with-pgsql, or install the mysql.so or pg.so module.<br/>\n".
 32+ " If the database extension is installed (eg php-mysql), make sure it is enabled in your php.ini.\n";
 33+ if( $wgCommandLineMode ) { print $error; }
 34+ else { outputFooter($error); }
3035 exit;
3136 }
3237
@@ -157,4 +162,41 @@
158163 return false;
159164 }
160165
 166+/**
 167+ * Used to end the HTML stream when we die out
 168+ */
 169+function outputFooter( $text ) {
 170+print $text;
 171+print <<<END
 172+</div></div></div>
 173+
 174+
 175+<div id="column-one">
 176+ <div class="portlet" id="p-logo">
 177+ <a style="background-image: url(../skins/common/images/mediawiki.png);"
 178+ href="http://www.mediawiki.org/"
 179+ title="Main Page"></a>
 180+ </div>
 181+ <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
 182+ <div class='portlet'><div class='pBody'>
 183+ <ul>
 184+ <li><strong><a href="http://www.mediawiki.org/">MediaWiki home</a></strong></li>
 185+ <li><a href="../README">Readme</a></li>
 186+ <li><a href="../RELEASE-NOTES">Release notes</a></li>
 187+ <li><a href="../docs/">Documentation</a></li>
 188+ <li><a href="http://meta.wikipedia.org/wiki/MediaWiki_User's_Guide">User's Guide</a></li>
 189+ <li><a href="http://meta.wikimedia.org/wiki/MediaWiki_FAQ">FAQ</a></li>
 190+ </ul>
 191+ <p style="font-size:90%;margin-top:1em">MediaWiki is Copyright &copy; 2001-2006 by Magnus Manske, Brion Vibber, Lee Daniel Crocker, Tim Starling, Erik M&ouml;ller, Gabriel Wicke and others.</p>
 192+ </div></div>
 193+</div>
 194+
 195+</div>
 196+
 197+</body>
 198+</html>
 199+
 200+END;
 201+
 202+}
161203 ?>

Follow-up revisions

RevisionCommit summaryAuthorDate
r13688Revert the rest of r13645; totally broken, tries to call an installer-specifi...brion09:00, 17 April 2006

Status & tagging log