List Info

Thread: 2.4.5 bug: ShortURLConstructor and preview failing




2.4.5 bug: ShortURLConstructor and preview failing
user name
2006-05-08 12:45:27
Hi!

ShortURLConstructor.makeURL() seems to miss the PREVIEW
context. See 
below for a patch.

BTW is there any ViewCVS or similar thing for the JSPWiki
CVS?

--- src/com/ecyrd/jspwiki/url/ShortURLConstructor.java
+++ src/com/ecyrd/jspwiki/url/ShortURLConstructor.java
 -88,6
+88,11 
              if( name == null ) return
doReplacement("%u","",absolute);
              return doReplacement( viewurl, name, absolute
);
          }
+        else if( context.equals(WikiContext.PREVIEW) )
+        {
+            if( name == null ) return
doReplacement("%u","",absolute);
+            return doReplacement(
viewurl+"?do=Preview", name, absolute);
+        }
          else if( context.equals(WikiContext.EDIT) )
          {
              return doReplacement(
viewurl+"?do=Edit", name, absolute );

Regards
_______________________________________________
Jspwiki-users mailing list
Jspwiki-usersecyrd.com
http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
2.4.5 bug: ShortURLConstructor and preview failing
user name
2006-05-08 14:31:19
Thanks, I'll add this.

For your latter question: yes, though it's not widely
advertised:

http://
ecyrd.com/cgi-bin/viewcvs.cgi/JSPWiki/

/Janne

On May 8, 2006, at 15:45 , Malte Kiesel wrote:

> Hi!
>
> ShortURLConstructor.makeURL() seems to miss the PREVIEW
context.  
> See below for a patch.
>
> BTW is there any ViewCVS or similar thing for the
JSPWiki CVS?
>
> --- src/com/ecyrd/jspwiki/url/ShortURLConstructor.java
> +++ src/com/ecyrd/jspwiki/url/ShortURLConstructor.java
>  -88,6 +88,11 
>              if( name == null ) return
doReplacement("% 
> u","",absolute);
>              return doReplacement( viewurl, name,
absolute );
>          }
> +        else if( context.equals(WikiContext.PREVIEW) )
> +        {
> +            if( name == null ) return
doReplacement("% 
> u","",absolute);
> +            return doReplacement(
viewurl+"?do=Preview", name,  
> absolute);
> +        }
>          else if( context.equals(WikiContext.EDIT) )
>          {
>              return doReplacement(
viewurl+"?do=Edit", name,  
> absolute );
>
> Regards
> _______________________________________________
> Jspwiki-users mailing list
> Jspwiki-usersecyrd.com
> http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users

_______________________________________________
Jspwiki-users mailing list
Jspwiki-usersecyrd.com
http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )