Changeset 19831


Ignore:
Timestamp:
01/05/13 11:25:23 (7 years ago)
Author:
mistic100
Message:

make sure temp folder is created on the right place

Location:
extensions/flickr2piwigo
Files:
2 edited

Legend:

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

    r19537 r19831  
    1313global $conf; 
    1414 
    15 define('FLICKR_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 
    16 define('FLICKR_ADMIN', get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__))); 
    17 define('FLICKR_FS_CACHE', $conf['data_location'].'flickr_cache/'); 
     15define('FLICKR_PATH',     PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 
     16define('FLICKR_ADMIN',    get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__))); 
     17define('FLICKR_FS_CACHE', PHPWG_ROOT_PATH . $conf['data_location'] . 'flickr_cache/'); 
    1818 
    1919 
  • extensions/flickr2piwigo/maintain.inc.php

    r17476 r19831  
    1717  conf_update_param('flickr2piwigo', flickr2piwigo_default_config); 
    1818   
    19   mkdir($conf['data_location'].'flickr_cache/', 0755); 
     19  mkgetdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'flickr_cache/', MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR); 
    2020} 
    2121 
     
    2929  } 
    3030   
    31   if (!file_exists($conf['data_location'].'flickr_cache/')) 
     31  if (!file_exists(PHPWG_ROOT_PATH . $conf['data_location'] . 'flickr_cache/')) 
    3232  { 
    33     mkdir($conf['data_location'].'flickr_cache/', 0755); 
     33    mkgetdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'flickr_cache/', MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR); 
    3434  } 
    3535} 
     
    4141  pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "flickr2piwigo" LIMIT 1;'); 
    4242   
    43   rrmdir($conf['data_location'].'flickr_cache/'); 
     43  rrmdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'flickr_cache/'); 
    4444} 
    4545 
Note: See TracChangeset for help on using the changeset viewer.