Skip to content

Commit

Permalink
Fixed issue #11760: Helper class ls\ajax\AjaxHelper uses echo keyword…
Browse files Browse the repository at this point in the history
… as method name
  • Loading branch information
olleharstedt committed Oct 10, 2016
1 parent 7a7e354 commit b909a78
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions application/helpers/admin/ajax_helper.php
Expand Up @@ -36,7 +36,7 @@ public static function createUrl($route, array $params = array())
public static function output($msg)
{
$output = new JsonOutput($msg);
self::echo($output); // Encoded to json format when converted to string
self::echoString($output); // Encoded to json format when converted to string
}

/**
Expand All @@ -47,7 +47,7 @@ public static function output($msg)
public static function outputSuccess($msg)
{
$output = new JsonOutputSuccess($msg);
self::echo($output);
self::echoString($output);
}

/**
Expand All @@ -59,7 +59,7 @@ public static function outputSuccess($msg)
public static function outputError($msg, $code = 0)
{
$output = new JsonOutputError($msg, $code);
self::echo($output);
self::echoString($output);
}

/**
Expand All @@ -69,7 +69,7 @@ public static function outputError($msg, $code = 0)
public static function outputNoPermission()
{
$output = new JsonOutputNoPermission();
self::echo($output);
self::echoString($output);
}

/**
Expand All @@ -78,15 +78,15 @@ public static function outputNoPermission()
public static function outputNotLoggedIn()
{
$output = new JsonOutputNotLoggedIn();
self::echo($output);
self::echoString($output);
}

/**
* Echo $str with json header
* @param string str
* @return void
*/
private static function echo($str)
private static function echoString($str)
{
header('Content-Type: application/json');
echo $str;
Expand Down

0 comments on commit b909a78

Please sign in to comment.