Ignore:
Timestamp:
Aug 23, 2014, 12:51:23 PM (10 years ago)
Author:
mistic100
Message:

update for 2.7

File:
1 edited

Legend:

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

    r28832 r29251  
    1717define('PICASA_WA_ADMIN', get_root_url() . 'admin.php?page=plugin-' . PICASA_WA_ID);
    1818define('PICASA_WA_CACHE', PHPWG_ROOT_PATH . $conf['data_location'] . 'picasa_wa_cache/');
    19 define('PICASA_WA_VERSION',  'auto');
    2019
    2120
    22 include_once(PICASA_WA_PATH . 'include/ws_functions.inc.php');
     21if (defined('IN_WS'))
     22{
     23  include_once(PICASA_WA_PATH . 'include/ws_functions.inc.php');
    2324
    24 
    25 add_event_handler('init', 'picasa_wa_init');
    26 add_event_handler('ws_add_methods', 'picasa_wa_add_ws_method');
     25  add_event_handler('ws_add_methods', 'picasa_wa_add_ws_method');
     26}
    2727
    2828if (defined('IN_ADMIN'))
     
    6666  }
    6767}
    68 
    69 function picasa_wa_init()
    70 {
    71   global $conf;
    72   include_once(PICASA_WA_PATH . 'maintain.inc.php');
    73   $maintain = new Google2Piwigo_maintain(PICASA_WA_ID);
    74   $maintain->autoUpdate(PICASA_WA_VERSION, 'install');
    75 
    76   $conf['google2piwigo'] = unserialize($conf['google2piwigo']);
    77 }
Note: See TracChangeset for help on using the changeset viewer.