From 25531bad88617608247d53c4acba231a2322b105 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 3 Apr 2015 13:33:27 +0200 Subject: [PATCH] Make user names clickable --- lib/private/ocsclient.php | 2 ++ settings/templates/apps.php | 2 ++ tests/lib/OCSClientTest.php | 3 +++ 3 files changed, 7 insertions(+) diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php index 30747c0d5f..df988d7d3a 100644 --- a/lib/private/ocsclient.php +++ b/lib/private/ocsclient.php @@ -202,6 +202,7 @@ class OCSClient { $app['type'] = (string)$tmp[$i]->typeid; $app['typename'] = (string)$tmp[$i]->typename; $app['personid'] = (string)$tmp[$i]->personid; + $app['profilepage'] = (string)$tmp[$i]->profilepage; $app['license'] = (string)$tmp[$i]->license; $app['detailpage'] = (string)$tmp[$i]->detailpage; $app['preview'] = (string)$tmp[$i]->smallpreviewpic1; @@ -274,6 +275,7 @@ class OCSClient { $app['label'] = (string)$tmp->label; $app['typename'] = (string)$tmp->typename; $app['personid'] = (string)$tmp->personid; + $app['profilepage'] = (string)$tmp->profilepage; $app['detailpage'] = (string)$tmp->detailpage; $app['preview1'] = (string)$tmp->smallpreviewpic1; $app['preview2'] = (string)$tmp->smallpreviewpic2; diff --git a/settings/templates/apps.php b/settings/templates/apps.php index f930ce6d44..b9459e0bd5 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -62,11 +62,13 @@ script(
{{{level}}}
+ {{#if profilepage}}{{/if}}
t('by')); ?> {{author}} {{#if licence}} ({{licence}}-t('licensed')); ?>) {{/if}}
+ {{#if profilepage}}
{{/if}} {{#if score}}
{{{score}}}
{{/if}} diff --git a/tests/lib/OCSClientTest.php b/tests/lib/OCSClientTest.php index 6c83103b57..fa3f1fe784 100644 --- a/tests/lib/OCSClientTest.php +++ b/tests/lib/OCSClientTest.php @@ -517,6 +517,7 @@ class OCSClientTest extends \Test\TestCase { 'score' => '60', 'downloads' => 5393, 'level' => 0, + 'profilepage' => 'http://opendesktop.org/usermanager/search.php?username=owncloud', ], [ 'id' => '168708', @@ -535,6 +536,7 @@ class OCSClientTest extends \Test\TestCase { 'score' => '58', 'downloads' => 4237, 'level' => 200, + 'profilepage' => 'http://opendesktop.org/usermanager/search.php?username=owncloud', ], ]; $this->assertEquals($expected, $this->ocsClient->getApplications([815, 1337], 1, 'approved')); @@ -760,6 +762,7 @@ class OCSClientTest extends \Test\TestCase { 'label' => 'recommended', 'typename' => 'ownCloud other', 'personid' => 'owncloud', + 'profilepage' => 'http://opendesktop.org/usermanager/search.php?username=owncloud', 'detailpage' => 'https://apps.owncloud.com/content/show.php?content=166053', 'preview1' => '', 'preview2' => '',