+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019 |
+ | Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* This class handles all REST client requests.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC (c) 2004-2020
*/
class CRM_Utils_REST {
/**
* Number of seconds we should let a REST process idle
+ * @var int
*/
- static $rest_timeout = 0;
+ public static $rest_timeout = 0;
/**
* Cache the actual UF Class
+ * @var string
*/
public $ufClass;
CRM_Utils_System::setHttpHeader("Status", "404 Not Found");
die("Can't find the requested template file templates/$tpl");
}
- if (array_key_exists('id', $_GET)) {// special treatmenent, because it's often used
- $smarty->assign('id', (int) $_GET['id']);// an id is always positive
+ // special treatmenent, because it's often used
+ if (array_key_exists('id', $_GET)) {
+ // an id is always positive
+ $smarty->assign('id', (int) $_GET['id']);
}
$pos = strpos(implode(array_keys($_GET)), '<');
$params['check_permissions'] = TRUE;
$params['version'] = 3;
- $_GET['json'] = $requestParams['json'] = 1; // $requestParams is local-only; this line seems pointless unless there's a side-effect influencing other functions
+ // $requestParams is local-only; this line seems pointless unless there's a side-effect influencing other functions
+ $_GET['json'] = $requestParams['json'] = 1;
if (!$params['sequential']) {
$params['sequential'] = 1;
}
if (!empty($q)) {
if (count($args) == 2 && $args[1] == 'ping') {
CRM_Utils_System::loadBootStrap([], FALSE, FALSE);
- return NULL; // this is pretty wonky but maybe there's some reason I can't see
+ // this is pretty wonky but maybe there's some reason I can't see
+ return NULL;
}
if (count($args) != 3) {
return self::error('ERROR: Malformed REST path');