Changeset 24349


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

unset config param in plugin_uninstall

Location:
extensions/skeleton/trunk
Files:
2 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}
  • extensions/skeleton/trunk/maintain.inc.php

    r24182 r24349  
    5050function plugin_uninstall()
    5151{
    52   global $prefixeTable;
    53  
    54   // delete configuration
    55   pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "skeleton" LIMIT 1;');
    56  
    57   // delete table
    58   pwg_query('DROP TABLE `'. $prefixeTable .'skeleton`;');
    59  
    60   // delete field
    61   pwg_query('ALTER TABLE `'. IMAGES_TABLE .'` DROP `skeleton`;');
    62  
    63   // delete local folder
    64   $dir = PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'skeleton/';
    65   foreach (scandir($dir) as $file)
    66   {
    67     if ($file == '.' or $file == '..') continue;
    68     unlink($dir.$file);
    69   }
    70   rmdir($dir);
     52  skeleton_uninstall();
    7153}
Note: See TracChangeset for help on using the changeset viewer.