You are here

function _drd_server_validate_timestamp in Drupal Remote Dashboard Server 7.2

Same name and namespace in other branches
  1. 6.2 drd_server.module \_drd_server_validate_timestamp()

Callback to validate if $timestamp contains numbers only.

Parameters

int $timestamp: The timestamp to be checked.

Return value

boolean TRUE if $timestamp only contains digits, FALSE otherwise.

1 call to _drd_server_validate_timestamp()
_drd_server_validate_request in ./drd_server.module
Callback to validate a request that's coming from DRD.

File

./drd_server.module, line 1183
Provides XMLRPC implementation to respond to requests from DRD.

Code

function _drd_server_validate_timestamp($timestamp) {
  for ($i = 0; $i < strlen($timestamp); $i++) {
    if (strpos('0123456789', $timestamp[$i]) === FALSE) {
      return FALSE;
    }
  }
  return TRUE;
}