Make WordPress Core

Ticket #9402: validation_fixes.patch

File validation_fixes.patch, 4.7 KB (added by simek, 15 years ago)
  • wp-admin/includes/update.php

     
    152152
    153153        $r = $current->response[ $file ];
    154154
    155         $details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');
     155        $details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');
    156156
    157157        echo '<tr><td colspan="5" class="plugin-update">';
    158158        if ( ! current_user_can('update_plugins') )
  • wp-admin/plugin-editor.php

     
    5050                if ( is_plugin_active($file) || isset($_POST['phperror']) ) {
    5151                        if ( is_plugin_active($file) )
    5252                                deactivate_plugins($file, true);
    53                         wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1"));
     53                        wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&amp;liveupdate=1"));
    5454                        exit;
    5555                }
    56                 wp_redirect("plugin-editor.php?file=$file&a=te");
     56                wp_redirect("plugin-editor.php?file=$file&amp;a=te");
    5757        } else {
    5858                wp_redirect("plugin-editor.php?file=$file");
    5959        }
     
    7474                        wp_die( $error );
    7575
    7676                if ( ! is_plugin_active($file) )
    77                         activate_plugin($file, "plugin-editor.php?file=$file&phperror=1");// we'll override this later if the plugin can be included without fatal error
     77                        activate_plugin($file, "plugin-editor.php?file=$file&amp;phperror=1");// we'll override this later if the plugin can be included without fatal error
    7878
    79                 wp_redirect("plugin-editor.php?file=$file&a=te");
     79                wp_redirect("plugin-editor.php?file=$file&amp;a=te");
    8080                exit;
    8181        }
    8282
     
    162162
    163163        <ul>
    164164<?php foreach($plugin_files as $plugin_file) : ?>
    165                 <li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo $plugin_file; ?>&plugin=<?php echo $plugin; ?>"><?php echo $plugin_file ?></a></li>
     165                <li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo $plugin_file; ?>&amp;plugin=<?php echo $plugin; ?>"><?php echo $plugin_file ?></a></li>
    166166<?php endforeach; ?>
    167167        </ul>
    168168        </div>
     
    175175                <input type="hidden" name="plugin" value="<?php echo $plugin ?>" />
    176176                </div>
    177177                <?php if ( count( $functions ) ) : ?>
    178                 <div id="documentation"><label for="docs-list">Documentation:</label> <?php echo $docs_select ?> <input type="button" class="button" value=" <?php _e( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" /></div>
     178                <div id="documentation"><label for="docs-list">Documentation:</label> <?php echo $docs_select ?> <input type="button" class="button" value=" <?php _e( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" /></div>
    179179                <?php endif; ?>
    180180<?php if ( is_writeable($real_file) ) : ?>
    181181        <?php if ( in_array($file, (array) get_option('active_plugins')) ) { ?>
  • wp-admin/theme-editor.php

     
    206206                <div id="documentation">
    207207                <label for="docs-list"><?php _e('Documentation:') ?></label>
    208208                <?php echo $docs_select; ?>
    209                 <input type="button" class="button" value=" <?php _e( 'Lookup' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" />
     209                <input type="button" class="button" value=" <?php _e( 'Lookup' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
    210210                </div>
    211211        <?php } ?>
    212212