Index: branches/concurrency/tests/phpunit/includes/api/ApiConcurrencyTest.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | 'record' => 1, |
86 | 86 | 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['one'], self::$users['one']->user ); |
87 | 87 | |
88 | | - $this->assertEquals( "success", $result['concurrency']['status'] ); |
| 88 | + $this->assertEquals( "success", $result['concurrency']['result'] ); |
89 | 89 | |
90 | 90 | $wgUser = self::$users['two']->user; |
91 | 91 | |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | 'record' => 1, |
96 | 96 | 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['two'], self::$users['two']->user ); |
97 | 97 | |
98 | | - $this->assertEquals( "failure", $result['concurrency']['status'] ); |
| 98 | + $this->assertEquals( "failure", $result['concurrency']['result'] ); |
99 | 99 | |
100 | 100 | list( $result, , $session ) = $this->doApiRequestWithToken( array( |
101 | 101 | 'action' => 'concurrency', |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | 'record' => 2, |
104 | 104 | 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['two'], self::$users['two']->user ); |
105 | 105 | |
106 | | - $this->assertEquals( "success", $result['concurrency']['status'] ); |
| 106 | + $this->assertEquals( "success", $result['concurrency']['result'] ); |
107 | 107 | |
108 | 108 | } |
109 | 109 | |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | 'record' => 1, |
124 | 124 | 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['one'], self::$users['one']->user ); |
125 | 125 | |
126 | | - $this->assertEquals( "success", $result['concurrency']['status'] ); |
| 126 | + $this->assertEquals( "success", $result['concurrency']['result'] ); |
127 | 127 | |
128 | 128 | list( $result, , $session ) = $this->doApiRequestWithToken( array( |
129 | 129 | 'action' => 'concurrency', |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | 'record' => 2, |
132 | 132 | 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['one'], self::$users['one']->user ); |
133 | 133 | |
134 | | - $this->assertEquals( "failure", $result['concurrency']['status'] ); |
| 134 | + $this->assertEquals( "failure", $result['concurrency']['result'] ); |
135 | 135 | |
136 | 136 | $wgUser = self::$users['two']->user; |
137 | 137 | |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | 'record' => 2, |
142 | 142 | 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['two'], self::$users['two']->user ); |
143 | 143 | |
144 | | - $this->assertEquals( "success", $result['concurrency']['status'] ); |
| 144 | + $this->assertEquals( "success", $result['concurrency']['result'] ); |
145 | 145 | |
146 | 146 | } |
147 | 147 | |
Index: branches/concurrency/includes/api/ApiConcurrency.php |
— | — | @@ -24,10 +24,10 @@ |
25 | 25 | case 'checkout': |
26 | 26 | case 'checkin': |
27 | 27 | if ( $concurrencyCheck->$params['ccaction']( $params['record'] ) ) { |
28 | | - $res['status'] = 'success'; |
| 28 | + $res['result'] = 'success'; |
29 | 29 | } |
30 | 30 | else { |
31 | | - $res['status'] = 'failure'; |
| 31 | + $res['result'] = 'failure'; |
32 | 32 | } |
33 | 33 | break; |
34 | 34 | |