Changeset 30490


Ignore:
Timestamp:
Nov 14, 2014, 9:55:39 AM (10 years ago)
Author:
plg
Message:

compatible with Piwigo 2.7

Location:
extensions/download_permissions
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • extensions/download_permissions/main.inc.php

    r29460 r30490  
    3030{
    3131  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 
    3732  // overwrite $user['enabled_high'] depending on the current album
    3833  if ('action' == script_basename() and isset($_GET['id']) and is_numeric($_GET['id']))
  • extensions/download_permissions/maintain.class.php

    r30489 r30490  
    55{
    66  private $installed = false;
    7  
    8   private $default_conf = array();
     7
     8  function __construct($plugin_id)
     9  {
     10    parent::__construct($plugin_id);
     11  }
    912
    1013  function install($plugin_version, &$errors=array())
    1114  {
    12     global $conf, $prefixeTable;
    13 
    1415    // create categories.downloadable (true/false)
    1516    $result = pwg_query('SHOW COLUMNS FROM `'.CATEGORIES_TABLE.'` LIKE "downloadable";');
     
    3031  }
    3132
     33  function update($old_version, $new_version, &$errors=array())
     34  {
     35    $this->install($new_version, $errors);
     36  }
     37
    3238  function deactivate()
    3339  {
     
    3642  function uninstall()
    3743  {
    38     global $prefixeTable;
    39    
    4044    pwg_query('ALTER TABLE '.CATEGORIES_TABLE.' DROP COLUMN downloadable;');
    4145  }
Note: See TracChangeset for help on using the changeset viewer.