Changeset 30490
- Timestamp:
- Nov 14, 2014, 9:55:39 AM (10 years ago)
- Location:
- extensions/download_permissions
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/download_permissions/main.inc.php
r29460 r30490 30 30 { 31 31 global $user; 32 33 include_once(DLPERMS_PATH.'maintain.inc.php');34 $maintain = new download_permissions_maintain('download_permissions');35 $maintain->autoUpdate(DLPERMS_VERSION, 'install');36 37 32 // overwrite $user['enabled_high'] depending on the current album 38 33 if ('action' == script_basename() and isset($_GET['id']) and is_numeric($_GET['id'])) -
extensions/download_permissions/maintain.class.php
r30489 r30490 5 5 { 6 6 private $installed = false; 7 8 private $default_conf = array(); 7 8 function __construct($plugin_id) 9 { 10 parent::__construct($plugin_id); 11 } 9 12 10 13 function install($plugin_version, &$errors=array()) 11 14 { 12 global $conf, $prefixeTable;13 14 15 // create categories.downloadable (true/false) 15 16 $result = pwg_query('SHOW COLUMNS FROM `'.CATEGORIES_TABLE.'` LIKE "downloadable";'); … … 30 31 } 31 32 33 function update($old_version, $new_version, &$errors=array()) 34 { 35 $this->install($new_version, $errors); 36 } 37 32 38 function deactivate() 33 39 { … … 36 42 function uninstall() 37 43 { 38 global $prefixeTable;39 40 44 pwg_query('ALTER TABLE '.CATEGORIES_TABLE.' DROP COLUMN downloadable;'); 41 45 }
Note: See TracChangeset
for help on using the changeset viewer.