Ticket #9402: validation_fixes.patch
File validation_fixes.patch, 4.7 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/update.php
152 152 153 153 $r = $current->response[ $file ]; 154 154 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'); 156 156 157 157 echo '<tr><td colspan="5" class="plugin-update">'; 158 158 if ( ! current_user_can('update_plugins') ) -
wp-admin/plugin-editor.php
50 50 if ( is_plugin_active($file) || isset($_POST['phperror']) ) { 51 51 if ( is_plugin_active($file) ) 52 52 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&liveupdate=1")); 54 54 exit; 55 55 } 56 wp_redirect("plugin-editor.php?file=$file&a =te");56 wp_redirect("plugin-editor.php?file=$file&a=te"); 57 57 } else { 58 58 wp_redirect("plugin-editor.php?file=$file"); 59 59 } … … 74 74 wp_die( $error ); 75 75 76 76 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 error77 activate_plugin($file, "plugin-editor.php?file=$file&phperror=1");// we'll override this later if the plugin can be included without fatal error 78 78 79 wp_redirect("plugin-editor.php?file=$file&a =te");79 wp_redirect("plugin-editor.php?file=$file&a=te"); 80 80 exit; 81 81 } 82 82 … … 162 162 163 163 <ul> 164 164 <?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; ?>&plugin=<?php echo $plugin; ?>"><?php echo $plugin_file ?></a></li> 166 166 <?php endforeach; ?> 167 167 </ul> 168 168 </div> … … 175 175 <input type="hidden" name="plugin" value="<?php echo $plugin ?>" /> 176 176 </div> 177 177 <?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() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" /></div> 179 179 <?php endif; ?> 180 180 <?php if ( is_writeable($real_file) ) : ?> 181 181 <?php if ( in_array($file, (array) get_option('active_plugins')) ) { ?> -
wp-admin/theme-editor.php
206 206 <div id="documentation"> 207 207 <label for="docs-list"><?php _e('Documentation:') ?></label> 208 208 <?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() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" /> 210 210 </div> 211 211 <?php } ?> 212 212