Changeset 12802 for trunk/admin/include


Ignore:
Timestamp:
Dec 29, 2011, 6:48:16 AM (13 years ago)
Author:
rvelices
Message:

fetaure 2542 replace $conflocal_data_dir with $confdata_location and move combined files and image derivatives from local to _data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/updates.class.php

    r12261 r12802  
    317317    include(PHPWG_ROOT_PATH.'admin/include/mysqldump.php');
    318318
    319     $path = $conf['local_data_dir'].'/update';
     319    $path = PHPWG_ROOT_PATH.$conf['data_location'].'update';
    320320
    321321    if (@mkgetdir($path)
     
    351351
    352352      @readfile($backupFile);
    353       self::deltree($conf['local_data_dir'].'/update');
     353      self::deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update');
    354354      exit();
    355355    }
     
    387387    if (empty($page['errors']))
    388388    {
    389       $path = $conf['local_data_dir'].'/update';
     389      $path = PHPWG_ROOT_PATH.$conf['data_location'].'update';
    390390      $filename = $path.'/'.$code.'.zip';
    391391      @mkgetdir($path);
     
    450450          {
    451451            self::process_obsolete_list($obsolete_list);
    452             self::deltree($conf['local_data_dir'].'/update');
     452            self::deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update');
    453453            invalidate_user_cache(true);
    454454            $template->delete_compiled_templates();
     
    466466          else
    467467          {
    468             file_put_contents($conf['local_data_dir'].'/update/log_error.txt', $error);
    469             $relative_path = trim(str_replace(dirname(dirname(dirname(dirname(__FILE__)))), '', $conf['local_data_dir']), '/\\');
     468            file_put_contents(PHPWG_ROOT_PATH.$conf['data_location'].'update/log_error.txt', $error);
    470469            array_push(
    471470              $page['errors'],
    472471              sprintf(
    473472                l10n('An error has occured during extract. Please check files permissions of your piwigo installation.<br><a href="%s">Click here to show log error</a>.'),
    474                 PHPWG_ROOT_PATH.$relative_path.'/update/log_error.txt'
     473                get_root_url().$conf['data_location'].'update/log_error.txt'
    475474              )
    476475            );
     
    479478        else
    480479        {
    481           self::deltree($conf['local_data_dir'].'/update');
     480          self::deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update');
    482481          array_push($page['errors'], l10n('An error has occured during upgrade.'));
    483482        }
Note: See TracChangeset for help on using the changeset viewer.