Changeset 9707


Ignore:
Timestamp:
03/15/11 18:07:03 (8 years ago)
Author:
patdenice
Message:

New version 2.2

Location:
extensions/autoupdate/trunk
Files:
9 added
25 edited
1 moved

Legend:

Unmodified
Added
Removed
  • extensions/autoupdate/trunk/admin.php

    r9622 r9707  
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    44 
    5 include(AUTOUPDATE_PATH.'include/functions.inc.php'); 
    6 include(PHPWG_ROOT_PATH.'admin/include/pclzip.lib.php'); 
     5include_once(AUTOUPDATE_PATH.'include/functions.inc.php'); 
     6include_once(PHPWG_ROOT_PATH.'admin/include/pclzip.lib.php'); 
     7include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 
    78 
    8 /* 
    9 STEP: 
    10 0 = check is needed. If version is latest or check fail, we stay on step 0 
    11 1 = new version on same branch AND new branch are available => user may choose upgrade. 
    12 2 = upgrade on same branch 
    13 3 = upgrade on different branch 
    14 */ 
    15 $step = isset($_GET['step']) ? $_GET['step'] : 0; 
    16 $upgrade_to = isset($_GET['to']) ? $_GET['to'] : ''; 
     9load_language('plugin.lang', AUTOUPDATE_PATH); 
    1710 
    18 // +-----------------------------------------------------------------------+ 
    19 // |                                Step 0                                 | 
    20 // +-----------------------------------------------------------------------+ 
    21 if ($step == 0) 
    22 { 
    23   $template->assign(array( 
    24     'CHECK_VERSION' => false, 
    25     'DEV_VERSION' => false, 
    26     ) 
    27   ); 
     11$my_base_url = get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__)); 
    2812 
    29   if (preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches)) 
    30   { 
    31     $url = PHPWG_URL.'/download/all_versions.php'; 
    32     $url .= '?rand='.md5(uniqid(rand(), true)); // Avoid server cache 
     13if (isset($_GET['tab'])) 
     14  $page['tab'] = $_GET['tab']; 
     15else 
     16  $page['tab'] = 'pwg'; 
    3317 
    34     if (@fetchRemote($url, $result) 
    35       and $all_versions = @explode("\n", $result) 
    36       and is_array($all_versions)) 
    37     { 
    38       $template->assign('CHECK_VERSION', true); 
     18$tabsheet = new tabsheet(); 
     19$tabsheet->add('pwg', l10n('Piwigo Upgrade'), $my_base_url.'-pwg'); 
     20$tabsheet->add('ext', l10n('Extensions Upgrade'), $my_base_url.'-ext'); 
     21$tabsheet->select($page['tab']); 
     22$tabsheet->assign(); 
    3923 
    40       $last_version = trim($all_versions[0]); 
    41       $upgrade_to = $last_version; 
    42  
    43       if (version_compare(PHPWG_VERSION, $last_version, '<')) 
    44       { 
    45         $new_branch = preg_replace('/(\d+\.\d+)\.\d+/', '$1', $last_version); 
    46         $actual_branch = $matches[1]; 
    47  
    48         if ($new_branch == $actual_branch) 
    49         { 
    50           $step = 2; 
    51         } 
    52         else 
    53         { 
    54           $step = 3; 
    55  
    56           // Check if new version exists in same branch 
    57           foreach ($all_versions as $version) 
    58           { 
    59             $new_branch = preg_replace('/(\d+\.\d+)\.\d+/', '$1', $version); 
    60  
    61             if ($new_branch == $actual_branch) 
    62             { 
    63               if (version_compare(PHPWG_VERSION, $version, '<')) 
    64               { 
    65                 $step = 1; 
    66               } 
    67               break; 
    68             } 
    69           } 
    70         } 
    71       } 
    72     } 
    73   } 
    74   else 
    75   { 
    76     $template->assign('DEV_VERSION', true); 
    77   } 
    78 } 
    79  
    80 // +-----------------------------------------------------------------------+ 
    81 // |                                Step 1                                 | 
    82 // +-----------------------------------------------------------------------+ 
    83 if ($step == 1) 
    84 { 
    85   $template->assign(array( 
    86     'MINOR_VERSION' => $version, 
    87     'MAJOR_VERSION' => $last_version, 
    88     ) 
    89   ); 
    90 } 
    91  
    92 // +-----------------------------------------------------------------------+ 
    93 // |                                Step 2                                 | 
    94 // +-----------------------------------------------------------------------+ 
    95 if ($step == 2 and is_webmaster()) 
    96 { 
    97   if (isset($_POST['submit']) and isset($_POST['upgrade_to'])) 
    98   { 
    99     autoupdate_upgrade_to($_POST['upgrade_to'], $step); 
    100   } 
    101 } 
    102  
    103 // +-----------------------------------------------------------------------+ 
    104 // |                                Step 3                                 | 
    105 // +-----------------------------------------------------------------------+ 
    106 if ($step == 3 and is_webmaster()) 
    107 { 
    108   if (isset($_POST['saveTemplate']) and version_compare(PHPWG_VERSION, '2.1', '<')) 
    109   { 
    110     autoupdate_save_template_dir(); 
    111   } 
    112  
    113   if (isset($_POST['dumpDatabase'])) 
    114   { 
    115     autoupdate_dump_database(); 
    116   } 
    117  
    118   if (isset($_POST['submit']) and isset($_POST['upgrade_to'])) 
    119   { 
    120     autoupdate_upgrade_to($_POST['upgrade_to'], $step); 
    121   } 
    122 } 
    123  
    124 // +-----------------------------------------------------------------------+ 
    125 // |                        Process template                               | 
    126 // +-----------------------------------------------------------------------+ 
    127  
    128 if (!is_webmaster()) 
    129 { 
    130   array_push($page['errors'], l10n('Webmaster status is required.')); 
    131 } 
    132  
    133 $template->assign(array( 
    134   'STEP'          => $step, 
    135   'AU_URL'        => get_admin_plugin_menu_link(AUTOUPDATE_PATH . '/autoupdate.php'), 
    136   'PHPWG_VERSION' => PHPWG_VERSION, 
    137   'UPGRADE_TO'    => $upgrade_to, 
    138   'RELEASE_URL'   => PHPWG_URL.'/releases/'.$upgrade_to, 
    139   ) 
    140 ); 
    141  
    142 $template->set_filename('plugin_admin_content', realpath(AUTOUPDATE_PATH.'template/autoupdate.tpl')); 
    143 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 
     24include(AUTOUPDATE_PATH.'/update_'.$page['tab'].'.inc.php'); 
    14425 
    14526?> 
  • extensions/autoupdate/trunk/include/functions_remote.inc.php

    r6767 r9707  
    2323  { 
    2424    return l10n('A new version of Piwigo is available.').'<br>' 
    25           . '<a href="admin.php?page=plugin&amp;section=autoupdate%2Fautoupdate.php">'.l10n('Click here to upgrade automatically').'</a>'; 
     25          . '<a href="admin.php?page=plugin-autoupdate">'.l10n('Click here to upgrade automatically').'</a>'; 
    2626  } 
    2727  else 
     
    3030    // Check plugins upgrade 
    3131    include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php'); 
     32    include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php'); 
     33    include_once(PHPWG_ROOT_PATH.'admin/include/languages.class.php'); 
    3234    $plugins = new plugins(); 
     35    $themes = new themes(); 
     36    $languages = new languages(); 
    3337    $ignore_list = unserialize($conf['autoupdate_ignore_list']); 
    3438 
    35     if (!isset($_SESSION['plugins_need_update'])) 
    36     { 
    37       $_SESSION['plugins_need_update'] = null; 
     39    // Upgrade? 
     40    if (!isset($ignore_list['plugins']) or !isset($ignore_list['themes']) or !isset($ignore_list['languages'])) 
     41    { 
     42      $ignore_list = array('plugins'=>array(),'themes'=>array(),'languages'=>array()); 
     43      $conf['autoupdate_ignore_list'] = serialize($ignore_list); 
     44      conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string($conf['autoupdate_ignore_list'])); 
     45    } 
     46 
     47    if (!isset($_SESSION['extensions_need_update'])) 
     48    { 
     49      $_SESSION['extensions_need_update'] = null; 
    3850      autoupdate_check_plugins_upgrade($plugins, $ignore_list); 
    39     } 
    40     elseif (!empty($_SESSION['plugins_need_update'])) 
    41     { 
    42       // Check if plugins have been upgraded since last check 
    43       foreach($plugins->fs_plugins as $plugin_id => $fs_plugin) 
    44       { 
    45         if (isset($_SESSION['plugins_need_update'][$plugin_id]) 
    46           and $plugins->plugin_version_compare($fs_plugin['version'], $_SESSION['plugins_need_update'][$plugin_id])) 
    47         { 
    48           // Plugin have been updated 
    49           autoupdate_check_plugins_upgrade($plugins, $ignore_list); 
    50         } 
    51       } 
    52     } 
    53  
    54     if (!empty($_SESSION['plugins_need_update'])) 
     51      autoupdate_check_themes_upgrade($themes, $ignore_list); 
     52      autoupdate_check_languages_upgrade($languages, $ignore_list); 
     53    } 
     54    else 
     55    { 
     56      if (!empty($_SESSION['extensions_need_update']['plugins'])) 
     57      { 
     58        // Check if plugins have been upgraded since last check 
     59        foreach($plugins->fs_plugins as $plugin_id => $fs_plugin) 
     60        { 
     61          if (isset($_SESSION['extensions_need_update']['plugins'][$plugin_id]) 
     62            and $plugins->plugin_version_compare($fs_plugin['version'], $_SESSION['extensions_need_update']['plugins'][$plugin_id])) 
     63          { 
     64            // Plugin have been updated 
     65            autoupdate_check_extensions_upgrade($plugins, $themes, $languages, $ignore_list); 
     66          } 
     67        } 
     68      } 
     69      if (!empty($_SESSION['extensions_need_update']['themes'])) 
     70      { 
     71        // Check if themes have been upgraded since last check 
     72        foreach($themes->fs_themes as $theme_id => $fs_theme) 
     73        { 
     74          if (isset($_SESSION['extensions_need_update']['themes'][$theme_id]) 
     75            and $themes->theme_version_compare($fs_theme['version'], $_SESSION['extensions_need_update']['themes'][$theme_id])) 
     76          { 
     77            // theme have been updated 
     78            autoupdate_check_extensions_upgrade($themes, $themes, $languages, $ignore_list); 
     79          } 
     80        } 
     81      } 
     82      if (!empty($_SESSION['extensions_need_update']['languages'])) 
     83      { 
     84        // Check if languages have been upgraded since last check 
     85        foreach($languages->fs_languages as $language_id => $fs_language) 
     86        { 
     87          if (isset($_SESSION['extensions_need_update']['languages'][$language_id]) 
     88            and $languages->language_version_compare($fs_language['version'], $_SESSION['extensions_need_update']['languages'][$language_id])) 
     89          { 
     90            // language have been updated 
     91            autoupdate_check_extensions_upgrade($languages, $themes, $languages, $ignore_list); 
     92          } 
     93        } 
     94      } 
     95    } 
     96 
     97    if (!empty($_SESSION['extensions_need_update'])) 
    5598    { 
    5699      return l10n('Some upgrades are available for you plugins').'<br>' 
    57         . '<a href="admin.php?page=plugins_update">'.l10n('Click here see upgrade plugins page').'</a>'; 
    58     } 
    59   } 
    60  
    61   if ($_SESSION['need_update'] === false and $_SESSION['plugins_need_update'] === array()) 
     100        . '<a href="admin.php?page=plugin-autoupdate">'.l10n('Click here see upgrade plugins page').'</a>'; 
     101    } 
     102  } 
     103 
     104  if ($_SESSION['need_update'] === false and $_SESSION['extensions_need_update'] === array()) 
    62105  { 
    63106    return l10n('Gallery and plugins are up to date'); 
     
    73116function autoupdate_check_plugins_upgrade($plugins, $ignore_list) 
    74117{ 
     118  global $conf; 
     119 
    75120  if ($plugins->get_server_plugins()) 
    76121  { 
    77     $new_ignore_list = array(); 
    78     $_SESSION['plugins_need_update'] = array(); 
     122    $plugins_ignore_list = array(); 
     123    $need_upgrade = array(); 
     124    if (is_null($_SESSION['extensions_need_update'])) 
     125      $_SESSION['extensions_need_update'] = array(); 
    79126 
    80127    foreach($plugins->fs_plugins as $plugin_id => $fs_plugin) 
     
    88135          $fs_plugin_name = htmlspecialchars_decode($fs_plugin['name']); 
    89136 
    90           if (in_array($fs_plugin_name, $ignore_list)) 
    91           { 
    92             array_push($new_ignore_list, $fs_plugin_name); 
     137          if (in_array($fs_plugin_name, $ignore_list['plugins'])) 
     138          { 
     139            array_push($plugins_ignore_list, $fs_plugin_name); 
    93140          } 
    94141          else 
    95142          { 
    96             $_SESSION['plugins_need_update'][$plugin_id] = $plugin_info['revision_name']; 
    97           } 
    98         } 
    99       } 
    100     } 
    101  
     143            $need_upgrade[$plugin_id] = $plugin_info['revision_name']; 
     144          } 
     145        } 
     146      } 
     147    } 
     148    if (!empty($need_upgrade)) 
     149    { 
     150      $_SESSION['extensions_need_update']['plugins'] = $need_upgrade; 
     151    } 
    102152    // Update ignore list in database 
    103     $query = ' 
    104 UPDATE '.CONFIG_TABLE.' 
    105 SET value = "'.addslashes(serialize($new_ignore_list)).'" 
    106 WHERE param = "autoupdate_ignore_list" 
    107 ;'; 
    108     pwg_query($query); 
     153    $conf['autoupdate_ignore_list']['plugins'] = $plugins_ignore_list; 
     154    conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['autoupdate_ignore_list']))); 
     155  } 
     156} 
     157 
     158function autoupdate_check_themes_upgrade($themes, $ignore_list) 
     159{ 
     160  global $conf; 
     161 
     162  if ($themes->get_server_themes()) 
     163  { 
     164    $themes_ignore_list = array(); 
     165    $need_upgrade = array(); 
     166    if (is_null($_SESSION['extensions_need_update'])) 
     167      $_SESSION['extensions_need_update'] = array(); 
     168 
     169    foreach($themes->fs_themes as $theme_id => $fs_theme) 
     170    { 
     171      if (isset($fs_theme['extension']) and isset($themes->server_themes[$fs_theme['extension']])) 
     172      { 
     173        $theme_info = $themes->server_themes[$fs_theme['extension']]; 
     174 
     175        if (!$themes->theme_version_compare($fs_theme['version'], $theme_info['revision_name'])) 
     176        { 
     177          $fs_theme_name = htmlspecialchars_decode($fs_theme['name']); 
     178 
     179          if (in_array($fs_theme_name, $ignore_list['theme'])) 
     180          { 
     181            array_push($themes_ignore_list, $fs_theme_name); 
     182          } 
     183          else 
     184          { 
     185            $need_upgrade[$theme_id] = $theme_info['revision_name']; 
     186          } 
     187        } 
     188      } 
     189    } 
     190    if (!empty($need_upgrade)) 
     191    { 
     192      $_SESSION['extensions_need_update']['themes'] = $need_upgrade; 
     193    } 
     194    // Update ignore list in database 
     195    $conf['autoupdate_ignore_list']['themes'] = $themes_ignore_list; 
     196    conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['autoupdate_ignore_list']))); 
     197  } 
     198} 
     199 
     200function autoupdate_check_languages_upgrade($plugins, $ignore_list) 
     201{ 
     202  global $conf; 
     203 
     204  if ($languages->get_server_languages()) 
     205  { 
     206    $languages_ignore_list = array(); 
     207    $need_upgrade = array(); 
     208    if (is_null($_SESSION['extensions_need_update'])) 
     209      $_SESSION['extensions_need_update'] = array(); 
     210 
     211    foreach($languages->fs_languages as $language_id => $fs_language) 
     212    { 
     213      if (isset($fs_language['extension']) and isset($languages->server_languages[$fs_language['extension']])) 
     214      { 
     215        $language_info = $languages->server_languages[$fs_language['extension']]; 
     216 
     217        if (!$languages->language_version_compare($fs_language['version'], $language_info['revision_name'])) 
     218        { 
     219          $fs_language_name = htmlspecialchars_decode($fs_language['name']); 
     220 
     221          if (in_array($fs_language_name, $ignore_list['languages'])) 
     222          { 
     223            array_push($languages_ignore_list, $fs_language_name); 
     224          } 
     225          else 
     226          { 
     227            $need_upgrade[$language_id] = $language_info['revision_name']; 
     228          } 
     229        } 
     230      } 
     231    } 
     232    if (!empty($need_upgrade)) 
     233    { 
     234      $_SESSION['extensions_need_update']['languages'] = $need_upgrade; 
     235    } 
     236    // Update ignore list in database 
     237    $conf['autoupdate_ignore_list']['languages'] = $languages_ignore_list; 
     238    conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['autoupdate_ignore_list']))); 
    109239  } 
    110240} 
  • extensions/autoupdate/trunk/language/ar_SA/plugin.lang.php

    r8589 r9707  
    3838$lang['Unable to dump database.'] = 'غير قادرعلى تفريق قاعدة البيانات.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/cs_CZ/plugin.lang.php

    r6199 r9707  
    3838$lang['Unable to dump database.'] = 'Nelze provést výpis databáze.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/da_DK/plugin.lang.php

    r6204 r9707  
    3838$lang['Unable to dump database.'] = 'Det er ikke muligt at dumpe databasen.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/de_DE/plugin.lang.php

    r6196 r9707  
    3838$lang['Unable to dump database.'] = 'Es ist nicht möglich die Datenbank zu exportieren.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/en_UK/plugin.lang.php

    r6196 r9707  
    3838$lang['Unable to dump database.'] = 'Unable to dump database.'; 
    3939 
     40$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42$lang['autoupdate_update_all'] = 'All update'; 
     43$lang['ERROR'] = 'ERROR'; 
     44$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/es_ES/plugin.lang.php

    r6196 r9707  
    3838$lang['Unable to dump database.'] = 'No se puede volcar la base de datos.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/fr_FR/plugin.lang.php

    r6196 r9707  
    3535$lang['Include history data (Warning: server memory limit may be exceeded)'] = 'Inclure les données de l\'historique (Attention: risque de dépassement de la limite mémoire du serveur)'; 
    3636$lang['Unable to write new local directory.'] = 'Impossible d\'écrire le nouveau dossier local.'; 
    37 $lang['Unable to send template directory.'] = 'Impossible d\'envoyer le dossier temlate.'; 
     37$lang['Unable to send template directory.'] = 'Impossible d\'envoyer le dossier template.'; 
    3838$lang['Unable to dump database.'] = 'Impossible de sauvegarder la base de données.'; 
    3939 
     40$lang['autoupdate_ignore'] = 'Ignorer cette mise à jour'; 
     41$lang['autoupdate_reset_ignore'] = 'Réinitialiser les mises à jour ignorées'; 
     42$lang['autoupdate_update_all'] = 'Tout mettre à jour'; 
     43$lang['ERROR'] = 'ERREUR'; 
     44$lang['Upgrade Complete'] = 'Mise à jour effectuée'; 
     45$lang['Piwigo Upgrade'] = 'Mise à jour de Piwigo'; 
     46$lang['Extensions Upgrade'] = 'Mise à jour des extensions'; 
    4047?> 
  • extensions/autoupdate/trunk/language/hr_HR/plugin.lang.php

    r6242 r9707  
    3838$lang['Unable to dump database.'] = 'Nemoguće pražnjenje baze podataka.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/hu_HU/plugin.lang.php

    r6211 r9707  
    3939$lang['Unable to dump database.'] = 'Nem lehet biztonsági másolatot készíteni az adatbázisról.'; 
    4040 
     41/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     42/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     43/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     44/*TODO*/$lang['ERROR'] = 'ERROR'; 
     45/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     46/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     47/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4148?> 
  • extensions/autoupdate/trunk/language/it_IT/plugin.lang.php

    r6344 r9707  
    3838$lang['Unable to dump database.'] = 'Impossibile eseguire il salvataggio del database.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/ja_JP/plugin.lang.php

    r6375 r9707  
    3838$lang['Unable to dump database.'] = 'ダンプデータベースができません。'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/ka_GE/plugin.lang.php

    r7019 r9707  
    3939$lang['Unable to dump database.'] = 'შეუძლებელია მონაცემთა ბაზის წაშლა.'; 
    4040 
     41/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     42/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     43/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     44/*TODO*/$lang['ERROR'] = 'ERROR'; 
     45/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     46/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     47/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4148?> 
  • extensions/autoupdate/trunk/language/lv_LV/plugin.lang.php

    r7813 r9707  
    3838$lang['Unable to dump database.'] = 'Nevar izveidot datubāzes dampu.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/nl_NL/plugin.lang.php

    r6196 r9707  
    3838$lang['Unable to dump database.'] = 'Het is niet mogelijk om de database te dumpen.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/no_NO/plugin.lang.php

    r8567 r9707  
    3737$lang['Unable to send template directory.'] = 'Ikke i stand til å sende mal mappe.'; 
    3838$lang['Unable to dump database.'] = 'Ikke i stand til å tømme database.'; 
     39/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     40/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     41/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     42/*TODO*/$lang['ERROR'] = 'ERROR'; 
     43/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     44/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     45/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    3946?> 
  • extensions/autoupdate/trunk/language/pl_PL/plugin.lang.php

    r6200 r9707  
    3838$lang['Unable to dump database.'] = 'Zrzucenie bazy danych nie powiodło się.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/pt_PT/plugin.lang.php

    r8930 r9707  
    3838$lang['Unable to dump database.'] = 'Impossível descarregar base de dados.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/ru_RU/plugin.lang.php

    r6196 r9707  
    3838/*TODO*/$lang['Unable to dump database.'] = 'Unable to dump database.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/sk_SK/plugin.lang.php

    r7041 r9707  
    3838$lang['Unable to dump database.'] = 'Nemôžem odpojiť databázu.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/vi_VN/plugin.lang.php

    r7110 r9707  
    3838$lang['Unable to dump database.'] = 'Không thể tạo bản sao cơ sở dữ liệu.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/language/zh_CN/plugin.lang.php

    r6196 r9707  
    3838$lang['Unable to dump database.'] = '不能转存数据库.'; 
    3939 
     40/*TODO*/$lang['autoupdate_ignore'] = 'Ignore this update'; 
     41/*TODO*/$lang['autoupdate_reset_ignore'] = 'Reset ignored updates'; 
     42/*TODO*/$lang['autoupdate_update_all'] = 'All update'; 
     43/*TODO*/$lang['ERROR'] = 'ERROR'; 
     44/*TODO*/$lang['Upgrade Complete'] = 'Upgrade Complete'; 
     45/*TODO*/$lang['Piwigo Upgrade'] = 'Piwigo Upgrade'; 
     46/*TODO*/$lang['Extensions Upgrade'] = 'Extensions Upgrade'; 
    4047?> 
  • extensions/autoupdate/trunk/main.inc.php

    r6181 r9707  
    1212 
    1313define('AUTOUPDATE_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 
     14 
     15global $conf; 
     16$conf['AU_ignore'] = unserialize($conf['autoupdate_ignore_list']); 
     17 
     18// Upgrade? 
     19if (!isset($conf['AU_ignore']['plugins']) or !isset($conf['AU_ignore']['themes']) or !isset($conf['AU_ignore']['languages'])) 
     20{ 
     21  $conf['AU_ignore'] = array('plugins'=>array(),'themes'=>array(),'languages'=>array()); 
     22  conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['AU_ignore']))); 
     23} 
    1424 
    1525if (script_basename() == 'admin') 
     
    4555 
    4656  array_push($plugin_menu_links, array( 
    47       'NAME' => 'Piwigo AutoUpgrade', 
    48       'URL' => get_admin_plugin_menu_link(AUTOUPDATE_PATH . '/autoupdate.php'))); 
     57    'NAME' => 'Piwigo AutoUpgrade', 
     58    'URL' => get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__)) 
     59    ) 
     60  ); 
    4961 
    5062  return $plugin_menu_links; 
  • extensions/autoupdate/trunk/maintain.inc.php

    r6196 r9707  
    99    $query = ' 
    1010INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 
    11 VALUES ("autoupdate_ignore_list" , "'.addslashes(serialize(array())).'" , "Ignored plugin list for Piwigo Auto Update plugin");'; 
     11VALUES ("autoupdate_ignore_list" , "'.addslashes(serialize(array('plugins'=>array(),'themes'=>array(),'languages'=>array()))).'" , "Ignored list for Piwigo Auto Update plugin");'; 
    1212 
    1313    pwg_query($query); 
  • extensions/autoupdate/trunk/template/head.tpl

    r6167 r9707  
    66  jQuery.ajax({ldelim} 
    77    type: 'GET', 
    8     url: '{$ROOT_URL|@cat:"plugins/autoupdate/remote.php"}', 
     8    url: 'plugins/autoupdate/ajax/check_updates.php', 
    99    dataType: 'text', 
    1010    timeout: 10000,  // 10 sec timeout 
Note: See TracChangeset for help on using the changeset viewer.