diff --git a/VERSION b/VERSION index 834f2629538327723c074ed4c3addca9888f0256..dbe590065479b394ecabbd44460125ae5fe544bf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.8.0 +2.8.1 diff --git a/lib/PZ/Controller/Shortcut.pm b/lib/PZ/Controller/Shortcut.pm index d992049796b133f3a15aa901eb9cb1fd1434d247..316fcec5677a0cd5d690f473e6274707e9e947a0 100644 --- a/lib/PZ/Controller/Shortcut.pm +++ b/lib/PZ/Controller/Shortcut.pm @@ -54,12 +54,15 @@ sub create ($c) { return $c->error(400, "Zkratka $custom už je použitá") if $exists; } - my $title = ''; - my $ua = Mojo::UserAgent->new; + my $title = $args->{title}; - eval { - $title = $ua->get($url)->result->dom->at('title')->text; - }; + if ( ! $title ) { + my $ua = Mojo::UserAgent->new; + + eval { + $title = $ua->get($url)->result->dom->at('title')->text; + }; + } my $user = $c->stash->{user} // $c->current_user;