r1294 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r1293‎ | r1294 | r1295 >
Date:18:49, 16 April 2003
Author:lcrocker
Status:old
Tags:
Comment:
Install and update script fixes.
Modified paths:
  • /trunk/phase3/Version.php (modified) (history)
  • /trunk/phase3/install.php (modified) (history)
  • /trunk/phase3/update.php (modified) (history)

Diff [purge]

Index: trunk/phase3/install.php
@@ -76,6 +76,8 @@
7777 copyfile( "./math", "texvc_tex", "{$IP}/math", 0775 );
7878 }
7979
 80+copyfile( ".", "Version.php", $IP );
 81+
8082 #
8183 # Make and initialize database
8284 #
@@ -117,8 +119,6 @@
118120 print "Adding indexes...\n";
119121 dbsource( $rconn, "./maintenance/indexes.sql" );
120122
121 -copyfile( ".", "Version.php", $IP );
122 -
123123 print "Done.\nBrowse \"{$wgServer}{$wgScript}\" to test,\n" .
124124 "or \"run WikiSuite -b -o\" in test suite.\n";
125125 exit();
Index: trunk/phase3/update.php
@@ -94,6 +94,13 @@
9595 }
9696 }
9797
 98+function readconsole() {
 99+ $fp = fopen( "php://stdin", "r" );
 100+ $resp = trim( fgets( $fp ) );
 101+ fclose( $fp );
 102+ return $resp;
 103+}
 104+
98105 function do_revision_updates() {
99106 global $wgSoftwareRevision;
100107
@@ -102,8 +109,15 @@
103110
104111 function update_passwords() {
105112 $fname = "Update scripte: update_passwords()";
106 - print "Updating passwords...\n";
 113+ print "\nIt appears that you need to update the user passwords in your\n" .
 114+ "database. If you have already done this (if you've run this update\n" .
 115+ "script once before, for example), doing so again will make all your\n" .
 116+ "user accounts inaccessible, so be sure you only do this once.\n" .
 117+ "Update user passwords? (yes/no) ";
107118
 119+ $resp = readconsole();
 120+ if ( ! ( "Y" == $resp{0} || "y" == $resp{0} ) ) { return; }
 121+
108122 $sql = "SELECT user_id,user_password FROM user";
109123 $source = wfQuery( $sql, fname );
110124
Index: trunk/phase3/Version.php
@@ -1,3 +1,4 @@
 2+<?
23 # This file is copied to the install directory so that
34 # later update scripts will be able to use it to determine
45 # what they need to update. The version number here must
@@ -9,4 +10,4 @@
1011 #
1112
1213 $wgSoftwareRevision = 1001;
13 -
 14+?>

Status & tagging log