diff --git a/module/repo/config.php b/module/repo/config.php index 86e31f4308..a86e7d8727 100644 --- a/module/repo/config.php +++ b/module/repo/config.php @@ -34,9 +34,11 @@ $config->repo->editor->view = array('id' => 'commentText', 'tools' => 'simpleT $config->repo->editor->diff = array('id' => 'commentText', 'tools' => 'simpleTools'); $config->repo->create = new stdclass(); -$config->repo->create->requiredFields = 'SCM,name,path,encoding,client'; +$config->repo->create->requiredFields = 'product,SCM,name,path,encoding,client'; + $config->repo->edit = new stdclass(); -$config->repo->edit->requiredFields = 'SCM,name,path,encoding,client'; +$config->repo->edit->requiredFields = 'product,SCM,name,path,encoding,client'; + $config->repo->svn = new stdclass(); $config->repo->svn->requiredFields = 'account,password'; diff --git a/module/repo/model.php b/module/repo/model.php index d12b398bb3..1bdf850feb 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -233,8 +233,10 @@ class repoModel extends model { if(!$this->checkClient()) return false; if(!$this->checkConnection()) return false; + $data = fixer::input('post') ->skipSpecial('path,client,account,password') + ->setDefault('product', '') ->join('product', ',') ->get(); @@ -275,6 +277,7 @@ class repoModel extends model $data = fixer::input('post') ->setDefault('client', 'svn') ->setDefault('prefix', $repo->prefix) + ->setDefault('product', '') ->setIF($this->post->path != $repo->path, 'synced', 0) ->skipSpecial('path,client,account,password') ->join('product', ',')