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

make sure temp folder is created on the right place

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/pbase2piwigo/maintain.inc.php

    r17225 r19832  
    11<?php
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    3 
    4 define(
    5   'pbase2piwigo_default_config',
    6   serialize(array(
    7     ))
    8   );
    93
    104
     
    137  global $conf;
    148 
    15   // conf_update_param('pbase2piwigo', pbase2piwigo_default_config);
    16  
    17   mkdir($conf['data_location'].'pbase_cache/', 0755);
     9  mkgetdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'pbase_cache/', MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR);
    1810}
    1911
     
    2113{
    2214  global $conf;
    23 
    24   // if (empty($conf['pbase2piwigo']))
    25   // {
    26     // conf_update_param('pbase2piwigo', pbase2piwigo_default_config);
    27   // }
    2815 
    29   if (!file_exists($conf['data_location'].'pbase_cache/'))
     16  if (!file_exists(PHPWG_ROOT_PATH . $conf['data_location'] . 'pbase_cache/'))
    3017  {
    31     mkdir($conf['data_location'].'pbase_cache/', 0755);
     18    mkgetdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'pbase_cache/', MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR);
    3219  }
    3320}
     
    3522function plugin_uninstall()
    3623{
    37   // pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "pbase2piwigo" LIMIT 1;');
     24  global $conf;
    3825 
    39   rrmdir($conf['data_location'].'pbase_cache/');
     26  rrmdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'pbase_cache/');
    4027}
    4128
Note: See TracChangeset for help on using the changeset viewer.