| @@ 144-152 (lines=9) @@ | ||
| 141 | } |
|
| 142 | ||
| 143 | // Commit or rollback |
|
| 144 | if ($error) { |
|
| 145 | $this->db->rollback(); |
|
| 146 | ||
| 147 | return -1 * $error; |
|
| 148 | } else { |
|
| 149 | $this->db->commit(); |
|
| 150 | ||
| 151 | return $this->id; |
|
| 152 | } |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| @@ 364-372 (lines=9) @@ | ||
| 361 | } |
|
| 362 | ||
| 363 | // Commit or rollback |
|
| 364 | if ($error) { |
|
| 365 | $this->db->rollback(); |
|
| 366 | ||
| 367 | return -1 * $error; |
|
| 368 | } else { |
|
| 369 | $this->db->commit(); |
|
| 370 | ||
| 371 | return 1; |
|
| 372 | } |
|
| 373 | } |
|
| 374 | ||
| 375 | /** |
|
| @@ 410-418 (lines=9) @@ | ||
| 407 | } |
|
| 408 | ||
| 409 | // Commit or rollback |
|
| 410 | if ($error) { |
|
| 411 | $this->db->rollback(); |
|
| 412 | ||
| 413 | return -1 * $error; |
|
| 414 | } else { |
|
| 415 | $this->db->commit(); |
|
| 416 | ||
| 417 | return 1; |
|
| 418 | } |
|
| 419 | } |
|
| 420 | ||
| 421 | /** |
|
| @@ 452-460 (lines=9) @@ | ||
| 449 | } |
|
| 450 | ||
| 451 | // End |
|
| 452 | if (!$error) { |
|
| 453 | $this->db->commit(); |
|
| 454 | ||
| 455 | return $object->id; |
|
| 456 | } else { |
|
| 457 | $this->db->rollback(); |
|
| 458 | ||
| 459 | return -1; |
|
| 460 | } |
|
| 461 | } |
|
| 462 | ||
| 463 | /** |
|