mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-16 14:13:55 +00:00
Leistungsschutzrecht: Optionally suppress pictures
This commit is contained in:
parent
ebd15dc84c
commit
1fa3397362
1 changed files with 7 additions and 5 deletions
|
@ -24,22 +24,24 @@ function leistungsschutzrecht_uninstall() {
|
|||
}
|
||||
|
||||
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
|
||||
if (!isset($siteinfo["url"])) {
|
||||
if (!isset($siteinfo["url"]) || empty($siteinfo['type'])) {
|
||||
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"])) {
|
||||
return;
|
||||
}
|
||||
|
||||
//$siteinfo["title"] = $siteinfo["url"];
|
||||
|
||||
if (!empty($siteinfo["text"])) {
|
||||
$siteinfo["text"] = leistungsschutzrecht_cuttext($siteinfo["text"]);
|
||||
}
|
||||
|
||||
unset($siteinfo["image"]);
|
||||
unset($siteinfo["images"]);
|
||||
unset($siteinfo["keywords"]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue