Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r12310 r12152  
    196196 */
    197197function validate_file_to_edit( $file, $allowed_files = '' ) {
     198    $file = stripslashes( $file );
     199
    198200    $code = validate_file( $file, $allowed_files );
    199201
     
    205207            wp_die( __('Sorry, can’t edit files with “..” in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.' ));
    206208
    207         //case 2 :
    208         //  wp_die( __('Sorry, can’t call files with their real path.' ));
     209        case 2 :
     210            wp_die( __('Sorry, can’t call files with their real path.' ));
    209211
    210212        case 3 :
     
    737739    }
    738740
    739     if ( (defined('FTP_SSH') && FTP_SSH) || (defined('FS_METHOD') && 'ssh' == FS_METHOD) )
     741    if ( defined('FTP_SSH') || (defined('FS_METHOD') && 'ssh' == FS_METHOD) )
    740742        $credentials['connection_type'] = 'ssh';
    741     else if ( (defined('FTP_SSL') && FTP_SSL) && 'ftpext' == $type ) //Only the FTP Extension understands SSL
     743    else if ( defined('FTP_SSL') && 'ftpext' == $type ) //Only the FTP Extension understands SSL
    742744        $credentials['connection_type'] = 'ftps';
    743745    else if ( !empty($_POST['connection_type']) )
     
    836838<?php
    837839
    838     $disabled = (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH) ? ' disabled="disabled"' : '';
     840    $disabled = defined('FTP_SSL') || defined('FTP_SSH') ? '' : ' disabled="disabled"';
    839841
    840842    foreach ( $types as $name => $text ) : ?>
Note: See TracChangeset for help on using the changeset viewer.