To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 8b42c35d authored by Reto Da Forno's avatar Reto Da Forno

bugfix in store_image

parent 3d7afa82
......@@ -418,6 +418,9 @@ function check_image_duplicate($image) {
function store_image($image) {
$id = null;
$hash = hash('sha1', $image['data']);
if (!array_key_exists('os', $image) || $image['os'] == "") {
$image['os'] = 1; # 1 = 'other'
}
$db = db_connect();
$sql = 'INSERT INTO `tbl_serv_targetimages` (`name`,`description`,`owner_fk`,`operatingsystems_fk`,`platforms_fk`,`core`,`binary`,`binary_hash_sha1`)
VALUES (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment