fix spaces

This commit is contained in:
ColdSphinX 2017-05-29 18:39:21 +02:00 committed by GitHub
parent 85833dbfc9
commit aa0ed6aae0

View File

@ -186,7 +186,7 @@ class Pastes extends CI_Model
"bit.ly",
"yourls",
"gwgd",
"polr",
"polr",
"random"
);
@ -284,14 +284,14 @@ class Pastes extends CI_Model
$url_shortening_api = "bitly";
}
break;
case "polr":
$var_polr_url = $this->config->item('polr_url');
$var_polr_api = $this->config->item('polr_api');
if ((!empty($var_polr_url)) && (!empty($var_polr_api)))
{
$url_shortening_api = "polr";
}
break;
case "polr":
$var_polr_url = $this->config->item('polr_url');
$var_polr_api = $this->config->item('polr_api');
if ((!empty($var_polr_url)) && (!empty($var_polr_api)))
{
$url_shortening_api = "polr";
}
break;
default:
$url_shortening_api = false;
break;
@ -385,12 +385,12 @@ class Pastes extends CI_Model
$fetchResp = $this->curl_connect($prep_data);
$shorturl = ((strlen($fetchResp) > 4) ? $fetchResp : false);
break;
case "polr":
$config_polr_url = $this->config->item('polr_url');
$config_polr_api = $this->config->item('polr_api');
$url = urlencode($url);
case "polr":
$config_polr_url = $this->config->item('polr_url');
$config_polr_api = $this->config->item('polr_api');
$url = urlencode($url);
// Prepare CURL options array
// Prepare CURL options array
$prep_data = array(
CURLOPT_URL => "{$config_polr_url}/api/v2/action/shorten?key={$config_polr_api}&url={$url}&is_secret=false",
CURLOPT_RETURNTRANSFER => true,
@ -398,7 +398,7 @@ class Pastes extends CI_Model
);
$fetchResp = $this->curl_connect($prep_data);
$shorturl = ((strlen($fetchResp) > 4) ? $fetchResp : false);
break;
break;
default:
$shorturl = false;
break;