You are here

function securepages_log in Secure Pages 7

3 calls to securepages_log()
securepages_match in ./securepages.module
Checks the page past and see if it should be secure or insecure.
securepages_match_form in ./securepages.module
Check form Id to see if this form should be secured.
securepages_redirect in ./securepages.module
Checks the current page and see if we need to redirect to the secure or insecure version of the page.

File

./securepages.module, line 378
Allows certain pages to be viewable only via HTTPS.

Code

function securepages_log($text, $path, $pattern = NULL) {
  if (variable_get('securepages_debug', 0)) {
    $options = array(
      '@path' => $path,
      '@line' => t('NF'),
      '@pattern' => '',
    );
    if ($pattern) {
      if (!drupal_match_path($path, $pattern) && function_exists('drupal_get_path_alias')) {
        $path = drupal_get_path_alias($path);
      }
      $pattern_parts = explode("\n", $pattern);
      foreach ($pattern_parts as $line => $part) {
        if (drupal_match_path($path, $part)) {
          $options['@line'] = $line + 1;
          $options['@pattern'] = $part;
          break;
        }
      }
    }
    drupal_set_message(t('SP: ' . $text, $options), 'warning', FALSE);
  }
}