Merge pull request #2910 from annando/1611-slinky

Several shorteners doesn't work anymore
2022.09-rc
Tobias Diekershoff 2016-11-15 09:53:38 +01:00 zatwierdzone przez GitHub
commit b628e82465
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -789,12 +789,12 @@ function short_link($url) {
$yourls->set('password', $yourls_password);
$yourls->set('ssl', $yourls_ssl);
$yourls->set('yourls-url', $yourls_url);
$slinky->set_cascade( array($yourls, new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL()));
$slinky->set_cascade(array($yourls, new Slinky_Ur1ca(), new Slinky_TinyURL()));
} else {
// setup a cascade of shortening services
// try to get a short link from these services
// in the order ur1.ca, trim, id.gd, tinyurl
$slinky->set_cascade(array(new Slinky_UR1ca(), new Slinky_Trim(), new Slinky_IsGd(), new Slinky_TinyURL()));
// in the order ur1.ca, tinyurl
$slinky->set_cascade(array(new Slinky_Ur1ca(), new Slinky_TinyURL()));
}
return $slinky->short();
}