Changeset 32199 for extensions


Ignore:
Timestamp:
May 11, 2020, 11:32:57 PM (5 years ago)
Author:
ddtddt
Message:

[memories]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/memories/maintain.class.php

    r32197 r32199  
    3737
    3838  function install($plugin_version, &$errors=array()){
    39         global $conf;
     39        global $conf, $pwg_loaded_plugins;
    4040        if (empty($conf['pfoya'])){
    4141      conf_update_param('pfoya', $this->default_conf, true);
     
    4949      conf_update_param('pfoya', $old_conf, true);
    5050    }
     51       
     52        if(isset($pwg_loaded_plugins['photos_from_one_year_ago'])){
     53                $query = 'UPDATE ' . PLUGINS_TABLE . ' SET state="inactive" WHERE id="memories";';
     54                pwg_query($query);
     55                $_SESSION['page_errors'] = array(l10n('you must delete Photo from 1 year ago before activate Memories'));
     56    }
     57       
    5158  }
     59
    5260
    5361  function update($old_version, $new_version, &$errors=array()){
    5462        $this->install($new_version, $errors);
    5563  }
    56 
    5764  function uninstall(){
    5865        conf_delete_param('pfoya');
Note: See TracChangeset for help on using the changeset viewer.