Changeset 19830


Ignore:
Timestamp:
Jan 5, 2013, 11:24:17 AM (11 years ago)
Author:
mistic100
Message:

make sure temp folder is created on the right place

Location:
extensions/Google2Piwigo
Files:
2 edited

Legend:

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

    r17475 r19830  
    1313global $conf;
    1414
    15 define('PICASA_WA_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
     15define('PICASA_WA_PATH',  PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
    1616define('PICASA_WA_ADMIN', get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__)));
    17 define('PICASA_WA_CACHE', $conf['data_location'].'picasa_wa_cache/');
     17define('PICASA_WA_CACHE', PHPWG_ROOT_PATH . $conf['data_location'] . 'picasa_wa_cache/');
    1818
    1919
  • extensions/Google2Piwigo/maintain.inc.php

    r17475 r19830  
    77  global $conf;
    88 
    9   mkdir($conf['data_location'].'picasa_wa_cache/', 0755);
     9  mkgetdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'picasa_wa_cache/', MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR);
     10}
     11
     12function plugin_activate()
     13{
     14  global $conf;
     15 
     16  if (!file_exists(PHPWG_ROOT_PATH . $conf['data_location'] . 'picasa_wa_cache/'))
     17  {
     18    mkgetdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'picasa_wa_cache/', MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR);
     19  }
    1020}
    1121
     
    1424  global $conf;
    1525 
    16   rrmdir($conf['data_location'].'picasa_wa_cache/');
     26  rrmdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'picasa_wa_cache/');
    1727}
    1828
Note: See TracChangeset for help on using the changeset viewer.