Commits

Phil Sturgeon committed 3caefdb

Added is_cli_request() method to documentation for Input class.

  • Participants
  • Parent commits 9453c6b

Comments (0)

Files changed (3)

File system/helpers/form_helper.php

 			$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 = '<form action="'.$action.'"';
 
 		$form .= _attributes_to_string($attributes, TRUE);

File user_guide/changelog.html

 	<li class="reactor">Fixed a bug (Reactor #145) where the Output Library had parse_exec_vars set to protected.</li>
 	<li class="reactor">Fixed a bug (Reactor #80) where is_really_writable would create an empty file when on Windows or with safe_mode enabled.</li>
 	<li class="reactor">Fixed various bugs with User Guide.</li>
+	<li class="reactor">Added is_cli_request() method to documentation for <a href="libraries/input.html">Input class</a>.</li>
 	<li class="reactor">Added form_validation_lang entries for <kbd>decimal</kbd>, <kbd>less_than</kbd> and <kbd>greater_than</kbd>.</li>
 	<li class="reactor"><a href="https://bitbucket.org/ellislab/codeigniter-reactor/issue/153/escape-str-bug-in-mssql-driver">Fixed issue #153</a> Escape Str Bug in MSSQL driver.</li>
+	<li class="reactor"><a href="https://bitbucket.org/ellislab/codeigniter-reactor/issue/172/bug-in-chrome-and-form_open-in-201">Fixed issue #172</a> Google Chrome 11 posts incorrectly when action is empty.</li>
 </ul>
 
 <h2>Version 2.0.1</h2>

File user_guide/libraries/input.html

 <h2>$this->input->is_ajax_request()</h2>
 <p>Checks to see if the <var>HTTP_X_REQUESTED_WITH</var> server header has been set, and returns a boolean response.</p>
 
-<code>$this->input->is_ajax_request()</code>
+
+<h2>$this->input->is_cli_request()</h2>
+<p>Checks to see if the <var>STDIN</var> constant is set, which is a failsafe way to see if PHP is being run on the command line.</p>
+
+<code>$this->input->is_cli_request()</code>
 
 
 </div>