Fix blog creation webservice
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 7 Jun 2010 14:22:20 +0000 (16:22 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 7 Jun 2010 14:22:20 +0000 (16:22 +0200)
The call to widgetBlogOwner modified the settings of X.org blog
instead of the new one...

Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
page.webservice.php

index 8ae6e58..6def8c7 100644 (file)
@@ -68,11 +68,11 @@ class XorgWebservice extends dcUrlHandlers {
     $core->addBlog($cur);
 
     $settings = new dcSettings($core, $owner);
-    xorgBlogOwnerWidget::setXorgOwner($settings, $type, $owner);
-
-    $settings = new dcSettings($core, $owner);
     $settings->system->put('public_path', 'public/' . $owner);
     $settings->system->put('public_url', '/public/' . $owner);
+    $xorgauth = $settings->addNamespace('xorgauth');
+    $xorgauth->put('xorg_blog_type', $type, 'string', 'Type de blog X.org');
+    $xorgauth->put('xorg_blog_owner', $owner, 'string', 'Propriétaire X.org du blog');
 
     return array('status' => true,
                  'message' => 'blog created');