You are here

function _echo_access in Echo 7

Same name and namespace in other branches
  1. 8 echo.module \_echo_access()
  2. 6 echo.module \_echo_access()

Returns TRUE if this request originated from the echo_themed_page() function; FALSE otherwise.

1 string reference to '_echo_access'
echo_menu in ./echo.module
Implements hook_menu().

File

./echo.module, line 88
The echo module converts text into a fully-themed page.

Code

function _echo_access() {
  $key = variable_get('echo_key');
  if (isset($_REQUEST['title'])) {
    if (isset($_REQUEST['content'])) {
      if (isset($_REQUEST['theme'])) {
        $calculated_token = sha1($_REQUEST['title'] . $_REQUEST['content'] . $_REQUEST['theme'] . $key);
        if ($calculated_token == $_REQUEST['token']) {
          return TRUE;
        }
      }
    }
  }
  return FALSE;
}