From: vincent@cubedesigners.com Date: Thu, 20 Jun 2013 14:26:35 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e6ccfc941607a984ad085813070968230ab00c80;p=cubeextranet.git --- diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index 7660b5005..b2ea17c6b 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -225,15 +225,14 @@ class wsAjax extends cubeAjax { if (isset($_FILES['apns_prod']) && $_FILES['apns_prod']['error']) { move_uploaded_file($_FILES['apns_prod']['tmp_name'], $dir . '/apns_prod.pem'); } - if (isset($_FILES['back']) && !$_FILES['back']['error']) { - $ext = CubeIT_Files::getExtension($_FILES['back']['name']); - move_uploaded_file($_FILES['back']['tmp_name'], $wdir . '/back.' . $ext); - $_POST['theme']['back'] = 'back.' . $ext; - } - if (isset($_FILES['etagere']) && !$_FILES['etagere']['error']) { - $ext = CubeIT_Files::getExtension($_FILES['etagere']['name']); - move_uploaded_file($_FILES['etagere']['tmp_name'], $wdir . '/etagere.' . $ext); - $_POST['theme']['etagere'] = 'etagere.' . $ext; + + $theme = array('back', 'etagere', 'icon', 'splash'); + foreach ($theme as $t) { + if (isset($_FILES[$t]) && !$_FILES[$t]['error']) { + $ext = CubeIT_Files::getExtension($_FILES[$t]['name']); + move_uploaded_file($_FILES[$t]['tmp_name'], $wdir . '/' . $t . '.' . $ext); + $_POST['theme'][$t] = $t . '.' . $ext; + } } foreach ($_POST['group'] as $gid => $group) { diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 4e570de2e..761725406 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -304,9 +304,9 @@ class wsUrl { $res.='

' . __('Thème') . '

'; $res.=''; - $images = array('back' => __('Image de fond'), 'etagere' => __("Image de l'étagère")); + $images = array('back' => __('Image de fond'), 'etagere' => __("Image de l'étagère"), 'icon' => __("Icône de l'application") . ' (1024x1024px)', 'splash' => __('Ecran de lancement') . ' (2048x2048px)'); foreach ($images as $i => $label) { - $res.=''; + $res.=''; } $res.='
' . $label . '
' . $label . '' . form::hidden(array('theme[' . $i . ']', 'theme_' . $i), $collection->theme[$i]) . '
';