@@ -15,7 +15,7 @@ public function addGroupUser($name, $userName)
15
15
]);
16
16
17
17
try {
18
- $ ret = $ this ->exec ($ this ->uri .'/user?groupname= ' . $ name , $ json , 'POST ' );
18
+ $ ret = $ this ->exec ($ this ->uri .'/user?groupname= ' . $ this -> filterName ( $ name). '' , $ json , 'POST ' );
19
19
} catch (\Jira \Api \Exception $ e ) {
20
20
$ code = $ e -> getCode ();
21
21
$ err = $ e -> getMessage ();
@@ -42,7 +42,7 @@ public function removeGroupUser($name, $userName)
42
42
43
43
try
44
44
{
45
- $ ret = $ this ->exec ($ this ->uri .'/user?username= ' .$ userName .'&groupname= ' . $ name , null , 'DELETE ' );
45
+ $ ret = $ this ->exec ($ this ->uri .'/user?username= ' .$ userName .'&groupname= ' . $ this -> filterName ( $ name). '' , null , 'DELETE ' );
46
46
}
47
47
catch (\Jira \Api \Exception $ e )
48
48
{
@@ -65,7 +65,7 @@ public function removeGroupUser($name, $userName)
65
65
*/
66
66
public function getGroup ($ name )
67
67
{
68
- $ ret = $ this ->exec ($ this ->uri .'?groupname= ' . $ name );
68
+ $ ret = $ this ->exec ($ this ->uri .'?groupname= ' . $ this -> filterName ( $ name, ' + ' ) . '' );
69
69
// $ret = $this->exec($this->uri.'/member?groupname=' . $name);
70
70
71
71
$ group = $ this ->json_mapper ->map (
@@ -88,14 +88,14 @@ public function getGroupMembers($name)
88
88
while ($ page * $ onPage < $ max )
89
89
{
90
90
$ json = json_encode ([
91
- 'groupname ' => $ name ,
91
+ 'groupname ' => $ this -> filterName ( $ name) ,
92
92
'maxResults ' => $ max ,
93
93
'startAt ' => $ onPage * $ page ,
94
94
]);
95
- $ ret = $ this ->exec ($ this ->uri ."?expand=users&maxResults= $ max&startAt= " .($ onPage *$ page ).'&groupname= ' . $ name );
95
+ $ ret = $ this ->exec ($ this ->uri ."?expand=users&maxResults= $ max&startAt= " .($ onPage *$ page ).'&groupname= ' . $ this -> filterName ( $ name, ' + ' ) );
96
96
// $ret = $this->exec($this->uri.'?groupname=' . $name);
97
97
$ ret = json_decode ($ ret );
98
- print_r ($ ret );
98
+ // print_r($ret);
99
99
$ max = $ ret ->users ->size ;
100
100
101
101
if ($ group === null ) {
@@ -120,7 +120,7 @@ public function getGroupMembers($name)
120
120
public function createGroup ($ name )
121
121
{
122
122
$ json = json_encode ([
123
- 'name ' => $ name ,
123
+ 'name ' => $ this -> filterName ( $ name) ,
124
124
]);
125
125
$ ret = $ this ->exec ($ this ->uri , $ json , 'POST ' );
126
126
// $ret = $this->exec($this->uri.'/member?groupname=' . $name);
0 commit comments