Fix error message when invalidating plugin because of bad path.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-07-30 00:02:47 +00:00
parent 80c409458f
commit ca07515463
2 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ function validate_active_plugins() {
function validate_plugin($plugin) {
if ( validate_file($plugin) )
return new WP_Error('plugin_invalid', __('Invalid plugin.'));
return new WP_Error('plugin_invalid', __('Invalid plugin path.'));
if ( ! file_exists(WP_PLUGIN_DIR . '/' . $plugin) )
return new WP_Error('plugin_not_found', __('Plugin file does not exist.'));

View File

@ -168,7 +168,7 @@ require_once('admin-header.php');
$invalid = validate_active_plugins();
if( !empty($invalid) )
foreach($invalid as $plugin_file => $error)
echo '<div id="message" class="error"><p>' . sprintf(__('The plugin <code>%s</code> has been <strong>deactivated</strong> due to <em>"%s"</em>.'), $plugin_file, $error->get_error_message()) . '</p></div>';
echo '<div id="message" class="error"><p>' . sprintf(__('The plugin <code>%s</code> has been <strong>deactivated</strong> due to an error: %s'), $plugin_file, $error->get_error_message()) . '</p></div>';
?>
<?php if ( isset($_GET['error']) ) : ?>