deprecated-1.10.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Returns the category of a file from its MIME type
  4. *
  5. * @param string $mime_type The MIME type
  6. *
  7. * @return string 'document', 'audio', 'video', or 'general' if the MIME type is unrecognized
  8. * @deprecated 1.10 Use elgg_get_file_simple_type()
  9. */
  10. function file_get_simple_type($mime_type) {
  11. elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_get_file_simple_type()', '1.10');
  12. return elgg_get_file_simple_type($mime_type);
  13. }
  14. /**
  15. * Returns the category of a file from its MIME type
  16. *
  17. * @param string $mime_type The MIME type
  18. *
  19. * @return string 'document', 'audio', 'video', or 'general' if the MIME type is unrecognized
  20. * @deprecated 1.10 Use elgg_get_file_simple_type()
  21. */
  22. function file_get_general_file_type($mime_type) {
  23. elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_get_file_simple_type()', '1.10');
  24. return elgg_get_file_simple_type($mime_type);
  25. }
  26. /**
  27. * Returns an object with methods set_ignore_access() and get_ignore_access() for back compatibility.
  28. *
  29. * Note: This no longer promises to return an instance of ElggAccess or Elgg\Access.
  30. *
  31. * @return \ElggSession
  32. * @since 1.7.0
  33. * @access private
  34. * @deprecated 1.10 Use elgg_get_ignore_access or elgg_set_ignore_access
  35. */
  36. function elgg_get_access_object() {
  37. elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_get/set_ignore_access()', '1.8');
  38. return _elgg_services()->session;
  39. }
  40. /**
  41. * Create a legacy password hash (salted MD5).
  42. *
  43. * @param \ElggUser $user The user this is being generated for.
  44. * @param string $password Password in clear text
  45. *
  46. * @return string
  47. * @access private
  48. * @deprecated 1.10.0 The password hashing API is not public
  49. */
  50. function generate_user_password(\ElggUser $user, $password) {
  51. elgg_deprecated_notice(__FUNCTION__ . " is deprecated and will not be replaced.", "1.10");
  52. return _elgg_services()->passwords->generateLegacyHash($user, $password);
  53. }