You are here

function _views_send_allow_php in Views Send 6

Find out if the current user is allowed to use the PHP filter.

2 calls to _views_send_allow_php()
views_send_mail_action in ./views_send.module
Main action callback.
_views_send_filter_form in ./views_send.module
This is a fork of filter_form() in order to allow adding the "Plain" option.

File

./views_send.module, line 902
The Views Send module.

Code

function _views_send_allow_php() {
  static $allow_php;
  if (!isset($allow_php)) {
    $allow_php = FALSE;
    $result = db_query("SELECT format FROM {filters} WHERE module = 'php'");
    while ($row = db_fetch_object($result)) {
      if (filter_access($row->format)) {
        $allow_php = TRUE;
        break;
      }
    }
  }
  return $allow_php;
}