And some more notices ...

This commit is contained in:
Michael 2018-07-31 18:10:34 +00:00
parent c0ecafcfdc
commit 06c6bfc88d
3 changed files with 22 additions and 12 deletions

View file

@ -81,14 +81,14 @@ class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div>';
function fromgplus_addon_settings_post(&$a,&$b) { function fromgplus_addon_settings_post(&$a,&$b) {
if(! local_user()) if (!local_user())
return; return;
if($_POST['fromgplus-submit']) { if (!empty($_POST['fromgplus-submit'])) {
PConfig::set(local_user(),'fromgplus','account',trim($_POST['fromgplus-account'])); PConfig::set(local_user(),'fromgplus','account',trim($_POST['fromgplus-account']));
$enable = ((x($_POST,'fromgplus-enable')) ? intval($_POST['fromgplus-enable']) : 0); $enable = (x($_POST,'fromgplus-enable') ? intval($_POST['fromgplus-enable']) : 0);
PConfig::set(local_user(),'fromgplus','enable', $enable); PConfig::set(local_user(),'fromgplus','enable', $enable);
$keywords = ((x($_POST, 'fromgplus-keywords')) ? intval($_POST['fromgplus-keywords']) : 0); $keywords = (x($_POST, 'fromgplus-keywords') ? intval($_POST['fromgplus-keywords']) : 0);
PConfig::set(local_user(),'fromgplus', 'keywords', $keywords); PConfig::set(local_user(),'fromgplus', 'keywords', $keywords);
if (!$enable) if (!$enable)

View file

@ -23,14 +23,20 @@ function leistungsschutzrecht_uninstall() {
} }
function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) { function leistungsschutzrecht_getsiteinfo($a, &$siteinfo) {
if (!isset($siteinfo["url"])) if (!isset($siteinfo["url"])) {
return; return;
}
if (!leistungsschutzrecht_is_member_site($siteinfo["url"])) if (!leistungsschutzrecht_is_member_site($siteinfo["url"])) {
return; return;
}
//$siteinfo["title"] = $siteinfo["url"]; //$siteinfo["title"] = $siteinfo["url"];
$siteinfo["text"] = leistungsschutzrecht_cuttext($siteinfo["text"]);
if (!empty($siteinfo["text"])) {
$siteinfo["text"] = leistungsschutzrecht_cuttext($siteinfo["text"]);
}
unset($siteinfo["image"]); unset($siteinfo["image"]);
unset($siteinfo["images"]); unset($siteinfo["images"]);
unset($siteinfo["keywords"]); unset($siteinfo["keywords"]);

View file

@ -970,7 +970,9 @@ function pumpio_dolike(App $a, $uid, $self, $post, $own_id, $threadcompletion =
$likedata['app'] = $post->generator->displayName; $likedata['app'] = $post->generator->displayName;
$likedata['author-name'] = $post->actor->displayName; $likedata['author-name'] = $post->actor->displayName;
$likedata['author-link'] = $post->actor->url; $likedata['author-link'] = $post->actor->url;
$likedata['author-avatar'] = $post->actor->image->url; if (!empty($post->actor->image)) {
$likedata['author-avatar'] = $post->actor->image->url;
}
$author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]'; $author = '[url=' . $likedata['author-link'] . ']' . $likedata['author-name'] . '[/url]';
$objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]'; $objauthor = '[url=' . $orig_post['author-link'] . ']' . $orig_post['author-name'] . '[/url]';
@ -1223,10 +1225,12 @@ function pumpio_dopost(App $a, $client, $uid, $self, $post, $own_id, $threadcomp
$postarray['verb'] = ACTIVITY_POST; $postarray['verb'] = ACTIVITY_POST;
$postarray['owner-name'] = $post->actor->displayName; $postarray['owner-name'] = $post->actor->displayName;
$postarray['owner-link'] = $post->actor->url; $postarray['owner-link'] = $post->actor->url;
$postarray['owner-avatar'] = $post->actor->image->url; $postarray['author-name'] = $postarray['owner-name'];
$postarray['author-name'] = $post->actor->displayName; $postarray['author-link'] = $postarray['owner-link'];
$postarray['author-link'] = $post->actor->url; if (!empty($post->actor->image)) {
$postarray['author-avatar'] = $post->actor->image->url; $postarray['owner-avatar'] = $post->actor->image->url;
$postarray['author-avatar'] = $postarray['owner-avatar'];
}
$postarray['plink'] = $post->object->url; $postarray['plink'] = $post->object->url;
$postarray['app'] = $post->generator->displayName; $postarray['app'] = $post->generator->displayName;
$postarray['title'] = ''; $postarray['title'] = '';