Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r12152 r12310  
    196196 */
    197197function validate_file_to_edit( $file, $allowed_files = '' ) {
    198     $file = stripslashes( $file );
    199 
    200198    $code = validate_file( $file, $allowed_files );
    201199
     
    207205            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.' ));
    208206
    209         case 2 :
    210             wp_die( __('Sorry, can’t call files with their real path.' ));
     207        //case 2 :
     208        //  wp_die( __('Sorry, can’t call files with their real path.' ));
    211209
    212210        case 3 :
     
    739737    }
    740738
    741     if ( defined('FTP_SSH') || (defined('FS_METHOD') && 'ssh' == FS_METHOD) )
     739    if ( (defined('FTP_SSH') && FTP_SSH) || (defined('FS_METHOD') && 'ssh' == FS_METHOD) )
    742740        $credentials['connection_type'] = 'ssh';
    743     else if ( defined('FTP_SSL') && 'ftpext' == $type ) //Only the FTP Extension understands SSL
     741    else if ( (defined('FTP_SSL') && FTP_SSL) && 'ftpext' == $type ) //Only the FTP Extension understands SSL
    744742        $credentials['connection_type'] = 'ftps';
    745743    else if ( !empty($_POST['connection_type']) )
     
    838836<?php
    839837
    840     $disabled = defined('FTP_SSL') || defined('FTP_SSH') ? '' : ' disabled="disabled"';
     838    $disabled = (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH) ? ' disabled="disabled"' : '';
    841839
    842840    foreach ( $types as $name => $text ) : ?>
Note: See TracChangeset for help on using the changeset viewer.