WordPress.org

Make WordPress Core

Changeset 25173


Ignore:
Timestamp:
08/29/2013 08:45:17 PM (8 years ago)
Author:
nacin
Message:

Move wp-config-sample.php to the root of develop.svn.

wp-config.php is now created in the root. wp-config-sample.php is properly copied over to the build directory for syncing to core.svn.

Add some ignores.

fixes #25185, see #24976.

Location:
trunk
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11wp-config.php
        22wp-tests-config.php
         3phpunit.xml
        34node_modules
        45npm-debug.log
  • trunk/.gitignore

    r25001 r25173  
    1313
    1414wp-config.php
     15wp-tests-config.php
     16phpunit.xml
    1517
    1618node_modules
  • trunk/Gruntfile.js

    r25157 r25173  
    1818        copy: {
    1919            all: {
    20                 dot: true,
    21                 expand: true,
    22                 cwd: SOURCE_DIR,
    23                 src: ['**','!**/.{svn,git}/**'], // Ignore version control directories.
    24                 dest: BUILD_DIR
     20                files: [
     21                    {
     22                        dot: true,
     23                        expand: true,
     24                        cwd: SOURCE_DIR,
     25                        src: ['**','!**/.{svn,git}/**'], // Ignore version control directories.
     26                        dest: BUILD_DIR
     27                    },
     28                    {
     29                        src: 'wp-config-sample.php',
     30                        dest: BUILD_DIR
     31                    }
     32                ]
    2533            },
    2634            dynamic: {
  • trunk/src/wp-admin/setup-config.php

    r23567 r25173  
    6363wp_magic_quotes();
    6464
    65 if ( ! file_exists( ABSPATH . 'wp-config-sample.php' ) )
     65// Support wp-config-sample.php one level up, for the develop repo.
     66if ( file_exists( ABSPATH . 'wp-config-sample.php' ) )
     67    $config_file = file( ABSPATH . 'wp-config-sample.php' );
     68elseif ( file_exists( dirname( ABSPATH ) . '/wp-config-sample.php' ) )
     69    $config_file = file( dirname( ABSPATH ) . '/wp-config-sample.php' );
     70else
    6671    wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) );
    67 
    68 $config_file = file(ABSPATH . 'wp-config-sample.php');
    6972
    7073// Check if wp-config.php has been created
     
    276279<?php
    277280    else :
    278         $handle = fopen(ABSPATH . 'wp-config.php', 'w');
     281        // If this file doesn't exist, then we are using the wp-config-sample.php
     282        // file one level up, which is for the develop repo.
     283        if ( file_exists( ABSPATH . 'wp-config-sample.php' ) )
     284            $path_to_wp_config = ABSPATH . 'wp-config.php';
     285        else
     286            $path_to_wp_config = dirname( ABSPATH ) . '/wp-config.php';
     287
     288        $handle = fopen( $path_to_wp_config, 'w' );
    279289        foreach( $config_file as $line ) {
    280             fwrite($handle, $line);
    281         }
    282         fclose($handle);
    283         chmod(ABSPATH . 'wp-config.php', 0666);
     290            fwrite( $handle, $line );
     291        }
     292        fclose( $handle );
     293        chmod( $path_to_wp_config, 0666 );
    284294        setup_config_display_header();
    285295?>
  • trunk/tests/phpunit

    • Property svn:ignore set to
      build
      wp-tests-config.php
Note: See TracChangeset for help on using the changeset viewer.