mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-26 04:51:08 -05:00
fix spaces
This commit is contained in:
parent
85833dbfc9
commit
aa0ed6aae0
@ -186,7 +186,7 @@ class Pastes extends CI_Model
|
|||||||
"bit.ly",
|
"bit.ly",
|
||||||
"yourls",
|
"yourls",
|
||||||
"gwgd",
|
"gwgd",
|
||||||
"polr",
|
"polr",
|
||||||
"random"
|
"random"
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -284,14 +284,14 @@ class Pastes extends CI_Model
|
|||||||
$url_shortening_api = "bitly";
|
$url_shortening_api = "bitly";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "polr":
|
case "polr":
|
||||||
$var_polr_url = $this->config->item('polr_url');
|
$var_polr_url = $this->config->item('polr_url');
|
||||||
$var_polr_api = $this->config->item('polr_api');
|
$var_polr_api = $this->config->item('polr_api');
|
||||||
if ((!empty($var_polr_url)) && (!empty($var_polr_api)))
|
if ((!empty($var_polr_url)) && (!empty($var_polr_api)))
|
||||||
{
|
{
|
||||||
$url_shortening_api = "polr";
|
$url_shortening_api = "polr";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$url_shortening_api = false;
|
$url_shortening_api = false;
|
||||||
break;
|
break;
|
||||||
@ -385,12 +385,12 @@ class Pastes extends CI_Model
|
|||||||
$fetchResp = $this->curl_connect($prep_data);
|
$fetchResp = $this->curl_connect($prep_data);
|
||||||
$shorturl = ((strlen($fetchResp) > 4) ? $fetchResp : false);
|
$shorturl = ((strlen($fetchResp) > 4) ? $fetchResp : false);
|
||||||
break;
|
break;
|
||||||
case "polr":
|
case "polr":
|
||||||
$config_polr_url = $this->config->item('polr_url');
|
$config_polr_url = $this->config->item('polr_url');
|
||||||
$config_polr_api = $this->config->item('polr_api');
|
$config_polr_api = $this->config->item('polr_api');
|
||||||
$url = urlencode($url);
|
$url = urlencode($url);
|
||||||
|
|
||||||
// Prepare CURL options array
|
// Prepare CURL options array
|
||||||
$prep_data = array(
|
$prep_data = array(
|
||||||
CURLOPT_URL => "{$config_polr_url}/api/v2/action/shorten?key={$config_polr_api}&url={$url}&is_secret=false",
|
CURLOPT_URL => "{$config_polr_url}/api/v2/action/shorten?key={$config_polr_api}&url={$url}&is_secret=false",
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
@ -398,7 +398,7 @@ class Pastes extends CI_Model
|
|||||||
);
|
);
|
||||||
$fetchResp = $this->curl_connect($prep_data);
|
$fetchResp = $this->curl_connect($prep_data);
|
||||||
$shorturl = ((strlen($fetchResp) > 4) ? $fetchResp : false);
|
$shorturl = ((strlen($fetchResp) > 4) ? $fetchResp : false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$shorturl = false;
|
$shorturl = false;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user