Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/file.php

    r14924 r15156  
    586586    // PHP4-compat - php4 classes can't contain constants
    587587    $zopen = $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4);
    588     if ( true !== $zopen && /* ZIPARCHIVE::ZIP_ER_OK */ 0 !== $zopen ) // may return true, or (int)0 ZIP_ER_OK under certain versions
     588    if ( true !== $zopen )
    589589        return new WP_Error('incompatible_archive', __('Incompatible Archive.'));
    590590
     
    607607        if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist)
    608608            continue;
     609        if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, Skip it
     610            continue;
    609611
    610612        $parent_folder = dirname($dir);
     
    685687        // Check the parent folders of the folders all exist within the creation array.
    686688        if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist)
     689            continue;
     690        if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, Skip it
    687691            continue;
    688692
     
    965969<?php screen_icon(); ?>
    966970<h2><?php _e('Connection Information') ?></h2>
    967 <p><?php _e('To perform the requested action, connection information is required.') ?></p>
    968 
     971<p><?php
     972    $label_user = __('Username');
     973    $label_pass = __('Password');
     974    _e('To perform the requested action, WordPress needs to access to your web server.');
     975    echo ' ';
     976    if ( ( isset( $types['ftp'] ) || isset( $types['ftps'] ) ) ) {
     977        if ( isset( $types['ssh'] ) ) {
     978            _e('Please enter your FTP or SSH credentials to proceed.');
     979            $label_user = __('FTP/SSH Username');
     980            $label_pass = __('FTP/SSH Password');
     981        } else {
     982            _e('Please enter your FTP credentials to proceed.');
     983            $label_user = __('FTP Username');
     984            $label_pass = __('FTP Password');
     985        }
     986        echo ' ';
     987    }
     988    _e('If you do not remember your credentials, you should contact your web host.');
     989?></p>
    969990<table class="form-table">
    970991<tr valign="top">
     
    974995
    975996<tr valign="top">
    976 <th scope="row"><label for="username"><?php _e('Username') ?></label></th>
     997<th scope="row"><label for="username"><?php echo $label_user; ?></label></th>
    977998<td><input name="username" type="text" id="username" value="<?php echo esc_attr($username) ?>"<?php disabled( defined('FTP_USER') ); ?> size="40" /></td>
    978999</tr>
    9791000
    9801001<tr valign="top">
    981 <th scope="row"><label for="password"><?php _e('Password') ?></label></th>
     1002<th scope="row"><label for="password"><?php echo $label_pass; ?></label></th>
    9821003<td><input name="password" type="password" id="password" value="<?php if ( defined('FTP_PASS') ) echo '*****'; ?>"<?php disabled( defined('FTP_PASS') ); ?> size="40" /></td>
    9831004</tr>
Note: See TracChangeset for help on using the changeset viewer.