Permalink
Browse files

Force https for irc links

  • Loading branch information...
r04r committed Jan 1, 2018
1 parent db2d534 commit 12723abc3aee8024523cc7649d6885116cd3a126
Showing with 6 additions and 6 deletions.
  1. +2 −2 includes/functions.php
  2. +2 −2 post.php
  3. +2 −2 report.php
@@ -1857,9 +1857,9 @@ function log_mod($action, $target)
function create_link($url)
{
global $link;
$link->insert('internal_shorturls', array('url' => $url));
$link->insert('internal_shorturls', array('url' => (ENABLE_HTTPS?'https://':'http://').BASE_DOMAIN.$url));
return DOMAIN.'!'.base_convert($link->insert_id(), 10, 36);
return (ENABLE_HTTPS?'https://':'http://').BASE_DOMAIN.'!'.base_convert($link->insert_id(), 10, 36);
}
function log_irc($message, $staff = false)
@@ -438,7 +438,7 @@
}
if (!$stealth_banned) {
log_irc('Reply in "'.$replying_to.'" by '.$ircname.' - '.create_link(DOMAIN.'topic/'.$_GET['reply'].'#reply_'.$inserted_id).' - '.trim(snippet($body, 150, false, false)));
log_irc('Reply in "'.$replying_to.'" by '.$ircname.' - '.create_link('topic/'.$_GET['reply'].'#reply_'.$inserted_id).' - '.trim(snippet($body, 150, false, false)));
}
}
unset($insert);
@@ -594,7 +594,7 @@
if (!$stealth_banned) {
topic_notification($headline, $ircname, snippet($body), DOMAIN.'topic/'.$inserted_id);
log_irc('Topic "'.$headline.'" by '.$ircname.' - '.create_link(DOMAIN.'topic/'.$inserted_id).' - '.trim(snippet($body, 150, false, false)));
log_irc('Topic "'.$headline.'" by '.$ircname.' - '.create_link('topic/'.$inserted_id).' - '.trim(snippet($body, 150, false, false)));
}
//$link->db_exec("INSERT INTO poll_options
@@ -70,11 +70,11 @@
$insert['reason'] = substr($_POST['comment'], 0, 512);
$link->insert('reports', $insert);
$topiclink = DOMAIN.'topic/'.$insert['topic'];
$topiclink = 'topic/'.$insert['topic'];
if ($insert['reply']) {
$topiclink .= '#reply_'.$insert['reply'];
}
$handlelink = DOMAIN.'reports/handle/'.$insert['topic'];
$handlelink = 'reports/handle/'.$insert['topic'];
if ($insert['reply']) {
$handlelink .= '/'.$insert['reply'];
}

0 comments on commit 12723ab

Please sign in to comment.