Ignore:
Timestamp:
Sep 5, 2013, 12:16:43 PM (7 years ago)
Author:
mistic100
Message:

unset config param in plugin_uninstall

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/skeleton/trunk/include/install.inc.php

    r24182 r24349  
    6666
    6767}
     68
     69function skeleton_uninstall()
     70{
     71  global $prefixeTable, $conf;
     72 
     73  // delete configuration
     74  pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "skeleton";');
     75  unset($conf['skeleton']);
     76 
     77  // delete table
     78  pwg_query('DROP TABLE `'. $prefixeTable .'skeleton`;');
     79 
     80  // delete field
     81  pwg_query('ALTER TABLE `'. IMAGES_TABLE .'` DROP `skeleton`;');
     82 
     83  // delete local folder
     84  $dir = PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'skeleton/';
     85  foreach (scandir($dir) as $file)
     86  {
     87    if ($file == '.' or $file == '..') continue;
     88    unlink($dir.$file);
     89  }
     90  rmdir($dir);
     91}
Note: See TracChangeset for help on using the changeset viewer.