aboutsummaryrefslogtreecommitdiffstats
path: root/mod/friendica.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/friendica.php')
-rw-r--r--[-rwxr-xr-x]mod/friendica.php25
1 files changed, 17 insertions, 8 deletions
diff --git a/mod/friendica.php b/mod/friendica.php
index ab92e31ed..52a064224 100755..100644
--- a/mod/friendica.php
+++ b/mod/friendica.php
@@ -4,8 +4,12 @@ function friendica_init(&$a) {
if ($a->argv[1]=="json"){
$register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN');
+ $sql_extra = '';
+ if(x($a->config,'admin_nickname')) {
+ $sql_extra = sprintf(" AND nickname = '%s' ",dbesc($a->config['admin_nickname']));
+ }
if (isset($a->config['admin_email']) && $a->config['admin_email']!=''){
- $r = q("SELECT username, nickname FROM user WHERE email='%s'", $a->config['admin_email']);
+ $r = q("SELECT username, nickname FROM user WHERE email='%s' $sql_extra", dbesc($a->config['admin_email']));
$admin = array(
'name' => $r[0]['username'],
'profile'=> $a->get_baseurl().'/profile/'.$r[0]['nickname'],
@@ -51,15 +55,20 @@ function friendica_content(&$a) {
$o .= '<p></p>';
if(count($a->plugins)) {
- $o .= '<p>' . t('Installed plugins/addons/apps') . '</p>';
- $o .= '<ul>';
- foreach($a->plugins as $p)
- if(strlen($p))
- $o .= '<li>' . $p . '</li>';
- $o .= '</ul>';
+ $o .= '<p>' . t('Installed plugins/addons/apps:') . '</p>';
+ $sorted = $a->plugins;
+ $s = '';
+ sort($sorted);
+ foreach($sorted as $p) {
+ if(strlen($p)) {
+ if(strlen($s)) $s .= ', ';
+ $s .= $p;
+ }
+ }
+ $o .= '<div style="margin-left: 25px; margin-right: 25px;">' . $s . '</div>';
}
else
- $o .= '<p>' . t('No installed plugins/addons/apps');
+ $o .= '<p>' . t('No installed plugins/addons/apps') . '</p>';
call_hooks('about_hook', $o);