Rev | Line | |
---|
[23759] | 1 | <?php |
---|
| 2 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
| 3 | |
---|
| 4 | if (!defined("DLCOUNT_PATH")) |
---|
| 5 | { |
---|
| 6 | define('DLCOUNT_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__))); |
---|
| 7 | } |
---|
| 8 | |
---|
| 9 | include_once(DLCOUNT_PATH.'/include/install.inc.php'); |
---|
| 10 | |
---|
| 11 | function plugin_install() |
---|
| 12 | { |
---|
| 13 | dlcount_install(); |
---|
| 14 | define('dlcount_installed', true); |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | function plugin_uninstall() |
---|
| 18 | { |
---|
| 19 | global $prefixeTable; |
---|
| 20 | |
---|
| 21 | $query = 'ALTER TABLE '.$prefixeTable.'images drop column download_counter;'; |
---|
| 22 | pwg_query($query); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | function plugin_activate() |
---|
| 26 | { |
---|
| 27 | if (!defined('dlcount_installed')) // a plugin is activated just after its installation |
---|
| 28 | { |
---|
| 29 | dlcount_install(); |
---|
| 30 | } |
---|
| 31 | } |
---|
| 32 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.