Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
Removed short link protocol detection
Browse files Browse the repository at this point in the history
Removed short link protocol detection due to mantis ticket 0021118
  • Loading branch information
Nicolas Schäfli committed Sep 12, 2017
1 parent 6283b44 commit ee3ba13
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions classes/Conf/class.xlvoConf.php
Expand Up @@ -44,18 +44,15 @@ class xlvoConf extends CachingActiveRecord {
* @return string
*/
public static function getShortLinkURL() {
if (self::getConfig(self::F_ALLOW_SHORTLINK)) {

$url = null;
$shortLinkEnabled = intval(self::getConfig(self::F_ALLOW_SHORTLINK));

if ($shortLinkEnabled === 1) {
$url = self::getConfig(self::F_ALLOW_SHORTLINK_LINK);
$url = rtrim($url, "/") . "/";
$url = str_replace("http://", '', $url);
$url = str_replace("https://", '', $url);

if (\ilHTTPS::getInstance()->isDetected()) {
$url = 'https://' . $url;
} else {
$url = 'http://' . $url;
}
} else {
}
else {
$url = ILIAS_HTTP_PATH
. '/Customizing/global/plugins/Services/Repository/RepositoryObject/LiveVoting/pin.php?pin=';
}
Expand Down

0 comments on commit ee3ba13

Please sign in to comment.