ALT Linux Bugzilla
– Attachment 4096 Details for
Bug 22426
FR: неплохо бы версию обновить
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
new patch
mediawiki-1.15.1-commoncode.patch (text/plain), 5.01 KB, created by
nwtour
on 2009-12-01 23:04:59 MSK
(
hide
)
Description:
new patch
Filename:
MIME Type:
Creator:
nwtour
Created:
2009-12-01 23:04:59 MSK
Size:
5.01 KB
patch
obsolete
>--- ./index.php.commoncode 2009-12-01 22:16:31 +0300 >+++ ./index.php 2009-12-01 22:17:01 +0300 >@@ -36,6 +36,9 @@ > * @file > */ > >+$DIR=getcwd(); >+chdir('/usr/share/mediawiki'); >+ > > # Initialise common code > $preIP = dirname( __FILE__ ); >--- ./config/index.php.commoncode 2009-12-01 22:00:29 +0300 >+++ ./config/index.php 2009-12-01 22:08:00 +0300 >@@ -19,6 +19,8 @@ > # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > # http://www.gnu.org/copyleft/gpl.html > >+$DIR=dirname( getcwd() ); >+chdir('/usr/share/mediawiki/config'); > error_reporting( E_ALL ); > header( "Content-type: text/html; charset=utf-8" ); > @ini_set( "display_errors", true ); >@@ -27,7 +29,7 @@ > $wgRequestTime = microtime( true ); > > # Attempt to set up the include path, to fix problems with relative includes >-$IP = dirname( dirname( __FILE__ ) ); >+$IP = '/usr/share/mediawiki'; > define( 'MW_INSTALL_PATH', $IP ); > > # Define an entry point and include some files >@@ -218,18 +220,18 @@ > > /* Check for existing configurations and bug out! */ > >-if( file_exists( "../LocalSettings.php" ) ) { >+if( file_exists( "$DIR/LocalSettings.php" ) ) { > $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; > dieout( "<p><strong>Setup has completed, <a href='../$script'>your wiki</a> is configured.</strong></p> > <p>Please delete the /config directory for extra security.</p>" ); > } > >-if( file_exists( "./LocalSettings.php" ) ) { >+if( file_exists( "$DIR/LocalSettings.php" ) ) { > writeSuccessMessage(); > dieout( '' ); > } > >-if( !is_writable( "." ) ) { >+if( !is_writable( $DIR . "/config" ) ) { > dieout( "<h2>Can't write config file, aborting</h2> > > <p>In order to configure the wiki you have to make the <tt>config</tt> subdirectory >@@ -1213,7 +1215,7 @@ > $localSettings = "<" . "?php$endl$local"; > // Fix up a common line-ending problem (due to CVS on Windows) > $localSettings = str_replace( "\r\n", "\n", $localSettings ); >- $f = fopen( "LocalSettings.php", 'xt' ); >+ $f = fopen( $DIR . "/config/LocalSettings.php", 'xt' ); > > if( $f == false ) { > print( "</li>\n" ); >@@ -1776,7 +1778,7 @@ > if( defined( 'MW_INSTALL_PATH' ) ) { > \$IP = MW_INSTALL_PATH; > } else { >- \$IP = dirname( __FILE__ ); >+ \$IP = '/usr/share/mediawiki'; > } > > \$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" ); >--- ./maintenance/commandLine.inc.commoncode 2009-12-01 21:47:23 +0300 >+++ ./maintenance/commandLine.inc 2009-12-01 21:48:28 +0300 >@@ -175,7 +175,7 @@ > if ( isset( $options['conf'] ) ) { > $settingsFile = $options['conf']; > } else { >- $settingsFile = "$IP/LocalSettings.php"; >+ $settingsFile = "$DIR/LocalSettings.php"; > } > if ( isset( $options['wiki'] ) ) { > $bits = explode( '-', $options['wiki'] ); >@@ -201,7 +201,7 @@ > > $adminSettings = isset( $options['aconf'] ) > ? $options['aconf'] >- : "{$IP}/AdminSettings.php"; >+ : "{$DIR}/AdminSettings.php"; > if( is_readable( $adminSettings ) ) > require_once( $adminSettings ); > >--- ./maintenance/update.php.commoncode 2009-12-01 21:42:35 +0300 >+++ ./maintenance/update.php 2009-12-01 21:42:59 +0300 >@@ -10,6 +10,9 @@ > * @ingroup Maintenance > */ > >+$DIR=getcwd(); >+chdir('/usr/share/mediawiki'); >+ > /** */ > $wgUseMasterForMaintenance = true; > $options = array( 'quick', 'nopurge' ); >--- ./maintenance/archives/upgradeWatchlist.php.commoncode 2009-12-01 21:35:21 +0300 >+++ ./maintenance/archives/upgradeWatchlist.php 2009-12-01 21:35:52 +0300 >@@ -15,7 +15,7 @@ > # Convert watchlists to new format > > global $IP; >-require_once( "../LocalSettings.php" ); >+require_once( "$DIR/LocalSettings.php" ); > require_once( "$IP/Setup.php" ); > > $wgTitle = Title::newFromText( "Rebuild links script" ); >--- ./includes/WebStart.php.commoncode 2009-12-01 21:23:11 +0300 >+++ ./includes/WebStart.php 2009-12-01 21:24:24 +0300 >@@ -103,14 +103,14 @@ > # LocalSettings.php is the per site customization file. If it does not exit > # the wiki installer need to be launched or the generated file moved from > # ./config/ to ./ >- if( !file_exists( "$IP/LocalSettings.php" ) ) { >+ if( !file_exists( "$DIR/LocalSettings.php" ) ) { > require_once( "$IP/includes/DefaultSettings.php" ); # used for printing the version > require_once( "$IP/includes/templates/NoLocalSettings.php" ); > die(); > } > > # Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked) >- require_once( "$IP/LocalSettings.php" ); >+ require_once( "$DIR/LocalSettings.php" ); > } > wfProfileOut( 'WebStart.php-conf' ); > >--- ./includes/templates/NoLocalSettings.php.commoncode 2009-02-20 16:56:57 +0300 >+++ ./includes/templates/NoLocalSettings.php 2009-12-01 20:50:14 +0300 >@@ -58,7 +58,7 @@ > <h1>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></h1> > <div class='error'> > <?php >- if ( file_exists( 'config/LocalSettings.php' ) ) { >+ if ( file_exists( $DIR . '/config/LocalSettings.php' ) ) { > echo( 'To complete the installation, move <tt>config/LocalSettings.php</tt> to the parent directory.' ); > } else { > echo( "Please <a href=\"" . htmlspecialchars( $path ) . "config/index." . htmlspecialchars( $ext ) . "\" title='setup'> set up the wiki</a> first." );
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22426
:
4095
| 4096