Skip to content

Commit

Permalink
Merge pull request #1160 from samsonasik/rem-helper-url-call
Browse files Browse the repository at this point in the history
remove unneeded helper('url') call in plugins and form helper as already called in bootstrap file
  • Loading branch information
lonnieezell authored Aug 13, 2018
2 parents e07e8ff + bdea3c9 commit def9426
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
2 changes: 0 additions & 2 deletions system/Helpers/form_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ function form_open(string $action = '', $attributes = [], array $hidden = []): s
// If no action is provided then set to the current url
if ( ! $action)
{
helper('url');
$action = current_url(true);
} // If an action is not a full URL then turn it into one
elseif (strpos($action, '://') === false)
{
helper('url');
$action = site_url($action);
}

Expand Down
24 changes: 0 additions & 24 deletions system/View/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ class Plugins
*/
public static function currentURL(array $params = [])
{
if ( ! function_exists('current_url'))
// can't unit test this since it is loaded in CIUnitTestCase setup
// @codeCoverageIgnoreStart
helper('url');
// @codeCoverageIgnoreEnd

return current_url();
}

Expand All @@ -63,12 +57,6 @@ public static function currentURL(array $params = [])
*/
public static function previousURL(array $params = [])
{
if ( ! function_exists('previous_url'))
// can't unit test this since it is loaded in CIUnitTestCase setup
// @codeCoverageIgnoreStart
helper('url');
// @codeCoverageIgnoreEnd

return previous_url();
}

Expand All @@ -81,12 +69,6 @@ public static function previousURL(array $params = [])
*/
public static function mailto(array $params = [])
{
if ( ! function_exists('mailto'))
// can't unit test this since it is loaded in CIUnitTestCase setup
// @codeCoverageIgnoreStart
helper('url');
// @codeCoverageIgnoreEnd

$email = $params['email'] ?? '';
$title = $params['title'] ?? '';
$attrs = $params['attributes'] ?? '';
Expand All @@ -103,12 +85,6 @@ public static function mailto(array $params = [])
*/
public static function safeMailto(array $params = [])
{
if ( ! function_exists('safe_mailto'))
// can't unit test this since it is loaded in CIUnitTestCase setup
// @codeCoverageIgnoreStart
helper('url');
// @codeCoverageIgnoreEnd

$email = $params['email'] ?? '';
$title = $params['title'] ?? '';
$attrs = $params['attributes'] ?? '';
Expand Down

0 comments on commit def9426

Please sign in to comment.