You are here

function _echo_access in Echo 6

Same name and namespace in other branches
  1. 8 echo.module \_echo_access()
  2. 7 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 95
The echo module converts text into a fully-themed page.

Code

function _echo_access() {
  if (isset($_REQUEST['title'])) {
    if (isset($_REQUEST['content'])) {
      if (isset($_REQUEST['theme'])) {
        $key = sha1($_REQUEST['title'] . $_REQUEST['content'] . $_REQUEST['theme']);
        if ($access = cache_get($key)) {
          if ($access->data == $key) {
            return TRUE;
          }
        }
      }
    }
  }
  return FALSE;
}