Changeset 57510 in spip-zone
- Timestamp:
- Jan 22, 2012, 2:36:19 PM (9 years ago)
- Location:
- _core_/plugins/svp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
_core_/plugins/svp/inc/svp_outiller.php
r56743 r57510 316 316 317 317 $version_normalisee = ''; 318 if ($version) { 319 $v = explode('.', $version); 320 foreach($v as $_nombre) { 321 $vn[] = str_pad($_nombre, 3, '0', STR_PAD_LEFT); 322 } 323 $version_normalisee = implode('.', $vn); 324 } 318 319 if (preg_match(',([0-9.]+)[\s-.]?(dev|alpha|a|beta|b|rc|pl|p)?,i', $version, $matches)) { 320 if ($matches[1]) { 321 $v = explode('.', $matches[1]); 322 foreach($v as $_nombre) { 323 $vn[] = str_pad($_nombre, 3, '0', STR_PAD_LEFT); 324 } 325 $version_normalisee = implode('.', $vn); 326 if ($matches[2]) 327 $version_normalisee = $version_normalisee . '-' . $matches[2]; 328 } 329 } 330 325 331 return $version_normalisee; 326 332 } -
_core_/plugins/svp/paquet.xml
r57508 r57510 2 2 prefix="svp" 3 3 categorie="maintenance" 4 version="0.75. 1"4 version="0.75.2" 5 5 etat="test" 6 6 compatibilite="[3.0.0-beta;3.0.*]" -
_core_/plugins/svp/svp_fonctions.php
r57130 r57510 426 426 foreach($v as $_nombre) { 427 427 $n = ltrim($_nombre, '0'); 428 $vn[] = (strlen($n)>0) ? $n : '0'; 428 // On traite les cas du type 001.002.000-dev qui doivent etre transformes en 1.2.0-dev. 429 // Etant donne que la denormalisation est toujours effectuee sur une version normalisee on sait 430 // que le suffixe commence toujours pas '-' 431 $vn[] = ((strlen($n)>0) AND substr($n, 0, 1)!='-' ) ? $n : "0$n"; 429 432 } 430 433 $version = implode('.', $vn);
Note: See TracChangeset
for help on using the changeset viewer.