Changeset 3147 for branches/2.0/include/functions.inc.php
- Timestamp:
- Feb 14, 2009, 3:28:21 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/include/functions.inc.php
r3137 r3147 494 494 closedir($dir); 495 495 @asort($languages); 496 @reset($languages);497 496 498 497 return $languages; … … 1373 1372 $source_file = $f; 1374 1373 break; 1375 }1376 1377 if ($target_charset=='utf-8')1378 { // we accept conversion from ISO-8859-1 to UTF-81379 $f = $dir.'.iso-8859-1/'.$filename;1380 if (file_exists($f))1381 {1382 $source_charset = 'iso-8859-1';1383 $source_file = $f;1384 break;1385 }1386 1374 } 1387 1375 } … … 1484 1472 } 1485 1473 } 1474 1475 /** 1476 * returns a "secret key" that is to be sent back when a user enters a comment 1477 * 1478 * @param int image_id 1479 */ 1480 function get_comment_post_key($image_id) 1481 { 1482 global $conf; 1483 1484 $time = time(); 1485 1486 return sprintf( 1487 '%s:%s', 1488 $time, 1489 hash_hmac( 1490 'md5', 1491 $time.':'.$image_id, 1492 $conf['secret_key'] 1493 ) 1494 ); 1495 } 1486 1496 ?>
Note: See TracChangeset
for help on using the changeset viewer.