Changeset 6196 for extensions/autoupdate
- Timestamp:
- May 16, 2010, 5:57:12 PM (14 years ago)
- Location:
- extensions/autoupdate/trunk
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/autoupdate/trunk/autoupdate.php
r6181 r6196 1 1 <?php 2 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 2 4 3 5 include(AUTOUPDATE_PATH.'include/functions.inc.php'); … … 27 29 if (preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches)) 28 30 { 29 if (@fetchRemote(PHPWG_URL.'/download/all_versions.php', $result) 31 $url = PHPWG_URL.'/download/all_versions.php'; 32 $url .= '?rand='.md5(uniqid(rand(), true)); // Avoid server cache 33 34 if (@fetchRemote($url, $result) 30 35 and $all_versions = @explode("\n", $result) 31 36 and is_array($all_versions)) … … 88 93 // | Step 2 | 89 94 // +-----------------------------------------------------------------------+ 90 if ($step == 2 )95 if ($step == 2 and is_webmaster()) 91 96 { 92 97 if (isset($_POST['submit']) and isset($_POST['upgrade_to'])) … … 99 104 // | Step 3 | 100 105 // +-----------------------------------------------------------------------+ 101 if ($step == 3 )106 if ($step == 3 and is_webmaster()) 102 107 { 103 if (isset($_POST['saveTemplate']) )108 if (isset($_POST['saveTemplate']) and version_compare(PHPWG_VERSION, '2.1', '<')) 104 109 { 105 110 autoupdate_save_template_dir(); … … 121 126 // +-----------------------------------------------------------------------+ 122 127 128 if (!is_webmaster()) 129 { 130 array_push($page['errors'], l10n('Webmaster status is required.')); 131 } 132 123 133 $template->assign(array( 124 'STEP' => $step, 125 'AU_URL' => get_admin_plugin_menu_link(AUTOUPDATE_PATH . '/autoupdate.php'), 126 'UPGRADE_TO' => $upgrade_to, 127 'RELEASE_URL' => PHPWG_URL.'/releases/'.$upgrade_to, 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, 128 139 ) 129 140 ); -
extensions/autoupdate/trunk/include/functions.inc.php
r6181 r6196 1 1 <?php 2 2 3 function autoupdate_deltree($path) 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 5 function autoupdate_deltree($path, $move_to_trash=false) 4 6 { 5 7 if (is_dir($path)) … … 13 15 if (is_dir($pathfile)) 14 16 { 15 autoupdate_deltree($pathfile );17 autoupdate_deltree($pathfile, $move_to_trash); 16 18 } 17 19 else … … 22 24 } 23 25 closedir($fh); 24 return @rmdir($path); 26 if (@rmdir($path)) 27 { 28 return true; 29 } 30 elseif ($move_to_trash) 31 { 32 $trash = PHPWG_ROOT_PATH.'_trash'; 33 if (!is_dir($trash)) 34 { 35 @mkgetdir($trash); 36 } 37 return @rename($path, $trash . '/'.md5(uniqid(rand(), true))); 38 } 39 else 40 { 41 return false; 42 } 25 43 } 26 44 } … … 65 83 elseif (is_dir($path)) 66 84 { 67 autoupdate_deltree($path );85 autoupdate_deltree($path, true); 68 86 } 69 87 } … … 399 417 } 400 418 419 if (!function_exists('is_webmaster')) 420 { 421 function is_webmaster($user_status = '') 422 { 423 return is_autorize_status(ACCESS_WEBMASTER, $user_status); 424 } 425 } 426 401 427 define('AU_DEFAULT_INDEX', file_get_contents(AUTOUPDATE_PATH.'index.php')); 402 428 ?> -
extensions/autoupdate/trunk/include/functions_remote.inc.php
r6167 r6196 1 1 <?php 2 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 2 4 3 5 function autoupdate_check_version($version=PHPWG_VERSION) -
extensions/autoupdate/trunk/language/cs_CZ/plugin.lang.php
r6181 r6196 28 28 /*TODO*/$lang['Some themes and plugins may be not available yet.'] = 'Some themes and plugins may be not available yet.'; 29 29 /*TODO*/$lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'; 30 /*TODO*/$lang[' First Step'] = 'First Step';31 /*TODO*/$lang[' Second Step'] = 'Second Step';32 /*TODO*/$lang[' Third Step'] = 'Third Step';30 /*TODO*/$lang['autoupdate_step_1'] = 'First Step'; 31 /*TODO*/$lang['autoupdate_step_2'] = 'Second Step'; 32 /*TODO*/$lang['autoupdate_step_3'] = 'Third Step'; 33 33 /*TODO*/$lang['Save Template Directory'] = 'Save template directory'; 34 34 /*TODO*/$lang['Dump Database'] = 'Dump Database'; -
extensions/autoupdate/trunk/language/de_DE/plugin.lang.php
r6184 r6196 28 28 $lang['Some themes and plugins may be not available yet.'] = 'Einige Themen und Plugins sind dadurch nicht mehr verwendbar.'; 29 29 $lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'Sie können direkt auf Version %s aktualisieren und Version %s überspringen (empfohlen).'; 30 $lang[' First Step'] = 'Erster Schritt';31 $lang[' Second Step'] = 'Zweiter Schritt';32 $lang[' Third Step'] = 'Dritter Schritt';30 $lang['autoupdate_step_1'] = 'Erster Schritt'; 31 $lang['autoupdate_step_2'] = 'Zweiter Schritt'; 32 $lang['autoupdate_step_3'] = 'Dritter Schritt'; 33 33 $lang['Save Template Directory'] = 'Sichere den Templateordner'; 34 34 $lang['Dump Database'] = 'Exportiere die Datenbank'; -
extensions/autoupdate/trunk/language/en_UK/plugin.lang.php
r6181 r6196 28 28 $lang['Some themes and plugins may be not available yet.'] = 'Some themes and plugins may be not available yet.'; 29 29 $lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'; 30 $lang[' First Step'] = 'First Step';31 $lang[' Second Step'] = 'Second Step';32 $lang[' Third Step'] = 'Third Step';30 $lang['autoupdate_step_1'] = 'First Step'; 31 $lang['autoupdate_step_2'] = 'Second Step'; 32 $lang['autoupdate_step_3'] = 'Third Step'; 33 33 $lang['Save Template Directory'] = 'Save template directory'; 34 34 $lang['Dump Database'] = 'Dump Database'; -
extensions/autoupdate/trunk/language/es_ES/plugin.lang.php
r6191 r6196 28 28 $lang['Some themes and plugins may be not available yet.'] = 'Algunos temas y plugins pueden no estar disponibles todavía.'; 29 29 $lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'Puede actualizar a Piwigo% s directamente, sin actualizar a Piwigo %s (recomendado).'; 30 $lang[' First Step'] = 'Primer paso';31 $lang[' Second Step'] = 'Segundo Paso';32 $lang[' Third Step'] = 'Tercer paso';30 $lang['autoupdate_step_1'] = 'Primer paso'; 31 $lang['autoupdate_step_2'] = 'Segundo Paso'; 32 $lang['autoupdate_step_3'] = 'Tercer paso'; 33 33 $lang['Save Template Directory'] = 'Guardar directorio de plantillas'; 34 34 $lang['Dump Database'] = 'Volcar la base de datos'; -
extensions/autoupdate/trunk/language/fr_FR/plugin.lang.php
r6181 r6196 28 28 $lang['Some themes and plugins may be not available yet.'] = 'Certains thèmes ou plugins ne sont peut-être pas encore disponibles.'; 29 29 $lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'Vous pouvez mettre à jour vers Piwigo %s directement, sans passer par Piwigo %s (recommandé).'; 30 $lang[' First Step'] = 'Première étape';31 $lang[' Second Step'] = 'Deuxième étape';32 $lang[' Third Step'] = 'Troisième étape';30 $lang['autoupdate_step_1'] = 'Première étape'; 31 $lang['autoupdate_step_2'] = 'Deuxième étape'; 32 $lang['autoupdate_step_3'] = 'Troisième étape'; 33 33 $lang['Save Template Directory'] = 'Sauvegarder le dossier template'; 34 34 $lang['Dump Database'] = 'Sauvegarder la base de données'; -
extensions/autoupdate/trunk/language/hr_HR/plugin.lang.php
r6181 r6196 28 28 /*TODO*/$lang['Some themes and plugins may be not available yet.'] = 'Some themes and plugins may be not available yet.'; 29 29 /*TODO*/$lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'; 30 /*TODO*/$lang[' First Step'] = 'First Step';31 /*TODO*/$lang[' Second Step'] = 'Second Step';32 /*TODO*/$lang[' Third Step'] = 'Third Step';30 /*TODO*/$lang['autoupdate_step_1'] = 'First Step'; 31 /*TODO*/$lang['autoupdate_step_2'] = 'Second Step'; 32 /*TODO*/$lang['autoupdate_step_3'] = 'Third Step'; 33 33 /*TODO*/$lang['Save Template Directory'] = 'Save template directory'; 34 34 /*TODO*/$lang['Dump Database'] = 'Dump Database'; -
extensions/autoupdate/trunk/language/hu_HU/plugin.lang.php
r6192 r6196 29 29 $lang['Some themes and plugins may be not available yet.'] = 'Lehet, hogy néhány téma és bővítmény még nem áll rendelkezésre.'; 30 30 $lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'Lehetősége van közvetlenül frissíteni a Piwigo %s verziójára, kihagyva a Piwigo %s verzióját (ajánlott).'; 31 $lang[' First Step'] = 'Első lépés';32 $lang[' Second Step'] = 'Második lépés';33 $lang[' Third Step'] = 'Harmadik lépés';31 $lang['autoupdate_step_1'] = 'Első lépés'; 32 $lang['autoupdate_step_2'] = 'Második lépés'; 33 $lang['autoupdate_step_3'] = 'Harmadik lépés'; 34 34 $lang['Save Template Directory'] = 'Template könyvtár mentése'; 35 35 $lang['Dump Database'] = 'Adatbázis mentése'; -
extensions/autoupdate/trunk/language/it_IT/plugin.lang.php
r6182 r6196 28 28 $lang['Some themes and plugins may be not available yet.'] = 'Alcuni temi e plugin possono non essere ancora disponibili.'; 29 29 $lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'E\' possibile aggiornare a Piwigo %s direttamente, senza passare a Piwigo %s (consigliato).'; 30 $lang[' First Step'] = 'Primo passo';31 $lang[' Second Step'] = 'Secondo passo';32 $lang[' Third Step'] = 'Terzo passo';30 $lang['autoupdate_step_1'] = 'Primo passo'; 31 $lang['autoupdate_step_2'] = 'Secondo passo'; 32 $lang['autoupdate_step_3'] = 'Terzo passo'; 33 33 $lang['Save Template Directory'] = 'Salvare la template directory'; 34 34 $lang['Dump Database'] = 'Salvare Database'; -
extensions/autoupdate/trunk/language/ja_JP/plugin.lang.php
r6181 r6196 28 28 /*TODO*/$lang['Some themes and plugins may be not available yet.'] = 'Some themes and plugins may be not available yet.'; 29 29 /*TODO*/$lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'; 30 /*TODO*/$lang[' First Step'] = 'First Step';31 /*TODO*/$lang[' Second Step'] = 'Second Step';32 /*TODO*/$lang[' Third Step'] = 'Third Step';30 /*TODO*/$lang['autoupdate_step_1'] = 'First Step'; 31 /*TODO*/$lang['autoupdate_step_2'] = 'Second Step'; 32 /*TODO*/$lang['autoupdate_step_3'] = 'Third Step'; 33 33 /*TODO*/$lang['Save Template Directory'] = 'Save template directory'; 34 34 /*TODO*/$lang['Dump Database'] = 'Dump Database'; -
extensions/autoupdate/trunk/language/nl_NL/plugin.lang.php
r6186 r6196 28 28 $lang['Some themes and plugins may be not available yet.'] = 'Sommige thema\'s en plugins zijn mogelijk nog niet beschikbaar.'; 29 29 $lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'U kunt direct upgraden naar Piwigo versie %s, zonder eerst te upgraden naar Piwigo versie %s (aanbevolen).'; 30 $lang[' First Step'] = 'Eerste stap';31 $lang[' Second Step'] = 'Tweede stap';32 $lang[' Third Step'] = 'Derde stap';30 $lang['autoupdate_step_1'] = 'Eerste stap'; 31 $lang['autoupdate_step_2'] = 'Tweede stap'; 32 $lang['autoupdate_step_3'] = 'Derde stap'; 33 33 $lang['Save Template Directory'] = 'Bewaar de template directory'; 34 34 $lang['Dump Database'] = 'Dump de database'; -
extensions/autoupdate/trunk/language/pl_PL/plugin.lang.php
r6181 r6196 28 28 /*TODO*/$lang['Some themes and plugins may be not available yet.'] = 'Some themes and plugins may be not available yet.'; 29 29 /*TODO*/$lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'; 30 /*TODO*/$lang[' First Step'] = 'First Step';31 /*TODO*/$lang[' Second Step'] = 'Second Step';32 /*TODO*/$lang[' Third Step'] = 'Third Step';30 /*TODO*/$lang['autoupdate_step_1'] = 'First Step'; 31 /*TODO*/$lang['autoupdate_step_2'] = 'Second Step'; 32 /*TODO*/$lang['autoupdate_step_3'] = 'Third Step'; 33 33 /*TODO*/$lang['Save Template Directory'] = 'Save template directory'; 34 34 /*TODO*/$lang['Dump Database'] = 'Dump Database'; -
extensions/autoupdate/trunk/language/ru_RU/plugin.lang.php
r6181 r6196 28 28 /*TODO*/$lang['Some themes and plugins may be not available yet.'] = 'Some themes and plugins may be not available yet.'; 29 29 /*TODO*/$lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'; 30 /*TODO*/$lang[' First Step'] = 'First Step';31 /*TODO*/$lang[' Second Step'] = 'Second Step';32 /*TODO*/$lang[' Third Step'] = 'Third Step';30 /*TODO*/$lang['autoupdate_step_1'] = 'First Step'; 31 /*TODO*/$lang['autoupdate_step_2'] = 'Second Step'; 32 /*TODO*/$lang['autoupdate_step_3'] = 'Third Step'; 33 33 /*TODO*/$lang['Save Template Directory'] = 'Save template directory'; 34 34 /*TODO*/$lang['Dump Database'] = 'Dump Database'; -
extensions/autoupdate/trunk/language/vi_VN/plugin.lang.php
r6185 r6196 28 28 $lang['Some themes and plugins may be not available yet.'] = 'M?t s? themes và plugins có th? chua dùng du?c.'; 29 29 $lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = 'B?n có th? nâng c?p tr?c ti?p lên phiên b?n Piwigo %s, mà không c?n ph?i nâng c?p t? phiên b?n %s (khuy?n cáo).'; 30 $lang[' First Step'] = 'Bu?c th? nh?t';31 $lang[' Second Step'] = 'Bu?c th? 2';32 $lang[' Third Step'] = 'Bu?c th? 3';30 $lang['autoupdate_step_1'] = 'Bu?c th? nh?t'; 31 $lang['autoupdate_step_2'] = 'Bu?c th? 2'; 32 $lang['autoupdate_step_3'] = 'Bu?c th? 3'; 33 33 $lang['Save Template Directory'] = 'Luu l?i template c?a thu m?c'; 34 34 $lang['Dump Database'] = 'T?o b?n sao co s? d? li?u'; -
extensions/autoupdate/trunk/language/zh_CN/plugin.lang.php
r6183 r6196 28 28 $lang['Some themes and plugins may be not available yet.'] = '一些主题和插件也许还未能用.'; 29 29 $lang['You can upgrade to Piwigo %s directly, without upgrading to Piwigo %s (recommended).'] = '您可以直接升级到 Piwigo %s , 而并不需要先升级到 Piwigo %s (recommended).'; 30 $lang[' First Step'] = '第一步';31 $lang[' Second Step'] = '第二步';32 $lang[' Third Step'] = '第三步';30 $lang['autoupdate_step_1'] = '第一步'; 31 $lang['autoupdate_step_2'] = '第二步'; 32 $lang['autoupdate_step_3'] = '第三步'; 33 33 $lang['Save Template Directory'] = '保存模板目录'; 34 34 $lang['Dump Database'] = '转存数据库'; -
extensions/autoupdate/trunk/maintain.inc.php
r6168 r6196 15 15 } 16 16 17 function plugin_ deactivate()17 function plugin_uninstall() 18 18 { 19 19 global $prefixeTable; -
extensions/autoupdate/trunk/plugins_update.php
r6181 r6196 1 1 <?php 2 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 2 4 3 5 function autoupdate_plugins_update_filter($content, &$smarty) -
extensions/autoupdate/trunk/template/autoupdate.tpl
r6181 r6196 56 56 </p> 57 57 <form action="" method="post"> 58 59 {if version_compare($PHPWG_VERSION, '2.1', '<')} 60 {counter assign=i} 58 61 <fieldset> 59 <legend>{' First Step'|@translate}</legend>62 <legend>{'autoupdate_step_'|cat:$i|@translate}</legend> 60 63 <p><input type="submit" name="saveTemplate" value="{'Save Template Directory'|@translate}"></p> 61 64 </fieldset> 65 {/if} 66 67 {counter assign=i} 62 68 <fieldset> 63 <legend>{' Second Step'|@translate}</legend>69 <legend>{'autoupdate_step_'|cat:$i|@translate}</legend> 64 70 <p><input type="checkbox" name="includeHistory"> {'Include history data (Warning: server memory limit may be exceeded)'|@translate}</p> 65 71 <p><input type="submit" name="dumpDatabase" value="{'Dump Database'|@translate}"></p> 66 72 </fieldset> 73 74 {counter assign=i} 67 75 <fieldset> 68 <legend>{' Third Step'|@translate|@sprintf:$UPGRADE_TO}</legend>76 <legend>{'autoupdate_step_'|cat:$i|@translate}</legend> 69 77 <p><input type="submit" name="submit" value="{'Upgrade to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}" onClick="return confirm('{'autoupdate_alert'|@translate}');"></p> 70 78 </fieldset> 79 71 80 <p><input type="hidden" name="upgrade_to" value="{$UPGRADE_TO}"></p> 72 81 </form>
Note: See TracChangeset
for help on using the changeset viewer.