Index: trunk/phase3/install.php |
— | — | @@ -76,6 +76,8 @@ |
77 | 77 | copyfile( "./math", "texvc_tex", "{$IP}/math", 0775 ); |
78 | 78 | } |
79 | 79 | |
| 80 | +copyfile( ".", "Version.php", $IP ); |
| 81 | + |
80 | 82 | # |
81 | 83 | # Make and initialize database |
82 | 84 | # |
— | — | @@ -117,8 +119,6 @@ |
118 | 120 | print "Adding indexes...\n"; |
119 | 121 | dbsource( $rconn, "./maintenance/indexes.sql" ); |
120 | 122 | |
121 | | -copyfile( ".", "Version.php", $IP ); |
122 | | - |
123 | 123 | print "Done.\nBrowse \"{$wgServer}{$wgScript}\" to test,\n" . |
124 | 124 | "or \"run WikiSuite -b -o\" in test suite.\n"; |
125 | 125 | exit(); |
Index: trunk/phase3/update.php |
— | — | @@ -94,6 +94,13 @@ |
95 | 95 | } |
96 | 96 | } |
97 | 97 | |
| 98 | +function readconsole() { |
| 99 | + $fp = fopen( "php://stdin", "r" ); |
| 100 | + $resp = trim( fgets( $fp ) ); |
| 101 | + fclose( $fp ); |
| 102 | + return $resp; |
| 103 | +} |
| 104 | + |
98 | 105 | function do_revision_updates() { |
99 | 106 | global $wgSoftwareRevision; |
100 | 107 | |
— | — | @@ -102,8 +109,15 @@ |
103 | 110 | |
104 | 111 | function update_passwords() { |
105 | 112 | $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) "; |
107 | 118 | |
| 119 | + $resp = readconsole(); |
| 120 | + if ( ! ( "Y" == $resp{0} || "y" == $resp{0} ) ) { return; } |
| 121 | + |
108 | 122 | $sql = "SELECT user_id,user_password FROM user"; |
109 | 123 | $source = wfQuery( $sql, fname ); |
110 | 124 | |
Index: trunk/phase3/Version.php |
— | — | @@ -1,3 +1,4 @@ |
| 2 | +<? |
2 | 3 | # This file is copied to the install directory so that |
3 | 4 | # later update scripts will be able to use it to determine |
4 | 5 | # what they need to update. The version number here must |
— | — | @@ -9,4 +10,4 @@ |
10 | 11 | # |
11 | 12 | |
12 | 13 | $wgSoftwareRevision = 1001; |
13 | | - |
| 14 | +?> |