You are here

function htaccess_display in Htaccess 7.2

1 string reference to 'htaccess_display'
htaccess_menu in ./htaccess.module
Implementation of hook_menu()

File

./htaccess.admin.inc, line 288
Administration pages.

Code

function htaccess_display($id) {
  global $base_url;
  $htaccess_get = db_select('htaccess', 'h')
    ->fields('h')
    ->condition('id', array(
    ':id' => $id,
  ), 'IN')
    ->execute()
    ->fetchAssoc();
  $htaccess = "<p>" . t("Back to !deployment_page", array(
    "!deployment_page" => l(t("deployment page"), "" . $base_url . "/admin/config/system/htaccess/deployment"),
  )) . "</p>";
  $htaccess .= "<code>" . str_replace(PHP_EOL, "<br />", check_plain($htaccess_get['htaccess'])) . "</code>";
  $form['htaccess_settings_display'] = array(
    '#type' => 'fieldset',
    '#title' => $htaccess_get['name'],
    '#description' => $htaccess,
  );
  return $form;
}