Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unneeded helper('url') call in plugins and form helper as already called in bootstrap file #1160

Merged
merged 1 commit into from
Aug 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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