Author: ludovic
Date: 2008-01-15 02:34:52 +0100 (Tue, 15 Jan 2008)
New Revision: 6834

Modified:
   
xwiki-products/curriki/trunk/plugins/currikispacemanager/src/main/java/org/curriki/plugin/spacemanager/impl/CurrikiSpace.java
Log:
CURRIKI-1193 Create Group Validation Controls

Modified: 
xwiki-products/curriki/trunk/plugins/currikispacemanager/src/main/java/org/curriki/plugin/spacemanager/impl/CurrikiSpace.java
===================================================================
--- 
xwiki-products/curriki/trunk/plugins/currikispacemanager/src/main/java/org/curriki/plugin/spacemanager/impl/CurrikiSpace.java
       2008-01-15 01:28:38 UTC (rev 6833)
+++ 
xwiki-products/curriki/trunk/plugins/currikispacemanager/src/main/java/org/curriki/plugin/spacemanager/impl/CurrikiSpace.java
       2008-01-15 01:34:52 UTC (rev 6834)
@@ -75,7 +75,7 @@
             //same title
             List list = 
context.getWiki().getStore().searchDocumentsNames(",BaseObject as obj, 
StringProperty as tprop where doc.fullName=obj.name and obj.className='"
                                     + manager.getSpaceClassName() + "' and 
obj.id=tprop.id.id and tprop.id.name='"
-                                    + SPACE_DISPLAYTITLE + "' and 
tprop.value='" + this.getDisplayTitle() + "'", context);
+                                    + SPACE_DISPLAYTITLE + "' and 
tprop.value='" + this.getDisplayTitle() + "' and doc.fullName<>'" + 
getSpaceName() + ".WebPreferences'", context);
             if(list!=null && list.size()>0)
                         errors.put( this.VALIDATION_TITLE_EXISTS, "1" );
 
@@ -90,7 +90,7 @@
             if (url.length()>0) {
                 list = 
context.getWiki().getStore().searchDocumentsNames(",BaseObject as obj, 
StringProperty as urlprop where doc.fullName=obj.name and obj.className='"
                         + manager.getSpaceClassName() + "' and 
obj.id=urlprop.id.id and urlprop.id.name='"
-                        + SPACE_URLSHORTCUT + "' and urlprop.value='" + 
this.getHomeShortcutURL() + "'", context);
+                        + SPACE_URLSHORTCUT + "' and urlprop.value='" + 
this.getHomeShortcutURL() + "' and doc.fullName<>'" + getSpaceName() + 
".WebPreferences'", context);
                 if(list!=null && list.size()>0)
                     errors.put( this.VALIDATION_URL_EXISTS, "1" );
             }

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to