Changeset 10028
- Timestamp:
- Apr 4, 2011, 12:28:50 AM (14 years ago)
- Location:
- extensions/autoupdate/trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/autoupdate/trunk/include/autoupdate.class.php
r9740 r10028 9 9 var $themes; 10 10 var $languages; 11 var $missing = array(); 12 var $default_plugins = array(); 13 var $default_themes = array(); 14 var $default_languages = array(); 11 15 12 16 function autoupdate() 13 17 { 14 18 $this->types = array('plugins', 'themes', 'languages'); 19 $this->default_themes = array('clear', 'dark', 'Sylvia'); 20 $this->default_plugins = array('admin_multi_view', 'c13y_upgrade', 'language_switch', 'LocalFilesEditor'); 15 21 16 22 foreach ($this->types as $type) … … 34 40 } 35 41 36 function get_server_extensions( )42 function get_server_extensions($version=PHPWG_VERSION) 37 43 { 38 44 global $user; … … 43 49 44 50 // Retrieve PEM versions 45 $version = PHPWG_VERSION;46 51 $versions_to_check = array(); 47 52 $url = PEM_URL . '/api/get_version_list.php'; … … 108 113 $server = 'server_'.$ext_to_check[$ext['extension_id']]; 109 114 $this->$ext_to_check[$ext['extension_id']]->$server += array($ext['extension_id'] => $ext); 110 } 111 } 115 unset($ext_to_check[$ext['extension_id']]); 116 } 117 } 118 $this->check_missing_extensions($ext_to_check); 112 119 return true; 113 120 } … … 183 190 } 184 191 192 function check_missing_extensions($missing) 193 { 194 foreach ($missing as $id => $type) 195 { 196 $fs = 'fs_'.$type; 197 $default = 'default_'.$type; 198 foreach ($this->$type->$fs as $ext_id => $ext) 199 { 200 if (isset($ext['extension']) and $id == $ext['extension'] and !in_array($ext_id, $this->$default)) 201 { 202 $this->missing[$type][] = $ext; 203 break; 204 } 205 } 206 } 207 } 208 185 209 function version_compare($a, $b, $type) 186 210 { -
extensions/autoupdate/trunk/language/ar_SA/plugin.lang.php
r9721 r10028 48 48 /*TODO*/$lang['All extensions are up to date.'] = 'All extensions are up to date.'; 49 49 /*TODO*/$lang['Update in progress...'] = 'Update in progress...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/cs_CZ/plugin.lang.php
r9746 r10028 48 48 $lang['All extensions are up to date.'] = 'Všechny moduly a rozšíření jsou nyní aktuální.'; 49 49 $lang['Update in progress...'] = 'Probíhá aktualizace...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/da_DK/plugin.lang.php
r9721 r10028 48 48 /*TODO*/$lang['All extensions are up to date.'] = 'All extensions are up to date.'; 49 49 /*TODO*/$lang['Update in progress...'] = 'Update in progress...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/de_DE/plugin.lang.php
r9732 r10028 48 48 $lang['All extensions are up to date.'] = 'Alle Erweiterungen sind auf dem neuesten Stand.'; 49 49 $lang['Update in progress...'] = 'Update in progress...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/en_UK/plugin.lang.php
r9735 r10028 48 48 $lang['All extensions are up to date.'] = 'All extensions are up to date.'; 49 49 $lang['Update in progress...'] = 'Update in progress...'; 50 51 $lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 52 $lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 53 $lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 54 ?> -
extensions/autoupdate/trunk/language/es_ES/plugin.lang.php
r9731 r10028 48 48 $lang['All extensions are up to date.'] = 'Todas las extensiones estan actualizadas.'; 49 49 $lang['Update in progress...'] = 'Actualización en curso...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/fr_FR/plugin.lang.php
r9721 r10028 48 48 $lang['All extensions are up to date.'] = 'Toutes les extensions sont à jour.'; 49 49 $lang['Update in progress...'] = 'Mise à jour en cours...'; 50 51 $lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Les plugins suivants ne seront peut-être pas compatibles avec la nouvelle version de Piwigo:'; 52 $lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Les thèmes suivants ne seront peut-être pas compatibles avec la nouvelle version de Piwigo:'; 53 $lang['I decide to upgrade anyway'] = 'Je décide de migrer quand même'; 50 54 ?> -
extensions/autoupdate/trunk/language/hr_HR/plugin.lang.php
r9721 r10028 48 48 /*TODO*/$lang['All extensions are up to date.'] = 'All extensions are up to date.'; 49 49 /*TODO*/$lang['Update in progress...'] = 'Update in progress...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/hu_HU/plugin.lang.php
r9722 r10028 49 49 $lang['All extensions are up to date.'] = 'Az összes bővítmény naprakész.'; 50 50 $lang['Update in progress...'] = 'Frissítés folyamatban...'; 51 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 53 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 51 54 ?> -
extensions/autoupdate/trunk/language/it_IT/plugin.lang.php
r9733 r10028 48 48 $lang['All extensions are up to date.'] = 'Tutte le estensioni sono aggiornati.'; 49 49 $lang['Update in progress...'] = 'Aggiornamento in corso ...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/ja_JP/plugin.lang.php
r9721 r10028 48 48 /*TODO*/$lang['All extensions are up to date.'] = 'All extensions are up to date.'; 49 49 /*TODO*/$lang['Update in progress...'] = 'Update in progress...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/ka_GE/plugin.lang.php
r9721 r10028 49 49 /*TODO*/$lang['All extensions are up to date.'] = 'All extensions are up to date.'; 50 50 /*TODO*/$lang['Update in progress...'] = 'Update in progress...'; 51 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 53 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 51 54 ?> -
extensions/autoupdate/trunk/language/lv_LV/plugin.lang.php
r9725 r10028 48 48 $lang['All extensions are up to date.'] = 'Visi paplašinājumi jau ir atjaunināti.'; 49 49 $lang['Update in progress...'] = 'Notiek jaunināšana...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/nl_NL/plugin.lang.php
r9734 r10028 49 49 $lang['Update in progress...'] = 'Bezig met update...'; 50 50 51 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 53 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 51 54 ?> -
extensions/autoupdate/trunk/language/no_NO/plugin.lang.php
r9721 r10028 47 47 /*TODO*/$lang['All extensions are up to date.'] = 'All extensions are up to date.'; 48 48 /*TODO*/$lang['Update in progress...'] = 'Update in progress...'; 49 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 50 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 49 52 ?> -
extensions/autoupdate/trunk/language/pl_PL/plugin.lang.php
r9750 r10028 48 48 $lang['All extensions are up to date.'] = 'Wszystkie rozszerzenia są aktualne.'; 49 49 $lang['Update in progress...'] = 'Trwa aktualizacja...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/pt_PT/plugin.lang.php
r9721 r10028 48 48 /*TODO*/$lang['All extensions are up to date.'] = 'All extensions are up to date.'; 49 49 /*TODO*/$lang['Update in progress...'] = 'Update in progress...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/ru_RU/plugin.lang.php
r9749 r10028 48 48 $lang['All extensions are up to date.'] = 'Все плагины соответствуют последней версии.'; 49 49 $lang['Update in progress...'] = 'Идет обновление...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/sk_SK/plugin.lang.php
r9748 r10028 48 48 $lang['All extensions are up to date.'] = 'Všetky doplnky sú aktuálne.'; 49 49 $lang['Update in progress...'] = 'Prebieha aktualizácia...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/vi_VN/plugin.lang.php
r9721 r10028 48 48 /*TODO*/$lang['All extensions are up to date.'] = 'All extensions are up to date.'; 49 49 /*TODO*/$lang['Update in progress...'] = 'Update in progress...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/language/zh_CN/plugin.lang.php
r9721 r10028 48 48 /*TODO*/$lang['All extensions are up to date.'] = 'All extensions are up to date.'; 49 49 /*TODO*/$lang['Update in progress...'] = 'Update in progress...'; 50 /*TODO*/$lang['Following plugins may not be compatible with the new version of Piwigo:'] = 'Following plugins may not be compatible with the new version of Piwigo:'; 51 /*TODO*/$lang['Following themes may not be compatible with the new version of Piwigo:'] = 'Following themes may not be compatible with the new version of Piwigo:'; 52 /*TODO*/$lang['I decide to upgrade anyway'] = 'I decide to upgrade anyway'; 50 53 ?> -
extensions/autoupdate/trunk/template/update_pwg.tpl
r9980 r10028 7 7 jQuery('.autoupdate_bar').show(); 8 8 }); 9 jQuery('[name="understand"]').click(function() {ldelim} 10 jQuery('[name="submit"]').attr('disabled', !this.checked); 11 }); 9 12 }); 10 13 {/footer_script} … … 79 82 <fieldset> 80 83 <legend>{'autoupdate_step_'|cat:$i|@translate}</legend> 81 <p><input type="submit" name="submit" value="{'Upgrade to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}"></p> 84 {if !empty($missing.plugins)} 85 <p><i>{'Following plugins may not be compatible with the new version of Piwigo:'|@translate}</i></p> 86 <p><ul>{foreach from=$missing.plugins item=plugin}<li><a href="{$plugin.uri}" class="externalLink">{$plugin.name}</a></li>{/foreach}</ul><br></p> 87 {/if} 88 {if !empty($missing.themes)} 89 <p><i>{'Following themes may not be compatible with the new version of Piwigo:'|@translate}</i></p> 90 <p><ul>{foreach from=$missing.themes item=theme}<li><a href="{$theme.uri}" class="externalLink">{$theme.name}</a></li>{/foreach}</ul><br></p> 91 {/if} 92 <p> 93 {if !empty($missing.plugins) or !empty($missing.themes)} 94 <p><label><input type="checkbox" name="understand"> {'I decide to upgrade anyway'|@translate}</label></p> 95 {/if} 96 <p><input type="submit" name="submit" value="{'Upgrade to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}" {if !empty($missing.plugins) or !empty($missing.themes)}disabled="disabled"{/if}> 97 </p> 82 98 <p class="autoupdate_bar" style="display:none;"> {'Update in progress...'|@translate}<br><img src="plugins/autoupdate/template/ajax-loader-bar.gif"></p> 83 99 </fieldset> -
extensions/autoupdate/trunk/update_pwg.inc.php
r9735 r10028 115 115 autoupdate_upgrade_to($_POST['upgrade_to'], $step); 116 116 } 117 118 include_once(AUTOUPDATE_PATH.'include/autoupdate.class.php'); 119 $autoupdate = new autoupdate(); 120 $autoupdate->get_server_extensions($upgrade_to); 121 $template->assign('missing', $autoupdate->missing); 117 122 } 118 123
Note: See TracChangeset
for help on using the changeset viewer.