You are here

function views_bulk_operations_script_action in Views Bulk Operations (VBO) 6.3

Same name and namespace in other branches
  1. 6 actions/script.action.inc \views_bulk_operations_script_action()
  2. 7.3 actions/script.action.inc \views_bulk_operations_script_action()
1 string reference to 'views_bulk_operations_script_action'
views_bulk_operations_views_default_views in ./views_bulk_operations.views_default.inc
Implementation of hook_views_default_views().

File

./script.action.inc, line 13

Code

function views_bulk_operations_script_action(&$object, $context) {
  if (!module_exists('actions_permissions') && !user_access('administer site configuration')) {
    global $user;
    $msg = 'An attempt to execute arbitrary PHP script action by user <a href="user/!uid">%user</a> was blocked because of lack of permission.';
    $arg = array(
      '%user' => $user->name,
      '!uid' => $user->uid,
    );
    drupal_set_message(t($msg, $arg), 'error', FALSE);
    watchdog('actions', $msg, $arg, WATCHDOG_ERROR);
    return;
  }
  @eval($context['script']);
}