From 9d0e61768acc8eb6adfd032cdc6fbeac4c024598 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sat, 2 Apr 2011 12:43:55 +0100 Subject: Added is_cli_request() method to documentation for Input class. --- system/helpers/form_helper.php | 4 ++++ user_guide/changelog.html | 2 ++ user_guide/libraries/input.html | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 532309794..8aa788c6c 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -49,11 +49,15 @@ if ( ! function_exists('form_open')) $attributes = 'method="post"'; } + // If an action is not a full URL then turn it into one if ($action && strpos($action, '://') === FALSE) { $action = $CI->config->site_url($action); } + // If no action is provided then set to the current url + $action OR $action = $CI->config->site_url($CI->uri->uri_string()); + $form = '
  • Fixed a bug (Reactor #145) where the Output Library had parse_exec_vars set to protected.
  • Fixed a bug (Reactor #80) where is_really_writable would create an empty file when on Windows or with safe_mode enabled.
  • Fixed various bugs with User Guide.
  • +
  • Added is_cli_request() method to documentation for Input class.
  • Added form_validation_lang entries for decimal, less_than and greater_than.
  • Fixed issue #153 Escape Str Bug in MSSQL driver.
  • +
  • Fixed issue #172 Google Chrome 11 posts incorrectly when action is empty.
  • Version 2.0.1

    diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html index d7e898bd1..b34938b13 100644 --- a/user_guide/libraries/input.html +++ b/user_guide/libraries/input.html @@ -269,7 +269,11 @@ else

    $this->input->is_ajax_request()

    Checks to see if the HTTP_X_REQUESTED_WITH server header has been set, and returns a boolean response.

    -$this->input->is_ajax_request() + +

    $this->input->is_cli_request()

    +

    Checks to see if the STDIN constant is set, which is a failsafe way to see if PHP is being run on the command line.

    + +$this->input->is_cli_request() -- cgit v1.2.3-24-g4f1b