Added sprintf to the forming shields.io request
This commit is contained in:
parent
02ca67a89e
commit
ea09c0f82b
|
@ -87,12 +87,12 @@ class BuildStatusController extends \PHPCI\Controller
|
|||
}
|
||||
|
||||
$color = ($status == 'passing') ? 'green' : 'red';
|
||||
$image = file_get_contents(
|
||||
'http://img.shields.io/badge/' .
|
||||
$label . '-' .
|
||||
$status . '-' .
|
||||
$color . '.svg?style=' . $style
|
||||
);
|
||||
$image = file_get_contents(sprintf('http://img.shields.io/badge/%s-%s-%s.svg?style=%s',
|
||||
$label,
|
||||
$status,
|
||||
$color,
|
||||
$style
|
||||
));
|
||||
|
||||
$this->response->disableLayout();
|
||||
$this->response->setHeader('Content-Type', 'image/svg+xml');
|
||||
|
|
Loading…
Reference in a new issue