[6106] | 1 | <?php |
---|
| 2 | /* ----------------------------------------------------------------------------- |
---|
| 3 | Plugin : Grum Plugin Classes - 3 |
---|
| 4 | Author : Grum |
---|
| 5 | email : grum@piwigo.org |
---|
| 6 | website : http://photos.grum.fr |
---|
| 7 | |
---|
| 8 | << May the Little SpaceFrog be with you ! >> |
---|
| 9 | ------------------------------------------------------------------------------ |
---|
| 10 | See main.inc.php for release information |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | GPC_Install : classe to manage plugin install |
---|
| 14 | |
---|
| 15 | --------------------------------------------------------------------------- */ |
---|
| 16 | |
---|
| 17 | if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 18 | |
---|
| 19 | include_once('gpc_version.inc.php'); // => Don't forget to update this file !! |
---|
[6235] | 20 | include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); |
---|
[6106] | 21 | include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCore.class.inc.php'); |
---|
| 22 | include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php'); |
---|
| 23 | |
---|
| 24 | /* PGC class for install process */ |
---|
| 25 | class GPC_Install extends CommonPlugin |
---|
| 26 | { |
---|
| 27 | private $tablef; |
---|
| 28 | |
---|
| 29 | public function __construct($prefixeTable, $filelocation) |
---|
| 30 | { |
---|
| 31 | $this->setPluginName("Grum Plugin Classes"); |
---|
| 32 | $this->setPluginNameFiles("gpc"); |
---|
| 33 | parent::__construct($prefixeTable, $filelocation); |
---|
| 34 | GPCRequestBuilder::init($prefixeTable, $this->getPluginNameFiles()); |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | public function __destruct() |
---|
| 38 | { |
---|
| 39 | parent::__destruct(); |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | /* |
---|
| 43 | function for installation process |
---|
| 44 | return true if install process is ok, otherwise false |
---|
| 45 | */ |
---|
| 46 | public function install() |
---|
| 47 | { |
---|
| 48 | $result=GPCRequestBuilder::createTables(); |
---|
| 49 | return($result); |
---|
| 50 | } |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | /* |
---|
| 54 | function for uninstall process |
---|
| 55 | */ |
---|
| 56 | public function uninstall() |
---|
| 57 | { |
---|
| 58 | $registeredPlugin=GPCCore::getRegistered(); |
---|
| 59 | if(count($registeredPlugin)>0) |
---|
| 60 | { |
---|
| 61 | return("Some plugins are dependent on Grum Plugin Classes: before uninstall, you must first uninstall the plugins dependent"); |
---|
| 62 | } |
---|
| 63 | else |
---|
| 64 | { |
---|
| 65 | $result=GPCRequestBuilder::deleteTables(); |
---|
| 66 | return($result); |
---|
| 67 | } |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | public function activate() |
---|
| 71 | { |
---|
| 72 | } |
---|
| 73 | |
---|
| 74 | public function deactivate() |
---|
| 75 | { |
---|
| 76 | } |
---|
| 77 | |
---|
| 78 | } //class |
---|
| 79 | |
---|
| 80 | ?> |
---|