Changeset 1231:415e762385aa
- Timestamp:
- 07/26/13 09:14:57 (12 years ago)
- Branch:
- Ticket 1412
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/update.php
r1179 r1231 27 27 28 28 $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 29 $new_v = $updater->check(DC_VERSION );29 $new_v = $updater->check(DC_VERSION, !empty($_GET['nocache'])); 30 30 $zip_file = $new_v ? DC_BACKUP_PATH.'/'.basename($updater->getFileURL()) : ''; 31 31 $version_info = $new_v ? $updater->getInfoURL() : ''; … … 173 173 if (!$core->error->flag()) { 174 174 echo '<h2>'.__('Dotclear update').'</h2>'; 175 176 if (!empty($_GET['nocache'])) { 177 dcPage::message(__('Manual checking of update done successfully.')); 178 } 175 179 } 176 180 … … 180 184 if (empty($new_v)) 181 185 { 182 echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'; 186 echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'. 187 '<form action="'.$p_url.'" method="get">'. 188 '<p><input type="hidden" name="nocache" value="1" />'. 189 '<input type="submit" value="'.__('Force checking update Dotclear').'" /></p>'. 190 '</form>'; 183 191 } 184 192 else -
inc/core/class.dc.update.php
r1179 r1231 32 32 33 33 protected $cache_ttl = '-6 hours'; 34 protected $nocache_ttl = '-2 mins'; 34 35 protected $forced_files = array(); 35 36 … … 55 56 * 56 57 * @param version string Current version to compare 58 * @param nocache boolean Force checking 57 59 * @return string Latest version if available 58 60 */ 59 public function check($version )60 { 61 $this->getVersionInfo( );61 public function check($version, $nocache=false) 62 { 63 $this->getVersionInfo($nocache); 62 64 $v = $this->getVersion(); 63 65 if ($v && version_compare($version,$v,'<')) { … … 68 70 } 69 71 70 public function getVersionInfo() 71 { 72 public function getVersionInfo($nocache=false) 73 { 74 # Check minimum time without cache (prevents from server flood) 75 if ($nocache && is_readable($this->cache_file) && filemtime($this->cache_file) > strtotime($this->nocache_ttl)) { 76 $nocache = false; 77 } 78 72 79 # Check cached file 73 if (is_readable($this->cache_file) && filemtime($this->cache_file) > strtotime($this->cache_ttl) )80 if (is_readable($this->cache_file) && filemtime($this->cache_file) > strtotime($this->cache_ttl) && !$nocache) 74 81 { 75 82 $c = @file_get_contents($this->cache_file); -
locales/fr/main.po
r1193 r1231 1991 1991 msgstr "Les fichiers suivants de votre installation de Dotclear ne peuvent pas être écrits. Veuillez corriger la situation ou <a href=\"http://fr.dotclear.org/download\">mettre à jour manuellement</a>." 1992 1992 1993 msgid "Manual checking of update done successfully." 1994 msgstr "Vérification manuelle de mise à jour effectuée avec succès." 1995 1993 1996 msgid "No newer Dotclear version available." 1994 1997 msgstr "Aucune nouvelle version de Dotclear n'est disponible." 1998 1999 msgid "Force checking update Dotclear" 2000 msgstr "Forcer la vérification de mise à jour de Dotclear" 1995 2001 1996 2002 #, php-format
Note: See TracChangeset
for help on using the changeset viewer.