On 05/17/2010 08:17 AM, Vincent Massol wrote:
I think I remember Ludovic was using that status
action some time ago.
Some time ago = a long time ago. I spent half an hour making it work,
and right now it can't work because:
- it does not use a velocity context, thus it fails whenever trying to
use velocity code in the template; since it bypasses XWikiAction, the
switch from the old velocity interpreter to the new component wasn't
reflected in StatusAction
- it does not check authentication, thus the code is always executed as
Guest
- the status.vm template expects $xwiki as a protected c.x.x.XWiki
object, so I believe that it was written before the public API was
introduced (so I doubt that it has been used after 2005)
Ludovic, can you confirm it's ok to remove it?
Thanks
-Vincent
On May 17, 2010, at 3:29 AM, sdumitriu (SVN) wrote:
> Author: sdumitriu
> Date: 2010-05-17 03:29:40 +0200 (Mon, 17 May 2010)
> New Revision: 28906
>
> Removed:
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/StatusAction.java
> Log:
> XWIKI-5200: Remove non-working /status/ action
> Removed Java code.
>
> Deleted:
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/StatusAction.java
> ===================================================================
> ---
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/StatusAction.java 2010-05-17
01:29:34 UTC (rev 28905)
> +++
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/StatusAction.java 2010-05-17
01:29:40 UTC (rev 28906)
> @@ -1,45 +0,0 @@
> -/*
> - * See the NOTICE file distributed with this work for additional
> - * information regarding copyright ownership.
> - *
> - * This is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU Lesser General Public License as
> - * published by the Free Software Foundation; either version 2.1 of
> - * the License, or (at your option) any later version.
> - *
> - * This software is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - * Lesser General Public License for more details.
> - *
> - * You should have received a copy of the GNU Lesser General Public
> - * License along with this software; if not, write to the Free
> - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> - * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
> - *
> - */
> -package com.xpn.xwiki.web;
> -
> -import com.xpn.xwiki.XWiki;
> -import com.xpn.xwiki.XWikiContext;
> -import org.apache.struts.action.ActionForward;
> -
> -public class StatusAction extends XWikiAction
> -{
> - /**
> - * We override {@link XWikiAction#execute(XWikiContext) since we don't want
any database calls
> - * at all to happen during the execution of this action since we're
displaying statuses about
> - * the database.
> - */
> - public ActionForward execute(XWikiContext context) throws Exception
> - {
> - // We only get the main wiki since the database statuses are available from
it and getting
> - // the other wiki will call the database.
> - XWiki.getMainXWiki(context);
> -
> - String page = Utils.getPage(context.getRequest(), "status");
> - Utils.parseTemplate(page, !page.equals("direct"), context);
> -
> - return null;
> - }
> -}
--
Sergiu Dumitriu
http://purl.org/net/sergiu/