Merge pull request #8018 from owncloud/ocs_result_success_is_100

OC_OCS_Result Class, Only accept 100 code as success
This commit is contained in:
Vincent Petry 2014-04-10 13:03:10 +02:00
commit 6cc578d1a7
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class OC_OCS_Result{
* @return bool
*/
public function succeeded() {
return (substr($this->statusCode, 0, 1) === '1');
return ($this->statusCode == 100);
}

View File

@ -37,7 +37,7 @@ class Test_API extends PHPUnit_Framework_TestCase {
function dataProviderTestOneResult() {
return array(
array(100, true),
array(101, true),
array(101, false),
array(997, false),
);
}