Avoid uninitialized warnings with comments+no CGI.
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Sun, 28 Dec 2014 18:15:45 +0000 (13:15 -0500)
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Sun, 28 Dec 2014 18:15:45 +0000 (13:15 -0500)
IkiWiki/Plugin/comments.pm

index ca497c75a9297fb910299fe87bb554f6def02bce..1a50d1865071a7a92dc7882b614d7deb150fe03b 100644 (file)
@@ -206,10 +206,12 @@ sub preprocess {
                        $commentopenid = $commentuser;
                }
                else {
-                       $commentauthorurl = IkiWiki::cgiurl(
-                               do => 'goto',
-                               page => IkiWiki::userpage($commentuser)
-                       );
+                       if (length $config{cgiurl}) {
+                               $commentauthorurl = IkiWiki::cgiurl(
+                                       do => 'goto',
+                                       page => IkiWiki::userpage($commentuser)
+                               );
+                       }
 
                        $commentauthor = $commentuser;
                }