Skip to content

Commit

Permalink
return legacy stuff for BC
Browse files Browse the repository at this point in the history
  • Loading branch information
craigh committed Mar 30, 2017
1 parent b0a90f6 commit 3f23c4b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/Zikula/Core/Response/Ajax/AbstractBaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ abstract class AbstractBaseResponse extends PlainResponse
*/
protected $csrfToken;

/**
* @deprecated remove at Core-2.0
* Authid Token.
*
* @var string
*/
protected $authid;

/**
* Flag to create a new nonce.
*
Expand Down Expand Up @@ -118,6 +126,7 @@ protected function generateCoreData()
}

if ($this->csrfToken) {
$core['authid'] = $this->authid; // @deprecated remove at Core-2.0
$core['token'] = $this->csrfToken;
}
$core['statusmsg'] = $this->messages;
Expand Down
8 changes: 8 additions & 0 deletions src/lib/Zikula/Core/Response/Ajax/AjaxResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ public function __construct($payload, $message = null, array $options = [])
$this->payload = $payload;
$this->messages = (array)$message;
$this->options = $options;

/**
* @deprecated remove at Core-2.0
*/
if (\System::isLegacyMode()) {
$this->authid = \SecurityUtil::generateAuthKey(\ModUtil::getName());
}

parent::__construct('', $this->statusCode);
}
}

0 comments on commit 3f23c4b

Please sign in to comment.