Browse Source

Add filter_xss() to trigger_error() calls...

Hurray coder! :P
pull/352/head
Adam Vessey 12 years ago
parent
commit
09e9785ecf
  1. 8
      includes/datastream.inc
  2. 8
      includes/utilities.inc
  3. 2
      islandora.module

8
includes/datastream.inc

@ -85,7 +85,7 @@ function islandora_datastream_get_url(AbstractDatastream $datastream, $type = 'd
*/
function islandora_datastream_get_delete_link(AbstractDatastream $datastream) {
$message = islandora_deprecated('7.x-1.2', 'Use the "islandora_datastream_delete_link" theme implementation.');
trigger_error($message, E_USER_DEPRECATED);
trigger_error(filter_xss($message), E_USER_DEPRECATED);
return theme('islandora_datastream_delete_link', array(
'datastream' => $datastream,
@ -100,7 +100,7 @@ function islandora_datastream_get_delete_link(AbstractDatastream $datastream) {
*/
function islandora_datastream_edit_get_link(AbstractDatastream $datastream) {
$message = islandora_deprecated('7.x-1.2', 'Use the "islandora_datastream_edit_link" theme implementation.');
trigger_error($message, E_USER_DEPRECATED);
trigger_error(filter_xss($message), E_USER_DEPRECATED);
return theme('islandora_datastream_edit_link', array(
'datastream' => $datastream,
@ -163,7 +163,7 @@ function islandora_edit_datastream_registry_render(array $edit_registry) {
*/
function islandora_datastream_get_download_link(AbstractDatastream $datastream) {
$message = islandora_deprecated('7.x-1.2', 'Use the "islandora_datastream_download_link" theme implementation.');
trigger_error($message, E_USER_DEPRECATED);
trigger_error(filter_xss($message), E_USER_DEPRECATED);
return theme('islandora_datastream_download_link', array(
'datastream' => $datastream,
@ -182,7 +182,7 @@ function islandora_datastream_get_download_link(AbstractDatastream $datastream)
*/
function islandora_datastream_get_view_link(AbstractDatastream $datastream) {
$message = islandora_deprecated('7.x-1.2', 'Use the "islandora_datastream_view_link" theme implementation.');
trigger_error($message, E_USER_DEPRECATED);
trigger_error(filter_xss($message), E_USER_DEPRECATED);
return theme('islandora_datastream_view_link', array(
'datastream' => $datastream,

8
includes/utilities.inc

@ -673,8 +673,8 @@ function islandora_get_comp_ds_mappings($pid) {
* TRUE if the account has all the given permissions, FALSE otherwise.
*/
function islandora_user_access_all(array $perms, $account = NULL) {
$message = islandora_deprecated('7.x-1.2', 'Roll your own code.');
trigger_error($message, E_USER_DEPRECATED);
$message = islandora_deprecated('7.x-1.2', 'Roll your own code or use islandora_user_access().');
trigger_error(filter_xss($message), E_USER_DEPRECATED);
foreach ($perms as $perm) {
if (!user_access($perm, $account)) {
@ -697,8 +697,8 @@ function islandora_user_access_all(array $perms, $account = NULL) {
* otherwise.
*/
function islandora_user_access_any(array $perms, $account = NULL) {
$message = islandora_deprecated('7.x-1.2', 'Roll your own code.');
trigger_error($message, E_USER_DEPRECATED);
$message = islandora_deprecated('7.x-1.2', 'Roll your own code or use islandora_user_access().');
trigger_error(filter_xss($message), E_USER_DEPRECATED);
foreach ($perms as $perm) {
if (user_access($perm, $account)) {

2
islandora.module

@ -549,7 +549,7 @@ function islandora_object_access_callback($perm, $object = NULL) {
function islandora_object_datastream_access_callback($perm, $object = NULL, $datastream = NULL, $account = NULL) {
module_load_include('inc', 'islandora', 'includes/utilities');
$message = islandora_deprecated('7.x-1.2', 'Use islandora_datastream_access().');
trigger_error($message, E_USER_DEPRECATED);
trigger_error(filter_xss($message), E_USER_DEPRECATED);
return islandora_datastream_access($perm, $datastream, $account);
}

Loading…
Cancel
Save