Skip to content

Commit 954b3f7

Browse files
committed
->input-> => ->getInput()
1 parent 015ce84 commit 954b3f7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

gitdeploy.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class plgSystemGitDeploy extends CMSPlugin
4848
*/
4949
public function onAfterRoute()
5050
{
51-
if ($this->getApplication()->input->getCmd('github', false))
51+
if ($this->getApplication()->getInput()->getCmd('github', false))
5252
{
5353
set_error_handler(
5454
function($severity, $message, $file, $line)
@@ -93,7 +93,7 @@ function($e)
9393
*/
9494
protected function checkSecret($hookSecret)
9595
{
96-
if (!$this->getApplication()->input->server->get('HTTP_X_HUB_SIGNATURE_256', false))
96+
if (!$this->getApplication()->getInput()->server->get('HTTP_X_HUB_SIGNATURE_256', false))
9797
{
9898
throw new \Exception("HTTP header 'X-Hub-Signature' is missing.");
9999
}
@@ -103,7 +103,7 @@ protected function checkSecret($hookSecret)
103103
throw new \Exception("Missing 'hash' extension to check the secret code validity.");
104104
}
105105

106-
list($algo, $hash) = explode('=', $this->getApplication()->input->server->getString('HTTP_X_HUB_SIGNATURE_256'), 2) + array('', '');
106+
list($algo, $hash) = explode('=', $this->getApplication()->getInput()->server->getString('HTTP_X_HUB_SIGNATURE_256'), 2) + array('', '');
107107

108108
if (!in_array($algo, hash_algos(), TRUE))
109109
{
@@ -128,11 +128,11 @@ protected function checkSecret($hookSecret)
128128
*/
129129
protected function checkContentType()
130130
{
131-
if (!$this->getApplication()->input->server->getString('CONTENT_TYPE', false))
131+
if (!$this->getApplication()->getInput()->server->getString('CONTENT_TYPE', false))
132132
{
133133
throw new \Exception("Missing HTTP 'Content-Type' header.");
134134
}
135-
elseif (!$this->getApplication()->input->server->getString('HTTP_X_GITHUB_EVENT', false))
135+
elseif (!$this->getApplication()->getInput()->server->getString('HTTP_X_GITHUB_EVENT', false))
136136
{
137137
throw new \Exception("Missing HTTP 'X-Github-Event' header.");
138138
}
@@ -148,18 +148,18 @@ protected function checkContentType()
148148
*/
149149
protected function setPayload()
150150
{
151-
switch ($this->getApplication()->input->server->getString('CONTENT_TYPE'))
151+
switch ($this->getApplication()->getInput()->server->getString('CONTENT_TYPE'))
152152
{
153153
case 'application/json':
154154
$json = $this->rawPost ?: file_get_contents('php://input');
155155
break;
156156

157157
case 'application/x-www-form-urlencoded':
158-
$json = $this->getApplication()->input->post->get('payload');
158+
$json = $this->getApplication()->getInput()->post->get('payload');
159159
break;
160160

161161
default:
162-
throw new \Exception('Unsupported content type: ' . $this->getApplication()->input->server->getString('HTTP_CONTENT_TYPE'));
162+
throw new \Exception('Unsupported content type: ' . $this->getApplication()->getInput()->server->getString('HTTP_CONTENT_TYPE'));
163163
}
164164

165165
$this->payload = json_decode($json);
@@ -175,7 +175,7 @@ protected function setPayload()
175175
*/
176176
protected function handleGitHubEvent()
177177
{
178-
$githubEvent = $this->getApplication()->input->server->get('HTTP_X_GITHUB_EVENT');
178+
$githubEvent = $this->getApplication()->getInput()->server->get('HTTP_X_GITHUB_EVENT');
179179

180180
switch (strtolower($githubEvent))
181181
{
@@ -262,7 +262,7 @@ protected function runGitPull($payload)
262262
$commitsHtml .= '</ul>';
263263

264264
// Do we have a targetSite parameter
265-
$targetSite = $this->getApplication()->input->getCmd('targetSite', false);
265+
$targetSite = $this->getApplication()->getInput()->getCmd('targetSite', false);
266266

267267
$messageData['pusherName'] = $payload->pusher->name;
268268
$messageData['repoUrl'] = $payload->repository->url;

0 commit comments

Comments
 (0)