Skip to content

Commit

Permalink
Testing a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Whitacre committed Mar 13, 2014
1 parent 610f610 commit fa0a223
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class JSONImportStateMarks implements JSONImportStateInterface
* @var boolean
*/
const RETURN_DETAILS_ERRORS_ONLY = true;

/*
* Result keys
*/
Expand All @@ -37,13 +37,13 @@ class JSONImportStateMarks implements JSONImportStateInterface
* @var string
*/
const RESULT_ADDED = 'added';

/**
* Number of marks already existing in the system
* @var string
*/
const RESULT_SKIPPED = 'skipped';

/**
* Number of marks not imported due to errors
* @var string
Expand All @@ -59,7 +59,7 @@ class JSONImportStateMarks implements JSONImportStateInterface

/**
* Cache for 'unlabeled' label id used to mark entries with unknown label
*
*
* @var int
*/
private $unlabeled_label_id = null;
Expand Down Expand Up @@ -91,7 +91,7 @@ public function processLine($line)
// Strip trailing comma and simulate JSON
$jsonLine = mb_ereg_replace("\\,[ ]*$", '', $line);
$decodedMark = json_decode($jsonLine);
$importResult = $this->CI->mark_import->importMark($decodedMark);
$importResult = $this->CI->Mark_Import->importMark($decodedMark);
$this->importData['result']['total'] ++;
$this->importData['result'][$importResult['result']] ++;
if (self::RETURN_DETAILS && (! self::RETURN_DETAILS_ERRORS_ONLY || $importResult['result'] === self::RESULT_FAILED || ! empty($importResult['warnings']))) {
Expand All @@ -101,4 +101,4 @@ public function processLine($line)
}
}

}
}

0 comments on commit fa0a223

Please sign in to comment.