Changeset 26592 for extensions/community
- Timestamp:
- Jan 9, 2014, 10:26:21 PM (10 years ago)
- Location:
- extensions/community
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/include/functions_community.inc.php
r23085 r26592 396 396 return pwg_db_fetch_assoc(pwg_query($query)); 397 397 } 398 399 // will be included in Piwigo 2.6 400 if (!function_exists('safe_version_compare')) 401 { 402 function safe_version_compare($a, $b, $cmp=null) 403 { 404 $replace_chars = create_function('$m', 'return ord(strtolower($m[1]));'); 405 $a = preg_replace('#([0-9]+)([a-z]+)#i', '$1.$2', $a); 406 $b = preg_replace('#([0-9]+)([a-z]+)#i', '$1.$2', $b); 407 $a = preg_replace_callback('#\b([a-z]{1})\b#i', $replace_chars, $a); 408 $b = preg_replace_callback('#\b([a-z]{1})\b#i', $replace_chars, $b); 409 if (empty($cmp)) 410 { 411 return version_compare($a, $b); 412 } 413 else 414 { 415 return version_compare($a, $b, $cmp); 416 } 417 } 418 } 398 419 ?> -
extensions/community/main.inc.php
r26559 r26592 44 44 COMMUNITY_VERSION == 'auto' or 45 45 $pwg_loaded_plugins[COMMUNITY_ID]['version'] == 'auto' or 46 version_compare($pwg_loaded_plugins[COMMUNITY_ID]['version'], COMMUNITY_VERSION, '<')46 safe_version_compare($pwg_loaded_plugins[COMMUNITY_ID]['version'], COMMUNITY_VERSION, '<') 47 47 ) 48 48 {
Note: See TracChangeset
for help on using the changeset viewer.