Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds template to urls #66

Merged
merged 2 commits into from
Nov 21, 2017
Merged

Adds template to urls #66

merged 2 commits into from
Nov 21, 2017

Conversation

pierreozoux
Copy link
Member

closes #64

@@ -79,6 +91,10 @@ public function get() {
$site['icon'] = $this->url->linkToRouteAbsolute('external.icon.showIcon', ['icon' => 'external.svg']);
}

$site['url'] = str_replace('{email}', $email, $site['url']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can combine those 3 calls to one:

$site['url'] = str_replace(['{email}', '{uid}', '{displayname}'], [$email, $uid, $displayname], $site['url']);

@pierreozoux
Copy link
Member Author

@nickvergessen Thanks for the feedback, I corrected!

Signed-off-by: Joas Schilling <coding@schilljs.com>
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed some theory issues myself

@nickvergessen nickvergessen merged commit bd0ccde into master Nov 21, 2017
@nickvergessen nickvergessen deleted the template_in_links branch November 21, 2017 10:32
@pierreozoux
Copy link
Member Author

Thanks a lot! I'm really excited!

@pierreozoux
Copy link
Member Author

Could we make a release with that? Thanks!

@nickvergessen
Copy link
Member

https://apps.nextcloud.com/apps/external/releases?platform=13#13

Sorry I was on vacation...

But this will only be available in the upcoming 13 release

@pierreozoux
Copy link
Member Author

@nickvergessen no problems! thanks!

@dachinat
Copy link

dachinat commented Feb 1, 2018

Thanks for this feature. We have upgraded to 13.0.0 RC4, I have browsed apps/external/ directory and saw these changes, but I'm getting <iframe id="ifm" src="https://lvh.me:3000/user/login?l=en&amp;uid={uid}&amp;email={email}&amp;displayname={displayname}"></iframe> So, should this be working on 13.0.0 RC?

I have tried curl -H "OCS-APIRequest: true" https://user:pwd@localhost/ocs/v2.php/apps/external/api/v1 and it works. I thought we could have it for iframe as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template variable in the link
3 participants