Ignore:
Timestamp:
Sep 29, 2011, 4:52:06 PM (9 years ago)
Author:
patdenice
Message:

Add missing language keys for auto-upgrade (only error keys).

File:
1 edited

Legend:

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

    r11185 r12261  
    3939
    4040    if (preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches)
    41       and @fetchRemote(PHPWG_URL.'/download/all_versions.php', $result))
     41      and @fetchRemote(PHPWG_URL.'/download/all_versions.php?rand='.md5(uniqid(rand(), true)), $result))
    4242    {
    4343      $all_versions = @explode("\n", $result);
     
    137137    if (!$this->get_server_extensions())
    138138    {
    139       autoupdate_error();
     139      return false;
    140140    }
    141141
     
    394394      $end = false;
    395395      $zip = @fopen($filename, 'w');
     396
    396397      while (!$end)
    397398      {
     
    455456            if ($step == 2)
    456457            {
    457               array_push($page['infos'], sprintf(l10n('autoupdate_success'), $upgrade_to));
     458              array_push($page['infos'], l10n('Update Complete'), $upgrade_to);
    458459              $step = -1;
    459460            }
     
    467468            file_put_contents($conf['local_data_dir'].'/update/log_error.txt', $error);
    468469            $relative_path = trim(str_replace(dirname(dirname(dirname(dirname(__FILE__)))), '', $conf['local_data_dir']), '/\\');
    469             array_push($page['errors'], sprintf(l10n('autoupdate_extract_fail'), PHPWG_ROOT_PATH.$relative_path.'/update/log_error.txt'));
     470            array_push(
     471              $page['errors'],
     472              sprintf(
     473                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'
     475              )
     476            );
    470477          }
    471478        }
     
    473480        {
    474481          self::deltree($conf['local_data_dir'].'/update');
    475           array_push($page['errors'], l10n('autoupdate_fail'));
     482          array_push($page['errors'], l10n('An error has occured during upgrade.'));
    476483        }
    477484      }
Note: See TracChangeset for help on using the changeset viewer.