  |
59 | 59 | | $Qupdate->bindValue(':configuration_key', 'DEFAULT_CURRENCY'); |
| |
60 | 60 | | $Qupdate->setLogging($_SESSION['module'], $id); |
| |
61 | 61 | | $Qupdate->execute(); |
  |
| 62 | + | } |
|
62 | 63 | | |
  |
63 | | - | if ( $Qupdate->affectedRows() ) { |
| |
| 64 | + | if ( !$osC_Database->isError() ) { |
| |
| 65 | + | $osC_Database->commitTransaction(); |
| |
| 66 | + | |
| |
| 67 | + | osC_Cache::clear('currencies'); |
| |
| 68 | + | |
| |
| 69 | + | if ( ( $set_default === true ) && $Qupdate->affectedRows() ) { |
|
64 | 70 | | osC_Cache::clear('configuration'); |
| |
65 | 71 | | } |
  |
66 | | - | } |
|
67 | 72 | | |
  |
68 | | - | osC_Cache::clear('currencies'); |
| |
69 | | - | |
| |
70 | | - | return true; |
| |
| 73 | + | return true; |
| |
| 74 | + | } |
|
71 | 75 | | } |
| |
72 | 76 | | |
  |
| 77 | + | $osC_Database->rollbackTransaction(); |
| |
| 78 | + | |
  |
73 | 79 | | return false; |
| |
74 | 80 | | } |
| |
75 | 81 | | |