diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index e656799eb1fd4b1862e319aa229f0f030597daf2..7f909dd7ef23d84589b6b9dd018462aa659821f0 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -94,3 +94,10 @@ UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps -- DROP TABLE llx_product_fournisseur; -- ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur; ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur; + +-- Fix: deprecated tag to new one +update llx_opensurvey_sondage set format = 'D' where format = 'D+'; +update llx_opensurvey_sondage set format = 'A' where format = 'A+'; + + + diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 434280d439ae0914ca658d3a891fd0b936303890..a17cea45759ed7718d2dbf742a14db3ce1ba369c 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -157,7 +157,7 @@ if ($testmodifier) } // Add column (not for date) -if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format == "A")) +if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && $object->format == "A") { // Security check if (!$user->rights->opensurvey->write) accessforbidden(); @@ -181,8 +181,9 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format } // Add column (with format date) -if (isset($_POST["ajoutercolonne"]) && ($object->format == "D")) +if (isset($_POST["ajoutercolonne"]) && $object->format == "D") { + // Security check if (!$user->rights->opensurvey->write) accessforbidden(); @@ -276,7 +277,7 @@ if (isset($_POST["ajoutercolonne"]) && ($object->format == "D")) // Delete line for ($i = 0; $i < $nblignes; $i++) { - if (isset($_POST["effaceligne$i"])) + if (GETPOST("effaceligne".$i) || GETPOST("effaceligne".$i."_x") || GETPOST("effaceligne".$i.".x")) // effacelignei for chrome, effacelignei_x for firefox { // Security check if (!$user->rights->opensurvey->write) accessforbidden(); @@ -311,7 +312,8 @@ for ($i = 0; $i < $nblignes; $i++) // Delete column for ($i = 0; $i < $nbcolonnes; $i++) { - if (isset($_POST["effacecolonne$i"]) && $nbcolonnes > 1) + if ((GETPOST("effacecolonne".$i) || GETPOST("effacecolonne".$i."_x") || GETPOST("effacecolonne".$i.".x")) + && $nbcolonnes > 1) // effacecolonnei for chrome, effacecolonnei_x for firefox { // Security check if (!$user->rights->opensurvey->write) accessforbidden(); @@ -462,19 +464,20 @@ dol_fiche_end(); print '</form>'."\n"; + print '<div class="tabsAction">'; print '<a class="butAction" href="exportcsv.php?id=' . $numsondage . '">'.$langs->trans("ExportSpreadsheet") .' (.CSV)' . '</a>'; print '</div>'; -// Add form to add a field + +// Show form to add a new field/column if (GETPOST('ajoutsujet')) { // Security check if (!$user->rights->opensurvey->write) accessforbidden(); - //on recupere les données et les sujets du sondage print '<form name="formulaire" action="" method="POST">'."\n"; print '<input type="hidden" name="backtourl" value="'.GETPOST('backtourl').'">'; @@ -706,7 +709,7 @@ if ($object->format=="D") } else { - //affichage des sujets du sondage + // Show titles print '<tr>'."\n"; print '<td></td>'."\n"; print '<td></td>'."\n";