Hello everybody,
Is there a way to get a cookie value with a function of the velocity
syntax? I created a cookie with the javascript "createCookie()" function
(in the file skins.js) and I would like to get it value in a velocity
script in order to insert it in a sql query. Because I need to get the
cookie value before the velocity parsing.
For example in my wiki page :
#set($sql = " where doc.fullName =
'$a_function_which_read_a_cookie_value(name_of_the_cookie)' ")
Regards, Mathieu
---------------------------------------------------
Mathieu Emptoz
CEA Cadarache
DRFC/STEP
XWiki's EFDA Remote Participation Administrator
---------------------------------------------------
Hi all,
I'm currently working on allowing xwiki to manage documents (and
their urls) in utf-8 or other non latin1 encodings.
I saw that the method:
public static String getURLEncoded(String content)
{
try {
return URLEncoder.encode(content, "UTF-8");
} catch (UnsupportedEncodingException e) {
return content;
}
}
in XWiki class is hardcoded in UTF-8, which is strange as the default
encoding of xwiki is iso-latin-1.
The method is used in the core source:
1. To prepare "Content-disposition" headers for the responses (for
package export and file download)
--> it encodes the filename for file downloads.
2. To generate ids of TOC in TOCGenerator
It is also used through velocity macros (mainly editrights, to allow
passing of a full URL, with GET attributes as a simple attribute
value usually for xredirect).
Hence it is a problem as soon as a document can have an url involving
non ascii characters.
Currently, everything works because the encoded URL do not include
non ascii chars as it is used in few places, but this method will
pose problem even in a default wiki (i.e. latin1) settings. Moreover,
this method is static and it is not possible to fetch the current
xwiki encoding.
So I propose to:
1. make this method non static and use the xwiki configuration to
specify the encoding to be used...
2. propose a way to encode filenames of content disposition which is
compatible with RFC 2231 which allows the specification of filenames,
even if they do contains non ascii chars (names in japanese of thai
for instance...)
Does anyone object against this proposal ?
Regards, Gilles,
--
Gilles Sérasset
GETA-CLIPS-IMAG (UJF, INPG & CNRS)
BP 53 - F-38041 Grenoble Cedex 9
Phone: +33 4 76 51 43 80
Fax: +33 4 76 44 66 75
Hi there,
Sometime we forget to add a jira issue # to an issue or we make a
mistake. Here's below a solution for editing an already committed
message.
Thanks
-Vincent
Begin forwarded message:
> From: Brett Porter <brett(a)apache.org>
> Date: February 20, 2007 12:19:20 PM CEST
> To: continuum-dev(a)maven.apache.org
> Subject: Re: svn commit: r509415 [1/3] - in /maven/continuum/
> trunk: continuum-security/src/main/java/org/apache/maven/continuum/
> security/p rofile/ continuum-webapp/src/main/java/org/apache/maven/
> continuum/web/action/ continuum-webapp/src/main/java/org/apache/m
> Reply-To: continuum-dev(a)maven.apache.org
>
> Can you do....
>
> svn propedit svn:log -r509415 --revprop
>
> And add that to the front?
>
> - Brett
>
> On 20/02/2007, at 8:38 PM, oching(a)exodus.exist.com wrote:
>
>> Hi Wendy,
>>
>> This is for CONTINUUM-1147
>>
>> Thanks,
>> Deng
>>
>>> On 2/19/07, oching(a)apache.org <oching(a)apache.org> wrote:
>>>> Author: oching
>>>> Date: Mon Feb 19 18:41:37 2007
>>>> New Revision: 509415
>>>>
>>>> URL: http://svn.apache.org/viewvc?view=rev&rev=509415
>>>> Log:
>>>> Added isAuthorized* methods in ContinuumActionSupport for checking
>>>> authorization in action classes with different permissions.
>>>> Implemented
>>>> SecureAction in some of the action classes that has a specific
>>>> permission. Also added 'modify-project-notifier' operation in
>>>> ProjectDeveloperDynamicRoleProfile.
>>>
>>> Is there a JIRA issue for this?
>>>
>>> --
>>> Wendy
>>>
___________________________________________________________________________
Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire.
http://fr.mail.yahoo.com
Is there somebody who can help me with adding a button to start the
charting wizard in the WYSIWYG editor. I've never used TinyMCE before
so I don't even know where to start. Do I need to create a plugin just
to add a button ?
http://jira.xwiki.org/jira/browse/XWIKI-872
Regards,
Catalin
---------- Forwarded message ----------
From: Catalin Hritcu <catalin.hritcu(a)gmail.com>
Date: Feb 16, 2007 8:28 PM
Subject: XWIKI-872: Adding a button to start the charting wizard in
the WYSIWYG editor
To: Phung Nam <phunghainam(a)xwiki.com>
Hi Nam,
Could you help me with this task:
http://jira.xwiki.org/jira/browse/XWIKI-872
I've never mangled with TinyMCE before so I don't even know where to start.
Thanks,
Catalin
Hi,
I'd like to propose to vote Catalin as a new XWiki committer. Catalin
has been participating for a long time now (helped on the P2P wiki,
on the charting plugin, etc). He's interested in helping us more
(even though he says he doesn't have lots of time which we all
understand. Nevertheless he really believes in XWiki and wants to
participate on the long run).
Let him apply his own patches!
Here's my +1
Thanks
-Vincent
Hi,
I'd like to clean a bit the XWikiHibernateVersioningStore class but
I'd like to confirm my changes as I don't want to break anything.
There are several methods like this one:
public void updateXWikiDocArchive(XWikiDocument doc, String
text, boolean bTransaction, XWikiContext context) throws
XWikiException {
try {
if (bTransaction) {
checkHibernate(context);
bTransaction = beginTransaction(false, context);
}
Session session = getSession(context);
XWikiDocumentArchive archivedoc = getXWikiDocumentArchive
(doc, context);
archivedoc.updateArchive(doc.getFullName(), text);
saveXWikiDocArchive(archivedoc, bTransaction, context);
if (bTransaction) {
endTransaction(context, true, false);
}
} catch (Exception e) {
Object[] args = { doc.getFullName() };
throw new XWikiException
( XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_SAVING_OBJECT,
"Exception while updating archive {0}", e, args);
} finally {
try {
if (bTransaction)
endTransaction(context, false, false);
} catch (Exception e) {}
}
}
1) Why is checkHibernate done only when the operation is done in a
transaction?
2) Why is getSession called as the session object is not used?
3) I think the endTransaction is called twice...
4) Shouldn't we log something if the endTransaction fails?
Thus I'd like to:
a) move the checkHibernate outside of the if(bTransaction)
b) remove getSession call
c) remove the first endTransaction and leave the one in the finally
clause
d) add a warn log if the end transaction fail
ok with everyone?
Thanks
-Vincent
___________________________________________________________________________
Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire.
http://fr.mail.yahoo.com
Hi,
Right now our policy is to set the "fix for" field for all issues.
I'd like to propose to exclude issues that are not resolved (ie
"won't fix", etc) so that they don't appear in the JIRA release
notes. JIRA is missing the ability to exclude them from the release
notes so this would be a good way of doing that.
Thanks
-Vincent
___________________________________________________________________________
Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire.
http://fr.mail.yahoo.com
Hi,
Just a heads up to let you know that I have committed a Logging
Aspect in our source tree (in core/src/aspect). For more information
see http://jira.xwiki.org/jira/browse/XWIKI-897 and http://
www.xwiki.org/xwiki/bin/view/Community/
Debugging#HGeneratingadebugversionofXWiki
This LogAspect automatically intercepts all method calls and logs
them with their parameters.
For related information on this see http://blogs.codehaus.org/people/
vmassol/archives/000877_logifier.html
I personally find this very cool. I hope you do too ;-)
Thanks
-Vincent
___________________________________________________________________________
Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire.
http://fr.mail.yahoo.com
Hi Sergiu,
I think we need:
1) to decide if we want this in the public API (personally I'm not
sure and I'm actually more against it right now, reason being that
Util doesn't have a strong API).
2) we definitely need a JIRA issue for this (it's not referenced
below so I guess there's no JIRA issue for it).
Thanks
-Vincent
On Feb 19, 2007, at 2:52 PM, Sergiu Dumitriu wrote:
> Author: sdumitriu
> Date: 2007-02-19 14:52:55 +0100 (Mon, 19 Feb 2007)
> New Revision: 2197
>
> Modified:
> xwiki/trunk/core/src/main/java/com/xpn/xwiki/api/Context.java
> Log:
> Add getUtil to the Context API
> (is there a reason why this wasn't in there?)
>
>
> Modified: xwiki/trunk/core/src/main/java/com/xpn/xwiki/api/
> Context.java
> ===================================================================
> --- xwiki/trunk/core/src/main/java/com/xpn/xwiki/api/Context.java
> 2007-02-19 13:47:19 UTC (rev 2196)
> +++ xwiki/trunk/core/src/main/java/com/xpn/xwiki/api/Context.java
> 2007-02-19 13:52:55 UTC (rev 2197)
> @@ -23,6 +23,7 @@
>
> import com.xpn.xwiki.XWikiContext;
> import com.xpn.xwiki.doc.XWikiDocument;
> +import com.xpn.xwiki.util.Util;
> import com.xpn.xwiki.validation.XWikiValidationStatus;
> import com.xpn.xwiki.web.XWikiRequest;
> import com.xpn.xwiki.web.XWikiResponse;
> @@ -274,4 +275,8 @@
> {
> return getXWikiContext().getDisplayedFields();
> }
> + public Util getUtil()
> + {
> + return context.getUtil();
> + }
> }
>
>
>
> --
> You receive this message as a subscriber of the xwiki-
> commits(a)objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-commits-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/
> wws
___________________________________________________________________________
Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire.
http://fr.mail.yahoo.com