Skip to content

Commit f376a9d

Browse files
author
crondog
committed
Merge remote-tracking branch 'upstream/master' into changes
2 parents 19bff00 + 714c657 commit f376a9d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

controllers/Rss.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public function rss() {
3535
$options['items'] = \F3::get('rss_max_items');
3636
if(\F3::get('PARAMS["tag"]')!=null)
3737
$options['tag'] = \F3::get('PARAMS["tag"]');
38+
if(\F3::get('PARAMS["type"]')!=null)
39+
$options['type'] = \F3::get('PARAMS["type"]');
40+
3841

3942
// get items
4043
$newestEntryDate = false;

helpers/Image.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function fetchFavicon($url, $isHtmlUrl=false, $width=false, $height=false
4747
elseif (substr($shortcutIcon, 0, 1)=='/')
4848
$shortcutIcon = $urlElements['scheme'] . '://' . $urlElements['host'] . $shortcutIcon;
4949
else
50-
$shortcutIcon = $url . $shortcutIcon;
50+
$shortcutIcon = (strrpos($url, '/')===strlen($url)-1) ? $url . $shortcutIcon : $url . '/' . $shortcutIcon;
5151
}
5252

5353
$faviconAsPng = $this->loadImage($shortcutIcon, $width, $height);
@@ -159,6 +159,8 @@ private function parseShortcutIcon($html) {
159159
$result = preg_match('/<link .*rel=("|\')apple-touch-icon\1.*>/Ui', $html, $match1);
160160
if($result==0)
161161
$result = preg_match('/<link [^>]*rel=("|\')shortcut icon\1.*>/Ui', $html, $match1);
162+
if($result==0)
163+
$result = preg_match('/<link [^>]*rel=("|\')icon\1.*>/Ui', $html, $match1);
162164
if($result>0) {
163165
preg_match('/href=("|\')(.*)\1/Ui', $match1[0], $match2);
164166
return $match2[2];

0 commit comments

Comments
 (0)