forked from friendica/friendica-addons
Leistungsschutzrecht: Optionally suppress pictures
This commit is contained in:
parent
ebd15dc84c
commit
1fa3397362
|
@ -24,22 +24,24 @@ function leistungsschutzrecht_uninstall() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
|
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
|
||||||
if (!isset($siteinfo["url"])) {
|
if (!isset($siteinfo["url"]) || empty($siteinfo['type'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Avoid any third party pictures, to avoid copyright issues
|
||||||
|
if (($siteinfo['type'] != 'photo') && Config::get('leistungsschutzrecht', 'suppress_photos', false)) {
|
||||||
|
unset($siteinfo["image"]);
|
||||||
|
unset($siteinfo["images"]);
|
||||||
|
}
|
||||||
|
|
||||||
if (!leistungsschutzrecht_is_member_site($siteinfo["url"])) {
|
if (!leistungsschutzrecht_is_member_site($siteinfo["url"])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//$siteinfo["title"] = $siteinfo["url"];
|
|
||||||
|
|
||||||
if (!empty($siteinfo["text"])) {
|
if (!empty($siteinfo["text"])) {
|
||||||
$siteinfo["text"] = leistungsschutzrecht_cuttext($siteinfo["text"]);
|
$siteinfo["text"] = leistungsschutzrecht_cuttext($siteinfo["text"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($siteinfo["image"]);
|
|
||||||
unset($siteinfo["images"]);
|
|
||||||
unset($siteinfo["keywords"]);
|
unset($siteinfo["keywords"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue