Index: trunk/extensions/OpenStackManager/OpenStackNovaPuppetGroup.php |
— | — | @@ -110,11 +110,9 @@ |
111 | 111 | $condition = ''; |
112 | 112 | if ( $projects ) { |
113 | 113 | $condition .= 'group_project ='; |
114 | | - foreach ( $projects as $project ) { |
115 | | - $condition .= $project . ','; |
116 | | - } |
117 | | - $condition = $dbr->addQuotes( $condition ); |
118 | | - $condition = $condition[0,-1]; |
| 114 | + $projects = implode( ',', $projects ); |
| 115 | + $projects = $dbr->addQuotes( $projects ); |
| 116 | + $condition .= $projects; |
119 | 117 | } |
120 | 118 | $rows = $dbr->select( |
121 | 119 | 'openstack_puppet_groups', |