--- plugin_manager.install	2011-01-28 15:58:06.000000000 +0100
+++ plugin_manager.new.install	2011-01-28 15:57:18.000000000 +0100
@@ -76,16 +76,17 @@ function plugin_manager_schema() {
  * Implementation of hook_install().
  */
 function plugin_manager_install() {
-  drupal_install_schema('plugin_manager');
-  @mkdir(file_directory_path() .'/plugin_manager_extraction/');
-  @mkdir(file_directory_path() .'/plugin_manager_cache/');
+  $path = variable_get('file_public_path', conf_path() . '/files');
+  @mkdir($path .'/plugin_manager_extraction/');
+  @mkdir($path .'/plugin_manager_cache/');
 
   $module = $_SERVER['DOCUMENT_ROOT'] . base_path() .'sites/all/modules';
-  if (!is_dir($module) AND !@mkdir($module)) {
-    drupal_set_message(t('Could not create directory @dir', array('@dir' => $theme)), 'error');
+  if (!is_dir($module) && !@mkdir($module)) {
+    drupal_set_message(t('Could not create directory @dir', array('@dir' => $module)), 'error');
   }
+  
   $theme = $_SERVER['DOCUMENT_ROOT'] . base_path() .'sites/all/themes';
-  if (!is_dir($theme) AND !@mkdir($theme)) {
+  if (!is_dir($theme) && !@mkdir($theme)) {
     drupal_set_message(t('Could not create directory @dir', array('@dir' => $theme)), 'error');
   }
 
@@ -95,17 +96,15 @@ function plugin_manager_install() {
  * Implementation of hook_uninstall().
  */
 function plugin_manager_uninstall() {
-  // Remove the tables from the database.
-  drupal_uninstall_schema('plugin_manager');
-
   // Remove the variables that have been set with time.
   // @todo test this query
   db_delete('variable')->condition('name', 'plugin_manager%', 'LIKE')->execute();
   cache_clear_all('variables', 'cache');
 
   // Remove the files and folders created by the plugin_manager.
-  plugin_manager_delete(file_directory_path() .'/plugin_manager_extraction/');
-  plugin_manager_delete(file_directory_path() .'/plugin_manager_cache/');
+  $path = variable_get('file_public_path', conf_path() . '/files');
+  plugin_manager_delete($path .'/plugin_manager_extraction/');
+  plugin_manager_delete($path .'/plugin_manager_cache/');
 }
 
 /**
