|
23 | 23 | /** |
24 | 24 | * IXR is the class used for the XML-RPC server |
25 | 25 | */ |
26 | | -use const Collator\OFF; |
27 | | - |
28 | 26 | define("TL_APICALL", 'XML-RPC'); |
29 | 27 |
|
30 | 28 | require_once '../../../../config.inc.php'; |
|
50 | 48 | class TestlinkXMLRPCServer extends IXR_Server |
51 | 49 | { |
52 | 50 |
|
53 | | - public $methods; |
54 | | - |
55 | 51 | public static $version = "1.1"; |
56 | 52 |
|
57 | 53 | const OFF = false; |
@@ -577,8 +573,8 @@ protected function userHasRight($rightToCheck, |
577 | 573 | $tprojectid = intval( |
578 | 574 | isset($context[self::$testProjectIDParamName]) ? $context[self::$testProjectIDParamName] : 0); |
579 | 575 |
|
580 | | - if ($tprojectid == 0 && isset( |
581 | | - $this->args[self::$testProjectIDParamName])) { |
| 576 | + if ($tprojectid == 0 && |
| 577 | + isset($this->args[self::$testProjectIDParamName])) { |
582 | 578 | $tprojectid = $this->args[self::$testProjectIDParamName]; |
583 | 579 | } |
584 | 580 |
|
@@ -606,8 +602,8 @@ protected function userHasRight($rightToCheck, |
606 | 602 | // Try using TestSuiteID to get TestProjectID |
607 | 603 | $tsuiteid = intval( |
608 | 604 | isset($context[self::$testSuiteIDParamName]) ? $context[self::$testSuiteIDParamName] : 0); |
609 | | - if ($tsuiteid == 0 && isset( |
610 | | - $this->args[self::$testSuiteIDParamName])) { |
| 605 | + if ($tsuiteid == 0 && |
| 606 | + isset($this->args[self::$testSuiteIDParamName])) { |
611 | 607 | $tsuiteid = intval($this->args[self::$testSuiteIDParamName]); |
612 | 608 | } |
613 | 609 | if ($tsuiteid > 0) { |
@@ -1541,7 +1537,12 @@ protected function _isDevKeyValid($devKey) |
1541 | 1537 | $this->devKey = $this->dbObj->prepare_string($devKey); |
1542 | 1538 | $query = "SELECT id FROM {$this->tables['users']} WHERE script_key='{$this->devKey}'"; |
1543 | 1539 | $this->userID = $this->dbObj->fetchFirstRowSingleColumn($query, "id"); |
1544 | | - return null == $this->userID; |
| 1540 | + |
| 1541 | + if (null == $this->userID) { |
| 1542 | + return false; |
| 1543 | + } else { |
| 1544 | + return true; |
| 1545 | + } |
1545 | 1546 | } |
1546 | 1547 |
|
1547 | 1548 | /** |
@@ -4652,8 +4653,8 @@ public function getTestCaseAttachments($args) |
4652 | 4653 | return $this->errors; |
4653 | 4654 | } |
4654 | 4655 |
|
4655 | | - if ($status_ok && ! $this->_isParamPresent( |
4656 | | - self::$versionNumberParamName)) { |
| 4656 | + if ($status_ok && |
| 4657 | + ! $this->_isParamPresent(self::$versionNumberParamName)) { |
4657 | 4658 | try { |
4658 | 4659 | $tc = $this->getTestCase($args, self::THROW_ON_ERROR); |
4659 | 4660 | $this->args[self::$versionNumberParamName] = $tc[0][self::$versionNumberParamName]; |
@@ -7210,8 +7211,8 @@ public function setTestCaseExecutionType($args) |
7210 | 7211 | 'checkTestCaseVersionNumber' |
7211 | 7212 | ]; |
7212 | 7213 | $status_ok = $this->_runChecks($checkFunctions, $msg_prefix); |
7213 | | - if ($status_ok && |
7214 | | - ! $this->_isParamPresent(self::$executionTypeParamName)) { |
| 7214 | + if ($status_ok && ! $this->_isParamPresent( |
| 7215 | + self::$executionTypeParamName)) { |
7215 | 7216 | $status_ok = false; |
7216 | 7217 | $msg = sprintf(MISSING_REQUIRED_PARAMETER_STR, |
7217 | 7218 | self::$customFieldsParamName); |
@@ -8154,8 +8155,8 @@ public function getTestCaseBugs($args) |
8154 | 8155 | " WHERE parent_id = {$this->args[self::$testCaseIDParamName]})"; |
8155 | 8156 |
|
8156 | 8157 | if (! is_null($execContext['build_id'])) { |
8157 | | - $sql .= " AND build_id = " . intval( |
8158 | | - $execContext['build_id']); |
| 8158 | + $sql .= " AND build_id = " . |
| 8159 | + intval($execContext['build_id']); |
8159 | 8160 | } |
8160 | 8161 |
|
8161 | 8162 | if (! is_null($execContext['platform_id'])) { |
|
0 commit comments