Fixing Gitlab support

This commit is contained in:
Dan Cryer 2014-02-25 09:47:09 +00:00
parent 08af82e84b
commit a1f47ddfe1
2 changed files with 7 additions and 4 deletions

View file

@ -175,7 +175,8 @@ class WebhookController extends \PHPCI\Controller
*/ */
public function gitlab($project) public function gitlab($project)
{ {
$payload = json_decode($this->getParam('payload'), true); $payloadString = file_get_contents("php://input");
$payload = json_decode($payloadString, true);
try { try {

View file

@ -221,10 +221,12 @@ class ProjectBase extends Model
*/ */
public function getAccessInformation($key = null) public function getAccessInformation($key = null)
{ {
$data = unserialize($this->data['access_information']);
if (is_null($key)) { if (is_null($key)) {
$rtn = $this->data['access_information']; $rtn = $data;
} else if (isset($this->data['access_information'][$key])) { } else if (isset($data[$key])) {
$rtn = $this->data['access_information'][$key]; $rtn = $data[$key];
} else { } else {
$rtn = null; $rtn = null;
} }