From 808abb6b4ee4fcd0306850c53880b8da3cb1c137 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 31 Dec 2013 16:03:58 +0100 Subject: [PATCH 001/177] Restore correct date --- build/debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/debian/changelog b/build/debian/changelog index 170b8945ffe..f3bf1b1d126 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -17,4 +17,4 @@ dolibarr (3.4.0) unstable; urgency=low [ Laurent Destailleur (eldy) ] * New upstream release. - -- Laurent Destailleur (eldy) Mon, 30 Dec 2013 12:00:00 +0100 + -- Laurent Destailleur (eldy) Mon, 22 Apr 2013 12:00:00 +0100 From 5fd47b34b0544fd38ac2578df561a55853df2174 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 1 Jan 2014 18:30:32 +0100 Subject: [PATCH 002/177] Fix: Bad link for download file into documents page of supplier invoices --- htdocs/core/class/html.formfile.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 189cec49f80..0559c7b56da 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -762,7 +762,10 @@ class FormFile { // Define relative path used to store the file if (empty($relativepath)) + { $relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/'; + if ($object->element == 'invoice_supplier') $relativepath=get_exdir($object->id,2).$relativepath; + } $var=!$var; print ''; From 165f9617e9c5d24809692edd3cc0270d80157975 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Jan 2014 10:55:11 +0100 Subject: [PATCH 003/177] Fix: No hard coded data --- build/makepack-dolibarrmodule.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/makepack-dolibarrmodule.pl b/build/makepack-dolibarrmodule.pl index 0babf13e0b1..28220e9df95 100755 --- a/build/makepack-dolibarrmodule.pl +++ b/build/makepack-dolibarrmodule.pl @@ -37,9 +37,9 @@ if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS=' elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; } elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; } if (! $OS) { - print "makepack-dolbarrmodule.pl was not able to detect your OS.\n"; + print "$PROG.$Extension was not able to detect your OS.\n"; print "Can't continue.\n"; - print "makepack-dolibarrmodule.pl aborted.\n"; + print "$PROG.$Extension aborted.\n"; sleep 2; exit 1; } @@ -59,7 +59,7 @@ if ($OS =~ /windows/) { if (! $TEMP || ! -d $TEMP) { print "Error: A temporary directory can not be find.\n"; print "Check that TEMP or TMP environment variable is set correctly.\n"; - print "makepack-dolibarrmodule.pl aborted.\n"; + print "$PROG.$Extension aborted.\n"; sleep 2; exit 2; } From 3d1a980f2df71569baec113008c35d281872ed9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 2 Jan 2014 15:49:49 +0100 Subject: [PATCH 004/177] Logging error when no poll was found in opensurveysondage.class.php --- htdocs/opensurvey/class/opensurveysondage.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index cde370edd03..b0895e466f4 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -229,7 +230,13 @@ class Opensurveysondage extends CommonObject $this->date_m = $this->db->jdate($obj->tls); $ret=1; } - else $ret=0; + else + { + $sondage = ($id ? 'id='.$id : 'sondageid='.$numsurvey); + $this->error='Fetch no poll found for '.$sondage; + dol_syslog($this->error, LOG_ERR); + $ret = 0; + } $this->db->free($resql); } From c35a704875a4ad120b264e1b5b97549a7879aab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 2 Jan 2014 15:54:17 +0100 Subject: [PATCH 005/177] Printing opensurveysondage.class.php error instead of a non-translated error --- htdocs/opensurvey/adminstuds.php | 3 +-- htdocs/opensurvey/adminstuds_preview.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index 39d804ee578..099d3090f7e 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -156,8 +156,7 @@ $form=new Form($db); $result=$object->fetch(0,$numsondage); if ($result <= 0) { - print $langs->trans("ErrorRecordNotFound"); - llxFooter(); + dol_print_error($db,$object->error); exit; } diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index 62fbadda1ac..4445ed8c538 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -382,8 +382,7 @@ $form=new Form($db); $result=$object->fetch(0,$numsondage); if ($result <= 0) { - print $langs->trans("ErrorRecordNotFound"); - llxFooter(); + dol_print_error($db,$object->error); exit; } From 048ea8062a9b9481a4f7c87e81b9ff2194d7b728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 2 Jan 2014 16:32:11 +0100 Subject: [PATCH 006/177] Modified GET param of poll id to accept standard ID --- COPYRIGHT | 3 +++ htdocs/opensurvey/adminstuds.php | 34 +++++++++--------------- htdocs/opensurvey/adminstuds_preview.php | 17 ++++++------ htdocs/opensurvey/list.php | 2 +- 4 files changed, 26 insertions(+), 30 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index db0cb532478..799e49cd60b 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -50,6 +50,9 @@ http://www.fsf.org/licensing/licenses/index_html Copyright --------- +Copyright (C) 2014 +- Marcos García + Copyright (C) 2013 - Christophe Battarel - Laurent Destailleur diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index 099d3090f7e..c6fc44e0025 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,18 +36,10 @@ if (!$user->admin) accessforbidden(); // Initialisation des variables $action=GETPOST('action'); $numsondage = $numsondageadmin = ''; -if (GETPOST('sondage')) -{ - if (strlen(GETPOST('sondage')) == 24) // recuperation du numero de sondage admin (24 car.) dans l'URL - { - $numsondageadmin=GETPOST("sondage",'alpha'); - $numsondage=substr($numsondageadmin, 0, 16); - } - else - { - $numsondageadmin=''; - $numsondage=GETPOST("sondage",'alpha'); - } + +if (GETPOST('id')) { + $numsondageadmin = GETPOST('id', 'alpha'); + $numsondage = substr($numsondageadmin, 0, 16); } $object=new Opensurveysondage($db); @@ -128,7 +121,7 @@ if (GETPOST('ajoutcomment')) $comment_user = GETPOST('commentuser'); $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)"; - $sql.= " VALUES ('".$db->escape($numsondage)."','".$db->escape($comment)."','".$db->escape($comment_user)."')"; + $sql.= " VALUES ('".$db->escape($object->id_sondage)."','".$db->escape($comment)."','".$db->escape($comment_user)."')"; $resql = $db->query($sql); dol_syslog("sql=".$sql); if (! $resql) @@ -153,7 +146,7 @@ if ($idcomment) $form=new Form($db); -$result=$object->fetch(0,$numsondage); +$result=$object->fetch(0, $numsondageadmin); if ($result <= 0) { dol_print_error($db,$object->error); @@ -177,7 +170,7 @@ $toutsujet=str_replace("@","
",$toutsujet); $toutsujet=str_replace("°","'",$toutsujet); -print '
'."\n"; +print ''."\n"; print ''; $head = array(); @@ -271,7 +264,7 @@ $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current -$url=$urlwithouturlroot.dol_buildpath('/opensurvey/public/studs.php',1).'?sondage='.$numsondage; +$url=$urlwithouturlroot.dol_buildpath('/opensurvey/public/studs.php',1).'?sondage='.$object->id_sondage; $urllink=''.$url.''; print $urllink; @@ -289,15 +282,15 @@ dol_fiche_end(); */ print '
'; -if ($action != 'edit') print ''.$langs->trans("Modify") . ''; +if ($action != 'edit') print ''.$langs->trans("Modify") . ''; -if ($action != 'edit') print ''.$langs->trans('Delete').''; +if ($action != 'edit') print ''.$langs->trans('Delete').''; print '
'; if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?&sondage='.$numsondageadmin, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?&id='.$numsondageadmin, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1); } @@ -312,7 +305,6 @@ print_fiche_titre($langs->trans("CommentsOfVoters"),'',''); // Comment list $sql = 'SELECT id_comment, usercomment, comment'; $sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments'; -$sql.= " WHERE id_sondage='".$db->escape($numsondage)."'"; $sql.= " ORDER BY id_comment"; $resql = $db->query($sql); $num_rows=$db->num_rows($resql); @@ -322,7 +314,7 @@ if ($num_rows > 0) while ( $i < $num_rows) { $obj=$db->fetch_object($resql); - print ' '.img_picto('', 'delete.png').' '; + print ' '.img_picto('', 'delete.png').' '; print $obj->usercomment.' : '.dol_nl2br($obj->comment)."
"; $i++; } diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index 4445ed8c538..f0b29720bbb 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +36,7 @@ if (!$user->admin) accessforbidden(); // Init vars $action=GETPOST('action'); -$numsondageadmin=GETPOST("sondage"); +$numsondageadmin=GETPOST("id"); $numsondage=substr($numsondageadmin, 0, 16); $object=new Opensurveysondage($db); @@ -471,7 +472,7 @@ if (GETPOST('ajoutsujet')) { //on recupere les données et les sujets du sondage print ''."\n"; - print ''; + print ''; print ''; print '
'."\n"; @@ -586,7 +587,7 @@ print '
'."\n"; $nbcolonnes=substr_count($object->sujet,',')+1; print ''."\n"; -print ''; +print ''; print '
'."\n"; print '
'."\n"; @@ -643,7 +644,7 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; + print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; @@ -669,7 +670,7 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; + print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; @@ -693,7 +694,7 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; + print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; print ''."\n"; //affichage des horaires @@ -711,7 +712,7 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; + print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; print ''."\n"; } } @@ -728,7 +729,7 @@ else print ''.$tmp[0].''."\n"; } - print ''.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).''."\n"; + print ''.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).''."\n"; print ''."\n"; } diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 908a01db8fd..0248e2402c9 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -113,7 +113,7 @@ while ($i < min($num,$limit)) $var=!$var; print ''; print ''; - print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; + print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; print ''; $type=($obj->format=='A' || $obj->format=='A+')?'classic':'date'; print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); From 5f3d2aea51a9e9b08f4fc4d26db43ce533c6fb48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 2 Jan 2014 16:32:48 +0100 Subject: [PATCH 007/177] Opensurvey polls tab cards can now be extended from external modules --- ChangeLog | 2 +- dev/skeletons/modMyModule.class.php | 1 + htdocs/opensurvey/adminstuds.php | 12 +-------- htdocs/opensurvey/adminstuds_preview.php | 12 +-------- htdocs/opensurvey/fonctions.php | 34 ++++++++++++++++++++++++ 5 files changed, 38 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4bfb6e73595..e85b76eaebc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,7 +16,7 @@ For developers: - New: Add path file of trigger into admin trigger list page. - New: More phpunit tests. - New: Payments and supplier payment pages tabs can now be extended from modules. - +- New: Opensurvey polls tab cards can now be extended from external modules. ***** ChangeLog for 3.5 compared to 3.4.* ***** diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index deeb34caa66..224798a2fd2 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -134,6 +134,7 @@ class modMyModule extends DolibarrModules // 'payment' to add a tab in payment view // 'payment_supplier' to add a tab in supplier payment view // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) + // 'opensurveypoll' to add a tab in opensurvey poll view $this->tabs = array(); // Dictionnaries diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index c6fc44e0025..6a0eda17148 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -173,17 +173,7 @@ $toutsujet=str_replace("°","'",$toutsujet); print ''."\n"; print ''; -$head = array(); - -$head[0][0] = ''; -$head[0][1] = $langs->trans("Card"); -$head[0][2] = 'general'; -$h++; - -$head[1][0] = 'adminstuds_preview.php?sondage='.$object->id_sondage_admin; -$head[1][1] = $langs->trans("SurveyResults").'/'.$langs->trans("Preview"); -$head[1][2] = 'preview'; -$h++; +$head = opensurvey_prepare_head($object); print dol_get_fiche_head($head,'general',$langs->trans("Survey"),0,dol_buildpath('/opensurvey/img/object_opensurvey.png',1),1); diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index f0b29720bbb..de1658b80ea 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -406,17 +406,7 @@ $toutsujet=str_replace("°","'",$toutsujet); print ''."\n"; -$head = array(); - -$head[0][0] = 'adminstuds.php?sondage='.$object->id_sondage_admin; -$head[0][1] = $langs->trans("Card"); -$head[0][2] = 'general'; -$h++; - -$head[1][0] = 'adminstuds_preview.php?sondage='.$object->id_sondage_admin; -$head[1][1] = $langs->trans("SurveyResults").'/'.$langs->trans("Preview"); -$head[1][2] = 'preview'; -$h++; +$head = opensurvey_prepare_head($object); print dol_get_fiche_head($head,'preview',$langs->trans("Survey"),0,dol_buildpath('/opensurvey/img/object_opensurvey.png',1),1); diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 9dcc398fa3a..78cb13732dc 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +22,40 @@ * \brief Functions for module */ +/** + * Returns an array with the tabs for the "Opensurvey poll" section + * It loads tabs from modules looking for the entity Opensurveyso + * + * @param Opensurveysondage $object Current viewing poll + * @return array Tabs for the opensurvey section + */ +function opensurvey_prepare_head(Opensurveysondage $object) { + + global $langs, $conf; + + $h = 0; + $head = array(); + $head[0][0] = 'adminstuds.php?id='.$object->id_sondage_admin; + $head[0][1] = $langs->trans("Card"); + $head[0][2] = 'general'; + $h++; + + $head[1][0] = 'adminstuds_preview.php?id='.$object->id_sondage_admin; + $head[1][1] = $langs->trans("SurveyResults").'/'.$langs->trans("Preview"); + $head[1][2] = 'preview'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname); to remove a tab + complete_head_from_modules($conf,$langs,$object,$head,$h,'opensurveypoll'); + + complete_head_from_modules($conf,$langs,$object,$head,$h,'opensurveypoll', 'remove'); + + return $head; +} /** * Show header for new member From 0b3dd9d7bb6e43e3296c71509c2b5364889c7ac9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Jan 2014 20:49:36 +0100 Subject: [PATCH 008/177] Fix: Call Image on this instead of pdf. Fix: Missing parameter for photo. Conflicts: htdocs/core/modules/member/doc/pdf_standard.class.php htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php --- .../modules/member/doc/pdf_standard.class.php | 8 ++++---- .../doc/pdf_standardlabel.class.php | 17 ++++++++-------- .../modules/printsheet/modules_labels.php | 20 +++++++++---------- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 0b0214196d0..94580ff1fad 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -195,8 +195,8 @@ class pdf_standard // Center if ($textright=='') // Only a left part { - if ($textleft == '%LOGO%' && $logo) $this->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - else if ($textleft == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); else { $pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height); @@ -230,8 +230,8 @@ class pdf_standard } else // Only a right part { - if ($textright == '%LOGO%' && $logo) $this->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); - else if ($textright == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); + if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); + else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); else { $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index 5ee5c2bd72b..e4c1cb81adf 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -120,9 +120,10 @@ class pdf_standardlabel * @param string $footer Footer * @param Translate $outputlangs Output langs * @param string $textright Text right + * @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text) * @return void */ - function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='') + function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$photo='') { global $mysoc,$conf,$langs; @@ -148,8 +149,6 @@ class pdf_standardlabel $logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo; } } - // Define photo - $photo=''; // Define background image $backgroundimage=''; @@ -184,8 +183,8 @@ class pdf_standardlabel // Middle if ($textright=='') // Only a left part { - if ($textleft == '%LOGO%' && $logo) $this->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - else if ($textleft == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); else { $pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height); @@ -218,8 +217,8 @@ class pdf_standardlabel } else // Only a right part { - if ($textright == '%LOGO%' && $logo) $this->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); - else if ($textright == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); + if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); + else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); else { $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); @@ -394,7 +393,7 @@ class pdf_standardlabel /** * Function to build PDF on disk, then output on HTTP strem. * - * @param array $arrayofmembers Array of members informations + * @param array $arrayofrecords Array of record informations (array('textleft'=>,'textheader'=>, ..., 'id'=>,'photo'=>) * @param Translate $outputlangs Lang object for output language * @param string $srctemplatepath Full path of source filename for generator using a template file * @param string $outputdir Output directory @@ -471,7 +470,7 @@ class pdf_standardlabel foreach($arrayofmembers as $val) { // imprime le texte specifique sur la carte - $this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['id'],$val['photo']); + $this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['photo']); } //$pdf->SetXY(10, 295); diff --git a/htdocs/core/modules/printsheet/modules_labels.php b/htdocs/core/modules/printsheet/modules_labels.php index 63934cad404..4c4ebad6c3a 100644 --- a/htdocs/core/modules/printsheet/modules_labels.php +++ b/htdocs/core/modules/printsheet/modules_labels.php @@ -63,25 +63,25 @@ class ModelePDFLabels * Create a document onto disk accordign to template module * * @param DoliDB $db Database handler - * @param array $arrayofmembers Array of members + * @param array $arrayofrecords Array of records * @param string $modele Force le modele a utiliser ('' to not force) * @param Translate $outputlangs Objet lang a utiliser pour traduction * @param string $outputdir Output directory * @return int <0 if KO, >0 if OK */ -function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir='') +function members_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir='') { global $conf,$langs; $langs->load("members"); $error=0; - + // Increase limit for PDF build $err=error_reporting(); error_reporting(0); @set_time_limit(120); error_reporting($err); - + $code=''; $srctemplatepath=''; @@ -99,7 +99,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $ } else $code=$modele; $modele='standardlabel'; - + // If selected modele is a filename template (then $modele="modelname:filename") $tmp=explode(':',$modele,2); if (! empty($tmp[1])) @@ -108,7 +108,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $ $srctemplatepath=$tmp[1]; } else $srctemplatepath=$code; - + // Search template files $file=''; $classname=''; $filefound=0; $dirmodels=array('/'); @@ -118,7 +118,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $ foreach(array('doc','pdf') as $prefix) { $file = $prefix."_".$modele.".class.php"; - + // On verifie l'emplacement du modele $file=dol_buildpath($reldir."core/modules/printsheet/doc/".$file,0); if (file_exists($file)) @@ -130,18 +130,18 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $ } if ($filefound) break; } - + // Charge le modele if ($filefound) { require_once $file; $obj = new $classname($db); - + // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($arrayofmembers, $outputlangs, $srctemplatepath, $outputdir) > 0) + if ($obj->write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir) > 0) { $outputlangs->charset_output=$sav_charset_output; return 1; From 76f890b72f49432411b7b56bfff6a5f674608534 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Jan 2014 20:49:36 +0100 Subject: [PATCH 009/177] Fix: Call Image on this instead of pdf. Fix: Missing parameter for photo. Conflicts: htdocs/core/modules/member/doc/pdf_standard.class.php htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php --- .../modules/member/doc/pdf_standard.class.php | 8 ++++---- .../doc/pdf_standardlabel.class.php | 17 ++++++++-------- .../modules/printsheet/modules_labels.php | 20 +++++++++---------- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 8789c246307..e85e4a7d767 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -195,8 +195,8 @@ class pdf_standard // Center if ($textright=='') // Only a left part { - if ($textleft == '%LOGO%' && $logo) $this->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - else if ($textleft == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); else { $pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height); @@ -230,8 +230,8 @@ class pdf_standard } else // Only a right part { - if ($textright == '%LOGO%' && $logo) $this->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); - else if ($textright == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); + if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); + else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); else { $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index 5ee5c2bd72b..e4c1cb81adf 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -120,9 +120,10 @@ class pdf_standardlabel * @param string $footer Footer * @param Translate $outputlangs Output langs * @param string $textright Text right + * @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text) * @return void */ - function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='') + function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$photo='') { global $mysoc,$conf,$langs; @@ -148,8 +149,6 @@ class pdf_standardlabel $logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo; } } - // Define photo - $photo=''; // Define background image $backgroundimage=''; @@ -184,8 +183,8 @@ class pdf_standardlabel // Middle if ($textright=='') // Only a left part { - if ($textleft == '%LOGO%' && $logo) $this->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - else if ($textleft == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); else { $pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height); @@ -218,8 +217,8 @@ class pdf_standardlabel } else // Only a right part { - if ($textright == '%LOGO%' && $logo) $this->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); - else if ($textright == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); + if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); + else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); else { $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); @@ -394,7 +393,7 @@ class pdf_standardlabel /** * Function to build PDF on disk, then output on HTTP strem. * - * @param array $arrayofmembers Array of members informations + * @param array $arrayofrecords Array of record informations (array('textleft'=>,'textheader'=>, ..., 'id'=>,'photo'=>) * @param Translate $outputlangs Lang object for output language * @param string $srctemplatepath Full path of source filename for generator using a template file * @param string $outputdir Output directory @@ -471,7 +470,7 @@ class pdf_standardlabel foreach($arrayofmembers as $val) { // imprime le texte specifique sur la carte - $this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['id'],$val['photo']); + $this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['photo']); } //$pdf->SetXY(10, 295); diff --git a/htdocs/core/modules/printsheet/modules_labels.php b/htdocs/core/modules/printsheet/modules_labels.php index 63934cad404..4c4ebad6c3a 100644 --- a/htdocs/core/modules/printsheet/modules_labels.php +++ b/htdocs/core/modules/printsheet/modules_labels.php @@ -63,25 +63,25 @@ class ModelePDFLabels * Create a document onto disk accordign to template module * * @param DoliDB $db Database handler - * @param array $arrayofmembers Array of members + * @param array $arrayofrecords Array of records * @param string $modele Force le modele a utiliser ('' to not force) * @param Translate $outputlangs Objet lang a utiliser pour traduction * @param string $outputdir Output directory * @return int <0 if KO, >0 if OK */ -function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir='') +function members_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir='') { global $conf,$langs; $langs->load("members"); $error=0; - + // Increase limit for PDF build $err=error_reporting(); error_reporting(0); @set_time_limit(120); error_reporting($err); - + $code=''; $srctemplatepath=''; @@ -99,7 +99,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $ } else $code=$modele; $modele='standardlabel'; - + // If selected modele is a filename template (then $modele="modelname:filename") $tmp=explode(':',$modele,2); if (! empty($tmp[1])) @@ -108,7 +108,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $ $srctemplatepath=$tmp[1]; } else $srctemplatepath=$code; - + // Search template files $file=''; $classname=''; $filefound=0; $dirmodels=array('/'); @@ -118,7 +118,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $ foreach(array('doc','pdf') as $prefix) { $file = $prefix."_".$modele.".class.php"; - + // On verifie l'emplacement du modele $file=dol_buildpath($reldir."core/modules/printsheet/doc/".$file,0); if (file_exists($file)) @@ -130,18 +130,18 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $ } if ($filefound) break; } - + // Charge le modele if ($filefound) { require_once $file; $obj = new $classname($db); - + // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($arrayofmembers, $outputlangs, $srctemplatepath, $outputdir) > 0) + if ($obj->write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir) > 0) { $outputlangs->charset_output=$sav_charset_output; return 1; From 4a4084e0962cac4d4178949785075951433ecfc9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 Jan 2014 00:13:16 +0100 Subject: [PATCH 010/177] Fix: doxygen --- .../core/modules/printsheet/doc/pdf_standardlabel.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index e4c1cb81adf..f4fd38b52ad 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -399,7 +399,7 @@ class pdf_standardlabel * @param string $outputdir Output directory * @return int 1=OK, 0=KO */ - function write_file($arrayofmembers,$outputlangs,$srctemplatepath,$outputdir='') + function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='') { global $user,$conf,$langs,$mysoc,$_Avery_Labels; @@ -467,7 +467,7 @@ class pdf_standardlabel // Add each record - foreach($arrayofmembers as $val) + foreach($arrayofrecords as $val) { // imprime le texte specifique sur la carte $this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['photo']); From 694fd5810aa22d7b51afaafc934f35d4f0d202e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 00:44:56 +0100 Subject: [PATCH 011/177] Removed unuseful opensurvey admin page --- htdocs/core/modules/modOpenSurvey.class.php | 3 - htdocs/opensurvey/admin/index.php | 66 --------------------- 2 files changed, 69 deletions(-) delete mode 100644 htdocs/opensurvey/admin/index.php diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index 34c3e90e54d..23452107958 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -74,9 +74,6 @@ class modOpenSurvey extends DolibarrModules //$this->dirs[0] = DOL_DATA_ROOT.'/mymodule; //$this->dirs[1] = DOL_DATA_ROOT.'/mymodule/temp; - // Config pages. Put here list of php page names stored in admin directory used to setup module - $this->config_page_url = array("index.php@opensurvey"); - // Dependencies $this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled diff --git a/htdocs/opensurvey/admin/index.php b/htdocs/opensurvey/admin/index.php deleted file mode 100644 index d22c3f03cde..00000000000 --- a/htdocs/opensurvey/admin/index.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/opensurvey/admin/index.php - * \ingroup opensurvey - * \brief Setup page of opensurvey - */ - -require_once('../../main.inc.php'); -require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); -require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); -require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); - -// Security check -if (!$user->admin) accessforbidden(); - -$langs->load("admin"); -$langs->load("other"); - - -/* - * View - */ - -$langs->load("opensurvey"); - -llxHeader(); - -$linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("OpenSurveyArea"),$linkback,'setup'); -print '
'; - -echo $langs->trans("OpenSurveyNothingToSetup").'

'."\n"; - -// Link -print img_picto('','object_globe.png').' '.$langs->trans("PublicLinkToCreateSurvey").':
'; - -// Define $urlwithroot -$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); -$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file -//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - -$url=$urlwithouturlroot.dol_buildpath('/opensurvey/public/index.php',1); -$urllink=''.$url.''; -print $urllink; - - -llxFooter(); - -$db->close(); -?> \ No newline at end of file From 68893b205c32e170ad77a052e74cd4a7427e81dd Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Fri, 3 Jan 2014 09:58:01 +0100 Subject: [PATCH 012/177] New standard VAT rate for France on january, 1st, 2014 --- htdocs/install/mysql/data/llx_c_tva.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index d96bc2d3f36..253f8cedbe8 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -88,13 +88,13 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (80 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (802,80, '0','0','VAT Rate 0',1); -- FRANCE (id country=1) -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11, 1,'19.6','0','VAT standard rate (France hors DOM-TOM)',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11, 1,'20','0','VAT standard rate (France hors DOM-TOM)',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 12, 1, '8.5','0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 13, 1, '8.5','1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 14, 1, '5.5','0','VAT reduced rate (France hors DOM-TOM)',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 15, 1, '0','0','VAT Rate 0 ou non applicable',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 16, 1, '2.1','0','VAT super-reduced rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 17, 1, '7','0','VAT reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 17, 1, '10','0','VAT reduced rate',1); -- GERMANY (id country=5) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 51, 5, '19.0','0','allgemeine Ust.',1); From 0b551817762aca5ec19fa88b1d8c00d1a48a5c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 13:59:13 +0100 Subject: [PATCH 013/177] Little changes to improve listing of surveys --- htdocs/opensurvey/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 0248e2402c9..d3739418822 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -77,7 +77,7 @@ if ($action == 'delete') // tableau qui affiche tous les sondages de la base print ''."\n"; -print ''."\n"; +print ''."\n"; $sql = "SELECT id_sondage, id_sondage_admin, mail_admin, format, origin, date_fin, titre, nom_admin"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as p"; @@ -114,11 +114,11 @@ while ($i < min($num,$limit)) print ''; print ''; + print ''; print ''."\n"; + print ''."\n"; } print ''."\n"; @@ -560,7 +560,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheur //si un seul jour et aucunes horaires choisies, : message d'erreur if ((GETPOST('choixheures') || GETPOST('choixheures_x')) && (count($_SESSION["totalchoixjour"])=="1" && $_POST["horaires0"][0]=="" && $_POST["horaires0"][1]=="" && $_POST["horaires0"][2]=="" && $_POST["horaires0"][3]=="" && $_POST["horaires0"][4]=="")) { - print '
'. $langs->trans("Survey").''. $langs->trans("Type") .''. $langs->trans("Title") .''. $langs->trans("Author") .''. $langs->trans("ExpireDate") .''. $langs->trans("NbOfVoters") .' 
'. $langs->trans("Ref").''. $langs->trans("Title") .''. $langs->trans("Type") .''. $langs->trans("Author") .''. $langs->trans("ExpireDate") .''. $langs->trans("NbOfVoters") .' 
'; print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; - print ''; + print ''.$obj->titre.''; $type=($obj->format=='A' || $obj->format=='A+')?'classic':'date'; print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate"); - print ''.$obj->titre.''.$obj->nom_admin.''.$obj->nom_admin.''.dol_print_date($db->jdate($obj->date_fin),'day'); if ($db->jdate($obj->date_fin) < time()) { print ' '.img_warning(); } From 6965d88cb59a7621f8c4b5c5961d21e0605362c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 13:59:30 +0100 Subject: [PATCH 014/177] Removed unused global vars in function llxHeaderSurvey --- htdocs/opensurvey/fonctions.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 78cb13732dc..1f3d9d459f4 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -70,8 +70,6 @@ function opensurvey_prepare_head(Opensurveysondage $object) { */ function llxHeaderSurvey($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='') { - global $user, $conf, $langs, $mysoc; - top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers print ''; From 93fb104077363228e87cc409b36a6b793f6ac4ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 13:59:57 +0100 Subject: [PATCH 015/177] Image alternative text was empty in creation page of surveys --- htdocs/opensurvey/public/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/opensurvey/public/index.php b/htdocs/opensurvey/public/index.php index 2c78a86cb9d..4d722e703b9 100644 --- a/htdocs/opensurvey/public/index.php +++ b/htdocs/opensurvey/public/index.php @@ -53,8 +53,8 @@ print '
print $langs->trans("OrganizeYourMeetingEasily").'

-
-
+
+
'; From 05ab8334efed68fe5ff93b1b603bc30ad2707369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 14:00:48 +0100 Subject: [PATCH 016/177] Missing copyright info --- htdocs/opensurvey/list.php | 1 + htdocs/opensurvey/public/index.php | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index d3739418822..49fa1da6149 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/opensurvey/public/index.php b/htdocs/opensurvey/public/index.php index 4d722e703b9..95519ba7278 100644 --- a/htdocs/opensurvey/public/index.php +++ b/htdocs/opensurvey/public/index.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 2e995fc20b71fca94fa74b8ff9819918a434fd4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 14:42:39 +0100 Subject: [PATCH 017/177] Unwanted removal of query filter in poll card --- htdocs/opensurvey/adminstuds.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index 6a0eda17148..2ab74e99922 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -295,6 +295,7 @@ print_fiche_titre($langs->trans("CommentsOfVoters"),'',''); // Comment list $sql = 'SELECT id_comment, usercomment, comment'; $sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments'; +$sql.= " WHERE id_sondage='".$db->escape($numsondage)."'"; $sql.= " ORDER BY id_comment"; $resql = $db->query($sql); $num_rows=$db->num_rows($resql); From 7a1af8656a004d57cfed726b932cba3d6457649b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 14:52:31 +0100 Subject: [PATCH 018/177] Removed duplicate code --- htdocs/opensurvey/adminstuds.php | 23 ++++++----------- .../class/opensurveysondage.class.php | 25 +++++++++++++++++++ htdocs/opensurvey/public/studs.php | 17 ++++--------- 3 files changed, 37 insertions(+), 28 deletions(-) diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index 2ab74e99922..0d84caeeb7b 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -293,21 +293,12 @@ print '
'."\n"; print_fiche_titre($langs->trans("CommentsOfVoters"),'',''); // Comment list -$sql = 'SELECT id_comment, usercomment, comment'; -$sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments'; -$sql.= " WHERE id_sondage='".$db->escape($numsondage)."'"; -$sql.= " ORDER BY id_comment"; -$resql = $db->query($sql); -$num_rows=$db->num_rows($resql); -if ($num_rows > 0) -{ - $i = 0; - while ( $i < $num_rows) - { - $obj=$db->fetch_object($resql); - print ' '.img_picto('', 'delete.png').' '; - print $obj->usercomment.' : '.dol_nl2br($obj->comment)."
"; - $i++; +$comments = $object->getComments(); + +if ($comments) { + foreach ($comments as $comment) { + print ' '.img_picto('', 'delete.png').' '; + print $comment->usercomment.': '.dol_nl2br($comment->comment)."
"; } } else @@ -320,7 +311,7 @@ print '
'; // Add comment print $langs->trans("AddACommentForPoll") . '
'; print '
'."\n"; -print $langs->trans("Name") .' :
'."\n"; +print $langs->trans("Name") .':
'."\n"; print '
'."\n"; if (isset($erreur_commentaire_vide) && $erreur_commentaire_vide=="yes") { print "" . $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")) . ""; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index b0895e466f4..870fd17ce76 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -517,5 +517,30 @@ class Opensurveysondage extends CommonObject $this->canedit=0; } + /** + * Returns all comments for the current opensurvey poll + * + * @return Object[] + */ + public function getComments() { + + $sql = 'SELECT id_comment, usercomment, comment'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments'; + $sql.= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'"; + $sql.= " ORDER BY id_comment"; + $resql = $this->db->query($sql); + + $num_rows=$this->db->num_rows($resql); + + $comments = array(); + + if ($num_rows > 0) { + while ($obj = $this->db->fetch_object($resql)) { + $comments[] = $obj; + } + } + + return $comments; + } } ?> diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 62e78f172ee..fb01e43c8d0 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -697,23 +697,16 @@ print '
'; // Comment list -$sql = 'SELECT id_comment, usercomment, comment'; -$sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments'; -$sql.= " WHERE id_sondage='".$db->escape($numsondage)."'"; -$sql.= " ORDER BY id_comment"; -$resql = $db->query($sql); -$num_rows=$db->num_rows($resql); -if ($num_rows > 0) +$comments = $object->getComments(); + +if ($comments) { - $i = 0; print "
" . $langs->trans("CommentsOfVoters") . " :
\n"; - while ( $i < $num_rows) - { - $obj=$db->fetch_object($resql); + + foreach ($comments as $obj) { print '
'; if (in_array($obj->usercomment, $listofvoters)) print ' '.img_picto('', 'delete.png').' '; print $obj->usercomment.' : '.dol_nl2br($obj->comment)."
"; - $i++; } } From 32ca1b8881a644b754b2325e647bb9f93d2b8990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 14:59:59 +0100 Subject: [PATCH 019/177] Corrected broken links --- htdocs/opensurvey/fonctions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 1f3d9d459f4..ae3e9800d92 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -195,7 +195,7 @@ function issetAndNoEmpty($name, $tableau = null) function getUrlSondage($id, $admin = false) { if ($admin === true) { - $url = get_server_name().'adminstuds_preview.php?sondage='.$id; + $url = get_server_name().'adminstuds_preview.php?id='.$id; } else { $url = get_server_name().'/public/studs.php?sondage='.$id; } @@ -267,7 +267,7 @@ function ajouter_sondage($origin) dol_syslog($sql); $resql=$db->query($sql); - if ($origin == 'dolibarr') $urlback=dol_buildpath('/opensurvey/adminstuds_preview.php',1).'?sondage='.$sondage_admin; + if ($origin == 'dolibarr') $urlback=dol_buildpath('/opensurvey/adminstuds_preview.php',1).'?id='.$sondage_admin; else { // Define $urlwithroot From dd7be996c21dfee44a9beeb1281c50035c84271d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 15:27:26 +0100 Subject: [PATCH 020/177] Improved translation of opensurvey module --- htdocs/langs/en_US/errors.lang | 3 ++- htdocs/langs/en_US/opensurvey.lang | 8 ++++++++ htdocs/opensurvey/public/choix_autre.php | 12 ++++++------ htdocs/opensurvey/public/choix_date.php | 10 +++++----- htdocs/opensurvey/public/create_survey.php | 13 +++++++------ 5 files changed, 28 insertions(+), 18 deletions(-) diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index ac4d439a208..8eb265013c5 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -127,6 +127,7 @@ ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setu ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s ErrorWarehouseMustDiffers=Source and target warehouses must differs +ErrorBadFormat=Bad format! # Warnings WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined @@ -143,4 +144,4 @@ WarningUntilDirRemoved=All security warnings (visible by admin users only) will WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution. WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). -WarningNotRelevant=Irrelevant operation for this dataset +WarningNotRelevant=Irrelevant operation for this dataset \ No newline at end of file diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 1e1900296dd..db1140097a7 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -44,6 +44,8 @@ PourContreList=List (empty/for/against) AddNewColumn=Add new column TitleChoice=Choice label InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. +InfoExpiration=Your poll will be automatically removed after 6 months.
You can fix another removal date for it. +RemovalDate=Removal date (optional) ExportSpreadsheet=Export result spreadsheet ExpireDate=Limit date NbOfVoters=Nb of voters @@ -67,3 +69,9 @@ CanEditVotes=Can change vote of others SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. BackToCurrentMonth=Back to current month PublicLinkToCreateSurvey=Public link to allow everybody to create a survey +ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation +ErrorOpenSurveyOneChoice=Enter at least one choice +ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY +ErrorOpenSurveyInvalidChars=Characters \" < and > are not permitted +MoreChoices=Enter more choices for the voters +AfterCreationInfo=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
Then, you will receive quickly an email contening the link to your poll for sending it to the voters. \ No newline at end of file diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index e120bd7ec20..622c1c02f06 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -125,7 +125,7 @@ llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); if (empty($_SESSION['titre']) || empty($_SESSION['nom']) || empty($_SESSION['adresse'])) { - dol_print_error('',"You haven't filled the first section of the poll creation"); + dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); llxFooterSurvey(); exit; } @@ -179,25 +179,25 @@ for ($i=0;$i<$_SESSION["nbrecases"];$i++) //message d'erreur si aucun champ renseigné if ($testremplissage != "ok" && (isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"]))) { - print "
" . $langs->trans("Enter at least one choice") . "

"."\n"; + print "
" . $langs->trans("ErrorOpenSurveyOneChoice") . "

"."\n"; $erreur = true; } //message d'erreur si mauvaise date if ($testdate === false) { - print "
" . _("Date must be have the format DD/MM/YYYY") . "

"."\n"; + print "
" . $langs->trans("ErrorOpenSurveyDateFormat") . "

"."\n"; } if ($erreur_injection) { - print "" . _("Characters \" < and > are not permitted") . "

\n"; + print "" . $langs->trans("ErrorOpenSurveyInvalidChars") . "

\n"; } if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur && !$erreur_injection) { //demande de la date de fin du sondage print '
'."\n"; print '
'."\n"; - print '
'. _("Your poll will be automatically removed after 6 months.
You can fix another removal date for it.") .'

'."\n"; - print _("Removal date (optional)") .' : '. _("(DD/MM/YYYY)") ."\n"; + print '
'. $langs->trans("InfoExpiration") .'

'."\n"; + print $langs->trans("RemovalDate") .' : DD/MM/YYYY'; print '
'."\n"; print '
'."\n"; print ''. $langs->trans("InfoAfterCreate") .''."\n"; diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/public/choix_date.php index f651a91899d..6f0ca322d53 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/public/choix_date.php @@ -86,7 +86,7 @@ if (GETPOST('reset')) { if (! isset($_SESSION['nom']) && ! isset($_SESSION['adresse']) && ! isset($_SESSION['commentaires']) && ! isset($_SESSION['mail'])) { - dol_print_error('',"You haven't filled the first section of the poll creation"); + dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); exit; } @@ -542,7 +542,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheur } if ($affichageerreurfindeligne) { - print '
'. _("Bad format!") .''. $langs->trans("ErrorBadFormat") .'
'. _("Enter more choices for the voters") .'
'."\n"; + print '
'. $langs->trans("MoreChoices") .'
'."\n"; $erreur=true; } } @@ -574,14 +574,14 @@ if (!$erreur && (GETPOST('choixheures') || GETPOST('choixheures_x'))) { print '
'. $langs->trans("PollWillExpire",2) .'
'. $langs->trans("RemovalDate") .' : '.$date_fin.'
'."\n"; print '
'."\n"; print '
'."\n"; - print ''. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
Then, you will receive quickly an email contening the link to your poll for sending it to the voters.") .'
'."\n"; + print ''. $langs->trans("AfterCreationInfo") .''."\n"; print'
'."\n"; // print'

'."\n"; // print 'Pour finir la création du sondage, cliquez sur le bouton ajout ci-dessous'."\n"; // print '

'."\n"; print ''."\n"; print ''."\n"; - print''."\n"; + print''."\n"; print '
'. $langs->trans("BackToHoursSetup") .'
'. $langs->trans("CreatePoll") .'
'. $langs->trans("CreatePoll") .'
'."\n"; } diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index f601602144c..bc6b9df5f67 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -147,7 +147,8 @@ if (!$_SESSION["adresse"] && (GETPOST('creation_sondage_date') || GETPOST('creat print "" .$langs->trans("FieldMandatory") . " "."\n"; } elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) { - print "" . _("The address is not correct! (You should enter a valid email address in order to receive the link to your poll)") . ""."\n"; + $langs->load('errors'); + print "" . $langs->trans("ErrorBadEMail", $adresse) . ""."\n"; } print ''."\n"; @@ -180,11 +181,11 @@ if (GETPOST('choix_sondage')) else { //affichage des boutons pour choisir sondage date ou autre - print '
'."\n"; - print ' '."\n"; - print ''."\n"; - print ' '."\n"; - print ''."\n"; + print '
'. _("Schedule an event") .'
'. _("Make a choice") .'
'."\n"; + print ' '."\n"; + print ''."\n"; + print ' '."\n"; + print ''."\n"; print '
'. $langs->trans("CreateSurveyDate") .'
'. $langs->trans("CreateSurveyStandard") .'
'."\n"; } print '


'."\n"; From e0dd3d5bc938bea3045af86f6f944d6c84893bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 15:31:29 +0100 Subject: [PATCH 021/177] Added missing copyright info --- htdocs/opensurvey/public/choix_autre.php | 1 + htdocs/opensurvey/public/create_survey.php | 1 + htdocs/opensurvey/public/studs.php | 1 + 3 files changed, 3 insertions(+) diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index 622c1c02f06..5d10ad9792f 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index bc6b9df5f67..2706081b091 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index fb01e43c8d0..e2241482ac4 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From cf3ac246bfea245459dbcfbff25b22f4952c8514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 15:35:12 +0100 Subject: [PATCH 022/177] Moved exportcsv.php out of public folder as it should only be accesible for Dolibarr users --- htdocs/opensurvey/adminstuds_preview.php | 2 +- htdocs/opensurvey/{public => }/exportcsv.php | 20 +++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) rename htdocs/opensurvey/{public => }/exportcsv.php (84%) diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index de1658b80ea..04a3ed62b86 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -449,7 +449,7 @@ print ''."\n"; print ''; diff --git a/htdocs/opensurvey/public/exportcsv.php b/htdocs/opensurvey/exportcsv.php similarity index 84% rename from htdocs/opensurvey/public/exportcsv.php rename to htdocs/opensurvey/exportcsv.php index 5fded4f5d32..49d982f5721 100644 --- a/htdocs/opensurvey/public/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -16,33 +16,23 @@ */ /** - * \file htdocs/opensurvey/public/exportcsv.php + * \file htdocs/opensurvey/exportcsv.php * \ingroup opensurvey * \brief Page to list surveys */ -define("NOLOGIN",1); // This means this output page does not require to be logged. -define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -require_once('../../main.inc.php'); +require_once('../main.inc.php'); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php"); $action=GETPOST('action'); $numsondage = $numsondageadmin = ''; -if (GETPOST('sondage')) +if (GETPOST('id')) { - if (strlen(GETPOST('sondage')) == 24) // recuperation du numero de sondage admin (24 car.) dans l'URL - { - $numsondageadmin=GETPOST("sondage",'alpha'); - $numsondage=substr($numsondageadmin, 0, 16); - } - else - { - $numsondageadmin=''; - $numsondage=GETPOST("sondage",'alpha'); - } + $numsondageadmin=GETPOST("id",'alpha'); + $numsondage=substr($numsondageadmin, 0, 16); } $object=new Opensurveysondage($db); From 8727daeb7737dc8502d4e6573eacab17d42d1b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 16:38:02 +0100 Subject: [PATCH 023/177] Unified comment addition in OpenSurveySondage::addComment and removed duplicate code --- htdocs/opensurvey/adminstuds.php | 26 +++++++------------ .../class/opensurveysondage.class.php | 21 +++++++++++++++ htdocs/opensurvey/public/studs.php | 15 ++--------- 3 files changed, 32 insertions(+), 30 deletions(-) diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index 0d84caeeb7b..2700ea5c518 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -44,6 +44,13 @@ if (GETPOST('id')) { $object=new Opensurveysondage($db); +$result=$object->fetch(0, $numsondageadmin); +if ($result <= 0) +{ + dol_print_error($db,$object->error); + exit; +} + $expiredate=dol_mktime(0, 0, 0, GETPOST('expiremonth'), GETPOST('expireday'), GETPOST('expireyear')); @@ -74,12 +81,6 @@ if ($action == 'update') $action = 'edit'; } - if (! $error) - { - $res=$object->fetch(0,$numsondageadmin); - if ($res < 0) dol_print_error($db,$object->error); - } - if (! $error) { $object->titre = GETPOST('nouveautitre'); @@ -120,10 +121,8 @@ if (GETPOST('ajoutcomment')) $comment = GETPOST("comment"); $comment_user = GETPOST('commentuser'); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)"; - $sql.= " VALUES ('".$db->escape($object->id_sondage)."','".$db->escape($comment)."','".$db->escape($comment_user)."')"; - $resql = $db->query($sql); - dol_syslog("sql=".$sql); + $resql = $object->addComment($comment, $comment_user); + if (! $resql) { $err |= COMMENT_INSERT_FAILED; @@ -146,13 +145,6 @@ if ($idcomment) $form=new Form($db); -$result=$object->fetch(0, $numsondageadmin); -if ($result <= 0) -{ - dol_print_error($db,$object->error); - exit; -} - $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); llxHeader('',$object->titre, 0, 0, 0, 0, $arrayofjs, $arrayofcss); diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 870fd17ce76..6db64139971 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -542,5 +542,26 @@ class Opensurveysondage extends CommonObject return $comments; } + + /** + * Adds a comment to the poll + * + * @param string $comment Comment content + * @param string $comment_user Comment author + * @return boolean False in case of the query fails, true if it was successful + */ + public function addComment($comment, $comment_user) { + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)"; + $sql.= " VALUES ('".$this->db->escape($this->id_sondage)."','".$this->db->escape($comment)."','".$this->db->escape($comment_user)."')"; + $resql = $this->db->query($sql); + dol_syslog("sql=".$sql); + + if (!$resql) { + return false; + } + + return true; + } } ?> diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index e2241482ac4..2c84dead099 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -84,10 +84,8 @@ if (GETPOST('ajoutcomment')) $comment = GETPOST("comment"); $comment_user = GETPOST('commentuser'); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)"; - $sql.= " VALUES ('".$db->escape($numsondage)."','".$db->escape($comment)."','".$db->escape($comment_user)."')"; - $resql = $db->query($sql); - dol_syslog("sql=".$sql); + $resql = $object->addComment($comment, $comment_user); + if (! $resql) dol_print_error($db); } } @@ -227,15 +225,6 @@ if ($idcomment) */ $form=new Form($db); -$object=new OpenSurveySondage($db); - -$result=$object->fetch(0,$numsondage); -if ($result <= 0) -{ - print $langs->trans("ErrorRecordNotFound"); - llxFooterSurvey(); - exit; -} $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); From 8b781e46c64e51ca0eaf0678293e8c2dfca2fedc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 16:43:34 +0100 Subject: [PATCH 024/177] Added missing copyright info --- htdocs/opensurvey/exportcsv.php | 1 + htdocs/opensurvey/public/choix_date.php | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/opensurvey/exportcsv.php b/htdocs/opensurvey/exportcsv.php index 49d982f5721..3cf0fe944e9 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/public/choix_date.php index 6f0ca322d53..d90fbb680d9 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/public/choix_date.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From a5b9122e98fd889bfff88c4225b540b802ecdc33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 17:44:42 +0100 Subject: [PATCH 025/177] Allow to disable poll comments --- .../install/mysql/migration/3.5.0-3.6.0.sql | 1 + .../mysql/tables/llx_opensurvey_sondage.sql | 1 + htdocs/langs/en_US/opensurvey.lang | 1 + htdocs/opensurvey/adminstuds.php | 24 ++++++++++++++----- .../class/opensurveysondage.class.php | 18 +++++++++----- htdocs/opensurvey/fonctions.php | 6 +++-- htdocs/opensurvey/public/create_survey.php | 10 ++++++++ htdocs/opensurvey/public/studs.php | 16 +++++++------ 8 files changed, 56 insertions(+), 21 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 53d6198a849..3d82a6cb1c0 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -18,3 +18,4 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); ALTER TABLE llx_bookmark ADD COLUMN entity integer DEFAULT 1 NOT NULL; +ALTER TABLE `llx_opensurvey_sondage` ADD `allow_comments` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT 1 AFTER `canedit` ; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index f66fbcf5e79..476b3d9fb40 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -27,6 +27,7 @@ CREATE TABLE llx_opensurvey_sondage ( mailsonde varchar(2) DEFAULT '0', survey_link_visible integer DEFAULT 1, canedit integer DEFAULT 0, + allow_comments TINYINT(1) unsigned NOT NULL DEFAULT 1, origin VARCHAR(64), tms TIMESTAMP, sujet TEXT diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index db1140097a7..88308711fc6 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -66,6 +66,7 @@ AddEndHour=Add end hour votes=vote(s) NoCommentYet=No comments have been posted for this poll yet CanEditVotes=Can change vote of others +CanComment=Users can comment in the poll SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. BackToCurrentMonth=Back to current month PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index 2700ea5c518..c98b3ad376e 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -89,6 +89,7 @@ if ($action == 'update') $object->date_fin = $expiredate; $object->survey_link_visible = GETPOST('survey_link_visible')=='on'?1:0; $object->canedit = GETPOST('canedit')=='on'?1:0; + $object->allow_comments = GETPOST('cancomment') == 'on' ? true : false; $res=$object->update($user); if ($res < 0) @@ -231,6 +232,15 @@ if ($action == 'edit') else print yn($object->canedit); print ''; +// Users can comment +print ''.$langs->trans('CanComment').''; +if ($action == 'edit') +{ + print 'allow_comments?' checked="true"':'').'">'; +} +else print yn($object->allow_comments); +print ''; + // Expire date print ''.$langs->trans('ExpireDate').''; if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object->date_fin,'expire'); @@ -301,12 +311,14 @@ else print '
'; // Add comment -print $langs->trans("AddACommentForPoll") . '
'; -print '
'."\n"; -print $langs->trans("Name") .':
'."\n"; -print '
'."\n"; -if (isset($erreur_commentaire_vide) && $erreur_commentaire_vide=="yes") { - print "" . $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")) . ""; +if ($object->allow_comments) { + print $langs->trans("AddACommentForPoll") . '
'; + print '
'."\n"; + print $langs->trans("Name") .':
'."\n"; + print '
'."\n"; + if (isset($erreur_commentaire_vide) && $erreur_commentaire_vide=="yes") { + print "" . $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")) . ""; + } } print ''; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 6db64139971..9e40f254021 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -54,8 +54,11 @@ class Opensurveysondage extends CommonObject var $survey_link_visible; var $canedit; - - + /** + * Allow comments on this poll + * @var bool + */ + public $allow_comments; /** * Constructor @@ -196,6 +199,7 @@ class Opensurveysondage extends CommonObject $sql.= " t.mailsonde,"; $sql.= " t.survey_link_visible,"; $sql.= " t.canedit,"; + $sql.= " t.allow_comments,"; $sql.= " t.sujet,"; $sql.= " t.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as t"; @@ -225,6 +229,7 @@ class Opensurveysondage extends CommonObject $this->mailsonde = $obj->mailsonde; $this->survey_link_visible = $obj->survey_link_visible; $this->canedit = $obj->canedit; + $this->allow_comments = $obj->allow_comments; $this->sujet = $obj->sujet; $this->date_m = $this->db->jdate($obj->tls); @@ -274,8 +279,8 @@ class Opensurveysondage extends CommonObject if (isset($this->format)) $this->format=trim($this->format); if (isset($this->mailsonde)) $this->mailsonde=trim($this->mailsonde); if (isset($this->survey_link_visible)) $this->survey_link_visible=trim($this->survey_link_visible); - if (isset($this->canedit)) $this->canedit=trim($this->canedit); - + $this->canedit = $this->canedit ? 1 : 0; + $this->allow_comments = $this->allow_comments ? 1 : 0; // Check parameters // Put here code to add a control on parameters values @@ -293,8 +298,9 @@ class Opensurveysondage extends CommonObject $sql.= " format=".(isset($this->format)?"'".$this->db->escape($this->format)."'":"null").","; $sql.= " mailsonde=".(isset($this->mailsonde)?$this->db->escape($this->mailsonde):"null").","; $sql.= " survey_link_visible=".(isset($this->survey_link_visible)?$this->db->escape($this->survey_link_visible):"null").","; - $sql.= " canedit=".(isset($this->canedit)?$this->db->escape($this->canedit):"null").""; - + $sql.= " canedit=".$this->db->escape($this->canedit).","; + $sql.= " allow_comments=".$this->db->escape($this->allow_comments); + //$sql.= " WHERE rowid=".$this->id; $sql.= " WHERE id_sondage_admin='".$this->db->escape($this->id_sondage_admin)."'"; diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index ae3e9800d92..7f3ecb5f36e 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -255,13 +255,14 @@ function ajouter_sondage($origin) $date_fin = time()+15552000; } $canedit=empty($_SESSION['formatcanedit'])?'0':'1'; + $allow_comments = empty($_SESSION['allow_comments']) ? 0 : 1; // Insert survey $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_sondage'; - $sql.= '(id_sondage, commentaires, mail_admin, nom_admin, titre, id_sondage_admin, date_fin, format, mailsonde, canedit, origin, sujet)'; + $sql.= '(id_sondage, commentaires, mail_admin, nom_admin, titre, id_sondage_admin, date_fin, format, mailsonde, canedit, allow_comments, origin, sujet)'; $sql.= " VALUES ('".$db->escape($sondage)."', '".$db->escape($_SESSION['commentaires'])."', '".$db->escape($_SESSION['adresse'])."', '".$db->escape($_SESSION['nom'])."',"; $sql.= " '".$db->escape($_SESSION['titre'])."', '".$sondage_admin."', '".$db->idate($date_fin)."', '".$_SESSION['formatsondage']."', '".$db->escape($_SESSION['mailsonde'])."',"; - $sql.= " '".$canedit."', '".$db->escape($origin)."',"; + $sql.= " '".$canedit."', '".$allow_comments."', '".$db->escape($origin)."',"; $sql.= " '".$db->escape($_SESSION['toutchoix'])."'"; $sql.= ")"; dol_syslog($sql); @@ -288,6 +289,7 @@ function ajouter_sondage($origin) unset($_SESSION["commentaires"]); unset($_SESSION["canedit"]); unset($_SESSION["mailsonde"]); + unset($_SESSION['allow_comments']); header("Location: ".$urlback); exit(); diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index 2706081b091..9e33933b4ae 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -74,6 +74,12 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GET } else { $_SESSION["mailsonde"] = false; } + + if (GETPOST('allow_comments') == 'on') { + $_SESSION['allow_comments'] = true; + } else { + $_SESSION['allow_comments'] = false; + } if (! isValidEmail($adresse)) $erreur_adresse = true; @@ -172,6 +178,10 @@ if ($_SESSION["mailsonde"]) $cochemail="checked"; print ' '. $langs->trans("ToReceiveEMailForEachVote") .'
'."\n"; +if ($_SESSION['allow_comments']) $allow_comments = "checked"; + +print ' '.$langs->trans('CanComment').'
'."\n"; + if (GETPOST('choix_sondage')) { if (GETPOST('choix_sondage') == 'date') print ''; diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 2c84dead099..dec1d8f6d22 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -701,15 +701,17 @@ if ($comments) } // Form to add comment -print '
' .$langs->trans("AddACommentForPoll") . "
\n"; +if ($object->allow_comments) { + print '
' .$langs->trans("AddACommentForPoll") . "
\n"; -print '
'."\n"; -print $langs->trans("Name") .' : '; -print '   '."\n"; -print '
'."\n"; -print ''."\n"; + print '
'."\n"; + print $langs->trans("Name") .' : '; + print '   '."\n"; + print '
'."\n"; + print ''."\n"; -print '
'."\n"; // div add comment + print '
'."\n"; // div add comment +} print '

'; From d992d5cb228c0976ba3c9f5283fb2f81115172bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 Jan 2014 18:16:21 +0100 Subject: [PATCH 026/177] Fix: Bad SQL request when using filter on category. --- htdocs/compta/stats/cabyprodserv.php | 55 ++++++++++++++------------ htdocs/compta/stats/casoc.php | 58 +++++++++++++++++++--------- 2 files changed, 70 insertions(+), 43 deletions(-) diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index ebfe0c4834b..f3e5f746e6b 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2013 Antoine Iauch + * Copyright (C) 2013 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -171,23 +172,21 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl // SQL request $catotal=0; -if ($modecompta == 'CREANCES-DETTES') { +if ($modecompta == 'CREANCES-DETTES') +{ $sql = "SELECT DISTINCT p.rowid as rowid, p.ref as ref, p.label as label,"; - $sql.= " sum(DISTINCT l.total_ht) as amount, sum(DISTINCT l.total_ttc) as amount_ttc"; - $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; - $sql.= " JOIN ".MAIN_DB_PREFIX."facturedet as l"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON l.fk_facture = f.rowid"; - if ($selected_cat === -2) { - $sql.=" LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; - } - if ($selected_cat && $selected_cat !== -2) { - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = " . $selected_cat; - if ($subcat) { - $sql.=" OR c.fk_parent = " . $selected_cat; + $sql.= " sum(l.total_ht) as amount, sum(l.total_ttc) as amount_ttc"; + $sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as l, ".MAIN_DB_PREFIX."product as p"; + if ($selected_cat === -2) // Without any category + { + $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; + } + else if ($selected_cat) // Into a specific category + { + $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_categorie = c.rowid"; - } $sql.= " WHERE l.fk_product = p.rowid"; + $sql.= " AND l.fk_facture = f.rowid"; $sql.= " AND f.fk_statut in (1,2)"; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $sql.= " AND f.type IN (0,1,2)"; @@ -197,16 +196,21 @@ if ($modecompta == 'CREANCES-DETTES') { if ($date_start && $date_end) { $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - if ($selected_cat === -2) { - $sql.=" AND cp.fk_product is null"; - } - if ($selected_cat && $selected_cat !== -2) { - $sql.= " AND cp.fk_product = p.rowid"; - } + if ($selected_cat === -2) // Without any category + { + $sql.=" AND cp.fk_product is null"; + } + else if ($selected_cat) { // Into a specific category + $sql.= " AND (c.rowid = ".$selected_cat; + if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat; + $sql.= ")"; + $sql.= " AND cp.fk_categorie = c.rowid AND cp.fk_product = p.rowid"; + } $sql.= " AND f.entity = ".$conf->entity; - $sql.= " GROUP BY p.rowid "; - $sql.= "ORDER BY p.ref "; + $sql.= " GROUP BY p.rowid"; + $sql.= " ORDER BY p.ref"; + dol_syslog("cabyprodserv sql=".$sql); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -381,7 +385,10 @@ if ($modecompta == 'CREANCES-DETTES') { print ''; } else { // $modecompta != 'CREANCES-DETTES' - // TODO: better message + // TODO: better message, for example: + // "Calculation of part of each product for accountancy in this mode is not possible. When a partial payment (for example 5 euros) is done on an + // invoice with 2 product (product A for 10 euros and product B for 20 euros), what is part of paiment for product A and part of paiment for product B ? + // Because there is no way to know this, this report is not relevant. print '
' . $langs->trans("WarningNotRelevant") . '
'; } diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 63ca148e5c3..bbf03e0865c 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Antoine Iauch @@ -177,18 +177,15 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl $catotal=0; if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT DISTINCT s.rowid as socid, s.nom as name,"; - $sql.= " sum(DISTINCT f.total) as amount, sum(DISTINCT f.total_ttc) as amount_ttc"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql.= " JOIN ".MAIN_DB_PREFIX."facture as f"; - if ($selected_cat === -2) { + $sql.= " sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; + $sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; + if ($selected_cat === -2) // Without any category + { $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; } - if ($selected_cat && $selected_cat !== -2) { - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = ".$selected_cat; - if ($subcat) { - $sql.=" OR c.fk_parent = " . $selected_cat; - } - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON cs.fk_categorie = c.rowid"; + else if ($selected_cat) // Into a specific category + { + $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } $sql.= " WHERE f.fk_statut in (1,2)"; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { @@ -200,34 +197,57 @@ if ($modecompta == 'CREANCES-DETTES') { if ($date_start && $date_end) { $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - if ($selected_cat === -2) { + if ($selected_cat === -2) // Without any category + { $sql.=" AND cs.fk_societe is null"; } - if ($selected_cat && $selected_cat !== -2) { - $sql.= " AND cs.fk_societe = s.rowid"; + else if ($selected_cat) { // Into a specific category + $sql.= " AND (c.rowid = ".$selected_cat; + if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat; + $sql.= ")"; + $sql.= " AND cs.fk_categorie = c.rowid AND cs.fk_societe = s.rowid"; } - } else { +} else { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) */ $sql = "SELECT s.rowid as socid, s.nom as name, sum(pf.amount) as amount_ttc"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql.= ", ".MAIN_DB_PREFIX."facture as f"; + $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql.= ", ".MAIN_DB_PREFIX."paiement_facture as pf"; $sql.= ", ".MAIN_DB_PREFIX."paiement as p"; - $sql .= " WHERE p.rowid = pf.fk_paiement"; + $sql.= ", ".MAIN_DB_PREFIX."societe as s"; + if ($selected_cat === -2) // Without any category + { + $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; + } + else if ($selected_cat) // Into a specific category + { + $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; + } + $sql.= " WHERE p.rowid = pf.fk_paiement"; $sql.= " AND pf.fk_facture = f.rowid"; $sql.= " AND f.fk_soc = s.rowid"; if ($date_start && $date_end) { $sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; } + if ($selected_cat === -2) // Without any category + { + $sql.=" AND cs.fk_societe is null"; + } + else if ($selected_cat) { // Into a specific category + $sql.= " AND (c.rowid = ".$selected_cat; + if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat; + $sql.= ")"; + $sql.= " AND cs.fk_categorie = c.rowid AND cs.fk_societe = s.rowid"; + } } $sql.= " AND f.entity = ".$conf->entity; if ($socid) $sql.= " AND f.fk_soc = ".$socid; $sql.= " GROUP BY s.rowid, s.nom"; $sql.= " ORDER BY s.rowid"; +dol_syslog("casoc sql=".$sql); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -248,7 +268,7 @@ if ($result) { // On ajoute les paiements anciennes version, non lies par paiement_facture if ($modecompta != 'CREANCES-DETTES') { - $sql = "SELECT '0' as socid, 'Autres' as name, sum(DISTINCT p.amount) as amount_ttc"; + $sql = "SELECT '0' as socid, 'Autres' as name, sum(p.amount) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql.= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= ", ".MAIN_DB_PREFIX."paiement as p"; From 8d664973841fde293011104f174f33a7025e351c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 Jan 2014 18:23:07 +0100 Subject: [PATCH 027/177] Update doc for 3.4.2 --- ChangeLog | 92 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 151c2e47c7d..7c1d434ea37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,55 +4,59 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** -Fix: field's problem into company's page (RIB) -Fix: Document cerfa doesn't contained firstname & lastname from donator +Fix: field's problem into company's page (RIB). +Fix: Document cerfa doesn't contained firstname & lastname from donator. Fix: Bad rounding on margin calculations and display. Fix: Option drop table into backup was broken. -Fix: [ bug #1105 ] Searching Boxes other search option -Fix: wrong buy price update -Fix: [ bug #1142 ] Set paiement on invoice (PGSql) -Fix: [ bug #1145 ] Agenda button list type do not display -Fix: [ bug #1148 ] Product consomation : supplier order bad status -Fix: [ bug #1159 ] Commercial search "other" give p.note do not exists -Fix: [ bug #1174 ] Product translated description not good into PDF -Fix: [ bug #1163 ] SQL Error when searching for supplier orders -Fix: [ bug #1162 ] Translaction for morning and afternoon -Fix: [ bug #1161 ] Search on product label +Fix: [ bug #1105 ] Searching Boxes other search option. +Fix: wrong buy price update. +Fix: [ bug #1142 ] Set paiement on invoice (PGSql). +Fix: [ bug #1145 ] Agenda button list type do not display. +Fix: [ bug #1148 ] Product consomation : supplier order bad status. +Fix: [ bug #1159 ] Commercial search "other" give p.note do not exists. +Fix: [ bug #1174 ] Product translated description not good into PDF. +Fix: [ bug #1163 ] SQL Error when searching for supplier orders. +Fix: [ bug #1162 ] Translaction for morning and afternoon. +Fix: [ bug #1161 ] Search on product label. Fix: [ bug #1075 ] POS module doesn't decrement stock of products in delayed payment mode. -Fix: [ bug #1171 ] Documents lost in interventions after validating -Fix: fix unsubscribe URL into mailing when sending manually (not by script) -Fix: [ bug #1182 ] ODT company_country tag is htmlencoded -Fix: [ bug #1196 ] Product barcode search does not expect 13th digit on EAN13 type -Fix: [ bug #1202 ] Wrong amount in deposit % invoice from proposal +Fix: [ bug #1171 ] Documents lost in interventions after validating. +Fix: fix unsubscribe URL into mailing when sending manually (not by script). +Fix: [ bug #1182 ] ODT company_country tag is htmlencoded. +Fix: [ bug #1196 ] Product barcode search does not expect 13th digit on EAN13 type. +Fix: [ bug #1202 ] Wrong amount in deposit % invoice from proposal. +Fix: Removed analytics tags into doc page. +Fix: Call Image on this instead of pdf. +Fix: Missing parameter for photo. +Fix: Bad SQL request for turnover report. ***** ChangeLog for 3.4.1 compared to 3.4.0 ***** -Fix: Display buying price on line edit when no supplier price is defined -Fix: Retrieving of margin info when invoice created automatically from order -Fix: Reordering supplier products in list by supplier or supplier ref was crashing -Fix: [ bug #1029 ] Tulip numbering mask -Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card -Fix: [ bug #1033 ] SUPPLIER REF disappeared -Fix: update extrafield do not display immediatly after update -Fix: Fix bug with canvas thirdparty -Fix: [ bug #1037 ] Consumption> Supplier invoices related -Fix: User group name do not display in card (view or edit mode) -Fix: Link "Show all supplier invoice" on suplier card not working -Fix: [ bug #1039 ] Pre-defined invoices conversion -Fix: If only service module is activated, it's impossible to delete service -Fix: [ bug #1043 ] Bad interventions ref numbering -Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted -Fix: Localtaxes balance not showing -Fix: Intervention box links to contracts id -Fix: Compatiblity with multicompany module -Fix: Edit propal line was losing product supplier price id -Fix: Delete linked element to supplier invoice when deleted -Fix: [ bug #1061 ] Bad info shipped products -Fix: [ bug #1062 ] Documents lost in propals and contracts validating -Fix: Supplier price displayed on document lines and margin infos didnt take discount -Fix: sorting on qty did not work in supplier product list -Fix: there was no escaping on filter fields in supplier product list -Fix: bugs on margin reports and better margin calculation on credit notes -Qual: Add travis-ci integration +Fix: Display buying price on line edit when no supplier price is defined. +Fix: Retrieving of margin info when invoice created automatically from order. +Fix: Reordering supplier products in list by supplier or supplier ref was crashing. +Fix: [ bug #1029 ] Tulip numbering mask. +Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card. +Fix: [ bug #1033 ] SUPPLIER REF disappeared. +Fix: update extrafield do not display immediatly after update. +Fix: Fix bug with canvas thirdparty. +Fix: [ bug #1037 ] Consumption> Supplier invoices related. +Fix: User group name do not display in card (view or edit mode). +Fix: Link "Show all supplier invoice" on suplier card not working. +Fix: [ bug #1039 ] Pre-defined invoices conversion. +Fix: If only service module is activated, it's impossible to delete service. +Fix: [ bug #1043 ] Bad interventions ref numbering. +Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted. +Fix: Localtaxes balance not showing. +Fix: Intervention box links to contracts id. +Fix: Compatiblity with multicompany module. +Fix: Edit propal line was losing product supplier price id. +Fix: Delete linked element to supplier invoice when deleted. +Fix: [ bug #1061 ] Bad info shipped products. +Fix: [ bug #1062 ] Documents lost in propals and contracts validating. +Fix: Supplier price displayed on document lines and margin infos didnt take discount. +Fix: sorting on qty did not work in supplier product list. +Fix: there was no escaping on filter fields in supplier product list. +Fix: bugs on margin reports and better margin calculation on credit notes. +Qual: Add travis-ci integration. ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: From 1a038fac06bd3d4c17587dfce703031f1104fb43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 22:13:15 +0100 Subject: [PATCH 028/177] Removed the use of id_sondage_admin and survey_link_visible fields of llx_opensurvey_sondage --- .../install/mysql/migration/3.5.0-3.6.0.sql | 5 ++- .../tables/llx_opensurvey_sondage.key.sql | 1 - .../mysql/tables/llx_opensurvey_sondage.sql | 2 -- htdocs/opensurvey/adminstuds.php | 22 ++++++------- htdocs/opensurvey/adminstuds_preview.php | 19 ++++++----- .../class/opensurveysondage.class.php | 32 +++---------------- htdocs/opensurvey/exportcsv.php | 5 ++- htdocs/opensurvey/fonctions.php | 11 +++---- htdocs/opensurvey/list.php | 10 +++--- htdocs/opensurvey/public/studs.php | 13 ++------ 10 files changed, 42 insertions(+), 78 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 3d82a6cb1c0..c900b9d7374 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -18,4 +18,7 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); ALTER TABLE llx_bookmark ADD COLUMN entity integer DEFAULT 1 NOT NULL; -ALTER TABLE `llx_opensurvey_sondage` ADD `allow_comments` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT 1 AFTER `canedit` ; \ No newline at end of file +ALTER TABLE `llx_opensurvey_sondage` ADD `allow_comments` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT 1 AFTER `canedit` ; +ALTER TABLE `llx_opensurvey_sondage` DROP `survey_link_visible` ; +ALTER TABLE `llx_opensurvey_sondage` DROP INDEX `idx_id_sondage_admin` ; +ALTER TABLE `llx_opensurvey_sondage` DROP `id_sondage_admin` ; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql index 3bf5771811e..ec10e64ac07 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql @@ -15,5 +15,4 @@ -- along with this program. If not, see . -- ============================================================================ -ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_id_sondage_admin (id_sondage_admin); ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_date_fin (date_fin); diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index 476b3d9fb40..ae06605ec67 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -17,7 +17,6 @@ CREATE TABLE llx_opensurvey_sondage ( id_sondage VARCHAR(16) PRIMARY KEY, - id_sondage_admin VARCHAR(24), commentaires text, mail_admin VARCHAR(128), nom_admin VARCHAR(64), @@ -25,7 +24,6 @@ CREATE TABLE llx_opensurvey_sondage ( date_fin DATETIME, format VARCHAR(2), mailsonde varchar(2) DEFAULT '0', - survey_link_visible integer DEFAULT 1, canedit integer DEFAULT 0, allow_comments TINYINT(1) unsigned NOT NULL DEFAULT 1, origin VARCHAR(64), diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index c98b3ad376e..705f668ae8b 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -35,16 +35,15 @@ if (!$user->admin) accessforbidden(); // Initialisation des variables $action=GETPOST('action'); -$numsondage = $numsondageadmin = ''; +$numsondage = ''; if (GETPOST('id')) { - $numsondageadmin = GETPOST('id', 'alpha'); - $numsondage = substr($numsondageadmin, 0, 16); + $numsondage = GETPOST('id', 'alpha'); } $object=new Opensurveysondage($db); -$result=$object->fetch(0, $numsondageadmin); +$result=$object->fetch(0, $numsondage); if ($result <= 0) { dol_print_error($db,$object->error); @@ -63,7 +62,7 @@ $expiredate=dol_mktime(0, 0, 0, GETPOST('expiremonth'), GETPOST('expireday'), GE // Delete if ($action == 'delete_confirm') { - $result=$object->delete($user,'',$numsondageadmin); + $result=$object->delete($user,'',$numsondage); header('Location: '.dol_buildpath('/opensurvey/list.php',1)); exit(); @@ -87,7 +86,6 @@ if ($action == 'update') $object->commentaires = GETPOST('nouveauxcommentaires'); $object->mail_admin = GETPOST('nouvelleadresse'); $object->date_fin = $expiredate; - $object->survey_link_visible = GETPOST('survey_link_visible')=='on'?1:0; $object->canedit = GETPOST('canedit')=='on'?1:0; $object->allow_comments = GETPOST('cancomment') == 'on' ? true : false; @@ -163,7 +161,7 @@ $toutsujet=str_replace("@","
",$toutsujet); $toutsujet=str_replace("°","'",$toutsujet); -print '
'."\n"; +print ''."\n"; print ''; $head = opensurvey_prepare_head($object); @@ -178,7 +176,7 @@ $linkback = ''.$langs->tra // Ref print ''.$langs->trans('Ref').''; print ''; -print $form->showrefnav($object, 'sondage', $linkback, 1, 'id_sondage_admin', 'id_sondage_admin'); +print $form->showrefnav($object, 'sondage', $linkback, 1, 'id_sondage', 'id_sondage'); print ''; print ''; @@ -274,15 +272,15 @@ dol_fiche_end(); */ print '
'; -if ($action != 'edit') print ''.$langs->trans("Modify") . ''; +if ($action != 'edit') print ''.$langs->trans("Modify") . ''; -if ($action != 'edit') print ''.$langs->trans('Delete').''; +if ($action != 'edit') print ''.$langs->trans('Delete').''; print '
'; if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?&id='.$numsondageadmin, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?&id='.$numsondage, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1); } @@ -299,7 +297,7 @@ $comments = $object->getComments(); if ($comments) { foreach ($comments as $comment) { - print ' '.img_picto('', 'delete.png').' '; + print ' '.img_picto('', 'delete.png').' '; print $comment->usercomment.': '.dol_nl2br($comment->comment)."
"; } } diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index 04a3ed62b86..481912c5fbd 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -36,8 +36,7 @@ if (!$user->admin) accessforbidden(); // Init vars $action=GETPOST('action'); -$numsondageadmin=GETPOST("id"); -$numsondage=substr($numsondageadmin, 0, 16); +$numsondage= GETPOST("id"); $object=new Opensurveysondage($db); $result=$object->fetch(0,$numsondage); @@ -418,7 +417,7 @@ $linkback = ''.$langs->trans('Ref').''; print ''; -print $form->showrefnav($object, 'sondage', $linkback, 1, 'id_sondage_admin', 'id_sondage_admin'); +print $form->showrefnav($object, 'sondage', $linkback, 1, 'id_sondage', 'id_sondage'); print ''; print ''; @@ -462,7 +461,7 @@ if (GETPOST('ajoutsujet')) { //on recupere les données et les sujets du sondage print ''."\n"; - print ''; + print ''; print ''; print '
'."\n"; @@ -577,7 +576,7 @@ print '
'."\n"; $nbcolonnes=substr_count($object->sujet,',')+1; print ''."\n"; -print ''; +print ''; print '
'."\n"; print '
'."\n"; @@ -634,7 +633,7 @@ if ($object->format=="D"||$object->format=="D+") } } - print '
id_sondage_admin.'">'.$langs->trans("Add").''."\n"; + print 'id_sondage.'">'.$langs->trans("Add").''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; @@ -660,7 +659,7 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; + print 'id_sondage.'">'.$langs->trans("Add").''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; @@ -684,7 +683,7 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; + print 'id_sondage.'">'.$langs->trans("Add").''."\n"; print ''."\n"; //affichage des horaires @@ -702,7 +701,7 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage_admin.'">'.$langs->trans("Add").''."\n"; + print 'id_sondage.'">'.$langs->trans("Add").''."\n"; print ''."\n"; } } @@ -719,7 +718,7 @@ else print ''.$tmp[0].''."\n"; } - print ''.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).''."\n"; + print ''.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).''."\n"; print ''."\n"; } diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 9e40f254021..61c65a62441 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -47,11 +47,9 @@ class Opensurveysondage extends CommonObject var $mail_admin; var $nom_admin; var $titre; - var $id_sondage_admin; var $date_fin=''; var $format; var $mailsonde; - var $survey_link_visible; var $canedit; /** @@ -91,10 +89,8 @@ class Opensurveysondage extends CommonObject if (isset($this->mail_admin)) $this->mail_admin=trim($this->mail_admin); if (isset($this->nom_admin)) $this->nom_admin=trim($this->nom_admin); if (isset($this->titre)) $this->titre=trim($this->titre); - if (isset($this->id_sondage_admin)) $this->id_sondage_admin=trim($this->id_sondage_admin); if (isset($this->format)) $this->format=trim($this->format); if (isset($this->mailsonde)) $this->mailsonde=trim($this->mailsonde); - if (isset($this->survey_link_visible)) $this->survey_link_visible=trim($this->survey_link_visible); if (isset($this->canedit)) $this->canedit=trim($this->canedit); @@ -110,11 +106,9 @@ class Opensurveysondage extends CommonObject $sql.= "mail_admin,"; $sql.= "nom_admin,"; $sql.= "titre,"; - $sql.= "id_sondage_admin,"; $sql.= "date_fin,"; $sql.= "format,"; $sql.= "mailsonde,"; - $sql.= "survey_link_visible,"; $sql.= "canedit"; $sql.= ") VALUES ("; @@ -123,11 +117,9 @@ class Opensurveysondage extends CommonObject $sql.= " ".(! isset($this->mail_admin)?'NULL':"'".$this->db->escape($this->mail_admin)."'").","; $sql.= " ".(! isset($this->nom_admin)?'NULL':"'".$this->db->escape($this->nom_admin)."'").","; $sql.= " ".(! isset($this->titre)?'NULL':"'".$this->db->escape($this->titre)."'").","; - $sql.= " ".(! isset($this->id_sondage_admin)?'NULL':"'".$this->db->escape($this->id_sondage_admin)."'").","; $sql.= " ".(! isset($this->date_fin) || dol_strlen($this->date_fin)==0?'NULL':$this->db->idate($this->date_fin)).","; $sql.= " ".(! isset($this->format)?'NULL':"'".$this->db->escape($this->format)."'").","; $sql.= " ".(! isset($this->mailsonde)?'NULL':"'".$this->db->escape($this->mailsonde)."'").","; - $sql.= " ".(! isset($this->survey_link_visible)?'NULL':"'".$this->db->escape($this->survey_link_visible)."'").","; $sql.= " ".(! isset($this->canedit)?'NULL':"'".$this->db->escape($this->canedit)."'").""; $sql.= ")"; @@ -193,19 +185,16 @@ class Opensurveysondage extends CommonObject $sql.= " t.mail_admin,"; $sql.= " t.nom_admin,"; $sql.= " t.titre,"; - $sql.= " t.id_sondage_admin,"; $sql.= " t.date_fin,"; $sql.= " t.format,"; $sql.= " t.mailsonde,"; - $sql.= " t.survey_link_visible,"; $sql.= " t.canedit,"; $sql.= " t.allow_comments,"; $sql.= " t.sujet,"; $sql.= " t.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as t"; if ($id > 0) $sql.= " WHERE t.rowid = ".$this->db->escape($id); - else if (strlen($numsurvey) == 16) $sql.= " WHERE t.id_sondage = '".$this->db->escape($numsurvey)."'"; - else $sql.= " WHERE t.id_sondage_admin = '".$this->db->escape($numsurvey)."'"; + else $sql.= " WHERE t.id_sondage = '".$this->db->escape($numsurvey)."'"; dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); @@ -216,18 +205,15 @@ class Opensurveysondage extends CommonObject $obj = $this->db->fetch_object($resql); //$this->id = $obj->rowid; - $this->ref = $obj->id_sondage_admin; $this->id_sondage = $obj->id_sondage; $this->commentaires = $obj->commentaires; $this->mail_admin = $obj->mail_admin; $this->nom_admin = $obj->nom_admin; $this->titre = $obj->titre; - $this->id_sondage_admin = $obj->id_sondage_admin; $this->date_fin = $this->db->jdate($obj->date_fin); $this->format = $obj->format; $this->mailsonde = $obj->mailsonde; - $this->survey_link_visible = $obj->survey_link_visible; $this->canedit = $obj->canedit; $this->allow_comments = $obj->allow_comments; $this->sujet = $obj->sujet; @@ -275,10 +261,8 @@ class Opensurveysondage extends CommonObject if (isset($this->mail_admin)) $this->mail_admin=trim($this->mail_admin); if (isset($this->nom_admin)) $this->nom_admin=trim($this->nom_admin); if (isset($this->titre)) $this->titre=trim($this->titre); - if (isset($this->id_sondage_admin)) $this->id_sondage_admin=trim($this->id_sondage_admin); if (isset($this->format)) $this->format=trim($this->format); if (isset($this->mailsonde)) $this->mailsonde=trim($this->mailsonde); - if (isset($this->survey_link_visible)) $this->survey_link_visible=trim($this->survey_link_visible); $this->canedit = $this->canedit ? 1 : 0; $this->allow_comments = $this->allow_comments ? 1 : 0; @@ -293,16 +277,14 @@ class Opensurveysondage extends CommonObject $sql.= " mail_admin=".(isset($this->mail_admin)?"'".$this->db->escape($this->mail_admin)."'":"null").","; $sql.= " nom_admin=".(isset($this->nom_admin)?"'".$this->db->escape($this->nom_admin)."'":"null").","; $sql.= " titre=".(isset($this->titre)?"'".$this->db->escape($this->titre)."'":"null").","; - $sql.= " id_sondage_admin=".(isset($this->id_sondage_admin)?"'".$this->db->escape($this->id_sondage_admin)."'":"null").","; $sql.= " date_fin=".(dol_strlen($this->date_fin)!=0 ? "'".$this->db->idate($this->date_fin)."'" : 'null').","; $sql.= " format=".(isset($this->format)?"'".$this->db->escape($this->format)."'":"null").","; $sql.= " mailsonde=".(isset($this->mailsonde)?$this->db->escape($this->mailsonde):"null").","; - $sql.= " survey_link_visible=".(isset($this->survey_link_visible)?$this->db->escape($this->survey_link_visible):"null").","; $sql.= " canedit=".$this->db->escape($this->canedit).","; $sql.= " allow_comments=".$this->db->escape($this->allow_comments); //$sql.= " WHERE rowid=".$this->id; - $sql.= " WHERE id_sondage_admin='".$this->db->escape($this->id_sondage_admin)."'"; + $sql.= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'"; $this->db->begin(); @@ -350,16 +332,14 @@ class Opensurveysondage extends CommonObject * * @param User $user User that deletes * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @param string $numsondageadmin Num sondage admin to delete + * @param string $numsondage Num sondage admin to delete * @return int <0 if KO, >0 if OK */ - function delete($user, $notrigger, $numsondageadmin) + function delete($user, $notrigger, $numsondage) { global $conf, $langs; $error=0; - $numsondage=substr($numsondageadmin, 0, 16); - $this->db->begin(); if (! $error) @@ -389,7 +369,7 @@ class Opensurveysondage extends CommonObject $resql=$this->db->query($sql); $sql = "DELETE FROM ".MAIN_DB_PREFIX."opensurvey_sondage"; - $sql.= " WHERE id_sondage_admin = '".$this->db->escape($numsondageadmin)."'"; + $sql.= " WHERE id_sondage = '".$this->db->escape($numsondage)."'"; dol_syslog(get_class($this)."::delete sql=".$sql); $resql = $this->db->query($sql); @@ -515,11 +495,9 @@ class Opensurveysondage extends CommonObject $this->mail_admin=''; $this->nom_admin=''; $this->titre=''; - $this->id_sondage_admin=''; $this->date_fin=''; $this->format=''; $this->mailsonde=''; - $this->survey_link_visible=''; $this->canedit=0; } diff --git a/htdocs/opensurvey/exportcsv.php b/htdocs/opensurvey/exportcsv.php index 3cf0fe944e9..12e5fbb0489 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -29,11 +29,10 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php"); $action=GETPOST('action'); -$numsondage = $numsondageadmin = ''; +$numsondage = ''; if (GETPOST('id')) { - $numsondageadmin=GETPOST("id",'alpha'); - $numsondage=substr($numsondageadmin, 0, 16); + $numsondage=GETPOST("id",'alpha'); } $object=new Opensurveysondage($db); diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 7f3ecb5f36e..8876ef6e1aa 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -36,12 +36,12 @@ function opensurvey_prepare_head(Opensurveysondage $object) { $h = 0; $head = array(); - $head[0][0] = 'adminstuds.php?id='.$object->id_sondage_admin; + $head[0][0] = 'adminstuds.php?id='.$object->id_sondage; $head[0][1] = $langs->trans("Card"); $head[0][2] = 'general'; $h++; - $head[1][0] = 'adminstuds_preview.php?id='.$object->id_sondage_admin; + $head[1][0] = 'adminstuds_preview.php?id='.$object->id_sondage; $head[1][1] = $langs->trans("SurveyResults").'/'.$langs->trans("Preview"); $head[1][2] = 'preview'; $h++; @@ -232,7 +232,6 @@ function ajouter_sondage($origin) global $conf, $db; $sondage=dol_survey_random(16); - $sondage_admin=$sondage.dol_survey_random(8); if ($_SESSION["formatsondage"]=="A"||$_SESSION["formatsondage"]=="A+") { //extraction de la date de fin choisie @@ -259,16 +258,16 @@ function ajouter_sondage($origin) // Insert survey $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_sondage'; - $sql.= '(id_sondage, commentaires, mail_admin, nom_admin, titre, id_sondage_admin, date_fin, format, mailsonde, canedit, allow_comments, origin, sujet)'; + $sql.= '(id_sondage, commentaires, mail_admin, nom_admin, titre, date_fin, format, mailsonde, canedit, allow_comments, origin, sujet)'; $sql.= " VALUES ('".$db->escape($sondage)."', '".$db->escape($_SESSION['commentaires'])."', '".$db->escape($_SESSION['adresse'])."', '".$db->escape($_SESSION['nom'])."',"; - $sql.= " '".$db->escape($_SESSION['titre'])."', '".$sondage_admin."', '".$db->idate($date_fin)."', '".$_SESSION['formatsondage']."', '".$db->escape($_SESSION['mailsonde'])."',"; + $sql.= " '".$db->escape($_SESSION['titre'])."', '".$db->idate($date_fin)."', '".$_SESSION['formatsondage']."', '".$db->escape($_SESSION['mailsonde'])."',"; $sql.= " '".$canedit."', '".$allow_comments."', '".$db->escape($origin)."',"; $sql.= " '".$db->escape($_SESSION['toutchoix'])."'"; $sql.= ")"; dol_syslog($sql); $resql=$db->query($sql); - if ($origin == 'dolibarr') $urlback=dol_buildpath('/opensurvey/adminstuds_preview.php',1).'?id='.$sondage_admin; + if ($origin == 'dolibarr') $urlback=dol_buildpath('/opensurvey/adminstuds_preview.php',1).'?id='.$sondage; else { // Define $urlwithroot diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 49fa1da6149..90071466dd4 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -28,7 +28,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); $action=GETPOST('action'); $id=GETPOST('id'); -$numsondage=substr($id, 0, 16); +$numsondage= $id; if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="p.titre"; @@ -49,7 +49,7 @@ if ($action == 'delete_confirm') $object=new Opensurveysondage($db); - $result=$object->delete($user,'',$numsondageadmin); + $result=$object->delete($user,'',$numsondage); $db->commit(); } @@ -80,7 +80,7 @@ if ($action == 'delete') print ''."\n"; print ''."\n"; -$sql = "SELECT id_sondage, id_sondage_admin, mail_admin, format, origin, date_fin, titre, nom_admin"; +$sql = "SELECT id_sondage, mail_admin, format, origin, date_fin, titre, nom_admin"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as p"; // Count total nb of records $nbtotalofrecords = 0; @@ -114,7 +114,7 @@ while ($i < min($num,$limit)) $var=!$var; print ''; print ''; print''."\n"; - print ''."\n"; + print ''."\n"; print ''."\n"; $i++; diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index dec1d8f6d22..a8968987f83 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -33,19 +33,10 @@ require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); // Init vars $action=GETPOST('action'); -$numsondage = $numsondageadmin = ''; +$numsondage = ''; if (GETPOST('sondage')) { - if (strlen(GETPOST('sondage')) == 24) // recuperation du numero de sondage admin (24 car.) dans l'URL - { - $numsondageadmin=GETPOST("sondage",'alpha'); - $numsondage=substr($numsondageadmin, 0, 16); - } - else - { - $numsondageadmin=''; - $numsondage=GETPOST("sondage",'alpha'); - } + $numsondage = GETPOST('sondage', 'alpha'); } $object=new Opensurveysondage($db); From 2b01981213f0ea7bd5774f36b44cfb380f20b26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 22:29:40 +0100 Subject: [PATCH 029/177] There is no rowid in llx_opensurvey_sondage table --- htdocs/opensurvey/class/opensurveysondage.class.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 61c65a62441..84c08a2e125 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -179,7 +179,6 @@ class Opensurveysondage extends CommonObject global $langs; $sql = "SELECT"; - //$sql.= " t.rowid,"; $sql.= " t.id_sondage,"; $sql.= " t.commentaires,"; $sql.= " t.mail_admin,"; @@ -193,8 +192,7 @@ class Opensurveysondage extends CommonObject $sql.= " t.sujet,"; $sql.= " t.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as t"; - if ($id > 0) $sql.= " WHERE t.rowid = ".$this->db->escape($id); - else $sql.= " WHERE t.id_sondage = '".$this->db->escape($numsurvey)."'"; + $sql.= " WHERE t.id_sondage = '".$this->db->escape($numsurvey)."'"; dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); @@ -204,8 +202,6 @@ class Opensurveysondage extends CommonObject { $obj = $this->db->fetch_object($resql); - //$this->id = $obj->rowid; - $this->id_sondage = $obj->id_sondage; $this->commentaires = $obj->commentaires; $this->mail_admin = $obj->mail_admin; @@ -283,7 +279,6 @@ class Opensurveysondage extends CommonObject $sql.= " canedit=".$this->db->escape($this->canedit).","; $sql.= " allow_comments=".$this->db->escape($this->allow_comments); - //$sql.= " WHERE rowid=".$this->id; $sql.= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'"; $this->db->begin(); From 13d4ea4c3829ec1fa24faa3c74447d4ff88eb7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 23:30:15 +0100 Subject: [PATCH 030/177] =?UTF-8?q?Added=20a=20new=20feature=20to=20disabl?= =?UTF-8?q?e=20spying=20other=20users=E2=80=99=20vote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../install/mysql/migration/3.5.0-3.6.0.sql | 7 +- .../mysql/tables/llx_opensurvey_sondage.sql | 1 + htdocs/langs/en_US/opensurvey.lang | 5 +- htdocs/opensurvey/adminstuds.php | 12 +- .../class/opensurveysondage.class.php | 14 +- htdocs/opensurvey/fonctions.php | 10 +- htdocs/opensurvey/public/create_survey.php | 10 + htdocs/opensurvey/public/studs.php | 298 +++++++++--------- 8 files changed, 198 insertions(+), 159 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index c900b9d7374..41209d68cd2 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -18,7 +18,8 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); ALTER TABLE llx_bookmark ADD COLUMN entity integer DEFAULT 1 NOT NULL; -ALTER TABLE `llx_opensurvey_sondage` ADD `allow_comments` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT 1 AFTER `canedit` ; -ALTER TABLE `llx_opensurvey_sondage` DROP `survey_link_visible` ; +ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_comments` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT 1 AFTER `canedit` ; +ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `survey_link_visible` ; ALTER TABLE `llx_opensurvey_sondage` DROP INDEX `idx_id_sondage_admin` ; -ALTER TABLE `llx_opensurvey_sondage` DROP `id_sondage_admin` ; \ No newline at end of file +ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `id_sondage_admin` ; +ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_spy` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allow_comments` ; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index ae06605ec67..111519ce901 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -26,6 +26,7 @@ CREATE TABLE llx_opensurvey_sondage ( mailsonde varchar(2) DEFAULT '0', canedit integer DEFAULT 0, allow_comments TINYINT(1) unsigned NOT NULL DEFAULT 1, + allow_spy TINYINT(1) unsigned NOT NULL DEFAULT 1, origin VARCHAR(64), tms TIMESTAMP, sujet TEXT diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 88308711fc6..8125589d105 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -27,7 +27,7 @@ SelectedDays=Selected days TheBestChoice=The best choice currently is TheBestChoices=The best choices currently are with=with -OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you (without paying attention to the choices of the other voters) and validate with the plus button at the end of the line. +OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line. InitiatorOfPoll=Initiator of the poll CommentsOfVoters=Comments of voters ConfirmRemovalOfPoll=Are you sure you want to remove this poll (and all votes) @@ -66,7 +66,8 @@ AddEndHour=Add end hour votes=vote(s) NoCommentYet=No comments have been posted for this poll yet CanEditVotes=Can change vote of others -CanComment=Users can comment in the poll +CanComment=Voters can comment in the poll +CanSeeOthersVote=Voters can see other people's vote SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. BackToCurrentMonth=Back to current month PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index 705f668ae8b..9433ea6a250 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -88,6 +88,7 @@ if ($action == 'update') $object->date_fin = $expiredate; $object->canedit = GETPOST('canedit')=='on'?1:0; $object->allow_comments = GETPOST('cancomment') == 'on' ? true : false; + $object->allow_spy = GETPOST('canseeothersvote') == 'on' ? true : false; $res=$object->update($user); if ($res < 0) @@ -176,7 +177,7 @@ $linkback = ''.$langs->tra // Ref print '
'; print ''; print ''; @@ -239,6 +240,15 @@ if ($action == 'edit') else print yn($object->allow_comments); print ''; +// Users can see others vote +print ''; + // Expire date print ''."\n"; - - // ligne d'un usager pré-authentifié - $mod_ok = ($object->canedit || (! empty($nombase) && in_array($nombase, $listofvoters))); - - // Name - $nombase=str_replace("°","'",$obj->nom); - print ''."\n"; - - // si la ligne n'est pas a changer, on affiche les données - if (! $testligneamodifier) +if ($object->allow_spy) { + $sumfor = array(); + $sumagainst = array(); + $compteur = 0; + $sql ="SELECT id_users, nom, id_sondage, reponses"; + $sql.=" FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; + $sql.=" WHERE id_sondage = '".$db->escape($numsondage)."'"; + dol_syslog('sql='.$sql); + $resql=$db->query($sql); + if (! $resql) { - for ($i = 0; $i < $nbcolonnes; $i++) - { - $car = substr($ensemblereponses, $i, 1); - //print 'xx'.$i."-".$car.'-'.$listofanswers[$i]['format'].'zz'; - - if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) - { - if (((string) $car) == "1") print ''."\n"; - else print ''."\n"; - // Total - if (! isset($sumfor[$i])) $sumfor[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - } - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { - if (((string) $car) == "1") print ''."\n"; - else if (((string) $car) == "0") print ''."\n"; - else print ''."\n"; - // Total - if (! isset($sumfor[$i])) $sumfor[$i] = 0; - if (! isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; - } - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { - if (((string) $car) == "1") print ''."\n"; - else if (((string) $car) == "0") print ''."\n"; - else print ''."\n"; - // Total - if (! isset($sumfor[$i])) $sumfor[$i] = 0; - if (! isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; - } - } + dol_print_error($db); + exit; } - else + $num=$db->num_rows($resql); + while ($compteur < $num) { - //sinon on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs - if ($compteur == $ligneamodifier) - { - for ($i = 0; $i < $nbcolonnes; $i++) - { - $car = substr($ensemblereponses, $i, 1); - print ''."\n"; - } - } - else + $obj=$db->fetch_object($resql); + + $ensemblereponses = $obj->reponses; + + print ''."\n"; + + // ligne d'un usager pré-authentifié + $mod_ok = ($object->canedit || (! empty($nombase) && in_array($nombase, $listofvoters))); + + // Name + $nombase=str_replace("°","'",$obj->nom); + print ''."\n"; + + // si la ligne n'est pas a changer, on affiche les données + if (! $testligneamodifier) { for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); + //print 'xx'.$i."-".$car.'-'.$listofanswers[$i]['format'].'zz'; + if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) { if (((string) $car) == "1") print ''."\n"; @@ -477,8 +413,8 @@ while ($compteur < $num) } if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { - if (((string) $car) == "1") print ''."\n"; - else if (((string) $car) == "0") print ''."\n"; + if (((string) $car) == "1") print ''."\n"; + else if (((string) $car) == "0") print ''."\n"; else print ''."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -499,31 +435,97 @@ while ($compteur < $num) } } } - } - - // Button edit at end of line - if ($compteur != $ligneamodifier && $mod_ok) - { - print ''."\n"; - } - - //demande de confirmation pour modification de ligne - for ($i=0; $i<$nblignes; $i++) - { - if (isset($_POST["modifierligne".$i])) + else { - if ($compteur == $i) + //sinon on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs + if ($compteur == $ligneamodifier) { - print ''."\n"; + for ($i = 0; $i < $nbcolonnes; $i++) + { + $car = substr($ensemblereponses, $i, 1); + print ''."\n"; + } + } + else + { + for ($i = 0; $i < $nbcolonnes; $i++) + { + $car = substr($ensemblereponses, $i, 1); + if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) + { + if (((string) $car) == "1") print ''."\n"; + else print ''."\n"; + // Total + if (! isset($sumfor[$i])) $sumfor[$i] = 0; + if (((string) $car) == "1") $sumfor[$i]++; + } + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') + { + if (((string) $car) == "1") print ''."\n"; + else if (((string) $car) == "0") print ''."\n"; + else print ''."\n"; + // Total + if (! isset($sumfor[$i])) $sumfor[$i] = 0; + if (! isset($sumagainst[$i])) $sumagainst[$i] = 0; + if (((string) $car) == "1") $sumfor[$i]++; + if (((string) $car) == "0") $sumagainst[$i]++; + } + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') + { + if (((string) $car) == "1") print ''."\n"; + else if (((string) $car) == "0") print ''."\n"; + else print ''."\n"; + // Total + if (! isset($sumfor[$i])) $sumfor[$i] = 0; + if (! isset($sumagainst[$i])) $sumagainst[$i] = 0; + if (((string) $car) == "1") $sumfor[$i]++; + if (((string) $car) == "0") $sumagainst[$i]++; + } + } } } - } - $compteur++; - print ''."\n"; + // Button edit at end of line + if ($compteur != $ligneamodifier && $mod_ok) + { + print ''."\n"; + } + + //demande de confirmation pour modification de ligne + for ($i=0; $i<$nblignes; $i++) + { + if (isset($_POST["modifierligne".$i])) + { + if ($compteur == $i) + { + print ''."\n"; + } + } + } + + $compteur++; + print ''."\n"; + } } // Add line to add new record @@ -589,39 +591,41 @@ for ($i=0; $i < $nbcolonnes; $i++) } } -// Show line total -print ''."\n"; -print ''."\n"; -for ($i = 0; $i < $nbcolonnes; $i++) -{ - $showsumfor = isset($sumfor[$i])?$sumfor[$i]:''; - $showsumagainst = isset($sumagainst[$i])?$sumagainst[$i]:''; - if (empty($showsumfor)) $showsumfor = 0; - if (empty($showsumagainst)) $showsumagainst = 0; - - print ''."\n"; -} -print ''; -// Show picto winner -if ($nbofcheckbox >= 2) -{ +if ($object->allow_spy) { + // Show line total print ''."\n"; - print ''."\n"; - for ($i=0; $i < $nbcolonnes; $i++) + print ''."\n"; + for ($i = 0; $i < $nbcolonnes; $i++) { - //print 'xx'.(! empty($listofanswers[$i]['format'])).'-'.$sumfor[$i].'-'.$meilleurecolonne; - if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst')) && isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) - { - print ''."\n"; - } else { - print ''."\n"; - } + $showsumfor = isset($sumfor[$i])?$sumfor[$i]:''; + $showsumagainst = isset($sumagainst[$i])?$sumagainst[$i]:''; + if (empty($showsumfor)) $showsumfor = 0; + if (empty($showsumagainst)) $showsumagainst = 0; + + print ''."\n"; + } + print ''; + // Show picto winner + if ($nbofcheckbox >= 2) + { + print ''."\n"; + print ''."\n"; + for ($i=0; $i < $nbcolonnes; $i++) + { + //print 'xx'.(! empty($listofanswers[$i]['format'])).'-'.$sumfor[$i].'-'.$meilleurecolonne; + if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst')) && isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) + { + print ''."\n"; + } else { + print ''."\n"; + } + } + print ''."\n"; } - print ''."\n"; } print '
'. $langs->trans("Ref").''. $langs->trans("Title") .''. $langs->trans("Type") .''. $langs->trans("Author") .''. $langs->trans("ExpireDate") .''. $langs->trans("NbOfVoters") .' 
'; - print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; + print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; print ''.$obj->titre.''; $type=($obj->format=='A' || $obj->format=='A+')?'classic':'date'; print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); @@ -126,7 +126,7 @@ while ($i < min($num,$limit)) print ''.$nbuser.''.img_picto('', 'delete.png').''.img_picto('', 'delete.png').'
'.$langs->trans('Ref').''; -print $form->showrefnav($object, 'sondage', $linkback, 1, 'id_sondage', 'id_sondage'); +print $form->showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage'); print '
'.$langs->trans('CanSeeOthersVote').''; +if ($action == 'edit') +{ + print 'allow_spy?' checked="true"':'').'">'; +} +else print yn($object->allow_spy); +print '
'.$langs->trans('ExpireDate').''; if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object->date_fin,'expire'); diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 84c08a2e125..fe20979ff4a 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -57,6 +57,12 @@ class Opensurveysondage extends CommonObject * @var bool */ public $allow_comments; + + /** + * Allow users see others vote + * @var bool + */ + public $allow_spy; /** * Constructor @@ -121,7 +127,7 @@ class Opensurveysondage extends CommonObject $sql.= " ".(! isset($this->format)?'NULL':"'".$this->db->escape($this->format)."'").","; $sql.= " ".(! isset($this->mailsonde)?'NULL':"'".$this->db->escape($this->mailsonde)."'").","; $sql.= " ".(! isset($this->canedit)?'NULL':"'".$this->db->escape($this->canedit)."'").""; - + $sql.= ")"; $this->db->begin(); @@ -189,6 +195,7 @@ class Opensurveysondage extends CommonObject $sql.= " t.mailsonde,"; $sql.= " t.canedit,"; $sql.= " t.allow_comments,"; + $sql.= " t.allow_spy,"; $sql.= " t.sujet,"; $sql.= " t.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as t"; @@ -212,6 +219,7 @@ class Opensurveysondage extends CommonObject $this->mailsonde = $obj->mailsonde; $this->canedit = $obj->canedit; $this->allow_comments = $obj->allow_comments; + $this->allow_spy = $obj->allow_spy; $this->sujet = $obj->sujet; $this->date_m = $this->db->jdate($obj->tls); @@ -261,6 +269,7 @@ class Opensurveysondage extends CommonObject if (isset($this->mailsonde)) $this->mailsonde=trim($this->mailsonde); $this->canedit = $this->canedit ? 1 : 0; $this->allow_comments = $this->allow_comments ? 1 : 0; + $this->allow_spy = $this->allow_spy ? 1 : 0; // Check parameters // Put here code to add a control on parameters values @@ -277,7 +286,8 @@ class Opensurveysondage extends CommonObject $sql.= " format=".(isset($this->format)?"'".$this->db->escape($this->format)."'":"null").","; $sql.= " mailsonde=".(isset($this->mailsonde)?$this->db->escape($this->mailsonde):"null").","; $sql.= " canedit=".$this->db->escape($this->canedit).","; - $sql.= " allow_comments=".$this->db->escape($this->allow_comments); + $sql.= " allow_comments=".$this->db->escape($this->allow_comments).","; + $sql.= " allow_spy=".$this->db->escape($this->allow_spy); $sql.= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'"; diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 8876ef6e1aa..3be543a96fd 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -229,7 +229,7 @@ function dol_survey_random($car) */ function ajouter_sondage($origin) { - global $conf, $db; + global $db; $sondage=dol_survey_random(16); @@ -255,13 +255,14 @@ function ajouter_sondage($origin) } $canedit=empty($_SESSION['formatcanedit'])?'0':'1'; $allow_comments = empty($_SESSION['allow_comments']) ? 0 : 1; - + $allow_spy = empty($_SESSION['allow_spy']) ? 0 : 1; + // Insert survey $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_sondage'; - $sql.= '(id_sondage, commentaires, mail_admin, nom_admin, titre, date_fin, format, mailsonde, canedit, allow_comments, origin, sujet)'; + $sql.= '(id_sondage, commentaires, mail_admin, nom_admin, titre, date_fin, format, mailsonde, canedit, allow_comments, allow_spy, origin, sujet)'; $sql.= " VALUES ('".$db->escape($sondage)."', '".$db->escape($_SESSION['commentaires'])."', '".$db->escape($_SESSION['adresse'])."', '".$db->escape($_SESSION['nom'])."',"; $sql.= " '".$db->escape($_SESSION['titre'])."', '".$db->idate($date_fin)."', '".$_SESSION['formatsondage']."', '".$db->escape($_SESSION['mailsonde'])."',"; - $sql.= " '".$canedit."', '".$allow_comments."', '".$db->escape($origin)."',"; + $sql.= " '".$canedit."', '".$allow_comments."', '".$allow_spy."', '".$db->escape($origin)."',"; $sql.= " '".$db->escape($_SESSION['toutchoix'])."'"; $sql.= ")"; dol_syslog($sql); @@ -289,6 +290,7 @@ function ajouter_sondage($origin) unset($_SESSION["canedit"]); unset($_SESSION["mailsonde"]); unset($_SESSION['allow_comments']); + unset($_SESSION['allow_spy']); header("Location: ".$urlback); exit(); diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index 9e33933b4ae..fee80200fb0 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -80,6 +80,12 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GET } else { $_SESSION['allow_comments'] = false; } + + if (GETPOST('allow_spy') == 'on') { + $_SESSION['allow_spy'] = true; + } else { + $_SESSION['allow_spy'] = false; + } if (! isValidEmail($adresse)) $erreur_adresse = true; @@ -182,6 +188,10 @@ if ($_SESSION['allow_comments']) $allow_comments = "checked"; print ' '.$langs->trans('CanComment').'
'."\n"; +if ($_SESSION['allow_spy']) $allow_spy = "checked"; + +print ' '.$langs->trans('CanSeeOthersVote').'
'."\n"; + if (GETPOST('choix_sondage')) { if (GETPOST('choix_sondage') == 'date') print ''; diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index a8968987f83..a0cce7067ad 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -365,108 +365,44 @@ else // Loop on each answer -$sumfor = array(); -$sumagainst = array(); -$compteur = 0; -$sql ="SELECT id_users, nom, id_sondage, reponses"; -$sql.=" FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; -$sql.=" WHERE id_sondage = '".$db->escape($numsondage)."'"; -dol_syslog('sql='.$sql); -$resql=$db->query($sql); -if (! $resql) -{ - dol_print_error($db); - exit; -} -$num=$db->num_rows($resql); -while ($compteur < $num) -{ - $obj=$db->fetch_object($resql); - - $ensemblereponses = $obj->reponses; - - print '
'.$nombase.'OKKO'.$langs->trans("Yes").''.$langs->trans("No").' '.$langs->trans("For").''.$langs->trans("Against").' '; - if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) - { - print ''; - } - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { - $arraychoice=array('2'=>' ','0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")); - print $form->selectarray("choix".$i, $arraychoice, $car); - } - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { - $arraychoice=array('2'=>' ','0'=>$langs->trans("Against"),'1'=>$langs->trans("For")); - print $form->selectarray("choix".$i, $arraychoice, $car); - } - print '
'.$nombase.'OK'.$langs->trans("For").''.$langs->trans("Against").''.$langs->trans("Yes").''.$langs->trans("No").' '; - print ''; - print ''; - print ''; + if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) + { + print ''; + } + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') + { + $arraychoice=array('2'=>' ','0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")); + print $form->selectarray("choix".$i, $arraychoice, $car); + } + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') + { + $arraychoice=array('2'=>' ','0'=>$langs->trans("Against"),'1'=>$langs->trans("For")); + print $form->selectarray("choix".$i, $arraychoice, $car); + } + print 'OKKO'.$langs->trans("For").''.$langs->trans("Against").' '.$langs->trans("For").''.$langs->trans("Against").' 
'; + print ''; + print ''; + print '
'. $langs->trans("Total") .''; - if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) print $showsumfor; - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') print $langs->trans("Yes").': '.$showsumfor.'
'.$langs->trans("No").': '.$showsumagainst; - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') print $langs->trans("For").': '.$showsumfor.'
'.$langs->trans("Against").': '.$showsumagainst; - print '
'. $langs->trans("Total") .''; + if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) print $showsumfor; + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') print $langs->trans("Yes").': '.$showsumfor.'
'.$langs->trans("No").': '.$showsumagainst; + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') print $langs->trans("For").': '.$showsumfor.'
'.$langs->trans("Against").': '.$showsumagainst; + print '
'."\n"; print '
'."\n"; From b9ec6ad6379927267780b3d090f347e0d30c6036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 3 Jan 2014 23:58:44 +0100 Subject: [PATCH 031/177] Removed unused function opensurveysondage::createFromClone --- .../class/opensurveysondage.class.php | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index fe20979ff4a..6d4baf7568b 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -85,7 +85,6 @@ class Opensurveysondage extends CommonObject */ function create($user, $notrigger=0) { - global $conf, $langs; $error=0; // Clean parameters @@ -182,8 +181,6 @@ class Opensurveysondage extends CommonObject */ function fetch($id,$numsurvey='') { - global $langs; - $sql = "SELECT"; $sql.= " t.id_sondage,"; $sql.= " t.commentaires,"; @@ -431,60 +428,6 @@ class Opensurveysondage extends CommonObject return $this->lines; } - /** - * Load an object from its id and create a new one in database - * - * @param int $fromid Id of object to clone - * @return int New id of clone - */ - function createFromClone($fromid) - { - global $user,$langs; - - $error=0; - - $object=new Opensurveysondage($this->db); - - $this->db->begin(); - - // Load source object - $object->fetch($fromid); - $object->id=0; - $object->statut=0; - - // Clear fields - // ... - - // Create clone - $result=$object->create($user); - - // Other options - if ($result < 0) - { - $this->error=$object->error; - $error++; - } - - if (! $error) - { - - - } - - // End - if (! $error) - { - $this->db->commit(); - return $object->id; - } - else - { - $this->db->rollback(); - return -1; - } - } - - /** * Initialise object with example values * Id must be 0 if object instance is a specimen From f6cda9deb6047db67c12a2cbb621e31fefa98d3d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 Jan 2014 12:26:31 +0100 Subject: [PATCH 032/177] Fix: The scale was hardcoded. Comment in english --- .../modules/barcode/phpbarcode.modules.php | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/core/modules/barcode/phpbarcode.modules.php b/htdocs/core/modules/barcode/phpbarcode.modules.php index f5c8d596c70..2d29405ed9e 100644 --- a/htdocs/core/modules/barcode/phpbarcode.modules.php +++ b/htdocs/core/modules/barcode/phpbarcode.modules.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2013 Laurent Destailleur * Copyright (C) 2005 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -20,15 +20,15 @@ /** * \file htdocs/core/modules/barcode/phpbarcode.modules.php * \ingroup barcode - * \brief Fichier contenant la classe du modele de generation code barre phpbarcode + * \brief File with class to generate barcode images using php barcode generator */ require_once DOL_DOCUMENT_ROOT.'/core/modules/barcode/modules_barcode.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/barcode.lib.php'; // This is to include def like $genbarcode_loc and $font_loc -/** \class modPhpbarcode - * \brief Classe du modele de numerotation de generation code barre phpbarcode +/** + * Class to generate barcode images using php barcode generator */ class modPhpbarcode extends ModeleBarCode { @@ -77,7 +77,7 @@ class modPhpbarcode extends ModeleBarCode /** - * Return true if encodinf is supported + * Return true if encoding is supported * * @param string $encoding Encoding norm * @return int >0 if supported, 0 if not @@ -108,9 +108,10 @@ class modPhpbarcode extends ModeleBarCode * @param string $code Value to encode * @param string $encoding Mode of encoding * @param string $readable Code can be read + * @param string $scale Scale * @return int <0 if KO, >0 if OK */ - function buildBarCode($code,$encoding,$readable='Y') + function buildBarCode($code,$encoding,$readable='Y',$scale=1) { global $_GET,$_SERVER; global $conf; @@ -121,7 +122,7 @@ class modPhpbarcode extends ModeleBarCode if ($encoding == 'EAN8' || $encoding == 'EAN13') $encoding = 'EAN'; if ($encoding == 'C39' || $encoding == 'C128') $encoding = substr($encoding,1); - $scale=1; $mode='png'; + $mode='png'; $_GET["code"]=$code; $_GET["encoding"]=$encoding; @@ -147,9 +148,10 @@ class modPhpbarcode extends ModeleBarCode * @param string $code Value to encode * @param string $encoding Mode of encoding * @param string $readable Code can be read + * @param string $scale Scale * @return int <0 if KO, >0 if OK */ - function writeBarCode($code,$encoding,$readable='Y') + function writeBarCode($code,$encoding,$readable='Y',$scale=1) { global $conf,$filebarcode; @@ -159,7 +161,7 @@ class modPhpbarcode extends ModeleBarCode $filebarcode=$file; // global var to be used in barcode_outimage called by barcode_print in buildBarCode - $result=$this->buildBarCode($code,$encoding,$readable); + $result=$this->buildBarCode($code,$encoding,$readable,$scale); return $result; } From 3590e3d7b6845e958d6ed67bf051a6b412e2997b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 4 Jan 2014 15:42:44 +0100 Subject: [PATCH 033/177] Moved creation of surveys to the function Opensurveysondage::create --- .../class/opensurveysondage.class.php | 57 +++++++++++-------- htdocs/opensurvey/fonctions.php | 31 ++++++---- 2 files changed, 53 insertions(+), 35 deletions(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 6d4baf7568b..22f66a2c2a4 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -51,6 +51,9 @@ class Opensurveysondage extends CommonObject var $format; var $mailsonde; var $canedit; + + public $origin; + public $sujet; /** * Allow comments on this poll @@ -89,16 +92,18 @@ class Opensurveysondage extends CommonObject // Clean parameters - if (isset($this->id_sondage)) $this->id_sondage=trim($this->id_sondage); - if (isset($this->commentaires)) $this->commentaires=trim($this->commentaires); - if (isset($this->mail_admin)) $this->mail_admin=trim($this->mail_admin); - if (isset($this->nom_admin)) $this->nom_admin=trim($this->nom_admin); - if (isset($this->titre)) $this->titre=trim($this->titre); - if (isset($this->format)) $this->format=trim($this->format); - if (isset($this->mailsonde)) $this->mailsonde=trim($this->mailsonde); - if (isset($this->canedit)) $this->canedit=trim($this->canedit); - - + $this->id_sondage = trim($this->id_sondage); + $this->commentaires = trim($this->commentaires); + $this->mail_admin = trim($this->mail_admin); + $this->nom_admin = trim($this->nom_admin); + $this->titre = trim($this->titre); + $this->format = trim($this->format); + $this->mailsonde = ($this->mailsonde ? 1 : 0); + $this->canedit = ($this->canedit ? 1 : 0); + $this->allow_comments = ($this->allow_comments ? 1 : 0); + $this->allow_spy = ($this->allow_spy ? 1 : 0); + $this->origin = trim($this->origin); + $this->sujet = trim($this->sujet); // Check parameters // Put here code to add control on parameters values @@ -114,21 +119,29 @@ class Opensurveysondage extends CommonObject $sql.= "date_fin,"; $sql.= "format,"; $sql.= "mailsonde,"; - $sql.= "canedit"; + $sql.= "canedit,"; + $sql.= "allow_comments,"; + $sql.= "allow_spy,"; + $sql.= "origin,"; + $sql.= "sujet"; $sql.= ") VALUES ("; - $sql.= " ".(! isset($this->id_sondage)?'NULL':"'".$this->db->escape($this->id_sondage)."'").","; - $sql.= " ".(! isset($this->commentaires)?'NULL':"'".$this->db->escape($this->commentaires)."'").","; - $sql.= " ".(! isset($this->mail_admin)?'NULL':"'".$this->db->escape($this->mail_admin)."'").","; - $sql.= " ".(! isset($this->nom_admin)?'NULL':"'".$this->db->escape($this->nom_admin)."'").","; - $sql.= " ".(! isset($this->titre)?'NULL':"'".$this->db->escape($this->titre)."'").","; - $sql.= " ".(! isset($this->date_fin) || dol_strlen($this->date_fin)==0?'NULL':$this->db->idate($this->date_fin)).","; - $sql.= " ".(! isset($this->format)?'NULL':"'".$this->db->escape($this->format)."'").","; - $sql.= " ".(! isset($this->mailsonde)?'NULL':"'".$this->db->escape($this->mailsonde)."'").","; - $sql.= " ".(! isset($this->canedit)?'NULL':"'".$this->db->escape($this->canedit)."'").""; + $sql.= "'".$this->db->escape($this->id_sondage)."',"; + $sql.= " ".(empty($this->commentaires)?'NULL':"'".$this->db->escape($this->commentaires)."'").","; + $sql.= " ".(empty($this->mail_admin)?'NULL':"'".$this->db->escape($this->mail_admin)."'").","; + $sql.= " '".$this->db->escape($this->nom_admin)."',"; + $sql.= " '".$this->db->escape($this->titre)."',"; + $sql.= " '".$this->db->idate($this->date_fin)."',"; + $sql.= " '".$this->db->escape($this->format)."',"; + $sql.= " ".$this->db->escape($this->mailsonde).","; + $sql.= " ".$this->db->escape($this->canedit).","; + $sql.= " ".$this->db->escape($this->allow_comments).","; + $sql.= " ".$this->db->escape($this->allow_spy).","; + $sql.= " '".$this->db->escape($this->origin)."',"; + $sql.= " '".$this->db->escape($this->sujet)."'"; $sql.= ")"; - + $this->db->begin(); dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); @@ -137,8 +150,6 @@ class Opensurveysondage extends CommonObject if (! $error) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."opensurvey_sondage"); - if (! $notrigger) { // Uncomment this and change MYOBJECT to your own tag if you diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 3be543a96fd..bbd2a478817 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -230,6 +230,8 @@ function dol_survey_random($car) function ajouter_sondage($origin) { global $db; + + require_once DOL_DOCUMENT_ROOT.'/opensurvey/class/opensurveysondage.class.php'; $sondage=dol_survey_random(16); @@ -253,20 +255,27 @@ function ajouter_sondage($origin) if (is_numeric($date_fin) === false) { $date_fin = time()+15552000; } - $canedit=empty($_SESSION['formatcanedit'])?'0':'1'; + $canedit=empty($_SESSION['caneditsondage']) ? 0 : 1; $allow_comments = empty($_SESSION['allow_comments']) ? 0 : 1; $allow_spy = empty($_SESSION['allow_spy']) ? 0 : 1; // Insert survey - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_sondage'; - $sql.= '(id_sondage, commentaires, mail_admin, nom_admin, titre, date_fin, format, mailsonde, canedit, allow_comments, allow_spy, origin, sujet)'; - $sql.= " VALUES ('".$db->escape($sondage)."', '".$db->escape($_SESSION['commentaires'])."', '".$db->escape($_SESSION['adresse'])."', '".$db->escape($_SESSION['nom'])."',"; - $sql.= " '".$db->escape($_SESSION['titre'])."', '".$db->idate($date_fin)."', '".$_SESSION['formatsondage']."', '".$db->escape($_SESSION['mailsonde'])."',"; - $sql.= " '".$canedit."', '".$allow_comments."', '".$allow_spy."', '".$db->escape($origin)."',"; - $sql.= " '".$db->escape($_SESSION['toutchoix'])."'"; - $sql.= ")"; - dol_syslog($sql); - $resql=$db->query($sql); + $opensurveysondage = new Opensurveysondage($db); + $opensurveysondage->id_sondage = $sondage; + $opensurveysondage->commentaires = $_SESSION['commentaires']; + $opensurveysondage->mail_admin = $_SESSION['adresse']; + $opensurveysondage->nom_admin = $_SESSION['nom']; + $opensurveysondage->titre = $_SESSION['titre']; + $opensurveysondage->date_fin = $date_fin; + $opensurveysondage->format = $_SESSION['formatsondage']; + $opensurveysondage->mailsonde = $_SESSION['mailsonde']; + $opensurveysondage->canedit = $canedit; + $opensurveysondage->allow_comments = $allow_comments; + $opensurveysondage->allow_spy = $allow_spy; + $opensurveysondage->origin = $origin; + $opensurveysondage->sujet = $_SESSION['toutchoix']; + + $opensurveysondage->create(null); if ($origin == 'dolibarr') $urlback=dol_buildpath('/opensurvey/adminstuds_preview.php',1).'?id='.$sondage; else @@ -279,8 +288,6 @@ function ajouter_sondage($origin) $url=$urlwithouturlroot.dol_buildpath('/opensurvey/public/studs.php',1).'?sondage='.$sondage; $urlback=$url; - - //var_dump($urlback);exit; } unset($_SESSION["titre"]); From efba39310e2efe5d48ed8edfca3521662b13b743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 4 Jan 2014 15:47:47 +0100 Subject: [PATCH 034/177] Some session variables were not properly unset --- htdocs/opensurvey/fonctions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index bbd2a478817..d3f1069babb 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -298,6 +298,10 @@ function ajouter_sondage($origin) unset($_SESSION["mailsonde"]); unset($_SESSION['allow_comments']); unset($_SESSION['allow_spy']); + unset($_SESSION['toutchoix']); + unset($_SESSION['caneditsondage']); + unset($_SESSION['totalchoixjour']); + unset($_SESSION['champdatefin']); header("Location: ".$urlback); exit(); From 57a18ba4afd03f8703e91be1ba120d2d01175c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 4 Jan 2014 15:56:37 +0100 Subject: [PATCH 035/177] Unified duplicate code that cleaned Opensurveysondage parameters into Opensurveysondage::cleanParameters --- .../class/opensurveysondage.class.php | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 22f66a2c2a4..80bb57dddfa 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -91,19 +91,7 @@ class Opensurveysondage extends CommonObject $error=0; // Clean parameters - - $this->id_sondage = trim($this->id_sondage); - $this->commentaires = trim($this->commentaires); - $this->mail_admin = trim($this->mail_admin); - $this->nom_admin = trim($this->nom_admin); - $this->titre = trim($this->titre); - $this->format = trim($this->format); - $this->mailsonde = ($this->mailsonde ? 1 : 0); - $this->canedit = ($this->canedit ? 1 : 0); - $this->allow_comments = ($this->allow_comments ? 1 : 0); - $this->allow_spy = ($this->allow_spy ? 1 : 0); - $this->origin = trim($this->origin); - $this->sujet = trim($this->sujet); + $this->cleanParameters(); // Check parameters // Put here code to add control on parameters values @@ -267,17 +255,7 @@ class Opensurveysondage extends CommonObject $error=0; // Clean parameters - - if (isset($this->id_sondage)) $this->id_sondage=trim($this->id_sondage); - if (isset($this->commentaires)) $this->commentaires=trim($this->commentaires); - if (isset($this->mail_admin)) $this->mail_admin=trim($this->mail_admin); - if (isset($this->nom_admin)) $this->nom_admin=trim($this->nom_admin); - if (isset($this->titre)) $this->titre=trim($this->titre); - if (isset($this->format)) $this->format=trim($this->format); - if (isset($this->mailsonde)) $this->mailsonde=trim($this->mailsonde); - $this->canedit = $this->canedit ? 1 : 0; - $this->allow_comments = $this->allow_comments ? 1 : 0; - $this->allow_spy = $this->allow_spy ? 1 : 0; + $this->cleanParameters(); // Check parameters // Put here code to add a control on parameters values @@ -506,5 +484,21 @@ class Opensurveysondage extends CommonObject return true; } + + private function cleanParameters() { + + $this->id_sondage = trim($this->id_sondage); + $this->commentaires = trim($this->commentaires); + $this->mail_admin = trim($this->mail_admin); + $this->nom_admin = trim($this->nom_admin); + $this->titre = trim($this->titre); + $this->format = trim($this->format); + $this->mailsonde = ($this->mailsonde ? 1 : 0); + $this->canedit = ($this->canedit ? 1 : 0); + $this->allow_comments = ($this->allow_comments ? 1 : 0); + $this->allow_spy = ($this->allow_spy ? 1 : 0); + $this->origin = trim($this->origin); + $this->sujet = trim($this->sujet); + } } ?> From 11dc75686f349035b488665b53ee110d443b3ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 4 Jan 2014 15:57:07 +0100 Subject: [PATCH 036/177] Mailsonde Opensurvey function can now be modified --- htdocs/opensurvey/adminstuds.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index 9433ea6a250..32465058912 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -89,6 +89,7 @@ if ($action == 'update') $object->canedit = GETPOST('canedit')=='on'?1:0; $object->allow_comments = GETPOST('cancomment') == 'on' ? true : false; $object->allow_spy = GETPOST('canseeothersvote') == 'on' ? true : false; + $object->mailsonde = GETPOST('mailsonde') == 'on' ? true : false; $res=$object->update($user); if ($res < 0) @@ -222,6 +223,15 @@ if ($action == 'edit') else print dol_print_email($object->mail_admin); print ''; +// Receive an email with each vote +print ''.$langs->trans('ToReceiveEMailForEachVote').''; +if ($action == 'edit') +{ + print 'mailsonde?' checked="true"':'').'">'; +} +else print yn($object->mailsonde); +print ''; + // Can edit other votes print ''.$langs->trans('CanEditVotes').''; if ($action == 'edit') From ee1e7471ff34bc4b10287be3420bd9c83bb11840 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 Jan 2014 16:17:47 +0100 Subject: [PATCH 037/177] Fix: A lot of bug into generation of sticker pages or address pages form members module: - Position of element was wrong for non A4 pages. - Removed bugged definition of 5164 sticker template. - Solve problem of image proportions. - Margin of right was wrong. Conflicts: htdocs/core/modules/member/doc/pdf_standard.class.php htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php --- htdocs/core/lib/format_cards.lib.php | 4 +- .../modules/member/doc/pdf_standard.class.php | 66 ++++++++++------ .../doc/pdf_standardlabel.class.php | 79 ++++++++++++------- htdocs/langs/en_US/products.lang | 12 ++- htdocs/langs/fr_FR/products.lang | 9 +++ 5 files changed, 117 insertions(+), 53 deletions(-) diff --git a/htdocs/core/lib/format_cards.lib.php b/htdocs/core/lib/format_cards.lib.php index 13708771e30..5f18cb1a976 100644 --- a/htdocs/core/lib/format_cards.lib.php +++ b/htdocs/core/lib/format_cards.lib.php @@ -77,7 +77,7 @@ $_Avery_Labels = array ( 'width'=>101.6, 'height'=>50.8, 'font-size'=>8), - '5164'=>array('name'=>'5164 (Letter)', + /* Bugged '5164'=>array('name'=>'5164 (Letter)', 'paper-size'=>'letter', 'metric'=>'in', 'marginLeft'=>0.148, @@ -88,7 +88,7 @@ $_Avery_Labels = array ( 'SpaceY'=>0, 'width'=>4.0, 'height'=>3.33, - 'font-size'=>12), + 'font-size'=>12), */ '8600'=>array('name'=>'8600 (Letter)', 'paper-size'=>'letter', 'metric'=>'mm', diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 94580ff1fad..00aba591add 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -51,6 +51,7 @@ */ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php'; @@ -122,12 +123,16 @@ class pdf_standard * @param Translate $outputlangs Output langs * @param string $textright Text right * @param int $idmember Id member - * @param string $photo Photo member + * @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text) * @return void */ function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$idmember=0,$photo='') { global $mysoc,$conf,$langs; + global $forceimgscalewidth,$forceimgscaleheight; + + $imgscalewidth=(empty($forceimgscalewidth)?0.3:$forceimgscalewidth); // Scale of image for width (1=Full width of sticker) + $imgscaleheight=(empty($forceimgscalewidth)?0.5:$forceimgscalewidth); // Scale of image for height (1=Full height of sticker) // We are in a new page, then we must add a page if (($this->_COUNTX ==0) and ($this->_COUNTY==0) and (!$this->_First==1)) { @@ -192,50 +197,67 @@ class pdf_standard $pdf->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); } + + $xleft=2; $ytop=2+(empty($header)?0:1+$this->_Line_Height); + $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); + $defaultratio=($maxwidthtouse/$maxheighttouse); + + // Define widthtouse and heighttouse + $widthtouse=$maxwidthtouse; $heighttouse=0; // old value for image + $tmp=dol_getImageSize($photo, false); + if ($tmp['height']) + { + $imgratio=$tmp['width']/$tmp['height']; + if ($imgratio >= $defaultratio) { $widthtouse = $maxwidthtouse; $heighttouse = round($widthtouse / $imgratio); } + else { $heightouse = $maxheighttouse; $widthtouse = round($heightouse * $imgratio); } + } + //var_dump($this->_Width.'x'.$this->_Height.' with border and scale '.$imgscale.' => max '.$maxwidthtouse.'x'.$maxheighttouse.' => We use '.$widthtouse.'x'.$heighttouse);exit; + // Center if ($textright=='') // Only a left part { - if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + // Output left area + if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { - $pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); + $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); + $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } } else if ($textleft!='' && $textright!='') // { if ($textleft == '%LOGO%' || $textleft == '%PHOTO%') { - if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - $pdf->SetXY($_PosX+21, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell($this->_Width-22, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); + if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + $pdf->SetXY($_PosX+$xleft+$widthtouse+1, $_PosY+$ytop); + $pdf->MultiCell($this->_Width-$xleft-$xleft-$widthtouse-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } else if ($textright == '%LOGO%' || $textright == '%PHOTO%') { - if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+3+$this->_Line_Height,20); - else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+3+$this->_Line_Height,20); - $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell($this->_Width-22, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); + if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); + $pdf->MultiCell($this->_Width-$widthtouse-$xleft-$xleft-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } - else + else // text on halft left and text on half right { - $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell(round($this->_Width/2), $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); - $pdf->SetXY($_PosX+round($this->_Width/2), $_PosY+3+$this->_Line_Height); + $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); + $pdf->MultiCell(round($this->_Width/2), $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); + $pdf->SetXY($_PosX+round($this->_Width/2), $_PosY+$ytop); $pdf->MultiCell(round($this->_Width/2)-2, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } - } else // Only a right part { - if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); - else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); + // Output right area + if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { - $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); + $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); + $pdf->MultiCell($this->_Width-$xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } } diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index f4fd38b52ad..c05f168d2a8 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -51,6 +51,7 @@ */ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php'; @@ -114,20 +115,24 @@ class pdf_standardlabel /** * On imprime une etiquette * - * @param PDF &$pdf PDF - * @param string $textleft Textleft - * @param string $header Header - * @param string $footer Footer - * @param Translate $outputlangs Output langs - * @param string $textright Text right - * @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text) - * @return void + * @param PDF &$pdf PDF + * @param string $textleft Text left + * @param string $header Header + * @param string $footer Footer + * @param Translate $outputlangs Output langs + * @param string $textright Text right + * @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text) + * @return void */ function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$photo='') { global $mysoc,$conf,$langs; + global $forceimgscalewidth,$forceimgscaleheight; - // We are in a new page, then we must add a page + $imgscalewidth=(empty($forceimgscalewidth)?0.3:$forceimgscalewidth); // Scale of image for width (1=Full width of sticker) + $imgscaleheight=(empty($forceimgscalewidth)?0.5:$forceimgscalewidth); // Scale of image for height (1=Full height of sticker) + + // We are in a new page, then we must add a page if (($this->_COUNTX ==0) and ($this->_COUNTY==0) and (!$this->_First==1)) { $pdf->AddPage(); } @@ -180,14 +185,31 @@ class pdf_standardlabel $pdf->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); } - // Middle + + $xleft=2; $ytop=2+(empty($header)?0:1+$this->_Line_Height); + $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); + $defaultratio=($maxwidthtouse/$maxheighttouse); + + // Define widthtouse and heighttouse + $widthtouse=$maxwidthtouse; $heighttouse=0; // old value for image + $tmp=dol_getImageSize($photo, false); + if ($tmp['height']) + { + $imgratio=$tmp['width']/$tmp['height']; + if ($imgratio >= $defaultratio) { $widthtouse = $maxwidthtouse; $heighttouse = round($widthtouse / $imgratio); } + else { $heightouse = $maxheighttouse; $widthtouse = round($heightouse * $imgratio); } + } + //var_dump($this->_Width.'x'.$this->_Height.' with border and scale '.$imgscale.' => max '.$maxwidthtouse.'x'.$maxheighttouse.' => We use '.$widthtouse.'x'.$heighttouse);exit; + + // Center if ($textright=='') // Only a left part { - if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); + // Output left area + if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { - $pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height); + $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } } @@ -195,34 +217,35 @@ class pdf_standardlabel { if ($textleft == '%LOGO%' || $textleft == '%PHOTO%') { - if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20); - $pdf->SetXY($_PosX+21, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell($this->_Width-22, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); + if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + $pdf->SetXY($_PosX+$xleft+$widthtouse+1, $_PosY+$ytop); + $pdf->MultiCell($this->_Width-$xleft-$xleft-$widthtouse-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } else if ($textright == '%LOGO%' || $textright == '%PHOTO%') { - if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+3+$this->_Line_Height,20); - else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+3+$this->_Line_Height,20); - $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell($this->_Width-22, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); + if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); + $pdf->MultiCell($this->_Width-$widthtouse-$xleft-$xleft-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } - else + else // text on halft left and text on half right { - $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); + $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); $pdf->MultiCell(round($this->_Width/2), $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); - $pdf->SetXY($_PosX+round($this->_Width/2), $_PosY+3+$this->_Line_Height); + $pdf->SetXY($_PosX+round($this->_Width/2), $_PosY+$ytop); $pdf->MultiCell(round($this->_Width/2)-2, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } } else // Only a right part { - if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20); - else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20); + // Output right area + if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); + else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop,$widthtouse,$heighttouse); else { - $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); + $pdf->SetXY($_PosX+$xleft, $_PosY+$ytop); + $pdf->MultiCell($this->_Width-$xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } } diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 48f6b8489e6..806c3a4d083 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -203,4 +203,14 @@ ServiceSellByQuarterHT=Services turnover quarterly VWAP Quarter1=1st. Quarter Quarter2=2nd. Quarter Quarter3=3rd. Quarter -Quarter4=4th. Quarter \ No newline at end of file +Quarter4=4th. Quarter +BarCodePrintsheet=Imprimer code barre +PageToGenerateBarCodeSheets=With this tool, you can print sheets of bar code stickers. Choose format of your sticker page, type of barcode and value of barcode, then click on button %s. +NumberOfStickers=Number of stickers to print on page +PrintsheetForOneBarCode=Print several stickers for one barcode +BuildPageToPrint=Generate page to print +FillBarCodeTypeAndValueManually=Fill barcode type and value manually +FillBarCodeTypeAndValueFromProduct=Fill barcode type and value from a product +FillBarCodeTypeAndValueFromThirdParty=Fill barcode type and value from a thirdparty +BarcodeStickersMask=xxx + \ No newline at end of file diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 942eb67897f..df987ff22d3 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -204,3 +204,12 @@ Quarter1=1er trimestre Quarter2=2eme trimestre Quarter3=3eme trimestre Quarter4=4eme trimestre +BarCodePrintsheet=Imprimer code barre +PageToGenerateBarCodeSheets=Avec cet outils, vous pouvez imprimer une planche d'étiquette de code-barres. Sélectionner votre format de planche d'étiquette, le type de code-barre et la valeur du code-barre puis cliquer sur le bouton %s. +NumberOfStickers=Nombre d'étiquettes à imprimer sur la/les planches +PrintsheetForOneBarCode=Imprimer des étiquettes d'un code barre particulier +BuildPageToPrint=Générer la page à imprimer +FillBarCodeTypeAndValueManually=Remplir le type et la valeur du code barre manuellement +FillBarCodeTypeAndValueFromProduct=Remplir le type et la valeur du code barre depuis un produit +FillBarCodeTypeAndValueFromThirdParty=Remplir le type et la valeur du code barre depuis un tiers +BarcodeStickersMask=xxx \ No newline at end of file From a40286f2fcc693a500ed855a8e473621e818dfb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 4 Jan 2014 17:17:25 +0100 Subject: [PATCH 038/177] Added missing function comment --- htdocs/opensurvey/class/opensurveysondage.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 80bb57dddfa..7a7f9e8530a 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -485,6 +485,9 @@ class Opensurveysondage extends CommonObject return true; } + /** + * Cleans all the class variables before doing an update or an insert + */ private function cleanParameters() { $this->id_sondage = trim($this->id_sondage); From c197fbd4362c9983ef0fc0eb82b2e86b080cc331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 4 Jan 2014 18:01:55 +0100 Subject: [PATCH 039/177] Removed unused images --- .../public/images/logo_uds_bandeau.gif | Bin 3391 -> 0 bytes .../public/images/logo_uds_lettre.jpg | Bin 23051 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100755 htdocs/opensurvey/public/images/logo_uds_bandeau.gif delete mode 100755 htdocs/opensurvey/public/images/logo_uds_lettre.jpg diff --git a/htdocs/opensurvey/public/images/logo_uds_bandeau.gif b/htdocs/opensurvey/public/images/logo_uds_bandeau.gif deleted file mode 100755 index 3132c13a75a91be0d8a555378ddcd370e6828b29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3391 zcmV-F4Z!k8Nk%w1VgCSO0O$Sy5oxZs$kfTn%8jG6)zsD5+1WCExm9$Fu+8Mu zk-FN>;O>R7)t$lKWuD6X{QQ}}+-ac9(cI+X?e*&F>*eL;`uh6K*x|g@=y9dbI8bAAEeU_@U(B`|kyM&vpxYFmy-0axq^85V$CU&(oNLBv+{~d6$($dnY$>Qkn z_XJ_7G0l^ILqB^Y{Dn^Yg;N!bMkQW1Pxt ziJmkvH9I*yG(JVp(9wdh)Xm@SG(}NIR9#18c$SrxY-(*bOAab*hxY?4ClYM)A%iirpUvb*#@=J}v zqM)KME-_hGT6}tZw6nC3j*#{D`G0+YtjptgcX@!CtU-sqNQ=R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vj z?kQtm)jfOtYAwOXFYPi+ Date: Sat, 4 Jan 2014 18:57:57 +0100 Subject: [PATCH 040/177] Problem of key of language into auguria menu --- htdocs/core/menus/init_menu_auguria.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index eeeb699a844..6dbb9e1119d 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -70,9 +70,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 600__+MAX_llx_menu__, 'companies', 'contacts', 2__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'ContactsAddresses', 0, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 601__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/fiche.php?leftmenu=contacts&action=create', 'NewContactAddress', 1, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 602__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=p', 'Prospects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=c', 'Customers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=f', 'Suppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=p', 'ThirdPartyProspects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=c', 'ThirdPartyCustomers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=f', 'ThirdPartySuppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 607__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=o', 'Others', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 4, __ENTITY__); -- Third parties - Category customer insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 650__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=1', 'SuppliersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); From c9db0c3a945a5b0cafd5a20725cfe53ffc4cdefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 4 Jan 2014 19:51:44 +0100 Subject: [PATCH 041/177] =?UTF-8?q?Removed=20=E2=80=9Cstupid=E2=80=9D=20fe?= =?UTF-8?q?ature=20to=20allow=20voters=20edit=20other=20users=E2=80=99=20v?= =?UTF-8?q?ote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 1 + .../install/mysql/tables/llx_opensurvey_sondage.sql | 1 - htdocs/opensurvey/adminstuds.php | 10 ---------- htdocs/opensurvey/class/opensurveysondage.class.php | 8 -------- htdocs/opensurvey/fonctions.php | 4 ---- htdocs/opensurvey/public/choix_autre.php | 1 - htdocs/opensurvey/public/choix_date.php | 1 - htdocs/opensurvey/public/create_survey.php | 11 ++--------- htdocs/opensurvey/public/studs.php | 2 +- 9 files changed, 4 insertions(+), 35 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 41209d68cd2..ffd906c0299 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -22,4 +22,5 @@ ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_comments` TINYINT( 1 ) U ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `survey_link_visible` ; ALTER TABLE `llx_opensurvey_sondage` DROP INDEX `idx_id_sondage_admin` ; ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `id_sondage_admin` ; +ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `canedit` ; ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_spy` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allow_comments` ; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index 111519ce901..b697b0bc4ff 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -24,7 +24,6 @@ CREATE TABLE llx_opensurvey_sondage ( date_fin DATETIME, format VARCHAR(2), mailsonde varchar(2) DEFAULT '0', - canedit integer DEFAULT 0, allow_comments TINYINT(1) unsigned NOT NULL DEFAULT 1, allow_spy TINYINT(1) unsigned NOT NULL DEFAULT 1, origin VARCHAR(64), diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index 32465058912..bb31acf0d99 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -86,7 +86,6 @@ if ($action == 'update') $object->commentaires = GETPOST('nouveauxcommentaires'); $object->mail_admin = GETPOST('nouvelleadresse'); $object->date_fin = $expiredate; - $object->canedit = GETPOST('canedit')=='on'?1:0; $object->allow_comments = GETPOST('cancomment') == 'on' ? true : false; $object->allow_spy = GETPOST('canseeothersvote') == 'on' ? true : false; $object->mailsonde = GETPOST('mailsonde') == 'on' ? true : false; @@ -232,15 +231,6 @@ if ($action == 'edit') else print yn($object->mailsonde); print ''; -// Can edit other votes -print ''.$langs->trans('CanEditVotes').''; -if ($action == 'edit') -{ - print 'canedit?' checked="true"':'').'">'; -} -else print yn($object->canedit); -print ''; - // Users can comment print ''.$langs->trans('CanComment').''; if ($action == 'edit') diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 7a7f9e8530a..b7f83470cec 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -50,7 +50,6 @@ class Opensurveysondage extends CommonObject var $date_fin=''; var $format; var $mailsonde; - var $canedit; public $origin; public $sujet; @@ -107,7 +106,6 @@ class Opensurveysondage extends CommonObject $sql.= "date_fin,"; $sql.= "format,"; $sql.= "mailsonde,"; - $sql.= "canedit,"; $sql.= "allow_comments,"; $sql.= "allow_spy,"; $sql.= "origin,"; @@ -122,7 +120,6 @@ class Opensurveysondage extends CommonObject $sql.= " '".$this->db->idate($this->date_fin)."',"; $sql.= " '".$this->db->escape($this->format)."',"; $sql.= " ".$this->db->escape($this->mailsonde).","; - $sql.= " ".$this->db->escape($this->canedit).","; $sql.= " ".$this->db->escape($this->allow_comments).","; $sql.= " ".$this->db->escape($this->allow_spy).","; $sql.= " '".$this->db->escape($this->origin)."',"; @@ -189,7 +186,6 @@ class Opensurveysondage extends CommonObject $sql.= " t.date_fin,"; $sql.= " t.format,"; $sql.= " t.mailsonde,"; - $sql.= " t.canedit,"; $sql.= " t.allow_comments,"; $sql.= " t.allow_spy,"; $sql.= " t.sujet,"; @@ -213,7 +209,6 @@ class Opensurveysondage extends CommonObject $this->date_fin = $this->db->jdate($obj->date_fin); $this->format = $obj->format; $this->mailsonde = $obj->mailsonde; - $this->canedit = $obj->canedit; $this->allow_comments = $obj->allow_comments; $this->allow_spy = $obj->allow_spy; $this->sujet = $obj->sujet; @@ -271,7 +266,6 @@ class Opensurveysondage extends CommonObject $sql.= " date_fin=".(dol_strlen($this->date_fin)!=0 ? "'".$this->db->idate($this->date_fin)."'" : 'null').","; $sql.= " format=".(isset($this->format)?"'".$this->db->escape($this->format)."'":"null").","; $sql.= " mailsonde=".(isset($this->mailsonde)?$this->db->escape($this->mailsonde):"null").","; - $sql.= " canedit=".$this->db->escape($this->canedit).","; $sql.= " allow_comments=".$this->db->escape($this->allow_comments).","; $sql.= " allow_spy=".$this->db->escape($this->allow_spy); @@ -435,7 +429,6 @@ class Opensurveysondage extends CommonObject $this->date_fin=''; $this->format=''; $this->mailsonde=''; - $this->canedit=0; } /** @@ -497,7 +490,6 @@ class Opensurveysondage extends CommonObject $this->titre = trim($this->titre); $this->format = trim($this->format); $this->mailsonde = ($this->mailsonde ? 1 : 0); - $this->canedit = ($this->canedit ? 1 : 0); $this->allow_comments = ($this->allow_comments ? 1 : 0); $this->allow_spy = ($this->allow_spy ? 1 : 0); $this->origin = trim($this->origin); diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index d3f1069babb..9e7bcf5f511 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -255,7 +255,6 @@ function ajouter_sondage($origin) if (is_numeric($date_fin) === false) { $date_fin = time()+15552000; } - $canedit=empty($_SESSION['caneditsondage']) ? 0 : 1; $allow_comments = empty($_SESSION['allow_comments']) ? 0 : 1; $allow_spy = empty($_SESSION['allow_spy']) ? 0 : 1; @@ -269,7 +268,6 @@ function ajouter_sondage($origin) $opensurveysondage->date_fin = $date_fin; $opensurveysondage->format = $_SESSION['formatsondage']; $opensurveysondage->mailsonde = $_SESSION['mailsonde']; - $opensurveysondage->canedit = $canedit; $opensurveysondage->allow_comments = $allow_comments; $opensurveysondage->allow_spy = $allow_spy; $opensurveysondage->origin = $origin; @@ -294,12 +292,10 @@ function ajouter_sondage($origin) unset($_SESSION["nom"]); unset($_SESSION["adresse"]); unset($_SESSION["commentaires"]); - unset($_SESSION["canedit"]); unset($_SESSION["mailsonde"]); unset($_SESSION['allow_comments']); unset($_SESSION['allow_spy']); unset($_SESSION['toutchoix']); - unset($_SESSION['caneditsondage']); unset($_SESSION['totalchoixjour']); unset($_SESSION['champdatefin']); diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index 5d10ad9792f..ccb50a899f0 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -102,7 +102,6 @@ if (isset($_POST["confirmecreation"]) || isset($_POST["confirmecreation_x"])) { //format du sondage AUTRE $_SESSION["formatsondage"]="A"; - $_SESSION["caneditsondage"]=$_SESSION["canedit"]; // Add into database ajouter_sondage($origin); diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/public/choix_date.php index d90fbb680d9..4e51a91450b 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/public/choix_date.php @@ -207,7 +207,6 @@ $premierjourmois = date("N", mktime(0, 0, 0, $_SESSION["mois"], 1, $_SESSION["an //le format du sondage est DATE $_SESSION["formatsondage"] = "D"; -$_SESSION["formatcanedit"] = $_SESSION["canedit"]; //traduction de la valeur du mois if (is_integer($_SESSION["mois"]) && $_SESSION["mois"] > 0 && $_SESSION["mois"] < 13) diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index fee80200fb0..f0f99fe7659 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -36,14 +36,14 @@ $origin=GETPOST('origin','alpha'); // On teste toutes les variables pour supprimer l'ensemble des warnings PHP // On transforme en entites html les données afin éviter les failles XSS -$post_var = array('titre', 'nom', 'adresse', 'commentaires', 'canedit', 'mailsonde', 'creation_sondage_date', 'creation_sondage_date_x', 'creation_sondage_autre', 'creation_sondage_autre_x'); +$post_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_date_x', 'creation_sondage_autre', 'creation_sondage_autre_x'); foreach ($post_var as $var) { $$var = GETPOST($var); } // On initialise egalement la session car sinon bonjour les warning :-) -$session_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde', 'canedit'); +$session_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde'); foreach ($session_var as $var) { if (isset($_SESSION[$var])) $_SESSION[$var] = null; @@ -65,9 +65,6 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GET $_SESSION["adresse"] = $adresse; $_SESSION["commentaires"] = $commentaires; - unset($_SESSION["canedit"]); - $_SESSION["canedit"] = $canedit; - unset($_SESSION["mailsonde"]); if ($mailsonde !== null) { $_SESSION["mailsonde"] = true; @@ -175,10 +172,6 @@ print ''."\n"; print '
'."\n"; // Check or not -$cocheplus=''; -if ($_SESSION["canedit"]) $cocheplus="checked"; - -print ' '. $langs->trans("VotersCanModify") .'
'."\n"; if ($_SESSION["mailsonde"]) $cochemail="checked"; diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index a0cce7067ad..812555e83e5 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -389,7 +389,7 @@ if ($object->allow_spy) { print ''."\n"; // ligne d'un usager pré-authentifié - $mod_ok = ($object->canedit || (! empty($nombase) && in_array($nombase, $listofvoters))); + $mod_ok = (! empty($nombase) && in_array($nombase, $listofvoters)); // Name $nombase=str_replace("°","'",$obj->nom); From 7fccefd620f69b8dd11509e74ce8e3b6655fcff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 4 Jan 2014 20:05:18 +0100 Subject: [PATCH 042/177] Fixed code quality problem --- htdocs/opensurvey/class/opensurveysondage.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index b7f83470cec..92dfdd54685 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -480,6 +480,8 @@ class Opensurveysondage extends CommonObject /** * Cleans all the class variables before doing an update or an insert + * + * @return void */ private function cleanParameters() { From 5a7fe6b4a7bc31285a0ef39cf396218a36fa2f9b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 01:17:38 +0100 Subject: [PATCH 043/177] Fix: Change to make debian package ok despite removal of ckeditor package. --- htdocs/admin/modules.php | 3 ++- htdocs/core/modules/modFckeditor.class.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 7411c315304..72147693bd3 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -154,7 +154,8 @@ foreach ($modulesdir as $dir) $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod))); if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0; if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0; - //if ($mode == 'expdev' && ($objMod->version != 'experimental' && $objMod->version != 'development')) $modulequalified=0; + // We discard modules according to property disabled + if (! empty($objMod->hidden)) $modulequalified=false; // Define array $categ with categ with at least one qualified module if ($modulequalified) diff --git a/htdocs/core/modules/modFckeditor.class.php b/htdocs/core/modules/modFckeditor.class.php index 10bd7414722..917d15a852c 100644 --- a/htdocs/core/modules/modFckeditor.class.php +++ b/htdocs/core/modules/modFckeditor.class.php @@ -62,6 +62,8 @@ class modFckeditor extends DolibarrModules $this->config_page_url = array("fckeditor.php"); // Dependances + global $dolibarr_js_CKEDITOR; + $this->hidden = ($dolibarr_js_CKEDITOR == 'disabled'?1:0); // A condition to disable module (used for native debian packages) $this->depends = array(); $this->requiredby = array(); From 555a49d66ef8176e2053c5c5c0080a79857a5376 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 01:20:27 +0100 Subject: [PATCH 044/177] Update doc --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 654a5287bfe..eb58f849be4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.3.5 compared to 3.3.4 ***** +- Fix: Change to make debian package ok despite removal of ckeditor. - Fix: jcrop file to match debian rules - Fix: Add missing country UK. - Fix: Minor fix into package. From 45da8eb44640756650b5e8590dfd66ec8c1f9f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 04:50:37 +0100 Subject: [PATCH 045/177] Fixed fatal error when deleting a poll --- htdocs/opensurvey/list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 90071466dd4..b0502707669 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -45,6 +45,8 @@ $offset = $limit * $page; if ($action == 'delete_confirm') { + require_once DOL_DOCUMENT_ROOT.'/opensurvey/class/opensurveysondage.class.php'; + $db->begin(); $object=new Opensurveysondage($db); From d23a8ea788b866a2542559a4d415f181ab5ea92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 04:50:54 +0100 Subject: [PATCH 046/177] Fixed big XSS problems in open survey module --- htdocs/opensurvey/adminstuds.php | 12 ++++++------ htdocs/opensurvey/adminstuds_preview.php | 15 +++++++-------- htdocs/opensurvey/public/studs.php | 13 ++++++------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php index bb31acf0d99..1f107a7e1af 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/adminstuds.php @@ -193,24 +193,24 @@ $adresseadmin=$object->mail_admin; print $langs->trans("Title") .''; if ($action == 'edit') { - print ''; + print ''; } -else print $object->titre; +else print htmlentities($object->titre); print ''; // Auteur print ''; print $langs->trans("Author") .''; -print $object->nom_admin; +print htmlentities($object->nom_admin); print ''; // Description print ''.$langs->trans("Description") .''; if ($action == 'edit') { - print ''."\n"; + print ''."\n"; } -else print dol_nl2br($object->commentaires); +else print dol_nl2br(htmlentities($object->commentaires)); print ''; // EMail @@ -308,7 +308,7 @@ $comments = $object->getComments(); if ($comments) { foreach ($comments as $comment) { print '
'.img_picto('', 'delete.png').' '; - print $comment->usercomment.': '.dol_nl2br($comment->comment)."
"; + print htmlentities($comment->usercomment).': '.dol_nl2br(htmlentities($comment->comment))."
"; } } else diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index 481912c5fbd..6e8210a21af 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -556,16 +556,16 @@ print '
'."\n"; //affichage du titre du sondage $titre=str_replace("\\","",$object->titre); -print ''.$titre.'
'."\n"; +print ''.htmlentities($titre).'
'."\n"; //affichage du nom de l'auteur du sondage -print $langs->trans("InitiatorOfPoll") .' : '.$object->nom_admin.'
'."\n"; +print $langs->trans("InitiatorOfPoll") .' : '.htmlentities($object->nom_admin).'
'."\n"; //affichage des commentaires du sondage if ($object->commentaires) { print '
'.$langs->trans("Description") .' :
'."\n"; - $commentaires=dol_nl2br($object->commentaires); + $commentaires=dol_nl2br(htmlentities($object->commentaires)); print $commentaires; print '
'."\n"; } @@ -695,7 +695,7 @@ if ($object->format=="D"||$object->format=="D+") for ($i = 0; isset($toutsujet[$i]); $i++) { $heures=explode('@', $toutsujet[$i]); if (isset($heures[1])) { - print ''.$heures[1].''."\n"; + print ''.htmlentities($heures[1]).''."\n"; } else { print ''."\n"; } @@ -748,8 +748,7 @@ while ($compteur < $num) print ''."\n"; // Name - $nombase=str_replace("°","'",$obj->nom); - print ''.$nombase.''."\n"; + print ''.htmlentities($obj->nom).''."\n"; // si la ligne n'est pas a changer, on affiche les données if (! $testligneamodifier) @@ -1045,9 +1044,9 @@ if ($nbofcheckbox >= 2) print '

'."\n"; if (isset($meilleurecolonne) && $compteursujet == "1") { - print " " . $langs->trans('TheBestChoice') . " : $meilleursujet " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; + print " " . $langs->trans('TheBestChoice') . " : ".htmlentities($meilleursujet)." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; } elseif (isset($meilleurecolonne)) { - print " " . $langs->trans('TheBestChoices') . " : $meilleursujet " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; + print " " . $langs->trans('TheBestChoices') . " : ".htmlentities($meilleursujet)." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; } print '


'."\n"; } diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 812555e83e5..f31fd86b124 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -240,16 +240,16 @@ print '
'."\n"; //affichage du titre du sondage $titre=str_replace("\\","",$object->titre); -print ''.$titre.'
'."\n"; +print ''.htmlentities($titre).'
'."\n"; //affichage du nom de l'auteur du sondage -print $langs->trans("InitiatorOfPoll") .' : '.$object->nom_admin.'
'."\n"; +print $langs->trans("InitiatorOfPoll") .' : '.htmlentities($object->nom_admin).'
'."\n"; //affichage des commentaires du sondage if ($object->commentaires) { print '
'.$langs->trans("Description") .' :
'."\n"; - $commentaires=dol_nl2br($object->commentaires); + $commentaires=dol_nl2br(htmlentities($object->commentaires)); print $commentaires; print '
'."\n"; } @@ -339,7 +339,7 @@ if ($object->format=="D"||$object->format=="D+") for ($i=0; isset($toutsujet[$i]); $i++) { $heures=explode('@',$toutsujet[$i]); if (isset($heures[1])) { - print ''.$heures[1].''."\n"; + print ''.htmlentities($heures[1]).''."\n"; } else { print ''."\n"; } @@ -392,8 +392,7 @@ if ($object->allow_spy) { $mod_ok = (! empty($nombase) && in_array($nombase, $listofvoters)); // Name - $nombase=str_replace("°","'",$obj->nom); - print ''.$nombase.''."\n"; + print ''.htmlentities($obj->nom).''."\n"; // si la ligne n'est pas a changer, on affiche les données if (! $testligneamodifier) @@ -691,7 +690,7 @@ if ($comments) foreach ($comments as $obj) { print '
'; if (in_array($obj->usercomment, $listofvoters)) print ' '.img_picto('', 'delete.png').' '; - print $obj->usercomment.' : '.dol_nl2br($obj->comment)."
"; + print htmlentities($obj->usercomment).' : '.dol_nl2br(htmlentities($obj->comment))."
"; } } From e49f94d02e7a292bf7466750685bee46770e1d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 04:52:45 +0100 Subject: [PATCH 047/177] Fixed XSS problem in title tag --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index e8342224c4b..1ec90826662 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -968,7 +968,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs $appli='Dolibarr'; if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE; - if ($title) print ''.$appli.' - '.$title.''; + if ($title) print ''.$appli.' - '.htmlentities($title).''; else print "".$appli.""; print "\n"; From dd8d8e8e4224b7a2f81aef19730a670ec7cc11ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 04:59:15 +0100 Subject: [PATCH 048/177] Removed unused translation strings --- htdocs/langs/ar_SA/opensurvey.lang | 1 - htdocs/langs/bg_BG/opensurvey.lang | 1 - htdocs/langs/ca_ES/opensurvey.lang | 1 - htdocs/langs/cs_CZ/opensurvey.lang | 1 - htdocs/langs/da_DK/opensurvey.lang | 1 - htdocs/langs/de_DE/opensurvey.lang | 1 - htdocs/langs/el_GR/opensurvey.lang | 1 - htdocs/langs/en_US/opensurvey.lang | 1 - htdocs/langs/es_ES/opensurvey.lang | 1 - htdocs/langs/et_EE/opensurvey.lang | 1 - htdocs/langs/fa_IR/opensurvey.lang | 1 - htdocs/langs/fi_FI/opensurvey.lang | 1 - htdocs/langs/fr_FR/opensurvey.lang | 1 - htdocs/langs/he_IL/opensurvey.lang | 1 - htdocs/langs/hu_HU/opensurvey.lang | 1 - htdocs/langs/is_IS/opensurvey.lang | 1 - htdocs/langs/it_IT/opensurvey.lang | 1 - htdocs/langs/ja_JP/opensurvey.lang | 1 - htdocs/langs/ko_KR/opensurvey.lang | 1 - htdocs/langs/lv_LV/opensurvey.lang | 1 - htdocs/langs/nb_NO/opensurvey.lang | 1 - htdocs/langs/nl_NL/opensurvey.lang | 1 - htdocs/langs/pl_PL/opensurvey.lang | 1 - htdocs/langs/pt_BR/opensurvey.lang | 1 - htdocs/langs/pt_PT/opensurvey.lang | 1 - htdocs/langs/ro_RO/opensurvey.lang | 1 - htdocs/langs/ru_RU/opensurvey.lang | 1 - htdocs/langs/sk_SK/opensurvey.lang | 1 - htdocs/langs/sl_SI/opensurvey.lang | 1 - htdocs/langs/sv_SE/opensurvey.lang | 1 - htdocs/langs/tr_TR/opensurvey.lang | 1 - htdocs/langs/uz_UZ/opensurvey.lang | 1 - htdocs/langs/vi_VN/opensurvey.lang | 1 - htdocs/langs/zh_CN/opensurvey.lang | 1 - htdocs/langs/zh_TW/opensurvey.lang | 1 - 35 files changed, 35 deletions(-) diff --git a/htdocs/langs/ar_SA/opensurvey.lang b/htdocs/langs/ar_SA/opensurvey.lang index b51aaef6ac1..2b6ee6afeee 100644 --- a/htdocs/langs/ar_SA/opensurvey.lang +++ b/htdocs/langs/ar_SA/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/bg_BG/opensurvey.lang b/htdocs/langs/bg_BG/opensurvey.lang index 2c7ca69a593..27ba95a817a 100644 --- a/htdocs/langs/bg_BG/opensurvey.lang +++ b/htdocs/langs/bg_BG/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/ca_ES/opensurvey.lang b/htdocs/langs/ca_ES/opensurvey.lang index 5efed00a277..d45c99ca2b9 100644 --- a/htdocs/langs/ca_ES/opensurvey.lang +++ b/htdocs/langs/ca_ES/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Crear enquesta PollTitle=Títol de l'enquesta OpenSurveyYourName=El seu nom OpenSurveyYourEMail=La seva adreça de correu electrònic -VotersCanModify=Els votants poden modificar el vot d'altres ToReceiveEMailForEachVote=Per rebre un email per cada vot TypeDate=Tipus de data TypeClassic=Tipus estándar diff --git a/htdocs/langs/cs_CZ/opensurvey.lang b/htdocs/langs/cs_CZ/opensurvey.lang index e7f5271a367..90922d793d7 100644 --- a/htdocs/langs/cs_CZ/opensurvey.lang +++ b/htdocs/langs/cs_CZ/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Vytvoření ankety PollTitle=Anketa titul OpenSurveyYourName=Vaše jméno OpenSurveyYourEMail=Vaše e-mailová adresa -VotersCanModify=Voliči mohou změnit hlas ostatních ToReceiveEMailForEachVote=Chcete-li obdržet e-mail pro každé hlasování TypeDate=Zadejte datum TypeClassic=Typ standardní diff --git a/htdocs/langs/da_DK/opensurvey.lang b/htdocs/langs/da_DK/opensurvey.lang index c4433d302a4..dae592158b3 100644 --- a/htdocs/langs/da_DK/opensurvey.lang +++ b/htdocs/langs/da_DK/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/de_DE/opensurvey.lang b/htdocs/langs/de_DE/opensurvey.lang index cea800aa7ad..6501ba2f820 100644 --- a/htdocs/langs/de_DE/opensurvey.lang +++ b/htdocs/langs/de_DE/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Abstimmung erstellen PollTitle=Abstimmungstitel OpenSurveyYourName=Ihr Name OpenSurveyYourEMail=Ihre E-Mail-Adresse -VotersCanModify=Wähler können Stimmen von Anderen verändern ToReceiveEMailForEachVote=EMail für jede Stimme erhalten TypeDate=Typ Datum TypeClassic=Typ Standard diff --git a/htdocs/langs/el_GR/opensurvey.lang b/htdocs/langs/el_GR/opensurvey.lang index c07d6c55970..f495fb5f677 100644 --- a/htdocs/langs/el_GR/opensurvey.lang +++ b/htdocs/langs/el_GR/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Δημιουργία δημοσκόπησης PollTitle=Τίτλος δημοσκόπησης OpenSurveyYourName=Το όνομά σας OpenSurveyYourEMail=Η διεύθυνση email σας -VotersCanModify=Οι ψηφοφόροι μπορούν να τροποποιήσουν την ψήφο των άλλων ToReceiveEMailForEachVote=Να λαμβάνετε ένα μήνυμα ηλεκτρονικού ταχυδρομείου για κάθε ψηφοφορία TypeDate=Ημερομηνία TypeClassic=Πρότυπο diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 8125589d105..f29dade011c 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Create poll PollTitle=Poll title OpenSurveyYourName=Your name OpenSurveyYourEMail=Your email address -VotersCanModify=Voters can modify vote of others ToReceiveEMailForEachVote=To receive an email for each vote TypeDate=Type date TypeClassic=Type standard diff --git a/htdocs/langs/es_ES/opensurvey.lang b/htdocs/langs/es_ES/opensurvey.lang index 454fcbd45b4..5bc9b379690 100644 --- a/htdocs/langs/es_ES/opensurvey.lang +++ b/htdocs/langs/es_ES/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Crear encuesta PollTitle=Título de la encuesta OpenSurveyYourName=Su nombre OpenSurveyYourEMail=Su dirección de correo electrónico -VotersCanModify=Los votantes pueden modificar el voto de otros ToReceiveEMailForEachVote=Para recibir un email por cada voto TypeDate=Tipo fecha TypeClassic=Tipo estándar diff --git a/htdocs/langs/et_EE/opensurvey.lang b/htdocs/langs/et_EE/opensurvey.lang index 3d7177305e1..f1751801423 100644 --- a/htdocs/langs/et_EE/opensurvey.lang +++ b/htdocs/langs/et_EE/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Loo küsitlus PollTitle=Küsitluse pealkiri OpenSurveyYourName=Sinu nimi OpenSurveyYourEMail=Sinu e-posti aadress -VotersCanModify=Hääletajad saavad teiste hääli muuta ToReceiveEMailForEachVote=Iga hääle kohta saadetakse e-kiri TypeDate=Liik: kuupäev TypeClassic=Liik: standardne diff --git a/htdocs/langs/fa_IR/opensurvey.lang b/htdocs/langs/fa_IR/opensurvey.lang index b51aaef6ac1..2b6ee6afeee 100644 --- a/htdocs/langs/fa_IR/opensurvey.lang +++ b/htdocs/langs/fa_IR/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/fi_FI/opensurvey.lang b/htdocs/langs/fi_FI/opensurvey.lang index ef9cf6c9d78..a18e50a8c41 100644 --- a/htdocs/langs/fi_FI/opensurvey.lang +++ b/htdocs/langs/fi_FI/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/fr_FR/opensurvey.lang b/htdocs/langs/fr_FR/opensurvey.lang index 19565c52265..69e6bd8caa5 100644 --- a/htdocs/langs/fr_FR/opensurvey.lang +++ b/htdocs/langs/fr_FR/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Créer sondage PollTitle=Titre sondage OpenSurveyYourName=Votre nom OpenSurveyYourEMail=Votre adresse email -VotersCanModify=Les votants peuvent modifier les votes des autres ToReceiveEMailForEachVote=Pour recevoir un email à chaque vote TypeDate=Type date TypeClassic=Type classique diff --git a/htdocs/langs/he_IL/opensurvey.lang b/htdocs/langs/he_IL/opensurvey.lang index 409a43f09cf..ae138fd831a 100644 --- a/htdocs/langs/he_IL/opensurvey.lang +++ b/htdocs/langs/he_IL/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/hu_HU/opensurvey.lang b/htdocs/langs/hu_HU/opensurvey.lang index 83389798df4..be7af7bacd3 100644 --- a/htdocs/langs/hu_HU/opensurvey.lang +++ b/htdocs/langs/hu_HU/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/is_IS/opensurvey.lang b/htdocs/langs/is_IS/opensurvey.lang index 42b395a7616..6fe17b81714 100644 --- a/htdocs/langs/is_IS/opensurvey.lang +++ b/htdocs/langs/is_IS/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/it_IT/opensurvey.lang b/htdocs/langs/it_IT/opensurvey.lang index aa587bc00fb..79172d479fd 100644 --- a/htdocs/langs/it_IT/opensurvey.lang +++ b/htdocs/langs/it_IT/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Crea sondaggio PollTitle=Titolo del sondaggio OpenSurveyYourName=Il tuo nome OpenSurveyYourEMail=Il tuo indirizzo email -VotersCanModify=I votanti possono modificare il voto degli altri ToReceiveEMailForEachVote=Per ricevere un'email per ogni voto TypeDate=Digita data TypeClassic=Tipo standard diff --git a/htdocs/langs/ja_JP/opensurvey.lang b/htdocs/langs/ja_JP/opensurvey.lang index bc15d390aed..83f887b5226 100644 --- a/htdocs/langs/ja_JP/opensurvey.lang +++ b/htdocs/langs/ja_JP/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/ko_KR/opensurvey.lang b/htdocs/langs/ko_KR/opensurvey.lang index 409a43f09cf..ae138fd831a 100644 --- a/htdocs/langs/ko_KR/opensurvey.lang +++ b/htdocs/langs/ko_KR/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/lv_LV/opensurvey.lang b/htdocs/langs/lv_LV/opensurvey.lang index d50ec464b14..f45fe2ba7cb 100644 --- a/htdocs/langs/lv_LV/opensurvey.lang +++ b/htdocs/langs/lv_LV/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Izveidot aptauju PollTitle=Aptauja virsraksts OpenSurveyYourName=Jūsu vārds OpenSurveyYourEMail=Jūsu e-pasta adrese -VotersCanModify=Vēlētāji var mainīt balsojumu par citiem ToReceiveEMailForEachVote=Lai saņemtu e-pastu par katru balsojumu TypeDate=Tipa datums TypeClassic=Tipa standarts diff --git a/htdocs/langs/nb_NO/opensurvey.lang b/htdocs/langs/nb_NO/opensurvey.lang index 6f5416b45ec..89cd1c48130 100644 --- a/htdocs/langs/nb_NO/opensurvey.lang +++ b/htdocs/langs/nb_NO/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/nl_NL/opensurvey.lang b/htdocs/langs/nl_NL/opensurvey.lang index 324cacea4dc..e11f3c97315 100644 --- a/htdocs/langs/nl_NL/opensurvey.lang +++ b/htdocs/langs/nl_NL/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/pl_PL/opensurvey.lang b/htdocs/langs/pl_PL/opensurvey.lang index 34c13419d06..f50f750ea1a 100644 --- a/htdocs/langs/pl_PL/opensurvey.lang +++ b/htdocs/langs/pl_PL/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/pt_BR/opensurvey.lang b/htdocs/langs/pt_BR/opensurvey.lang index 8dcae1a6640..5a92414f588 100644 --- a/htdocs/langs/pt_BR/opensurvey.lang +++ b/htdocs/langs/pt_BR/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Criar uma enquete PollTitle=Titulo enquete OpenSurveyYourName=Seu nome OpenSurveyYourEMail=Seu endereço e-mail -VotersCanModify=Votantes podem modificar voto de outros ToReceiveEMailForEachVote=Para receber um e-mail por cada voto TypeDate=Tipo data TypeClassic=Tipo estandard diff --git a/htdocs/langs/pt_PT/opensurvey.lang b/htdocs/langs/pt_PT/opensurvey.lang index 214d6b2f581..f2078e5b3ee 100644 --- a/htdocs/langs/pt_PT/opensurvey.lang +++ b/htdocs/langs/pt_PT/opensurvey.lang @@ -11,7 +11,6 @@ AddComment=Adicionar comentário # PollTitle=Poll title OpenSurveyYourName=O seu nome OpenSurveyYourEMail=O seu endereço de email -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote TypeDate=Tipo de data # TypeClassic=Type standard diff --git a/htdocs/langs/ro_RO/opensurvey.lang b/htdocs/langs/ro_RO/opensurvey.lang index c3a83fe6e7a..2d2ee60b7c7 100644 --- a/htdocs/langs/ro_RO/opensurvey.lang +++ b/htdocs/langs/ro_RO/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Creaţi sondaj PollTitle=Titlu sondaj OpenSurveyYourName=Numele dvs. OpenSurveyYourEMail=Adresa dvs de email -VotersCanModify=Votanţii pot modifica zotul celorlarţi ToReceiveEMailForEachVote=Primirea unui email pentru fiecare vot TypeDate=Tip dată TypeClassic=Tip standard diff --git a/htdocs/langs/ru_RU/opensurvey.lang b/htdocs/langs/ru_RU/opensurvey.lang index 2124efd63ce..6c1313da6e5 100644 --- a/htdocs/langs/ru_RU/opensurvey.lang +++ b/htdocs/langs/ru_RU/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/sk_SK/opensurvey.lang b/htdocs/langs/sk_SK/opensurvey.lang index fe26c643c55..e652d947091 100644 --- a/htdocs/langs/sk_SK/opensurvey.lang +++ b/htdocs/langs/sk_SK/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Vytvorenie ankety PollTitle=Anketa titul OpenSurveyYourName=Vaše meno OpenSurveyYourEMail=Vaša e-mailová adresa -VotersCanModify=Voliči môžu zmeniť hlas ostatných ToReceiveEMailForEachVote=Ak chcete dostať e-mail pre každé hlasovanie TypeDate=Zadajte dátum TypeClassic=Typ štandardné diff --git a/htdocs/langs/sl_SI/opensurvey.lang b/htdocs/langs/sl_SI/opensurvey.lang index a985d34ebba..e23feea5e1d 100644 --- a/htdocs/langs/sl_SI/opensurvey.lang +++ b/htdocs/langs/sl_SI/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/sv_SE/opensurvey.lang b/htdocs/langs/sv_SE/opensurvey.lang index 982dddf9b53..f6d87a57ca0 100644 --- a/htdocs/langs/sv_SE/opensurvey.lang +++ b/htdocs/langs/sv_SE/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/tr_TR/opensurvey.lang b/htdocs/langs/tr_TR/opensurvey.lang index e16a96fb10b..0ea8a37e208 100644 --- a/htdocs/langs/tr_TR/opensurvey.lang +++ b/htdocs/langs/tr_TR/opensurvey.lang @@ -11,7 +11,6 @@ CreatePoll=Anket oluştur PollTitle=Anket başlığı OpenSurveyYourName=Adınız OpenSurveyYourEMail=Eposta adresiniz -VotersCanModify=Oy kullananlar başkalarının oylarını değiştirebilir ToReceiveEMailForEachVote=Her oy için bir eposta almak için TypeDate=Tarih türü TypeClassic=Standart tür diff --git a/htdocs/langs/uz_UZ/opensurvey.lang b/htdocs/langs/uz_UZ/opensurvey.lang index 409a43f09cf..ae138fd831a 100644 --- a/htdocs/langs/uz_UZ/opensurvey.lang +++ b/htdocs/langs/uz_UZ/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/vi_VN/opensurvey.lang b/htdocs/langs/vi_VN/opensurvey.lang index 409a43f09cf..ae138fd831a 100644 --- a/htdocs/langs/vi_VN/opensurvey.lang +++ b/htdocs/langs/vi_VN/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/zh_CN/opensurvey.lang b/htdocs/langs/zh_CN/opensurvey.lang index e48fcc63432..fb5a33eb567 100644 --- a/htdocs/langs/zh_CN/opensurvey.lang +++ b/htdocs/langs/zh_CN/opensurvey.lang @@ -11,7 +11,6 @@ NewSurvey=新的调查 # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard diff --git a/htdocs/langs/zh_TW/opensurvey.lang b/htdocs/langs/zh_TW/opensurvey.lang index 5c35deb6004..2ba8e9fba39 100644 --- a/htdocs/langs/zh_TW/opensurvey.lang +++ b/htdocs/langs/zh_TW/opensurvey.lang @@ -11,7 +11,6 @@ # PollTitle=Poll title # OpenSurveyYourName=Your name # OpenSurveyYourEMail=Your email address -# VotersCanModify=Voters can modify vote of others # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard From 89c6aa2d87cb1446e41f3c9b7767d283c6c600d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 05:04:41 +0100 Subject: [PATCH 049/177] Removed unused/unuseful injection checks on open survey creation --- htdocs/langs/en_US/opensurvey.lang | 1 - htdocs/opensurvey/public/choix_autre.php | 7 +------ htdocs/opensurvey/public/create_survey.php | 7 +------ 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index f29dade011c..82126d16ef8 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -73,6 +73,5 @@ PublicLinkToCreateSurvey=Public link to allow everybody to create a survey ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation ErrorOpenSurveyOneChoice=Enter at least one choice ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY -ErrorOpenSurveyInvalidChars=Characters \" < and > are not permitted MoreChoices=Enter more choices for the voters AfterCreationInfo=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
Then, you will receive quickly an email contening the link to your poll for sending it to the voters. \ No newline at end of file diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index ccb50a899f0..4785a2b6e28 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -42,7 +42,6 @@ $origin=GETPOST('origin','alpha'); */ // Set session vars -$erreur_injection = false; if (isset($_SESSION["nbrecases"])) { for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) { if (isset($_POST["choix"][$i])) { @@ -188,11 +187,7 @@ if ($testdate === false) { print "
" . $langs->trans("ErrorOpenSurveyDateFormat") . "

"."\n"; } -if ($erreur_injection) { - print "" . $langs->trans("ErrorOpenSurveyInvalidChars") . "

\n"; -} - -if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur && !$erreur_injection) { +if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur) { //demande de la date de fin du sondage print '
'."\n"; print '
'."\n"; diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index f0f99fe7659..505adbee1d3 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -51,9 +51,6 @@ foreach ($session_var as $var) // On initialise également les autres variables $erreur_adresse = false; -$erreur_injection_titre = false; -$erreur_injection_nom = false; -$erreur_injection_commentaires = false; $cocheplus = ''; $cochemail = ''; @@ -86,9 +83,7 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GET if (! isValidEmail($adresse)) $erreur_adresse = true; - //var_dump($titre.' - '.$nom.' - '.$adresse.' - '.!$erreur_adresse.' - '.! $erreur_injection_titre.' - '.! $erreur_injection_commentaires.' - '.! $erreur_injection_nom.' - '.$creation_sondage_date.' - '.$creation_sondage_autre); exit; - - if ($titre && $nom && $adresse && !$erreur_adresse && ! $erreur_injection_titre && ! $erreur_injection_commentaires && ! $erreur_injection_nom) + if ($titre && $nom && $adresse && !$erreur_adresse) { if (! empty($creation_sondage_date)) { From a8a2613c4a58e4f553c3a31340196b11278f3b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 05:25:32 +0100 Subject: [PATCH 050/177] =?UTF-8?q?Date=20combo=20selector=20wasn=E2=80=99?= =?UTF-8?q?t=20translating=20month=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/opensurvey/adminstuds_preview.php | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index 6e8210a21af..9307add0f94 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -481,6 +481,9 @@ if (GETPOST('ajoutsujet')) } else { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; + + $formother=new FormOther($db); //ajout d'une date avec creneau horaire //print _("You can add a new scheduling date to your poll.
If you just want to add a new hour to an existant date, put the same date and choose a new hour.") .'

'."\n"; print $langs->trans("AddADate") .' :

'."\n"; @@ -491,22 +494,12 @@ if (GETPOST('ajoutsujet')) } print ''."\n"; - print ''."\n"; + print $formother->select_month('', 'nouveaumois', 1); + + print ' '; + + print $formother->select_year('', 'nouvelleannee', 1, 0, 5, 0, 1); - - print ''."\n"; print '

'. $langs->trans("AddStartHour") .' :

'."\n"; print ''; @@ -542,8 +560,9 @@ if (GETPOST('ajoutsujet')) exit; } - -print $langs->trans("PollAdminDesc",img_picto('','cancel.png@opensurvey'),img_picto('','add-16.png@opensurvey')).'

'; +if ($user->rights->opensurvey->write) { + print $langs->trans("PollAdminDesc",img_picto('','cancel.png@opensurvey'),img_picto('','add-16.png@opensurvey')).'

'; +} print '
'."\n"; @@ -586,8 +605,11 @@ print ''."\n"; print ''."\n"; //boucle pour l'affichage des boutons de suppression de colonne -for ($i = 0; isset($toutsujet[$i]); $i++) { - print ''."\n"; +if ($user->rights->opensurvey->write) { + for ($i = 0; isset($toutsujet[$i]); $i++) { + + print ''."\n"; + } } print ''."\n"; @@ -626,7 +648,11 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage.'">'.$langs->trans("Add").''."\n"; + if ($user->rights->opensurvey->write) { + print ''; + print 'id_sondage.'">'.$langs->trans("Add").''."\n"; + } + print ''."\n"; print ''."\n"; print ''."\n"; @@ -652,7 +678,10 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage.'">'.$langs->trans("Add").''."\n"; + if ($user->rights->opensurvey->write) { + print 'id_sondage.'">'.$langs->trans("Add").''."\n"; + } + print ''."\n"; print ''."\n"; print ''."\n"; @@ -676,7 +705,9 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage.'">'.$langs->trans("Add").''."\n"; + if ($user->rights->opensurvey->write) { + print 'id_sondage.'">'.$langs->trans("Add").''."\n"; + } print ''."\n"; //affichage des horaires @@ -694,7 +725,10 @@ if ($object->format=="D"||$object->format=="D+") } } - print 'id_sondage.'">'.$langs->trans("Add").''."\n"; + if ($user->rights->opensurvey->write) { + print 'id_sondage.'">'.$langs->trans("Add").''."\n"; + } + print ''."\n"; } } @@ -737,11 +771,14 @@ while ($compteur < $num) $ensemblereponses = $obj->reponses; - print ''."\n"; - print ''."\n"; - + print ''."\n"; + + if ($user->rights->opensurvey->write) { + print ''."\n"; + } + // Name - print ''.htmlentities($obj->nom).''."\n"; + print ''.htmlentities($obj->nom).''."\n"; // si la ligne n'est pas a changer, on affiche les données if (! $testligneamodifier) @@ -851,7 +888,7 @@ while ($compteur < $num) } // Button edit at end of line - if ($compteur != $ligneamodifier) + if ($compteur != $ligneamodifier && ($user->rights->opensurvey->write)) { print ''."\n"; } diff --git a/htdocs/opensurvey/index.php b/htdocs/opensurvey/index.php index a7f88631dd8..47beea912c0 100644 --- a/htdocs/opensurvey/index.php +++ b/htdocs/opensurvey/index.php @@ -25,7 +25,8 @@ require_once('../main.inc.php'); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); - +// Security check +if (!$user->rights->opensurvey->read) accessforbidden(); /* * View diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 1ecd93265de..8450b82ea3e 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -26,6 +26,9 @@ require_once('../main.inc.php'); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); +// Security check +if (!$user->rights->opensurvey->read) accessforbidden(); + $action=GETPOST('action'); $id=GETPOST('id'); $numsondage= $id; From 426ccb4056356bf9783221150fde96d9e80e5f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 06:25:47 +0100 Subject: [PATCH 053/177] Fixed another XSS in public poll vote page --- htdocs/opensurvey/public/studs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index f31fd86b124..55763007643 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -669,9 +669,9 @@ if ($nbofcheckbox >= 2) print '

'."\n"; if (isset($meilleurecolonne) && $compteursujet == "1") { - print ' ' . $langs->trans('TheBestChoice') . ": $meilleursujet " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; + print ' ' . $langs->trans('TheBestChoice') . ": ".htmlentities($meilleursujet)." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; } elseif (isset($meilleurecolonne)) { - print ' ' . $langs->trans('TheBestChoices') . ": $meilleursujet " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; + print ' ' . $langs->trans('TheBestChoices') . ": ".htmlentities($meilleursujet)." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; } print '


'."\n"; From 67077338a051ae3da8a9ad2d92c77eadca45e4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 06:37:08 +0100 Subject: [PATCH 054/177] Improved translation of opensurvey module --- htdocs/langs/en_US/errors.lang | 3 ++- htdocs/opensurvey/adminstuds_preview.php | 19 +++---------------- htdocs/opensurvey/public/studs.php | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 8eb265013c5..0fec31bebdd 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -37,6 +37,7 @@ ErrorBadParameters=Bad parameters ErrorBadValueForParameter=Wrong value '%s' for parameter incorrect '%s' ErrorBadImageFormat=Image file has not a supported format ErrorBadDateFormat=Value '%s' has wrong date format +ErrorWrongDate=Date is not correct! ErrorFailedToWriteInDir=Failed to write in directory %s ErrorFoundBadEmailInFile=Found incorrect email syntax for %s lines in file (example line %s with email=%s) ErrorUserCannotBeDelete=User can not be deleted. May be it is associated on Dolibarr entities. @@ -63,7 +64,7 @@ ErrorNoValueForRadioType=Please fill value for radio list ErrorBadFormatValueList=The list value cannot have more than one come : %s, but need at least one: llave,valores ErrorFieldCanNotContainSpecialCharacters=Field %s must not contains special characters. ErrorNoAccountancyModuleLoaded=No accountancy module activated -ErrorExportDuplicateProfil=This profil name already exists for this export set. +ErrorExportDuplicateProfil=This profile name already exists for this export set. ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching is not complete. ErrorLDAPMakeManualTest=A .ldif file has been generated in directory %s. Try to load it manually from command line to have more information on errors. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "statut not started" if field "done by" is also filled. diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index d103f75fddb..1bbf65ff457 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -503,7 +503,6 @@ if (GETPOST('ajoutsujet')) $formother=new FormOther($db); //ajout d'une date avec creneau horaire - //print _("You can add a new scheduling date to your poll.
If you just want to add a new hour to an existant date, put the same date and choose a new hour.") .'

'."\n"; print $langs->trans("AddADate") .' :

'."\n"; print ''; print '
'."\n"; -print '
'."\n"; // Start to show survey result print ''."\n"; diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 9e7bcf5f511..7c98ed0e15c 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -42,7 +42,7 @@ function opensurvey_prepare_head(Opensurveysondage $object) { $h++; $head[1][0] = 'adminstuds_preview.php?id='.$object->id_sondage; - $head[1][1] = $langs->trans("SurveyResults").'/'.$langs->trans("Preview"); + $head[1][1] = $langs->trans("SurveyResults"); $head[1][2] = 'preview'; $h++; From b699133357510a8cc20e5c296a570a0f8c1dc9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 06:50:56 +0100 Subject: [PATCH 057/177] Restricting deletion of polls in poll list --- htdocs/opensurvey/list.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 8450b82ea3e..de53147a66e 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -48,6 +48,9 @@ $offset = $limit * $page; if ($action == 'delete_confirm') { + // Security check + if (!$user->rights->opensurvey->write) accessforbidden(); + require_once DOL_DOCUMENT_ROOT.'/opensurvey/class/opensurveysondage.class.php'; $db->begin(); @@ -131,7 +134,13 @@ while ($i < min($num,$limit)) print ''; print''."\n"; - print ''."\n"; + print ''."\n"; print ''."\n"; $i++; From abf0ec1d6a61c4267ed51c263902139c4f40141a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 06:59:38 +0100 Subject: [PATCH 058/177] Removed unnecesary form ID --- htdocs/opensurvey/adminstuds_preview.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index a9e791228e6..8e330caace6 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -475,8 +475,7 @@ if (GETPOST('ajoutsujet')) if (!$user->rights->opensurvey->write) accessforbidden(); //on recupere les données et les sujets du sondage - print ''."\n"; - print ''; + print ''."\n"; print ''; print '
'."\n"; @@ -562,8 +561,7 @@ if ($user->rights->opensurvey->write) { $nbcolonnes=substr_count($object->sujet,',')+1; -print ''."\n"; -print ''; +print ''."\n"; print '
'."\n"; From b2c0463cd95abb1a2405f734726918d2596f34ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 07:03:51 +0100 Subject: [PATCH 059/177] Corrected little problem with XSS fix --- htdocs/opensurvey/adminstuds_preview.php | 6 +++--- htdocs/opensurvey/public/studs.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index 8e330caace6..4cdb4329f9b 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -1017,7 +1017,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) { else { $tmps=explode('@',$toutsujet[$i]); - $meilleursujet .= $tmps[0]; + $meilleursujet .= htmlentities($tmps[0]); } $compteursujet++; @@ -1034,9 +1034,9 @@ if ($nbofcheckbox >= 2) print '

'."\n"; if (isset($meilleurecolonne) && $compteursujet == "1") { - print " " . $langs->trans('TheBestChoice') . " : ".htmlentities($meilleursujet)." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; + print " " . $langs->trans('TheBestChoice') . " : ".$meilleursujet." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; } elseif (isset($meilleurecolonne)) { - print " " . $langs->trans('TheBestChoices') . " : ".htmlentities($meilleursujet)." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; + print " " . $langs->trans('TheBestChoices') . " : ".$meilleursujet." " . $langs->trans("with") . " $meilleurecolonne " . $vote_str . ".\n"; } print '


'."\n"; } diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 1cdcefd6c2b..0620c2070b4 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -651,7 +651,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) { else { $tmps=explode('@',$toutsujet[$i]); - $meilleursujet .= $tmps[0]; + $meilleursujet .= htmlentities($tmps[0]); } $compteursujet++; @@ -669,9 +669,9 @@ if ($nbofcheckbox >= 2) print '

'."\n"; if (isset($meilleurecolonne) && $compteursujet == "1") { - print ' ' . $langs->trans('TheBestChoice') . ": ".htmlentities($meilleursujet)." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; + print ' ' . $langs->trans('TheBestChoice') . ": ".$meilleursujet." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; } elseif (isset($meilleurecolonne)) { - print ' ' . $langs->trans('TheBestChoices') . ": ".htmlentities($meilleursujet)." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; + print ' ' . $langs->trans('TheBestChoices') . ": ".$meilleursujet." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; } print '


'."\n"; From 08560cbc5ff500998830e8e90671bb2e5a08abac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 07:05:04 +0100 Subject: [PATCH 060/177] Little spacing improvement --- htdocs/opensurvey/adminstuds_preview.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/adminstuds_preview.php index 4cdb4329f9b..fba4e679b4c 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/adminstuds_preview.php @@ -556,7 +556,7 @@ if (GETPOST('ajoutsujet')) } if ($user->rights->opensurvey->write) { - print $langs->trans("PollAdminDesc",img_picto('','cancel.png@opensurvey'),img_picto('','add-16.png@opensurvey')).'

'; + print '
'.$langs->trans("PollAdminDesc",img_picto('','cancel.png@opensurvey'),img_picto('','add-16.png@opensurvey')).'
'; } $nbcolonnes=substr_count($object->sujet,',')+1; From cf092834cdc2a51d9e32d098dc325714473ee5df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 07:08:37 +0100 Subject: [PATCH 061/177] Renamed some file names from french to english --- htdocs/opensurvey/{adminstuds.php => card.php} | 4 ++-- htdocs/opensurvey/fonctions.php | 8 ++++---- htdocs/opensurvey/list.php | 2 +- htdocs/opensurvey/{adminstuds_preview.php => results.php} | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename htdocs/opensurvey/{adminstuds.php => card.php} (97%) rename htdocs/opensurvey/{adminstuds_preview.php => results.php} (99%) diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/card.php similarity index 97% rename from htdocs/opensurvey/adminstuds.php rename to htdocs/opensurvey/card.php index 4f93bdff8d5..48a537b25e9 100644 --- a/htdocs/opensurvey/adminstuds.php +++ b/htdocs/opensurvey/card.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/opensurvey/adminstuds.php + * \file htdocs/opensurvey/card.php * \ingroup opensurvey * \brief Page to edit survey */ @@ -327,7 +327,7 @@ $comments = $object->getComments(); if ($comments) { foreach ($comments as $comment) { if ($user->rights->opensurvey->write) { - print ' '.img_picto('', 'delete.png').' '; + print ' '.img_picto('', 'delete.png').' '; } print htmlentities($comment->usercomment).': '.dol_nl2br(htmlentities($comment->comment))."
"; diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 7c98ed0e15c..5c001030e4e 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -36,12 +36,12 @@ function opensurvey_prepare_head(Opensurveysondage $object) { $h = 0; $head = array(); - $head[0][0] = 'adminstuds.php?id='.$object->id_sondage; + $head[0][0] = 'card.php?id='.$object->id_sondage; $head[0][1] = $langs->trans("Card"); $head[0][2] = 'general'; $h++; - $head[1][0] = 'adminstuds_preview.php?id='.$object->id_sondage; + $head[1][0] = 'results.php?id='.$object->id_sondage; $head[1][1] = $langs->trans("SurveyResults"); $head[1][2] = 'preview'; $h++; @@ -195,7 +195,7 @@ function issetAndNoEmpty($name, $tableau = null) function getUrlSondage($id, $admin = false) { if ($admin === true) { - $url = get_server_name().'adminstuds_preview.php?id='.$id; + $url = get_server_name().'results.php?id='.$id; } else { $url = get_server_name().'/public/studs.php?sondage='.$id; } @@ -275,7 +275,7 @@ function ajouter_sondage($origin) $opensurveysondage->create(null); - if ($origin == 'dolibarr') $urlback=dol_buildpath('/opensurvey/adminstuds_preview.php',1).'?id='.$sondage; + if ($origin == 'dolibarr') $urlback=dol_buildpath('/opensurvey/results.php',1).'?id='.$sondage; else { // Define $urlwithroot diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index de53147a66e..73442d3cf6d 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -122,7 +122,7 @@ while ($i < min($num,$limit)) $var=!$var; print '
'; print ''."\n"; print '
'.$nbuser.''.img_picto('', 'delete.png').''; + + if ($user->rights->opensurvey->write) { + print ''.img_picto('', 'delete.png').''; + } + + print '
'; - print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; + print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; print ''.htmlentities($obj->titre).''; $type=($obj->format=='A' || $obj->format=='A+')?'classic':'date'; print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); diff --git a/htdocs/opensurvey/adminstuds_preview.php b/htdocs/opensurvey/results.php similarity index 99% rename from htdocs/opensurvey/adminstuds_preview.php rename to htdocs/opensurvey/results.php index fba4e679b4c..eadb4d26f17 100644 --- a/htdocs/opensurvey/adminstuds_preview.php +++ b/htdocs/opensurvey/results.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/opensurvey/adminstuds_preview.php + * \file htdocs/opensurvey/results.php * \ingroup opensurvey * \brief Page to preview votes of a survey */ From f8268c60d4049c02e9db06f091941686b1d3d428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 07:16:36 +0100 Subject: [PATCH 062/177] Removed OpenSurvey legend from public poll voting page --- htdocs/opensurvey/fonctions.php | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 5c001030e4e..5106242963a 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -103,28 +103,22 @@ function llxFooterSurvey() */ function showlogo() { - global $user, $conf, $langs, $mysoc; + global $conf, $mysoc; // Print logo - $urllogo=DOL_URL_ROOT.'/theme/login_logo.png'; - - if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small); + if ($mysoc->logo) { + if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file=thumbs/'.urlencode($mysoc->logo_small); + } } - elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode($mysoc->logo); - $width=128; - } - elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) + + if (!$urllogo && (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))) { $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png'; } - print '
'; - print 'Logo
'; - print ''.$langs->trans("OpenSurvey").''; - print '

'; + + print '
Logo
'; + print '
'; } From fba3c630506e09edf2356211a2e6567d58d32676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 07:22:45 +0100 Subject: [PATCH 063/177] Starting to make survey creation a user-only access page --- htdocs/langs/ar_SA/opensurvey.lang | 3 --- htdocs/langs/bg_BG/opensurvey.lang | 3 --- htdocs/langs/ca_ES/opensurvey.lang | 3 --- htdocs/langs/cs_CZ/opensurvey.lang | 3 --- htdocs/langs/da_DK/opensurvey.lang | 3 --- htdocs/langs/de_DE/opensurvey.lang | 3 --- htdocs/langs/el_GR/opensurvey.lang | 3 --- htdocs/langs/en_US/opensurvey.lang | 3 --- htdocs/langs/es_ES/opensurvey.lang | 3 --- htdocs/langs/et_EE/opensurvey.lang | 3 --- htdocs/langs/fa_IR/opensurvey.lang | 3 --- htdocs/langs/fi_FI/opensurvey.lang | 3 --- htdocs/langs/fr_FR/opensurvey.lang | 3 --- htdocs/langs/he_IL/opensurvey.lang | 3 --- htdocs/langs/hu_HU/opensurvey.lang | 3 --- htdocs/langs/is_IS/opensurvey.lang | 3 --- htdocs/langs/it_IT/opensurvey.lang | 3 --- htdocs/langs/ja_JP/opensurvey.lang | 3 --- htdocs/langs/ko_KR/opensurvey.lang | 3 --- htdocs/langs/lv_LV/opensurvey.lang | 3 --- htdocs/langs/nb_NO/opensurvey.lang | 3 --- htdocs/langs/nl_NL/opensurvey.lang | 3 --- htdocs/langs/pl_PL/opensurvey.lang | 3 --- htdocs/langs/pt_BR/opensurvey.lang | 3 --- htdocs/langs/pt_PT/opensurvey.lang | 3 --- htdocs/langs/ro_RO/opensurvey.lang | 3 --- htdocs/langs/ru_RU/opensurvey.lang | 3 --- htdocs/langs/sk_SK/opensurvey.lang | 3 --- htdocs/langs/sl_SI/opensurvey.lang | 3 --- htdocs/langs/sv_SE/opensurvey.lang | 3 --- htdocs/langs/tr_TR/opensurvey.lang | 3 --- htdocs/langs/uz_UZ/opensurvey.lang | 3 --- htdocs/langs/vi_VN/opensurvey.lang | 3 --- htdocs/langs/zh_CN/opensurvey.lang | 3 --- htdocs/langs/zh_TW/opensurvey.lang | 3 --- htdocs/opensurvey/index.php | 15 --------------- htdocs/opensurvey/public/index.php | 7 ++----- 37 files changed, 2 insertions(+), 125 deletions(-) diff --git a/htdocs/langs/ar_SA/opensurvey.lang b/htdocs/langs/ar_SA/opensurvey.lang index 2b6ee6afeee..52216944ea0 100644 --- a/htdocs/langs/ar_SA/opensurvey.lang +++ b/htdocs/langs/ar_SA/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=الحد من التاريخ # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/bg_BG/opensurvey.lang b/htdocs/langs/bg_BG/opensurvey.lang index 27ba95a817a..99c7d3b791c 100644 --- a/htdocs/langs/bg_BG/opensurvey.lang +++ b/htdocs/langs/bg_BG/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Крайната дата # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/ca_ES/opensurvey.lang b/htdocs/langs/ca_ES/opensurvey.lang index d45c99ca2b9..d4a965d7bbc 100644 --- a/htdocs/langs/ca_ES/opensurvey.lang +++ b/htdocs/langs/ca_ES/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Tipus de data TypeClassic=Tipus estándar YouAreInPollCreateArea=Està a la secció de creació d'enquestes FieldMandatory=Camp obligatori -OpenSurveyDesc=Servei online per planificar una cita o elaborar una enquesta de forma fàcil i ràpida -OpenSurveyNoRegistration=SSense registre requerit. OpenSurveyStep2=Seleccioneu les dates entre els dies lliures (verds). Els dies seleccionats són de color blau. Pot seleccionar un dia prèviament seleccionat fent clic de nou en ell RemoveAllDays=Eliminar tots els dies CopyHoursOfFirstDay=Copia hores del primer dia @@ -65,4 +63,3 @@ NoCommentYet=Cap comentari ha estat publicat per a aquesta enquesta CanEditVotes=Podeu canviar el vot d'altres SelectDayDesc=Per a cada dia seleccionat, pot triar, o no, les hores de reunió en el següent format:
- buit,
- "8h", "8H" o "8:00" per proporcionar una hora d'inici de la reunió,
- "8-11", "8h-11h", "8H-11H" o "8:00-11:00" per proporcionar una hora d'inici i de fi de la reunió,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" per el mateix però amb minuts. BackToCurrentMonth=Tornar al mes actual -PublicLinkToCreateSurvey=Enllaç públic que permet a qualsevol crear una enquesta diff --git a/htdocs/langs/cs_CZ/opensurvey.lang b/htdocs/langs/cs_CZ/opensurvey.lang index 90922d793d7..07fd01d95c8 100644 --- a/htdocs/langs/cs_CZ/opensurvey.lang +++ b/htdocs/langs/cs_CZ/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Zadejte datum TypeClassic=Typ standardní YouAreInPollCreateArea=Nacházíte se v sekci pro vytvoření hlasování FieldMandatory=Pole povinné -OpenSurveyDesc=Online služby naplánovat rendez-vous nebo udělat průzkum snadno a rychle. -OpenSurveyNoRegistration=Ne nutná registrace. OpenSurveyStep2=Zvolte termín Vašeho amoung volné dny (zelená). Vybrané dny jsou v modré barvě. Můžete zrušit výběr den předem zvolenou opětovným kliknutím na něj RemoveAllDays=Odstraňte všechny dny CopyHoursOfFirstDay=Kopírování hodin prvního dne @@ -65,4 +63,3 @@ NoCommentYet=Žádné komentáře byly zveřejněny na tuto anketu ještě CanEditVotes=Může změnit hlas ostatních SelectDayDesc=Pro každý vybraný den, můžete si vybrat, zda se mají splnit hodin v následujícím formátu:
- Prázdné,
- "8h", "8H" nebo "8:00" dát schůzku v úvodní hodinu,
- "8-11", "8h-11h", "8H-11H" nebo "08:00-11:00" dát schůzku je začátek a konec hodiny,
- "8h15-11h15", "8H15-11h15" nebo "08:15-11:15" to samé, ale v minutách. BackToCurrentMonth=Zpět na aktuální měsíc -PublicLinkToCreateSurvey=Veřejné odkaz dovolit každý vytvořit průzkum diff --git a/htdocs/langs/da_DK/opensurvey.lang b/htdocs/langs/da_DK/opensurvey.lang index dae592158b3..bec2838bf6b 100644 --- a/htdocs/langs/da_DK/opensurvey.lang +++ b/htdocs/langs/da_DK/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Limit dato # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/de_DE/opensurvey.lang b/htdocs/langs/de_DE/opensurvey.lang index 6501ba2f820..e74d4af1b1a 100644 --- a/htdocs/langs/de_DE/opensurvey.lang +++ b/htdocs/langs/de_DE/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Typ Datum TypeClassic=Typ Standard YouAreInPollCreateArea=Du bist im Abschnitt "Abstimmung erstellen" FieldMandatory=Feld zwingend nötig -OpenSurveyDesc=Online-Service um eine Verabredung oder eine Umfrage schnell und einfach zu erstellen -OpenSurveyNoRegistration=Keine Registrierung benötigt. OpenSurveyStep2=Wähle Deine Daten unter den freien Tagen (grün). Die ausgewählten Tage erscheinen blau. Du kannst einen bereits ausgewählten Tag durch anklicken wieder abwählen. RemoveAllDays=Alle Tage entfernen CopyHoursOfFirstDay=Stunden vom ersten Tag kopieren @@ -65,4 +63,3 @@ NoCommentYet=Bisher gibt es keine Kommentare für diese Abstimmung CanEditVotes=Kann Stimmen von Anderen verändern SelectDayDesc=Für jeden ausgewählen Tag kann man die Besprechungszeiten im folgenden Format auswählen:
- leer,
- "8h", "8H" oder "8:00" für eine Besprechungs-Startzeit,
- "8-11", "8h-11h", "8H-11H" oder "8:00-11:00" für eine Besprechungs-Start und -Endzeit,
- "8h15-11h15", "8H15-11H15" oder "8:15-11:15" für das Gleiche aber mit Minuten. BackToCurrentMonth=Zurück zum aktuellen Monat -PublicLinkToCreateSurvey=Öffentlicher Link mit dem Jeder eine Umfrage erstellen kann diff --git a/htdocs/langs/el_GR/opensurvey.lang b/htdocs/langs/el_GR/opensurvey.lang index f495fb5f677..4b7a6ff7a65 100644 --- a/htdocs/langs/el_GR/opensurvey.lang +++ b/htdocs/langs/el_GR/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Ημερομηνία TypeClassic=Πρότυπο YouAreInPollCreateArea=Βρίσκεστε στο τμήμα δημιουργίας δημοσκόπηση FieldMandatory=Υποχρεωτικό πεδίο -OpenSurveyDesc=On-line υπηρεσία για να προγραμματίσετε ένα ραντεβού ή να κάνετε μια έρευνα γρήγορα και εύκολα. -OpenSurveyNoRegistration=Δεν απαιτείται εγγραφή. OpenSurveyStep2=Επιλέξτε τις ημερομηνίες σας ανάμεσα στις ελεύθερες ημέρες (πράσινο). Οι επιλεγμένες ημέρες είναι σε μπλε χρώμα. Μπορείτε να ακυρώσετε μια μέρα προηγουμένως επιλεγεί κάνοντας κλικ ξανά πάνω του RemoveAllDays=Αφαιρέστε όλες τις ημέρες CopyHoursOfFirstDay=Αντιγραφή ωρών της πρώτης ημέρας @@ -65,4 +63,3 @@ NoCommentYet=Δεν έχουν αναρτηθεί σχόλια για αυτή CanEditVotes=Μπορεί να αλλάξει την ψήφο των άλλων SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. BackToCurrentMonth=Πίσω στον τρέχοντα μήνα -PublicLinkToCreateSurvey=Κοινόχρηστους σύνδεσμος για να επιτρέπει σε όλους να δημιουργούν μια έρευνα diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 82126d16ef8..7cdadc308a0 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Type date TypeClassic=Type standard YouAreInPollCreateArea=You are in the poll creation section FieldMandatory=Field mandatory -OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -OpenSurveyNoRegistration=No registration required. OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it RemoveAllDays=Remove all days CopyHoursOfFirstDay=Copy hours of first day @@ -69,7 +67,6 @@ CanComment=Voters can comment in the poll CanSeeOthersVote=Voters can see other people's vote SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. BackToCurrentMonth=Back to current month -PublicLinkToCreateSurvey=Public link to allow everybody to create a survey ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation ErrorOpenSurveyOneChoice=Enter at least one choice ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY diff --git a/htdocs/langs/es_ES/opensurvey.lang b/htdocs/langs/es_ES/opensurvey.lang index 5bc9b379690..af28b1e0b2b 100644 --- a/htdocs/langs/es_ES/opensurvey.lang +++ b/htdocs/langs/es_ES/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Tipo fecha TypeClassic=Tipo estándar YouAreInPollCreateArea=Está en la sección de creación de encuestas FieldMandatory=Campo obligatorio -OpenSurveyDesc=Servicio online para planificar una cita o elaborar una encuesta de forma fácil y rápida. -OpenSurveyNoRegistration=Sin registro requerido. OpenSurveyStep2=Seleccione sus fechas de entre los días libres (verdes). Los días seleccionados son de color azul. Puede seleccionar un día previamente seleccionado haciendo click de nuevo en él RemoveAllDays=Eliminar todos los días CopyHoursOfFirstDay=Copiar horas del primer día @@ -65,4 +63,3 @@ NoCommentYet=Ningún comentario ha sido publicado todavía para esta encuesta CanEditVotes=Puede cambiar el voto de otros SelectDayDesc=Para cada día seleccionado, puede elegir, o no, las horas de reunión en el siguiente formato:
- vacío,
- "8h", "8H" o "8:00" para proporcionar una hora de inicio de la reunión,
- "8-11", "8h-11h", "8H-11H" o "8:00-11:00" para proporcionar una hora de inicio y de fin de la reunión,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" para lo mismo pero con minutos. BackToCurrentMonth=Volver al mes actual -PublicLinkToCreateSurvey=Enlace público que permite a cualquiera crear una encuesta diff --git a/htdocs/langs/et_EE/opensurvey.lang b/htdocs/langs/et_EE/opensurvey.lang index f1751801423..bcab21d0795 100644 --- a/htdocs/langs/et_EE/opensurvey.lang +++ b/htdocs/langs/et_EE/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Liik: kuupäev TypeClassic=Liik: standardne YouAreInPollCreateArea=Oled küsitluse loomise sektsioonis FieldMandatory=Kohustuslik väli -OpenSurveyDesc=Online teenus kohtumise planeerimiseks või kiiresti ja lihtsalt uuringu läbi viimiseks. -OpenSurveyNoRegistration=Registreerimine pole nõutud. OpenSurveyStep2=Vali kuupäevad vabade päevade seas (rohelised). Valitud päevad on märgitud sinisega. Eelnevalt valitud päevalt saab valiku maha võtta sellel klõpsates RemoveAllDays=Eemalda kõik päevad CopyHoursOfFirstDay=Kopeeri esimese päeva tunnid @@ -65,4 +63,3 @@ NoCommentYet=Sellele küsitlusel ei ole veel ühtki kommentaari CanEditVotes=Saab teiste hääli muuta SelectDayDesc=Iga valitud päeva kohta võid, aga ei pea, lisada sobivaid kellaaegasid järgnevas formaadis::
- tühi,
- "8h", "8H" või "8:00" kohtumise alustamise kellaajaks,
- "8-11", "8h-11h", "8H-11H" või "8:00-11:00" kohtumise alustamise ja lõpu kellaajaks,
- "8h15-11h15", "8H15-11H15" või "8:15-11:15" on sama, mis eelmine, aga minutitega. BackToCurrentMonth=Tagasi praegusesse kuusse -PublicLinkToCreateSurvey=Avalik link, mis võimaldab igaühel uuringut luua diff --git a/htdocs/langs/fa_IR/opensurvey.lang b/htdocs/langs/fa_IR/opensurvey.lang index 2b6ee6afeee..52216944ea0 100644 --- a/htdocs/langs/fa_IR/opensurvey.lang +++ b/htdocs/langs/fa_IR/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=الحد من التاريخ # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/fi_FI/opensurvey.lang b/htdocs/langs/fi_FI/opensurvey.lang index a18e50a8c41..105db3b15ee 100644 --- a/htdocs/langs/fi_FI/opensurvey.lang +++ b/htdocs/langs/fi_FI/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Raja-päivämäärä # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/fr_FR/opensurvey.lang b/htdocs/langs/fr_FR/opensurvey.lang index 69e6bd8caa5..2e282b58041 100644 --- a/htdocs/langs/fr_FR/opensurvey.lang +++ b/htdocs/langs/fr_FR/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Type date TypeClassic=Type classique YouAreInPollCreateArea=Vous êtes dans l'espace de création de sondage FieldMandatory=Champ obligatoire -OpenSurveyDesc=Service en ligne permettant de planifier un rendez-vous ou réaliser un sondage rapidement et simplement. -OpenSurveyNoRegistration=Aucune inscription préalable n'est nécessaire. OpenSurveyStep2=Sélectionner les dates parmi les jours libres (en vert). Les jours sélectionné sont bleus. Vous pouvez désélectionner un jour en cliquant à nouveau dessus. RemoveAllDays=Efface tous les jours CopyHoursOfFirstDay=Copier heures du premier jour @@ -65,4 +63,3 @@ NoCommentYet=Pas de commentaires laissés pour le moment sur ce sondage CanEditVotes=Modification des votes des autres autorisés SelectDayDesc=Pour chaque jour, vous pouvez choisir, ou pas, les heures au format suivant :
- laisser vide,
- "8h", "8H" ou "8:00" pour définir uniquement une heure de début,
- "8-11", "8h-11h", "8H-11H" ou "8:00-11:00" pour définir une heure de début et de fin,
- "8h15-11h15", "8H15-11H15" ou "8:15-11:15" pour définir une heure de début et fin avec précision sur les minutes. BackToCurrentMonth=Retour au mois en cours -PublicLinkToCreateSurvey=Lien publique pour permettre à tout le monde de créer un sondage diff --git a/htdocs/langs/he_IL/opensurvey.lang b/htdocs/langs/he_IL/opensurvey.lang index ae138fd831a..4f892f47a4d 100644 --- a/htdocs/langs/he_IL/opensurvey.lang +++ b/htdocs/langs/he_IL/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/hu_HU/opensurvey.lang b/htdocs/langs/hu_HU/opensurvey.lang index be7af7bacd3..b854e201153 100644 --- a/htdocs/langs/hu_HU/opensurvey.lang +++ b/htdocs/langs/hu_HU/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Dátum korlást # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/is_IS/opensurvey.lang b/htdocs/langs/is_IS/opensurvey.lang index 6fe17b81714..36d821869c4 100644 --- a/htdocs/langs/is_IS/opensurvey.lang +++ b/htdocs/langs/is_IS/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Takmarka dagsetningu # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/it_IT/opensurvey.lang b/htdocs/langs/it_IT/opensurvey.lang index 79172d479fd..868a65108d0 100644 --- a/htdocs/langs/it_IT/opensurvey.lang +++ b/htdocs/langs/it_IT/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Digita data TypeClassic=Tipo standard YouAreInPollCreateArea=Sei nella sezione di creazione sondaggi FieldMandatory=Campo obbligatorio -OpenSurveyDesc=Servizio online per pianificare incontri o fare indagini velocemente e con facilità. -OpenSurveyNoRegistration=La registrazione non è necessaria OpenSurveyStep2=Scegli le date fra i giorni liberi (in verde). I giorni selezionati sono in blu. Puoi deselezionare un giorno precedentemente selezionato cliccandoci di nuovo sopra. RemoveAllDays=Cancella tutti i giorni CopyHoursOfFirstDay=Copia le ore del primo giorno @@ -65,4 +63,3 @@ NoCommentYet=Non è ancora stato inserito alcun commento su questo sondaggio CanEditVotes=Puoi cambiare il voto degli altri SelectDayDesc=Per ogni giorno selezionato, puoi scegliere o no, le ore di riunione nel formato seguente:
-vuoto,
-"8h", "8H" o "8:00"per definire un orario di inizio,
-"8-11", "8h-11h", "8H-11H" o "8:00-11:00" per fornire un orario di inizio e fine,
- "8h15-11h15", "8H15-11H15" o "8:15-11:15"la stessa cosa ma con i minuti. BackToCurrentMonth=Torna al mese in corso -PublicLinkToCreateSurvey=Link pubblico per permettere a tutti di creare un'indagine diff --git a/htdocs/langs/ja_JP/opensurvey.lang b/htdocs/langs/ja_JP/opensurvey.lang index 83f887b5226..664f9717222 100644 --- a/htdocs/langs/ja_JP/opensurvey.lang +++ b/htdocs/langs/ja_JP/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=日付を制限する # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/ko_KR/opensurvey.lang b/htdocs/langs/ko_KR/opensurvey.lang index ae138fd831a..4f892f47a4d 100644 --- a/htdocs/langs/ko_KR/opensurvey.lang +++ b/htdocs/langs/ko_KR/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/lv_LV/opensurvey.lang b/htdocs/langs/lv_LV/opensurvey.lang index f45fe2ba7cb..5480c7947a4 100644 --- a/htdocs/langs/lv_LV/opensurvey.lang +++ b/htdocs/langs/lv_LV/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Tipa datums TypeClassic=Tipa standarts YouAreInPollCreateArea=Jūs esat pieres daļā radīšanas sadaļā FieldMandatory=Lauks obligāts -OpenSurveyDesc=Tiešsaistes pakalpojumu, lai plānotu Rendez-vous vai veikt aptauju ātri un viegli. -OpenSurveyNoRegistration=Nav nepieciešama reģistrācija. OpenSurveyStep2=Izvēlieties datumus amoung bezmaksas dienas (zaļā krāsā). Izvēlētās dienas ir zilā krāsā. Jūs varat noņemsiet dienu iepriekš izvēlēto noklikšķinot vēlreiz uz tā RemoveAllDays=Noņemt visas dienas CopyHoursOfFirstDay=Kopēt stundas pirmajā dienā @@ -65,4 +63,3 @@ NoCommentYet=Nav komentāri ir ievietojis šajā aptaujā vēl CanEditVotes=Var mainīt balsojumu citiem SelectDayDesc=Attiecībā uz katru izvēlēto dienu, jūs varat izvēlēties, vai ne, tiekoties stundas šādā formātā:
- Tukša,
- "8h", "8H" vai "08:00", lai sniegtu tikšanos s starta stundu,
- "8-11", "8h-11h", "8H-11H" vai "8:00-11:00", lai sniegtu sanāksmi sākuma un beigu stundu,
- "8h15-11h15", "8H15-11H15" vai "8:15-11:15" par to pašu, bet ar minūtes. BackToCurrentMonth=Atpakaļ uz tekošā mēneša -PublicLinkToCreateSurvey=Sabiedrības saites, lai ļautu ikvienam izveidot aptauju diff --git a/htdocs/langs/nb_NO/opensurvey.lang b/htdocs/langs/nb_NO/opensurvey.lang index 89cd1c48130..e7da7887e8b 100644 --- a/htdocs/langs/nb_NO/opensurvey.lang +++ b/htdocs/langs/nb_NO/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Limit date # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/nl_NL/opensurvey.lang b/htdocs/langs/nl_NL/opensurvey.lang index e11f3c97315..f7dbffb030f 100644 --- a/htdocs/langs/nl_NL/opensurvey.lang +++ b/htdocs/langs/nl_NL/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Termijn # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/pl_PL/opensurvey.lang b/htdocs/langs/pl_PL/opensurvey.lang index f50f750ea1a..7db10839fb8 100644 --- a/htdocs/langs/pl_PL/opensurvey.lang +++ b/htdocs/langs/pl_PL/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Limit daty # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/pt_BR/opensurvey.lang b/htdocs/langs/pt_BR/opensurvey.lang index 5a92414f588..adade08db90 100644 --- a/htdocs/langs/pt_BR/opensurvey.lang +++ b/htdocs/langs/pt_BR/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Tipo data TypeClassic=Tipo estandard YouAreInPollCreateArea=Voce esta na seçao de criaçao da enquete FieldMandatory=Campo obrigatorio -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -OpenSurveyNoRegistration=Nao e preciso se registrar. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it RemoveAllDays=Remover todos os dias CopyHoursOfFirstDay=Copiar horarios do primeiro dia @@ -65,4 +63,3 @@ ExpireDate=Data Límite # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/pt_PT/opensurvey.lang b/htdocs/langs/pt_PT/opensurvey.lang index f2078e5b3ee..27959f709ff 100644 --- a/htdocs/langs/pt_PT/opensurvey.lang +++ b/htdocs/langs/pt_PT/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Tipo de data # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ votes=Voto(s) # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/ro_RO/opensurvey.lang b/htdocs/langs/ro_RO/opensurvey.lang index 2d2ee60b7c7..c68eb13e392 100644 --- a/htdocs/langs/ro_RO/opensurvey.lang +++ b/htdocs/langs/ro_RO/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Tip dată TypeClassic=Tip standard YouAreInPollCreateArea=Sunteţi în secţiunea creare sondaj FieldMandatory=Câmp obligatoriu -OpenSurveyDesc=Serviciul online pentru planificarea unei întâlniri sau de a face un sondaj rapid și ușor. -OpenSurveyNoRegistration=Nu necesită înregistrare. OpenSurveyStep2=Selectati datele între zilele libere (verde). Zilele selectate sunt în albastru. Puteți deselecta o zi selectată anterior, făcând clic din nou pe ea RemoveAllDays=Elimină toate zilele CopyHoursOfFirstDay=Copiază orelele ale primei zile @@ -65,4 +63,3 @@ NoCommentYet=Niciun comentariu nu a fost postat încă pentru acest sondaj CanEditVotes=Puteţi schimba votul altora SelectDayDesc=Pentru fiecare zi selectată, puteți alege, sau nu, orele întălnirii în următorul format:
- gol,
- "8h", "8H" or "8:00" pentru a da ora de start a întâlnirii,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" pentru a da startul și ora finală,
- ""8h15-11h15", "8H15-11H15" or "8:15-11:15" pentru același lucru, dar cu minute. BackToCurrentMonth=Înapoi la luna curentă -PublicLinkToCreateSurvey=Link public pentru a permite oricărui să creeze un sondaj diff --git a/htdocs/langs/ru_RU/opensurvey.lang b/htdocs/langs/ru_RU/opensurvey.lang index 6c1313da6e5..b4f0db0ae60 100644 --- a/htdocs/langs/ru_RU/opensurvey.lang +++ b/htdocs/langs/ru_RU/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Дата лимита # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/sk_SK/opensurvey.lang b/htdocs/langs/sk_SK/opensurvey.lang index e652d947091..76cb7af9870 100644 --- a/htdocs/langs/sk_SK/opensurvey.lang +++ b/htdocs/langs/sk_SK/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Zadajte dátum TypeClassic=Typ štandardné YouAreInPollCreateArea=Nachádzate sa v sekcii pre vytvorenie hlasovanie FieldMandatory=Pole povinné -OpenSurveyDesc=Online služby naplánovať rendez-vous alebo urobiť prieskum ľahko a rýchlo. -OpenSurveyNoRegistration=Nie nutná registrácia. OpenSurveyStep2=Zvoľte termín Vášho amoung voľné dni (zelená). Vybrané dni sú v modrej farbe. Môžete zrušiť výber deň vopred zvolenú opätovným kliknutím na neho RemoveAllDays=Odstráňte všetky dni CopyHoursOfFirstDay=Kopírovanie hodín prvého dňa @@ -65,4 +63,3 @@ NoCommentYet=Žiadne komentáre boli zverejnené na túto anketu ešte CanEditVotes=Môže zmeniť hlas ostatných SelectDayDesc=Pre každý vybraný deň, môžete si vybrať, či sa majú splniť hodín v nasledujúcom formáte:
- Prázdne,
- "8h", "8H" alebo "8:00" dať schôdzku v úvodnej hodinu,
- "8-11", "8h-11h", "8H-11H" alebo "08:00-11:00" dať schôdzku je začiatok a koniec hodiny,
- "8h15-11h15", "8H15-11h15" alebo "08:15-11:15" to isté, ale v minútach. BackToCurrentMonth=Späť na aktuálny mesiac -PublicLinkToCreateSurvey=Verejné odkaz dovoliť každý vytvoriť prieskum diff --git a/htdocs/langs/sl_SI/opensurvey.lang b/htdocs/langs/sl_SI/opensurvey.lang index e23feea5e1d..060de054e3d 100644 --- a/htdocs/langs/sl_SI/opensurvey.lang +++ b/htdocs/langs/sl_SI/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Omejitveni datum # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/sv_SE/opensurvey.lang b/htdocs/langs/sv_SE/opensurvey.lang index f6d87a57ca0..e7fb2806092 100644 --- a/htdocs/langs/sv_SE/opensurvey.lang +++ b/htdocs/langs/sv_SE/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=Begränsa datum # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/tr_TR/opensurvey.lang b/htdocs/langs/tr_TR/opensurvey.lang index 0ea8a37e208..398025bcc77 100644 --- a/htdocs/langs/tr_TR/opensurvey.lang +++ b/htdocs/langs/tr_TR/opensurvey.lang @@ -16,8 +16,6 @@ TypeDate=Tarih türü TypeClassic=Standart tür YouAreInPollCreateArea=Anket oluşturma bölümündesiniz FieldMandatory=Zorunlu alan -OpenSurveyDesc=Bir randevu planlamak ya da hızlıca ve kolayca bir araştırma yapmak için çevrimiçi servis. -OpenSurveyNoRegistration=Kayıt gerekmez. OpenSurveyStep2=Boş günler arasından tarihlerinizi seçin (yeşil). Seçilen günler mavidir. Daha önceden seçtiğiniz günü tıklayarak seçimi kaldırabilirsiniz RemoveAllDays=Bütün günleri kaldır CopyHoursOfFirstDay=İlk günün saatlerini kopyala @@ -65,4 +63,3 @@ NoCommentYet=Bu anket için henüz gönderilen açıklama yok CanEditVotes=Başkalarını oyu değiştirilebilir SelectDayDesc=Seçilen her gün için, toplantı saatlerini aşağıdaki biçimde seçebilir ya da seçmeyebilirsiniz :
- boş,
- "8h", "8H" or "8:00" toplantı başlama saatleri için,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" ttoplantı başlama ve bitiş saatleri için,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" aynı şeyler için ama dakika olarak. BackToCurrentMonth=Geçerli aya geri dön -PublicLinkToCreateSurvey=Herkesin bir araştırma oluşturmasını sağlayan genel bağlantı diff --git a/htdocs/langs/uz_UZ/opensurvey.lang b/htdocs/langs/uz_UZ/opensurvey.lang index ae138fd831a..4f892f47a4d 100644 --- a/htdocs/langs/uz_UZ/opensurvey.lang +++ b/htdocs/langs/uz_UZ/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/vi_VN/opensurvey.lang b/htdocs/langs/vi_VN/opensurvey.lang index ae138fd831a..4f892f47a4d 100644 --- a/htdocs/langs/vi_VN/opensurvey.lang +++ b/htdocs/langs/vi_VN/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/zh_CN/opensurvey.lang b/htdocs/langs/zh_CN/opensurvey.lang index fb5a33eb567..b40b30c5dc1 100644 --- a/htdocs/langs/zh_CN/opensurvey.lang +++ b/htdocs/langs/zh_CN/opensurvey.lang @@ -16,8 +16,6 @@ NewSurvey=新的调查 # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ SurveyResults=结果 # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/langs/zh_TW/opensurvey.lang b/htdocs/langs/zh_TW/opensurvey.lang index 2ba8e9fba39..d7bce2f9596 100644 --- a/htdocs/langs/zh_TW/opensurvey.lang +++ b/htdocs/langs/zh_TW/opensurvey.lang @@ -16,8 +16,6 @@ # TypeClassic=Type standard # YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory -# OpenSurveyDesc=Online service to plan a rendez-vous or do a survey quickly and easily. -# OpenSurveyNoRegistration=No registration required. # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days # CopyHoursOfFirstDay=Copy hours of first day @@ -65,4 +63,3 @@ ExpireDate=極限日期 # CanEditVotes=Can change vote of others # SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format :
- empty,
- "8h", "8H" or "8:00" to give a meeting's start hour,
- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,
- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. # BackToCurrentMonth=Back to current month -# PublicLinkToCreateSurvey=Public link to allow everybody to create a survey diff --git a/htdocs/opensurvey/index.php b/htdocs/opensurvey/index.php index 47beea912c0..0f809f8e52f 100644 --- a/htdocs/opensurvey/index.php +++ b/htdocs/opensurvey/index.php @@ -50,21 +50,6 @@ print_fiche_titre($langs->trans("OpenSurveyArea")); echo $langs->trans("NoSurveysInDatabase",$nbsondages).'

'."\n"; - -// Link -print img_picto('','object_globe.png').' '.$langs->trans("PublicLinkToCreateSurvey").':
'; - -// Define $urlwithroot -$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); -$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file -//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - -$url=$urlwithouturlroot.dol_buildpath('/opensurvey/public/index.php',1); -$urllink=''.$url.''; -print $urllink; - - - llxFooter(); $db->close(); diff --git a/htdocs/opensurvey/public/index.php b/htdocs/opensurvey/public/index.php index 95519ba7278..f78a40fa351 100644 --- a/htdocs/opensurvey/public/index.php +++ b/htdocs/opensurvey/public/index.php @@ -47,11 +47,8 @@ llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); print '
- -
-

'.$langs->trans("OpenSurveyDesc").' '.$langs->trans("OpenSurveyNoRegistration").'

-

'; -print $langs->trans("OrganizeYourMeetingEasily").' +'; +print '

'.$langs->trans("OrganizeYourMeetingEasily").'


From c86130e81313ac5554aaff6c58e43e7967e47628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 08:03:50 +0100 Subject: [PATCH 064/177] Fixed navigation arrows in poll card --- htdocs/opensurvey/class/opensurveysondage.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 92dfdd54685..e67591ffa61 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -202,6 +202,9 @@ class Opensurveysondage extends CommonObject $obj = $this->db->fetch_object($resql); $this->id_sondage = $obj->id_sondage; + //For compatibility + $this->ref = $this->id_sondage; + $this->commentaires = $obj->commentaires; $this->mail_admin = $obj->mail_admin; $this->nom_admin = $obj->nom_admin; From 8d966756073a158859b8c4ef8c46b99930a8e178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 09:08:42 +0100 Subject: [PATCH 065/177] Force logged user to create surveys and applied Dolibarr style to poll creation wizard --- htdocs/core/modules/modOpenSurvey.class.php | 6 +++--- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 3 ++- .../mysql/tables/llx_opensurvey_sondage.sql | 1 - .../class/opensurveysondage.class.php | 4 ---- htdocs/opensurvey/fonctions.php | 17 ++--------------- htdocs/opensurvey/public/choix_autre.php | 14 ++++---------- htdocs/opensurvey/public/choix_date.php | 13 ++++--------- htdocs/opensurvey/public/create_survey.php | 13 ++++--------- htdocs/opensurvey/public/index.php | 8 ++------ 9 files changed, 21 insertions(+), 58 deletions(-) diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index cb174d2df9e..98830509bd7 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -157,12 +157,12 @@ class modOpenSurvey extends DolibarrModules 'titre'=>'NewSurvey', 'mainmenu'=>'opensurvey', 'leftmenu'=>'opensurvey_new', - 'url'=>'/opensurvey/public/index.php?origin=dolibarr', + 'url'=>'/opensurvey/public/index.php', 'langs'=>'opensurvey', 'position'=>210, 'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled. - 'perms'=>'', - 'target'=>'_blank', + 'perms'=>'$user->rights->opensurvey->write', + 'target'=>'', 'user'=>0); $r++; diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index ffd906c0299..4d85adb9782 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -23,4 +23,5 @@ ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `survey_link_visible` ; ALTER TABLE `llx_opensurvey_sondage` DROP INDEX `idx_id_sondage_admin` ; ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `id_sondage_admin` ; ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `canedit` ; -ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_spy` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allow_comments` ; \ No newline at end of file +ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_spy` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allow_comments` ; +ALTER TABLE `llx_opensurvey_sondage` DROP `origin` ; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index b697b0bc4ff..ce4add9e9f5 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -26,7 +26,6 @@ CREATE TABLE llx_opensurvey_sondage ( mailsonde varchar(2) DEFAULT '0', allow_comments TINYINT(1) unsigned NOT NULL DEFAULT 1, allow_spy TINYINT(1) unsigned NOT NULL DEFAULT 1, - origin VARCHAR(64), tms TIMESTAMP, sujet TEXT ) ENGINE=InnoDB; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index e67591ffa61..5d532fead5b 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -51,7 +51,6 @@ class Opensurveysondage extends CommonObject var $format; var $mailsonde; - public $origin; public $sujet; /** @@ -108,7 +107,6 @@ class Opensurveysondage extends CommonObject $sql.= "mailsonde,"; $sql.= "allow_comments,"; $sql.= "allow_spy,"; - $sql.= "origin,"; $sql.= "sujet"; $sql.= ") VALUES ("; @@ -122,7 +120,6 @@ class Opensurveysondage extends CommonObject $sql.= " ".$this->db->escape($this->mailsonde).","; $sql.= " ".$this->db->escape($this->allow_comments).","; $sql.= " ".$this->db->escape($this->allow_spy).","; - $sql.= " '".$this->db->escape($this->origin)."',"; $sql.= " '".$this->db->escape($this->sujet)."'"; $sql.= ")"; @@ -497,7 +494,6 @@ class Opensurveysondage extends CommonObject $this->mailsonde = ($this->mailsonde ? 1 : 0); $this->allow_comments = ($this->allow_comments ? 1 : 0); $this->allow_spy = ($this->allow_spy ? 1 : 0); - $this->origin = trim($this->origin); $this->sujet = trim($this->sujet); } } diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 5106242963a..437f851d67b 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -218,7 +218,6 @@ function dol_survey_random($car) /** * Add a poll * - * @param string $origin Origin of poll creation * @return void */ function ajouter_sondage($origin) @@ -264,24 +263,10 @@ function ajouter_sondage($origin) $opensurveysondage->mailsonde = $_SESSION['mailsonde']; $opensurveysondage->allow_comments = $allow_comments; $opensurveysondage->allow_spy = $allow_spy; - $opensurveysondage->origin = $origin; $opensurveysondage->sujet = $_SESSION['toutchoix']; $opensurveysondage->create(null); - if ($origin == 'dolibarr') $urlback=dol_buildpath('/opensurvey/results.php',1).'?id='.$sondage; - else - { - // Define $urlwithroot - $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); - $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file - //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - - $url=$urlwithouturlroot.dol_buildpath('/opensurvey/public/studs.php',1).'?sondage='.$sondage; - - $urlback=$url; - } - unset($_SESSION["titre"]); unset($_SESSION["nom"]); unset($_SESSION["adresse"]); @@ -292,6 +277,8 @@ function ajouter_sondage($origin) unset($_SESSION['toutchoix']); unset($_SESSION['totalchoixjour']); unset($_SESSION['champdatefin']); + + $urlback=dol_buildpath('/opensurvey/card.php',1).'?id='.$sondage; header("Location: ".$urlback); exit(); diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index 4785a2b6e28..d28f0621f8a 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -22,8 +22,6 @@ * \brief Page to create a new survey (choice selection) */ -define("NOLOGIN",1); // This means this output page does not require to be logged. -define("NOCSRFCHECK",1); // We accept to go on this page from external web site. require_once('../../main.inc.php'); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); @@ -33,9 +31,6 @@ $erreur = false; $testdate = true; $date_selected = ''; -$origin=GETPOST('origin','alpha'); - - /* * Action @@ -103,7 +98,7 @@ if (isset($_POST["confirmecreation"]) || isset($_POST["confirmecreation_x"])) $_SESSION["formatsondage"]="A"; // Add into database - ajouter_sondage($origin); + ajouter_sondage(); } else { $_POST["fin_sondage_autre"] = 'ok'; } @@ -120,7 +115,7 @@ $form=new Form($db); $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); -llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); +llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss); if (empty($_SESSION['titre']) || empty($_SESSION['nom']) || empty($_SESSION['adresse'])) { @@ -134,9 +129,8 @@ if (empty($_SESSION['titre']) || empty($_SESSION['nom']) || empty($_SESSION['adr //On prépare les données pour les inserer dans la base print ''."\n"; -print ''; -print '
'. $langs->trans("CreatePoll")." (2 / 2)" .'
'."\n"; +print_fiche_titre($langs->trans("CreatePoll").' (2 / 2)'); print '
'."\n"; print '
'. $langs->trans("PollOnChoice") .'

'."\n"; @@ -211,7 +205,7 @@ print ''."\n"; print '


'."\n"; print '
'."\n"; -llxFooterSurvey(); +llxFooter(); $db->close(); ?> \ No newline at end of file diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/public/choix_date.php index 4e51a91450b..a60d7af6ca6 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/public/choix_date.php @@ -22,15 +22,11 @@ * \brief Page to create a new survey (date selection) */ -define("NOLOGIN",1); // This means this output page does not require to be logged. -define("NOCSRFCHECK",1); // We accept to go on this page from external web site. require_once('../../main.inc.php'); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); -$origin=GETPOST('origin','alpha'); - /* * Actions @@ -63,7 +59,7 @@ if (GETPOST('confirmation') || GETPOST('confirmation_x')) else dol_print_error('','array not defined'); $_SESSION["toutchoix"]=substr("$choixdate",1); - ajouter_sondage($origin); + ajouter_sondage(); } // Reset days @@ -93,7 +89,7 @@ if (! isset($_SESSION['nom']) && ! isset($_SESSION['adresse']) && ! isset($_SESS $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); -llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); +llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss); //nombre de cases par défaut if (! isset($_SESSION["nbrecaseshoraires"])) @@ -221,9 +217,8 @@ else //Debut du formulaire et bandeaux de tete print ''."\n"; -print ''; -print '
'. $langs->trans("CreatePoll")." (2 / 2)" .'
'."\n"; +print_fiche_titre($langs->trans("CreatePoll").' (2 / 2)'); //affichage de l'aide pour les jours print '
'."\n"; @@ -594,7 +589,7 @@ print ''."\n"; print '



'."\n"; print '
'."\n"; -llxFooterSurvey(); +llxFooter(); $db->close(); ?> \ No newline at end of file diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index 505adbee1d3..850a87b9dbd 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -22,8 +22,6 @@ * \brief Page to create a new survey */ -define("NOLOGIN",1); // This means this output page does not require to be logged. -define("NOCSRFCHECK",1); // We accept to go on this page from external web site. require_once('../../main.inc.php'); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); @@ -108,21 +106,18 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GET $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); -llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); - - -print '
'. $langs->trans("CreatePoll").' (1 / 2)' .'
'."\n"; +llxHeader('', $langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); +print_fiche_titre($langs->trans("CreatePoll").' (1 / 2)'); //debut du formulaire print '
'."\n"; print ''; print '
'."\n"; -print '
'. $langs->trans("YouAreInPollCreateArea") .'

'."\n"; //Affichage des différents champs textes a remplir -print ''."\n"; +print '
'."\n"; print ''."\n"; if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) @@ -201,7 +196,7 @@ print '


'."\n"; print ''."\n"; print ''."\n"; -llxFooterSurvey(); +llxFooter(); $db->close(); ?> diff --git a/htdocs/opensurvey/public/index.php b/htdocs/opensurvey/public/index.php index f78a40fa351..cc4693c76a3 100644 --- a/htdocs/opensurvey/public/index.php +++ b/htdocs/opensurvey/public/index.php @@ -22,11 +22,7 @@ //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -define("NOLOGIN",1); // This means this output page does not require to be logged. -define("NOCSRFCHECK",1); // We accept to go on this page from external web site. require_once('../../main.inc.php'); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); @@ -43,7 +39,7 @@ $langs->load("opensurvey"); $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); -llxHeaderSurvey($langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); +llxHeader('', $langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); print '
@@ -56,7 +52,7 @@ print '

'.$langs->trans("OrganizeYourMeetingEasily").'

'; -llxFooterSurvey(); +llxFooter(); $db->close(); ?> From 4f57e8297537e66163142f2385826436cdbcd503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 09:14:12 +0100 Subject: [PATCH 066/177] Removed odd messages --- htdocs/langs/ar_SA/opensurvey.lang | 3 --- htdocs/langs/bg_BG/opensurvey.lang | 3 --- htdocs/langs/ca_ES/opensurvey.lang | 3 --- htdocs/langs/cs_CZ/opensurvey.lang | 3 --- htdocs/langs/da_DK/opensurvey.lang | 3 --- htdocs/langs/de_DE/opensurvey.lang | 3 --- htdocs/langs/el_GR/opensurvey.lang | 3 --- htdocs/langs/en_US/opensurvey.lang | 8 +------- htdocs/langs/es_ES/opensurvey.lang | 3 --- htdocs/langs/et_EE/opensurvey.lang | 3 --- htdocs/langs/fa_IR/opensurvey.lang | 3 --- htdocs/langs/fi_FI/opensurvey.lang | 3 --- htdocs/langs/fr_FR/opensurvey.lang | 3 --- htdocs/langs/he_IL/opensurvey.lang | 3 --- htdocs/langs/hu_HU/opensurvey.lang | 3 --- htdocs/langs/is_IS/opensurvey.lang | 3 --- htdocs/langs/it_IT/opensurvey.lang | 3 --- htdocs/langs/ja_JP/opensurvey.lang | 3 --- htdocs/langs/ko_KR/opensurvey.lang | 3 --- htdocs/langs/lv_LV/opensurvey.lang | 3 --- htdocs/langs/nb_NO/opensurvey.lang | 3 --- htdocs/langs/nl_NL/opensurvey.lang | 3 --- htdocs/langs/pl_PL/opensurvey.lang | 3 --- htdocs/langs/pt_BR/opensurvey.lang | 3 --- htdocs/langs/pt_PT/opensurvey.lang | 3 --- htdocs/langs/ro_RO/opensurvey.lang | 3 --- htdocs/langs/ru_RU/opensurvey.lang | 3 --- htdocs/langs/sk_SK/opensurvey.lang | 3 --- htdocs/langs/sl_SI/opensurvey.lang | 3 --- htdocs/langs/sv_SE/opensurvey.lang | 3 --- htdocs/langs/tr_TR/opensurvey.lang | 3 --- htdocs/langs/uz_UZ/opensurvey.lang | 3 --- htdocs/langs/vi_VN/opensurvey.lang | 3 --- htdocs/langs/zh_CN/opensurvey.lang | 3 --- htdocs/langs/zh_TW/opensurvey.lang | 3 --- htdocs/opensurvey/public/choix_autre.php | 3 --- htdocs/opensurvey/public/choix_date.php | 6 ------ 37 files changed, 1 insertion(+), 118 deletions(-) diff --git a/htdocs/langs/ar_SA/opensurvey.lang b/htdocs/langs/ar_SA/opensurvey.lang index 52216944ea0..109ed7caf28 100644 --- a/htdocs/langs/ar_SA/opensurvey.lang +++ b/htdocs/langs/ar_SA/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=الحد من التاريخ # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=الحد من التاريخ # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/bg_BG/opensurvey.lang b/htdocs/langs/bg_BG/opensurvey.lang index 99c7d3b791c..0cccd93ec28 100644 --- a/htdocs/langs/bg_BG/opensurvey.lang +++ b/htdocs/langs/bg_BG/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Крайната дата # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Крайната дата # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/ca_ES/opensurvey.lang b/htdocs/langs/ca_ES/opensurvey.lang index d4a965d7bbc..e00fb8efc9d 100644 --- a/htdocs/langs/ca_ES/opensurvey.lang +++ b/htdocs/langs/ca_ES/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=La seva adreça de correu electrònic ToReceiveEMailForEachVote=Per rebre un email per cada vot TypeDate=Tipus de data TypeClassic=Tipus estándar -YouAreInPollCreateArea=Està a la secció de creació d'enquestes FieldMandatory=Camp obligatori OpenSurveyStep2=Seleccioneu les dates entre els dies lliures (verds). Els dies seleccionats són de color blau. Pot seleccionar un dia prèviament seleccionat fent clic de nou en ell RemoveAllDays=Eliminar tots els dies @@ -40,7 +39,6 @@ YesNoList=Llista (buit/sí/no) PourContreList=Llista (buit/a favor/en contra) AddNewColumn=Afegir nova columna TitleChoice=Títol de l'opció -InfoAfterCreate=Un cop hagi confirmat la creació de la seva enquesta, passareu automàticament a la pàgina de la seva enquesta.
També rebrà un email amb un enllaç a la seva enquesta per enviar als votants. ExportSpreadsheet=Exportar resultats a un full de càlcul ExpireDate=Data límit NbOfVoters=Núm. de votants @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Aquest nom ja havia estat usat per a aquesta enquesta ErrorPollDoesNotExists=Error, l'enquesta %s no existeix. OpenSurveyNothingToSetup=No hi ha una configuració específica que fer. PollWillExpire=La seva enquesta expirarà automàticament %s dies després de l'última data de la seva enquesta. -RemovalDate=Data d'eliminació AddADate=Afegir una data AddStartHour=Afegir hora d'inici AddEndHour=Afegir hora de fi diff --git a/htdocs/langs/cs_CZ/opensurvey.lang b/htdocs/langs/cs_CZ/opensurvey.lang index 07fd01d95c8..450c28d0306 100644 --- a/htdocs/langs/cs_CZ/opensurvey.lang +++ b/htdocs/langs/cs_CZ/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Vaše e-mailová adresa ToReceiveEMailForEachVote=Chcete-li obdržet e-mail pro každé hlasování TypeDate=Zadejte datum TypeClassic=Typ standardní -YouAreInPollCreateArea=Nacházíte se v sekci pro vytvoření hlasování FieldMandatory=Pole povinné OpenSurveyStep2=Zvolte termín Vašeho amoung volné dny (zelená). Vybrané dny jsou v modré barvě. Můžete zrušit výběr den předem zvolenou opětovným kliknutím na něj RemoveAllDays=Odstraňte všechny dny @@ -40,7 +39,6 @@ YesNoList=List (prázdný / ano / ne) PourContreList=List (prázdný / pro / proti) AddNewColumn=Přidat nový sloupec TitleChoice=Volba štítek -InfoAfterCreate=Poté, co jste potvrdili vytvoření vašeho hlasování, budete automaticky přesměrováni na stránku vašeho hlasování.
Také byste měli obdržet e-mail s odkazem na vaše hlasování pro odeslání do voličů. ExportSpreadsheet=Export výsledků tabulku ExpireDate=Omezit datum NbOfVoters=Nb voličů @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Tento název již byl použit při tomto hlasování ErrorPollDoesNotExists=Chyba hlasování %s neexistuje. OpenSurveyNothingToSetup=Neexistuje žádné specifické nastavení dělat. PollWillExpire=Váš průzkum skončí automaticky %s dní po posledním dni svého hlasování. -RemovalDate=Odstranění data AddADate=Přidat datum AddStartHour=Přidat začít hodinu AddEndHour=Přidat end hodinu diff --git a/htdocs/langs/da_DK/opensurvey.lang b/htdocs/langs/da_DK/opensurvey.lang index bec2838bf6b..febbb811efb 100644 --- a/htdocs/langs/da_DK/opensurvey.lang +++ b/htdocs/langs/da_DK/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Limit dato # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Limit dato # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/de_DE/opensurvey.lang b/htdocs/langs/de_DE/opensurvey.lang index e74d4af1b1a..d77dae1b03f 100644 --- a/htdocs/langs/de_DE/opensurvey.lang +++ b/htdocs/langs/de_DE/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Ihre E-Mail-Adresse ToReceiveEMailForEachVote=EMail für jede Stimme erhalten TypeDate=Typ Datum TypeClassic=Typ Standard -YouAreInPollCreateArea=Du bist im Abschnitt "Abstimmung erstellen" FieldMandatory=Feld zwingend nötig OpenSurveyStep2=Wähle Deine Daten unter den freien Tagen (grün). Die ausgewählten Tage erscheinen blau. Du kannst einen bereits ausgewählten Tag durch anklicken wieder abwählen. RemoveAllDays=Alle Tage entfernen @@ -40,7 +39,6 @@ YesNoList=Liste (leer/ja/nein) PourContreList=Liste (leer/dafür/dagegen) AddNewColumn=Neue Spalte hinzufügen TitleChoice=Beschreibung wählen -InfoAfterCreate=Nach der Bestätigungen zum Erstellen der Abstimmung wirst Du automatisch auf die Seite mit der Abstimmung weitergeleitet.
Du solltest auch ein Email mit einem Link zur Abstimmung erhalten, welches Du an die Wähler schicken kannst. ExportSpreadsheet=Exportiere Resultattabelle ExpireDate=Frist NbOfVoters=Anzahl Wähler @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Dieser Name wurde für diese Abstimmung schon benutzt ErrorPollDoesNotExists=Fehler, Umfrage %s existiert nicht. OpenSurveyNothingToSetup=Es gibt nichts Spezielles zu konfigurieren. PollWillExpire=Deine Abstimmung endet automatisch nach %s Tagen nach dem letzten Abstimmungstag. -RemovalDate=Entferndatum AddADate=Datum hinzufügen AddStartHour=Startzeit hinzufügen AddEndHour=Endzeit hinzufügen diff --git a/htdocs/langs/el_GR/opensurvey.lang b/htdocs/langs/el_GR/opensurvey.lang index 4b7a6ff7a65..0ffe0175384 100644 --- a/htdocs/langs/el_GR/opensurvey.lang +++ b/htdocs/langs/el_GR/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Η διεύθυνση email σας ToReceiveEMailForEachVote=Να λαμβάνετε ένα μήνυμα ηλεκτρονικού ταχυδρομείου για κάθε ψηφοφορία TypeDate=Ημερομηνία TypeClassic=Πρότυπο -YouAreInPollCreateArea=Βρίσκεστε στο τμήμα δημιουργίας δημοσκόπηση FieldMandatory=Υποχρεωτικό πεδίο OpenSurveyStep2=Επιλέξτε τις ημερομηνίες σας ανάμεσα στις ελεύθερες ημέρες (πράσινο). Οι επιλεγμένες ημέρες είναι σε μπλε χρώμα. Μπορείτε να ακυρώσετε μια μέρα προηγουμένως επιλεγεί κάνοντας κλικ ξανά πάνω του RemoveAllDays=Αφαιρέστε όλες τις ημέρες @@ -40,7 +39,6 @@ YesNoList=Λίστα (άδειο/ναι/όχι) PourContreList=Λίστα (άδειο/για/από) AddNewColumn=Προσθέσετε νέα στήλη TitleChoice=Επιλέξτε ετικέτα -InfoAfterCreate=Αφού έχετε επιβεβαιώσει τη δημιουργία της δημοσκόπησης σας, θα μεταφερθείτε αυτόματα στη σελίδα της δημοσκόπησης σας.
Θα πρέπει επίσης να λάβετε ένα μήνυμα ηλεκτρονικού ταχυδρομείου με το σύνδεσμο στο δικό σας δημοψήφισμα για την αποστολή τους στους ψηφοφόρους. ExportSpreadsheet=Εξαγωγή αποτελεσμάτων σε υπολογιστικό φύλλο ExpireDate=Όριο ημερομηνίας NbOfVoters=Αριθμός ψηφοφόρων @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Το όνομα αυτό χρησιμοποιείται ή ErrorPollDoesNotExists=Σφάλμα, δημοσκόπησης %s δεν υπάρχει. OpenSurveyNothingToSetup=Δεν υπάρχει συγκεκριμένη ρύθμιση να κάνετε. PollWillExpire=Δημοσκόπηση σας θα λήξει αυτόματα %s ημέρες μετά την τελευταία ημέρα της δημοσκόπησης σας. -RemovalDate=Ημερομηνία αφαίρεσης AddADate=Προσθέσετε μια ημερομηνία AddStartHour=Προσθέσετε ώρα έναρξη AddEndHour=Προσθέσετε ώρα λήξης diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 7cdadc308a0..9f9f3fe3abc 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Your email address ToReceiveEMailForEachVote=To receive an email for each vote TypeDate=Type date TypeClassic=Type standard -YouAreInPollCreateArea=You are in the poll creation section FieldMandatory=Field mandatory OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it RemoveAllDays=Remove all days @@ -40,9 +39,6 @@ YesNoList=List (empty/yes/no) PourContreList=List (empty/for/against) AddNewColumn=Add new column TitleChoice=Choice label -InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. -InfoExpiration=Your poll will be automatically removed after 6 months.
You can fix another removal date for it. -RemovalDate=Removal date (optional) ExportSpreadsheet=Export result spreadsheet ExpireDate=Limit date NbOfVoters=Nb of voters @@ -56,7 +52,6 @@ VoteNameAlreadyExists=This name was already used for this poll ErrorPollDoesNotExists=Error, poll %s does not exists. OpenSurveyNothingToSetup=There is no specific setup to do. PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -RemovalDate=Removal date AddADate=Add a date AddStartHour=Add start hour AddEndHour=Add end hour @@ -70,5 +65,4 @@ BackToCurrentMonth=Back to current month ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation ErrorOpenSurveyOneChoice=Enter at least one choice ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY -MoreChoices=Enter more choices for the voters -AfterCreationInfo=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
Then, you will receive quickly an email contening the link to your poll for sending it to the voters. \ No newline at end of file +MoreChoices=Enter more choices for the voters \ No newline at end of file diff --git a/htdocs/langs/es_ES/opensurvey.lang b/htdocs/langs/es_ES/opensurvey.lang index af28b1e0b2b..b0c2806f262 100644 --- a/htdocs/langs/es_ES/opensurvey.lang +++ b/htdocs/langs/es_ES/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Su dirección de correo electrónico ToReceiveEMailForEachVote=Para recibir un email por cada voto TypeDate=Tipo fecha TypeClassic=Tipo estándar -YouAreInPollCreateArea=Está en la sección de creación de encuestas FieldMandatory=Campo obligatorio OpenSurveyStep2=Seleccione sus fechas de entre los días libres (verdes). Los días seleccionados son de color azul. Puede seleccionar un día previamente seleccionado haciendo click de nuevo en él RemoveAllDays=Eliminar todos los días @@ -40,7 +39,6 @@ YesNoList=Lista (vacío/sí/no) PourContreList=Lista (vacío/a favor/en contra) AddNewColumn=Añadir nueva columna TitleChoice=Título de la opción -InfoAfterCreate=Una vez haya confirmado la creación de su encuesta, será redirigido automáticamente a la página de su encuesta.
También recibirá un email con un enlace a su encuesta para enviárselo a los votantes. ExportSpreadsheet=Exportar resultados a una hoja de cálculo ExpireDate=Fecha límite NbOfVoters=Núm. de votantes @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Este nombre ya había sido usado para esta encuesta ErrorPollDoesNotExists=Error, la encuesta %s no existe. OpenSurveyNothingToSetup=No hay una configuración específica que hacer. PollWillExpire=Su encuesta expirará automáticamente %s días después de la última fecha de su encuesta. -RemovalDate=Fecha de eliminación AddADate=Añadir una fecha AddStartHour=Añadir hora de inicio AddEndHour=Añadir hora de fin diff --git a/htdocs/langs/et_EE/opensurvey.lang b/htdocs/langs/et_EE/opensurvey.lang index bcab21d0795..4beac93c766 100644 --- a/htdocs/langs/et_EE/opensurvey.lang +++ b/htdocs/langs/et_EE/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Sinu e-posti aadress ToReceiveEMailForEachVote=Iga hääle kohta saadetakse e-kiri TypeDate=Liik: kuupäev TypeClassic=Liik: standardne -YouAreInPollCreateArea=Oled küsitluse loomise sektsioonis FieldMandatory=Kohustuslik väli OpenSurveyStep2=Vali kuupäevad vabade päevade seas (rohelised). Valitud päevad on märgitud sinisega. Eelnevalt valitud päevalt saab valiku maha võtta sellel klõpsates RemoveAllDays=Eemalda kõik päevad @@ -40,7 +39,6 @@ YesNoList=Nimekiri (tühi/jah/ei) PourContreList=Nimekiri (tühi/poolt/vastu) AddNewColumn=Lisa uus veerg TitleChoice=Valiku silt -InfoAfterCreate=Pärast küsitluse loomise kinnitamist suunatakse Sind automaatselt küsitluse lehele.
Samuti peaks Sinuni jõudma e-kiri lingiga küsitlusele, et küsitlust teistele jagada. ExportSpreadsheet=Ekspordi tulemuste tabel ExpireDate=Piira kuupäevaga NbOfVoters=Hääletajaid @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Sellele küsitlusele vastamiseks on seda nime juba kasutat ErrorPollDoesNotExists=Viga: küsitlust nimega %s ei ole OpenSurveyNothingToSetup=Pole erilist seadistust, mida teha. PollWillExpire=Sinu küsitlus aegub automaatselt %s päeva pärast viimast vastust. -RemovalDate=Kustutamise kuupäev AddADate=Lisa kuupäev AddStartHour=Lisa alustamise kellaaeg AddEndHour=Lisa lõpetamise kellaaeg diff --git a/htdocs/langs/fa_IR/opensurvey.lang b/htdocs/langs/fa_IR/opensurvey.lang index 52216944ea0..109ed7caf28 100644 --- a/htdocs/langs/fa_IR/opensurvey.lang +++ b/htdocs/langs/fa_IR/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=الحد من التاريخ # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=الحد من التاريخ # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/fi_FI/opensurvey.lang b/htdocs/langs/fi_FI/opensurvey.lang index 105db3b15ee..6cfaf5b4970 100644 --- a/htdocs/langs/fi_FI/opensurvey.lang +++ b/htdocs/langs/fi_FI/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Raja-päivämäärä # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Raja-päivämäärä # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/fr_FR/opensurvey.lang b/htdocs/langs/fr_FR/opensurvey.lang index 2e282b58041..93cc778adcd 100644 --- a/htdocs/langs/fr_FR/opensurvey.lang +++ b/htdocs/langs/fr_FR/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Votre adresse email ToReceiveEMailForEachVote=Pour recevoir un email à chaque vote TypeDate=Type date TypeClassic=Type classique -YouAreInPollCreateArea=Vous êtes dans l'espace de création de sondage FieldMandatory=Champ obligatoire OpenSurveyStep2=Sélectionner les dates parmi les jours libres (en vert). Les jours sélectionné sont bleus. Vous pouvez désélectionner un jour en cliquant à nouveau dessus. RemoveAllDays=Efface tous les jours @@ -40,7 +39,6 @@ YesNoList=Liste (vide/oui/non) PourContreList=Liste (vide/pour/contre) AddNewColumn=Ajouter nouvelle colonne TitleChoice=Libellé du choix -InfoAfterCreate=Une fois la confirmation de la création de votre sondage réalisée, vous serez redirigé vers la page de vote du sondage.
Vous devriez de plus recevoir un email avec le lien de la page sondage pour diffusion auprès des votants. ExportSpreadsheet=Exporter feuille de résultats ExpireDate=Date expiration NbOfVoters=Nombre de votants @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Ce nom a déjà été utilisé pour ce vote ErrorPollDoesNotExists=Erreur, le sondage %s n'existe pas. OpenSurveyNothingToSetup=Aucune configuration particulière n'est requise. PollWillExpire=Ce sondage expirera automatiquement %s jours après la date de dernier choix. -RemovalDate=Date de retrait AddADate=Ajouter une date AddStartHour=Ajouter heure de début AddEndHour=Ajouter heure de fin diff --git a/htdocs/langs/he_IL/opensurvey.lang b/htdocs/langs/he_IL/opensurvey.lang index 4f892f47a4d..5b437693696 100644 --- a/htdocs/langs/he_IL/opensurvey.lang +++ b/htdocs/langs/he_IL/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet # ExpireDate=Limit date # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/hu_HU/opensurvey.lang b/htdocs/langs/hu_HU/opensurvey.lang index b854e201153..b6d41207ec6 100644 --- a/htdocs/langs/hu_HU/opensurvey.lang +++ b/htdocs/langs/hu_HU/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Dátum korlást # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Dátum korlást # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/is_IS/opensurvey.lang b/htdocs/langs/is_IS/opensurvey.lang index 36d821869c4..1d4f44ab550 100644 --- a/htdocs/langs/is_IS/opensurvey.lang +++ b/htdocs/langs/is_IS/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Takmarka dagsetningu # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Takmarka dagsetningu # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/it_IT/opensurvey.lang b/htdocs/langs/it_IT/opensurvey.lang index 868a65108d0..eb05f88aa99 100644 --- a/htdocs/langs/it_IT/opensurvey.lang +++ b/htdocs/langs/it_IT/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Il tuo indirizzo email ToReceiveEMailForEachVote=Per ricevere un'email per ogni voto TypeDate=Digita data TypeClassic=Tipo standard -YouAreInPollCreateArea=Sei nella sezione di creazione sondaggi FieldMandatory=Campo obbligatorio OpenSurveyStep2=Scegli le date fra i giorni liberi (in verde). I giorni selezionati sono in blu. Puoi deselezionare un giorno precedentemente selezionato cliccandoci di nuovo sopra. RemoveAllDays=Cancella tutti i giorni @@ -40,7 +39,6 @@ YesNoList=Lista (vuota/sì/no) PourContreList=Elenco (vuota/a favore/contro) AddNewColumn=Aggiungi una colonna TitleChoice=Scegli l'etichetta -InfoAfterCreate=Una volta convalidata la creazione del sondaggio, sarai reindirizzato automaticamente alla pagina del sondaggio.
Dovresti anche ricevere una email con il link del sondaggio da mandare ai votanti. ExportSpreadsheet=Esporta su foglio elettronico ExpireDate=Data limite NbOfVoters=Num votanti @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Questo nome è già stato usato in questo sondaggio ErrorPollDoesNotExists=Errore, il sondaggio %snon esiste. OpenSurveyNothingToSetup=Non ci sono configurazioni da fare. PollWillExpire=Il sondaggio scadrà automaticamente%sgiorni dopo la sua data finale. -RemovalDate=Data di cancellazione AddADate=Aggiungi una data AddStartHour=Aggiungi un'ora di partenza AddEndHour=Aggiungi un'ora di fine diff --git a/htdocs/langs/ja_JP/opensurvey.lang b/htdocs/langs/ja_JP/opensurvey.lang index 664f9717222..af5612cb974 100644 --- a/htdocs/langs/ja_JP/opensurvey.lang +++ b/htdocs/langs/ja_JP/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=日付を制限する # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=日付を制限する # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/ko_KR/opensurvey.lang b/htdocs/langs/ko_KR/opensurvey.lang index 4f892f47a4d..5b437693696 100644 --- a/htdocs/langs/ko_KR/opensurvey.lang +++ b/htdocs/langs/ko_KR/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet # ExpireDate=Limit date # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/lv_LV/opensurvey.lang b/htdocs/langs/lv_LV/opensurvey.lang index 5480c7947a4..464856c10c5 100644 --- a/htdocs/langs/lv_LV/opensurvey.lang +++ b/htdocs/langs/lv_LV/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Jūsu e-pasta adrese ToReceiveEMailForEachVote=Lai saņemtu e-pastu par katru balsojumu TypeDate=Tipa datums TypeClassic=Tipa standarts -YouAreInPollCreateArea=Jūs esat pieres daļā radīšanas sadaļā FieldMandatory=Lauks obligāts OpenSurveyStep2=Izvēlieties datumus amoung bezmaksas dienas (zaļā krāsā). Izvēlētās dienas ir zilā krāsā. Jūs varat noņemsiet dienu iepriekš izvēlēto noklikšķinot vēlreiz uz tā RemoveAllDays=Noņemt visas dienas @@ -40,7 +39,6 @@ YesNoList=Saraksts (tukšs/jā/nē) PourContreList=Saraksts (tukšs/par/pret) AddNewColumn=Pievienot jaunu kolonnu TitleChoice=Izvēlies nosaukumu -InfoAfterCreate=Kad esat apstiprinājuši izveidot savu aptauju, jums tiks automātiski novirzīts uz lapu jūsu aptaujā.
Jums vajadzētu saņemt arī e-pastu ar saiti uz jūsu aptauju, lai nosūtītu to uz vēlētājiem. ExportSpreadsheet=Eksporta rezultātu izklājlapu ExpireDate=Ierobežot datumu NbOfVoters=Balsotāju skaits @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Šis nosaukums jau tika izmantots šajā aptaujā ErrorPollDoesNotExists=Kļūda, aptauja %s neeksistē. OpenSurveyNothingToSetup=Nav īpašas uzstādīšanas darīt. PollWillExpire=Jūsu aptauja beigsies automātiski %s pēc pēdējās dienas, kad balsošanas datums beigsies. -RemovalDate=Noņemšanas datums AddADate=Pievienot datumu AddStartHour=Pievienot sākuma stundu AddEndHour=Pievienot beigu stundu diff --git a/htdocs/langs/nb_NO/opensurvey.lang b/htdocs/langs/nb_NO/opensurvey.lang index e7da7887e8b..daecee4ffd1 100644 --- a/htdocs/langs/nb_NO/opensurvey.lang +++ b/htdocs/langs/nb_NO/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Limit date # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Limit date # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/nl_NL/opensurvey.lang b/htdocs/langs/nl_NL/opensurvey.lang index f7dbffb030f..aa84c1516f3 100644 --- a/htdocs/langs/nl_NL/opensurvey.lang +++ b/htdocs/langs/nl_NL/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Termijn # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Termijn # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/pl_PL/opensurvey.lang b/htdocs/langs/pl_PL/opensurvey.lang index 7db10839fb8..6ea6a710268 100644 --- a/htdocs/langs/pl_PL/opensurvey.lang +++ b/htdocs/langs/pl_PL/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Limit daty # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Limit daty # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/pt_BR/opensurvey.lang b/htdocs/langs/pt_BR/opensurvey.lang index adade08db90..042fd02327c 100644 --- a/htdocs/langs/pt_BR/opensurvey.lang +++ b/htdocs/langs/pt_BR/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Seu endereço e-mail ToReceiveEMailForEachVote=Para receber um e-mail por cada voto TypeDate=Tipo data TypeClassic=Tipo estandard -YouAreInPollCreateArea=Voce esta na seçao de criaçao da enquete FieldMandatory=Campo obrigatorio # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it RemoveAllDays=Remover todos os dias @@ -40,7 +39,6 @@ SelectedDays=Dias selecionados # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Data Límite # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Data Límite # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/pt_PT/opensurvey.lang b/htdocs/langs/pt_PT/opensurvey.lang index 27959f709ff..66f13a08096 100644 --- a/htdocs/langs/pt_PT/opensurvey.lang +++ b/htdocs/langs/pt_PT/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=O seu endereço de email # ToReceiveEMailForEachVote=To receive an email for each vote TypeDate=Tipo de data # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ SelectedDays=Dias selecionados # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Data Limite # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ SurveyResults=Resultados # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/ro_RO/opensurvey.lang b/htdocs/langs/ro_RO/opensurvey.lang index c68eb13e392..735f9feb322 100644 --- a/htdocs/langs/ro_RO/opensurvey.lang +++ b/htdocs/langs/ro_RO/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Adresa dvs de email ToReceiveEMailForEachVote=Primirea unui email pentru fiecare vot TypeDate=Tip dată TypeClassic=Tip standard -YouAreInPollCreateArea=Sunteţi în secţiunea creare sondaj FieldMandatory=Câmp obligatoriu OpenSurveyStep2=Selectati datele între zilele libere (verde). Zilele selectate sunt în albastru. Puteți deselecta o zi selectată anterior, făcând clic din nou pe ea RemoveAllDays=Elimină toate zilele @@ -40,7 +39,6 @@ YesNoList=Listă (goală/da/nu) PourContreList=Listă (goală/pentru/impotrivă) AddNewColumn=Adaugă coloană nouă TitleChoice=Etichetă Alegere -InfoAfterCreate=După ce ați confirmat crearea de sondajului, veți fi redirecționat automat la pagina sondajului.
Ar trebui să primiţi, de asemenea, un e-mail cu link-ul sondajului pentru a trimite-l la votanţi. ExportSpreadsheet=Exportă rezultatul în foaie de calcul ExpireDate=Data limită NbOfVoters=Nr-ul voturilor @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Acest nume a fost deasemenea folosit pentru acest sondaj ErrorPollDoesNotExists=Eroare, sondajul %s nu există. OpenSurveyNothingToSetup=Nu există setări specifice de făcut. PollWillExpire=Sondajul dvs. va expira în mod automat în % s zile de la ultima data a sondajului. -RemovalDate=Data eliminare AddADate=Adaugă o dată AddStartHour=Adaugă o oră de start AddEndHour=Adaugă o oră de final diff --git a/htdocs/langs/ru_RU/opensurvey.lang b/htdocs/langs/ru_RU/opensurvey.lang index b4f0db0ae60..28e64b72c7e 100644 --- a/htdocs/langs/ru_RU/opensurvey.lang +++ b/htdocs/langs/ru_RU/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Дата лимита # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Дата лимита # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/sk_SK/opensurvey.lang b/htdocs/langs/sk_SK/opensurvey.lang index 76cb7af9870..3938e4a8b4d 100644 --- a/htdocs/langs/sk_SK/opensurvey.lang +++ b/htdocs/langs/sk_SK/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Vaša e-mailová adresa ToReceiveEMailForEachVote=Ak chcete dostať e-mail pre každé hlasovanie TypeDate=Zadajte dátum TypeClassic=Typ štandardné -YouAreInPollCreateArea=Nachádzate sa v sekcii pre vytvorenie hlasovanie FieldMandatory=Pole povinné OpenSurveyStep2=Zvoľte termín Vášho amoung voľné dni (zelená). Vybrané dni sú v modrej farbe. Môžete zrušiť výber deň vopred zvolenú opätovným kliknutím na neho RemoveAllDays=Odstráňte všetky dni @@ -40,7 +39,6 @@ YesNoList=List (prázdny / áno / nie) PourContreList=List (prázdny / pre / proti) AddNewColumn=Pridať nový stĺpec TitleChoice=Voľba štítok -InfoAfterCreate=Potom, čo ste potvrdili vytvorenie vášho hlasovania, budete automaticky presmerovaní na stránku vášho hlasovania.
Tiež by ste mali dostať e-mail s odkazom na vaše hlasovanie pre odoslanie do voličov. ExportSpreadsheet=Export výsledkov tabuľku ExpireDate=Obmedziť dátum NbOfVoters=Nb voličov @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Tento názov už bol použitý pri tomto hlasovaní ErrorPollDoesNotExists=Chyba hlasovania %s neexistuje. OpenSurveyNothingToSetup=Neexistuje žiadne špecifické nastavenia robiť. PollWillExpire=Váš prieskum skončí automaticky %s dní po poslednom dni svojho hlasovania. -RemovalDate=Odstránenie dáta AddADate=Pridať dátum AddStartHour=Pridať začať hodinu AddEndHour=Pridať end hodinu diff --git a/htdocs/langs/sl_SI/opensurvey.lang b/htdocs/langs/sl_SI/opensurvey.lang index 060de054e3d..33411fbeacd 100644 --- a/htdocs/langs/sl_SI/opensurvey.lang +++ b/htdocs/langs/sl_SI/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Omejitveni datum # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Omejitveni datum # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/sv_SE/opensurvey.lang b/htdocs/langs/sv_SE/opensurvey.lang index e7fb2806092..31cbcaf29db 100644 --- a/htdocs/langs/sv_SE/opensurvey.lang +++ b/htdocs/langs/sv_SE/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=Begränsa datum # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=Begränsa datum # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/tr_TR/opensurvey.lang b/htdocs/langs/tr_TR/opensurvey.lang index 398025bcc77..0aceb11e1db 100644 --- a/htdocs/langs/tr_TR/opensurvey.lang +++ b/htdocs/langs/tr_TR/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Eposta adresiniz ToReceiveEMailForEachVote=Her oy için bir eposta almak için TypeDate=Tarih türü TypeClassic=Standart tür -YouAreInPollCreateArea=Anket oluşturma bölümündesiniz FieldMandatory=Zorunlu alan OpenSurveyStep2=Boş günler arasından tarihlerinizi seçin (yeşil). Seçilen günler mavidir. Daha önceden seçtiğiniz günü tıklayarak seçimi kaldırabilirsiniz RemoveAllDays=Bütün günleri kaldır @@ -40,7 +39,6 @@ YesNoList=Liste (boş/evet/hayır) PourContreList=Liste (boş, uygun/karşı) AddNewColumn=Yeni sütun ekle TitleChoice=Seçim etiketi -InfoAfterCreate=Anketinizin oluşturulmasını onayladığınızda, otomatik olarak anket sayfanıza yönlendirileceksiniz.
Oylayıcılara göndermek üzere anketinizin bağlantısı olan bir eposta da alacaksınız. ExportSpreadsheet=Sonuçları hesap tablosuna aktar ExpireDate=Sınır tarihi NbOfVoters=Oylayıcı sayısı @@ -54,7 +52,6 @@ VoteNameAlreadyExists=Bu isim bu anket için zaten kullanılmış ErrorPollDoesNotExists=Hata, anket %s mevcut değil. OpenSurveyNothingToSetup=Yapılacak özel ayar yok. PollWillExpire=Anketiniz, son tarihinden %s gün sonra kendiliğinden sona erecektir. -RemovalDate=Kaldırılma tarihi AddADate=Bir tarih ekle AddStartHour=Başlangıç saati ekle AddEndHour=Bitiş saati ekle diff --git a/htdocs/langs/uz_UZ/opensurvey.lang b/htdocs/langs/uz_UZ/opensurvey.lang index 4f892f47a4d..5b437693696 100644 --- a/htdocs/langs/uz_UZ/opensurvey.lang +++ b/htdocs/langs/uz_UZ/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet # ExpireDate=Limit date # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/vi_VN/opensurvey.lang b/htdocs/langs/vi_VN/opensurvey.lang index 4f892f47a4d..5b437693696 100644 --- a/htdocs/langs/vi_VN/opensurvey.lang +++ b/htdocs/langs/vi_VN/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet # ExpireDate=Limit date # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/zh_CN/opensurvey.lang b/htdocs/langs/zh_CN/opensurvey.lang index b40b30c5dc1..613f1869ca7 100644 --- a/htdocs/langs/zh_CN/opensurvey.lang +++ b/htdocs/langs/zh_CN/opensurvey.lang @@ -14,7 +14,6 @@ NewSurvey=新的调查 # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ CreateSurveyStandard=创建一个标准的调查 # PourContreList=List (empty/for/against) # AddNewColumn=Add new column TitleChoice=选择标签 -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=极限日期 # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ SurveyResults=结果 # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/langs/zh_TW/opensurvey.lang b/htdocs/langs/zh_TW/opensurvey.lang index d7bce2f9596..0b0b7e0adf2 100644 --- a/htdocs/langs/zh_TW/opensurvey.lang +++ b/htdocs/langs/zh_TW/opensurvey.lang @@ -14,7 +14,6 @@ # ToReceiveEMailForEachVote=To receive an email for each vote # TypeDate=Type date # TypeClassic=Type standard -# YouAreInPollCreateArea=You are in the poll creation section # FieldMandatory=Field mandatory # OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it # RemoveAllDays=Remove all days @@ -40,7 +39,6 @@ # PourContreList=List (empty/for/against) # AddNewColumn=Add new column # TitleChoice=Choice label -# InfoAfterCreate=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll.
You should also receive an email with link to your poll for sending it to the voters. # ExportSpreadsheet=Export result spreadsheet ExpireDate=極限日期 # NbOfVoters=Nb of voters @@ -54,7 +52,6 @@ ExpireDate=極限日期 # ErrorPollDoesNotExists=Error, poll %s does not exists. # OpenSurveyNothingToSetup=There is no specific setup to do. # PollWillExpire=Your poll will expire automatically %s days after the last date of your poll. -# RemovalDate=Removal date # AddADate=Add a date # AddStartHour=Add start hour # AddEndHour=Add end hour diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index d28f0621f8a..5a49562989c 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -188,9 +188,6 @@ if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) print '
'. $langs->trans("InfoExpiration") .'

'."\n"; print $langs->trans("RemovalDate") .' : DD/MM/YYYY'; print ''."\n"; - print '
'."\n"; - print ''. $langs->trans("InfoAfterCreate") .''."\n"; - print '
'."\n"; print '
'."\n"; print '
'. $langs->trans("PollTitle") .'
'."\n"; print ''."\n"; diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/public/choix_date.php index a60d7af6ca6..8afb1477303 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/public/choix_date.php @@ -568,12 +568,6 @@ if (!$erreur && (GETPOST('choixheures') || GETPOST('choixheures_x'))) { print '
'. $langs->trans("PollWillExpire",2) .'
'; print ''; + print ''; print ''; if (! empty($conf->stock->enabled)) print ''; print ''; @@ -436,7 +436,7 @@ if ($id > 0 || ! empty($ref)) if (! empty($conf->categorie->enabled)) { print ''; - print ''; + print ''; } print '
'. $langs->trans("CreatePoll") .'

'. $langs->trans("RemovalDate") .' : '.$date_fin.'
'."\n"; print ''."\n"; - print '
'."\n"; - print ''. $langs->trans("AfterCreationInfo") .''."\n"; - print'
'."\n"; - // print'

'."\n"; - // print 'Pour finir la création du sondage, cliquez sur le bouton ajout ci-dessous'."\n"; - // print '

'."\n"; print ''."\n"; print ''."\n"; print''."\n"; From eccfa7ec21ad00687c0c7292778d4e1596660d2d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 12:54:29 +0100 Subject: [PATCH 067/177] Fix: Wrong prerequisite on PHP version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bad4d47ffc2..a5560af54f2 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ See ChangeLog file found into package. - Several skins. - Code is highly customizable (a lot of use of modules and submodules). - Works with Mysql 4.1 or higher, or PostgreSql 8.14 or higher. -- Works with PHP 5.0 or higher. +- Works with PHP 5.2.1 or higher. - An easy to understand and maintain code (PHP with no heavy frameworks). - A trigger architecture to allow you to make Dolibarr business events run PHP code to update your own information system. - "NPR VAT Rate" (French particularity for managing VAT in DOM-TOM called "Non Perçue Récupérable"). From e09a16b427b1ee547ca9611525e5794c76b65bb3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 13:16:18 +0100 Subject: [PATCH 068/177] Update doc --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a5560af54f2..34e515a2ccc 100644 --- a/README.md +++ b/README.md @@ -110,17 +110,18 @@ See ChangeLog file found into package. ### Miscellaneous: - Multi-user, with several permissions levels for each feature. -- Serveral menu managers (can be used by internal users, as a back-office, with a particular menu, or by external users, as a front-office, with another menu and permissions). - Very user friendly and easy to use. -- Optional WYSIWYG forms, optional Ajax forms. -- Several skins. -- Code is highly customizable (a lot of use of modules and submodules). -- Works with Mysql 4.1 or higher, or PostgreSql 8.14 or higher. -- Works with PHP 5.2.1 or higher. -- An easy to understand and maintain code (PHP with no heavy frameworks). -- A trigger architecture to allow you to make Dolibarr business events run PHP code to update your own information system. -- "NPR VAT Rate" (French particularity for managing VAT in DOM-TOM called "Non Perçue Récupérable"). - +- Highly customizable: Enable only modules you need, user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one). +- Works with PHP 5.2.1, MySql 4.1 or PostgreSQL 8.1. +- Compatible with all Cloud solutions that match MySql, PHP or PotgreSQL prerequisites. +- An easy to understand, maintain and code interfaces with your own system information (PHP with no heavy frameworks, trigger and hook architecture). +- Support countries specific features: + Spanish Tax RE and ISPF. + French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM). + Canadian double taxes (federal/province) and other countries using cumulative VAT. + Tunisian tax stamp. + Compatible with European directives (2006/112/CE ... 2010/45/UE) (http://europa.eu/legislation_summaries/taxation/l31057_en.htm) + ... ## WHAT DOLIBARR CAN'T DO YET (TODO LIST) From 36aedf618c15279c028e56a072fadbb127a1621b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 13:31:19 +0100 Subject: [PATCH 069/177] Fix: typo --- README.md | 61 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 34e515a2ccc..574e74da85c 100644 --- a/README.md +++ b/README.md @@ -76,36 +76,37 @@ See ChangeLog file found into package. ### Main modules/features: -- Customers, Prospects or Suppliers directory -- Products and services catalog -- Bank accounts management -- Orders management -- Commercial proposals management -- Contracts management -- Invoices management -- Payments management -- Standing orders management -- Stock management -- Shipping management +- Customers, Prospects or Suppliers directory. +- Products and services catalog. +- Bank accounts management. +- Orders management. +- Commercial proposals management. +- Contracts management. +- Invoices management. +- Payments management. +- Standing orders management. +- Stock management. +- Shipping management. - PDF or ODT generation for invoice, proposals, orders... -- Agenda with ical,vcal export for third tools integration -- EDM (Electronic Document Management) -- Foundations members management -- Employee's holidays management -- Mass Emailing -- Realize surveys -- Point of Sale +- Agenda with ical,vcal export for third tools integration. +- EDM (Electronic Document Management). +- Foundations members management. +- Employee's holidays management. +- Mass Emailing. +- Realize surveys. +- Point of Sale. ### Other modules: -- Bookmarks management -- Donations management -- Reporting -- Data export/import -- LDAP connectivity -- Third parties or products categories -- ClickToDial integration -- RSS integration +- Bookmarks management. +- Donations management. +- Reporting. +- Data export/import. +- Third parties or products categories. +- LDAP connectivity. +- ClickToDial integration. +- RSS integration. +- Can be extended with a lot of other external modules available onto DoliStore.com. ### Miscellaneous: @@ -113,7 +114,7 @@ See ChangeLog file found into package. - Very user friendly and easy to use. - Highly customizable: Enable only modules you need, user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one). - Works with PHP 5.2.1, MySql 4.1 or PostgreSQL 8.1. -- Compatible with all Cloud solutions that match MySql, PHP or PotgreSQL prerequisites. +- Compatible with all Cloud solutions that match MySql, PHP or PostgreSQL prerequisites. - An easy to understand, maintain and code interfaces with your own system information (PHP with no heavy frameworks, trigger and hook architecture). - Support countries specific features: Spanish Tax RE and ISPF. @@ -128,10 +129,10 @@ See ChangeLog file found into package. This is features that Dolibarr does not support completely yet: -- No double party accountancy (only bank management). +- No double party accountancy (only bank and treasury management). - Dolibarr manage one currency at once (mono-currency). -- Dolibarr manage one master company/foundation (mono-company). If you want to manage several companies or foundations, you must install several time the software (on same server or not). Another solution is to extend Dolibarr with the addon Module MultiCompany that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas). -- Dolibarr does not contains Payroll module. +- Dolibarr manage one master activity (mono-company). If you want to manage several companies or foundations, you must install several time the software (on same server or not). Another solution is to extend Dolibarr with the addon Module MultiCompany that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas). - Tasks on module project can't have dependencies between each other. +- Dolibarr does not contains Payroll module. - Dolibarr does not include any Webmail. - Dolibarr can't do coffee (not yet). From 67220a15caa5d6dc08430ffa127f2c7baa727a5b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 14:13:40 +0100 Subject: [PATCH 070/177] Fix: Bad translation key --- htdocs/societe/soc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 864b42b86a9..4655c04fc8e 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1826,7 +1826,7 @@ else else { $langs->load("mails"); - print ''; + print ''; } if ($user->rights->societe->creer) From 9a6f22a86e15832bcaa3aa78c588a25d61afc4ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 15:46:39 +0100 Subject: [PATCH 071/177] Fix: W3C no form into table. Fix: Css style overflowwithjm has been superseded by maxwidthonsmartphone Fix: Style button disabled was not visible with jmobile Fix: Rounding corner with jmobile --- htdocs/core/lib/company.lib.php | 64 ++++++++++++++-------------- htdocs/product/composition/fiche.php | 4 +- htdocs/public/test/test_arrays.php | 2 +- htdocs/societe/consumption.php | 11 ++--- htdocs/theme/eldy/style.css.php | 23 +++++----- 5 files changed, 55 insertions(+), 49 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index c08be97cac4..58ad856a62b 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -523,16 +523,16 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') global $bc; $form= new Form($db); - + $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $search_status = GETPOST("search_status",'int'); if ($search_status=='') $search_status=1; // always display activ customer first $search_name = GETPOST("search_name",'alpha'); - + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="p.lastname"; - + $i=-1; $contactstatic = new Contact($db); @@ -556,18 +556,17 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ContactsForCompany") : $langs->trans("ContactsAddressesForCompany")); print_fiche_titre($title,$buttoncreate,''); - print "\n".'
'. $langs->trans("BackToHoursSetup") .'
'. $langs->trans("CreatePoll") .'
'."\n"; - - - $param="socid=".$object->id; - if ($search_status != '') $param.='&search_status='.$search_status; - if ($search_name != '') $param.='&search_name='.urlencode($search_name); - print ''; print ''; print ''; print ''; - + + print "\n".'
'."\n"; + + $param="socid=".$object->id; + if ($search_status != '') $param.='&search_status='.$search_status; + if ($search_name != '') $param.='&search_name='.urlencode($search_name); + $colspan=8; print ''; print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"p.lastname","",$param,'',$sortfield,$sortorder); @@ -576,8 +575,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email","",$param,'',$sortfield,$sortorder); - if (! empty($conf->skype->enabled)) - { + if (! empty($conf->skype->enabled)) + { $colspan++; print ''; } @@ -594,44 +593,45 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''; } print ""; - - + + print ''; print ''; - + print ''; - print ''; - print ''; - + print ''; - - print ''; - if (! empty($conf->skype->enabled)) - { + + print ''; + + print ''; + if (! empty($conf->skype->enabled)) + { $colspan++; print ''; } - print ''; - + print ""; if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) { $colspan++; print ''; } - - + + print ''; - + print ""; - + $sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.skype, p.statut "; $sql .= ", p.civilite, p.address, p.zip, p.town"; @@ -681,12 +681,12 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''; - if (! empty($conf->skype->enabled)) + if (! empty($conf->skype->enabled)) { print ''; - } + } print ''; @@ -761,6 +761,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') } print "\n
'.$langs->trans("Skype").' 
'; print ''; print '        '; + // Status + print ''; print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print '  '; print ''; print '
'; print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL'); print ''; print dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE'); print ''.$contactstatic->getLibStatut(5).'
\n"; + print ''."\n"; + print "
\n"; ?>
'.$langs->trans("TotalBuyingPriceMin").': '; if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; - print ''.($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency)).' 
'.$langs->trans("CategoryFilter").'   '.$form->select_all_categories(0, $parent).'
'.$form->select_all_categories(0, $parent).'
'; print ''; diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index fb8274e5524..4a4e7bc6f74 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -4,7 +4,7 @@ define("NOCSRFCHECK",1); // We accept to go on this page from external web site. require '../../main.inc.php'; -if (empty($conf->global->MAIN_FEATURES_LEVEL)) +if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { print "Page available onto dev environment only"; exit; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 16d2c4fea7d..20110c63315 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * * Version V1.1 Initial version of Philippe Berthet * Version V2 Change to be compatible with 3.4 and enhanced to be more generic @@ -102,10 +102,6 @@ if (empty($socid)) $head = societe_prepare_head($object); dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"),0,'company'); -print '
'; -print ''; -print ''; - print ''; print ''; print '"; From 97bd5df4983e23a9220c4cc85768d3a5fb4a7794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 18:40:53 +0100 Subject: [PATCH 077/177] Moved poll expiration date to first form and removed odd forms --- htdocs/opensurvey/fonctions.php | 24 +- htdocs/opensurvey/public/choix_autre.php | 73 +----- htdocs/opensurvey/public/choix_date.php | 282 +++++++++------------ htdocs/opensurvey/public/create_survey.php | 45 +++- 4 files changed, 178 insertions(+), 246 deletions(-) diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 437f851d67b..b3aa1c15cfc 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -220,7 +220,7 @@ function dol_survey_random($car) * * @return void */ -function ajouter_sondage($origin) +function ajouter_sondage() { global $db; @@ -228,26 +228,6 @@ function ajouter_sondage($origin) $sondage=dol_survey_random(16); - if ($_SESSION["formatsondage"]=="A"||$_SESSION["formatsondage"]=="A+") { - //extraction de la date de fin choisie - if ($_SESSION["champdatefin"]) { - if ($_SESSION["champdatefin"]>time()+250000) { - $date_fin=$_SESSION["champdatefin"]; - } - } else { - $date_fin=time()+15552000; - } - } - - if ($_SESSION["formatsondage"]=="D"||$_SESSION["formatsondage"]=="D+") { - //Calcul de la date de fin du sondage - $taille_tableau=count($_SESSION["totalchoixjour"])-1; - $date_fin=$_SESSION["totalchoixjour"][$taille_tableau]+200000; - } - - if (is_numeric($date_fin) === false) { - $date_fin = time()+15552000; - } $allow_comments = empty($_SESSION['allow_comments']) ? 0 : 1; $allow_spy = empty($_SESSION['allow_spy']) ? 0 : 1; @@ -258,7 +238,7 @@ function ajouter_sondage($origin) $opensurveysondage->mail_admin = $_SESSION['adresse']; $opensurveysondage->nom_admin = $_SESSION['nom']; $opensurveysondage->titre = $_SESSION['titre']; - $opensurveysondage->date_fin = $date_fin; + $opensurveysondage->date_fin = $_SESSION['champdatefin']; $opensurveysondage->format = $_SESSION['formatsondage']; $opensurveysondage->mailsonde = $_SESSION['mailsonde']; $opensurveysondage->allow_comments = $allow_comments; diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index 5a49562989c..1037be6f714 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -27,11 +27,6 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); -$erreur = false; -$testdate = true; -$date_selected = ''; - - /* * Action */ @@ -71,36 +66,26 @@ if (isset($_POST["confirmecreation"]) || isset($_POST["confirmecreation_x"])) $toutchoix=substr("$toutchoix",1); $_SESSION["toutchoix"]=$toutchoix; - if (GETPOST('champdatefin')) + //test de remplissage des cases + $testremplissage = ''; + for ($i=0;$i<$_SESSION["nbrecases"];$i++) { - $registredate=explode("/",$_POST["champdatefin"]); - if (is_array($registredate) === false || count($registredate) !== 3) { - $testdate = false; - $date_selected = $_POST["champdatefin"]; - } else { - $time = mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]); - if ($time === false || date('d/m/Y', $time) !== $_POST["champdatefin"]) { - $testdate = false; - $date_selected = $_POST["champdatefin"]; - } else { - if (mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]) > time() + 250000) { - $_SESSION["champdatefin"]=mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]); - } - } + if (isset($_POST["choix"][$i])) + { + $testremplissage="ok"; } - } else { - $_SESSION["champdatefin"]=time()+15552000; } - if ($testdate === true) - { + //message d'erreur si aucun champ renseigné + if ($testremplissage != "ok") { + setEventMessage($langs->trans("ErrorOpenSurveyOneChoice"), 'errors'); + } else { + //format du sondage AUTRE $_SESSION["formatsondage"]="A"; // Add into database ajouter_sondage(); - } else { - $_POST["fin_sondage_autre"] = 'ok'; } } @@ -157,43 +142,9 @@ print '
'.$langs->trans('ThirdPartyName').''; @@ -158,6 +154,11 @@ dol_fiche_end(); print '
'; +print ''; +print ''; +print ''."\n"; + + $sql_select=''; if ($type_element == 'invoice') { // Customer : show products from invoices diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 04aa243db61..c767f5b956e 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1354,7 +1354,7 @@ div.tabs { /* margin: 0px 0px 2px 6px; padding: 0px 6px 3px 0px; */ text-align: ; - + margin-left: 4px !important; clear:both; height:100%; } @@ -2758,7 +2758,7 @@ a.tab span.ui-btn-inner } .ui-link { - color: rgb() !important; + color: rgb(); } .liste_titre .ui-link { color: # !important; @@ -2840,10 +2840,21 @@ ul.ulmenu { border: 1px solid #ccc; text-shadow: none; } +.ui-body-c .ui-link, .ui-body-c .ui-link:visited, .ui-body-c .ui-link:hover { + color: rgb(); +} .ui-btn-up-c .vsmenudisabled { color: # !important; text-shadow: none !important; } +.ui-controlgroup-horizontal .ui-btn.ui-first-child { +-webkit-border-top-left-radius: 6px; +border-top-left-radius: 6px; +} +.ui-controlgroup-horizontal .ui-btn.ui-last-child { +-webkit-border-top-right-radius: 6px; +border-top-right-radius: 6px; +} .alilevel1 { color: # !important; text-shadow: 1px 0px 1px #; @@ -2856,14 +2867,6 @@ ul.ulmenu { background-image: -o-linear-gradient( #ddd,#d1d1d1 ) !important; background-image: linear-gradient( #ddd,#d1d1d1 ) !important; } - -.overflowwithjm200 -{ - max-width: 200px; - overflow: hidden; - white-space: nowrap; -} - close(); From 48973c6d0296882d99e1a9a553c22923d6e35f9c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 16:00:45 +0100 Subject: [PATCH 072/177] Fix: Some SQL requests were not finished into new tab "consumption". --- htdocs/societe/consumption.php | 71 ++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 20110c63315..03036f36a04 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -29,9 +29,7 @@ require("../main.inc.php"); require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; // Security check $socid = GETPOST('socid','int'); @@ -161,37 +159,54 @@ print ''."\n"; $sql_select=''; if ($type_element == 'invoice') -{ // Customer : show products from invoices -$documentstatic=new Facture($db); -$sql_select = 'SELECT f.rowid as doc_id, f.facnumber as doc_number, f.type as doc_type, f.datef as datePrint, '; -$tables_from = MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."facturedet as d"; -$where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid; -$where.= " AND d.fk_facture = f.rowid"; -$where.= " AND f.entity = ".$conf->entity; -$datePrint = 'f.datef'; -$doc_number='f.facnumber'; -$thirdTypeSelect='customer'; +{ // Customer : show products from invoices + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $documentstatic=new Facture($db); + $sql_select = 'SELECT f.rowid as doc_id, f.facnumber as doc_number, f.type as doc_type, f.datef as datePrint, '; + $tables_from = MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."facturedet as d"; + $where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid; + $where.= " AND d.fk_facture = f.rowid"; + $where.= " AND f.entity = ".$conf->entity; + $datePrint = 'f.datef'; + $doc_number='f.facnumber'; + $thirdTypeSelect='customer'; } if ($type_element == 'order') { - // TODO - -} -if ($type_element == 'supplier_order') -{ // Supplier : Show products from orders. -$documentstatic=new CommandeFournisseur($db); -$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, "1" as doc_type, c.date_valid as datePrint, '; -$tables_from = MAIN_DB_PREFIX."commande_fournisseur as c,".MAIN_DB_PREFIX."commande_fournisseurdet as d"; -$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; -$where.= " AND d.fk_commande = c.rowid"; -$datePrint = 'c.date_creation'; -$doc_number='c.ref'; -$thirdTypeSelect='supplier'; + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + $documentstatic=new Commande($db); + $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, "1" as doc_type, c.date_commande as datePrint, '; + $tables_from = MAIN_DB_PREFIX."commande as c,".MAIN_DB_PREFIX."commandedet as d"; + $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; + $where.= " AND d.fk_commande = c.rowid"; + $where.= " AND c.entity = ".$conf->entity; + $datePrint = 'c.datef'; + $doc_number='c.ref'; + $thirdTypeSelect='customer'; } if ($type_element == 'supplier_invoice') -{ - // TODO - +{ // Supplier : Show products from invoices. + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; + $documentstatic=new FactureFournisseur($db); + $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, "1" as doc_type, f.datef as datePrint, '; + $tables_from = MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."facture_fourn_det as d"; + $where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid; + $where.= " AND d.fk_facture_fourn = f.rowid"; + $datePrint = 'f.datef'; + $doc_number='f.ref'; + $thirdTypeSelect='supplier'; +} +if ($type_element == 'supplier_order') +{ // Supplier : Show products from orders. + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; + $documentstatic=new CommandeFournisseur($db); + $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, "1" as doc_type, c.date_valid as datePrint, '; + $tables_from = MAIN_DB_PREFIX."commande_fournisseur as c,".MAIN_DB_PREFIX."commande_fournisseurdet as d"; + $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; + $where.= " AND d.fk_commande = c.rowid"; + $datePrint = 'c.date_valid'; + $doc_number='c.ref'; + $thirdTypeSelect='supplier'; } $sql = $sql_select; From 283297294b2491d1ab1dd59bf0f5b21eff758102 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 16:19:25 +0100 Subject: [PATCH 073/177] Fix: Missing definition of status labels --- htdocs/compta/deplacement/class/deplacement.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 66644cde848..b5ff84546fd 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -27,8 +27,7 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; /** - * \class Deplacement - * \brief Class to manage trips and working credit notes + * Class to manage trips and working credit notes */ class Deplacement extends CommonObject { @@ -65,6 +64,9 @@ class Deplacement extends CommonObject { $this->db = $db; + $this->statuts_short = array(0 => 'Draft', 1 => 'Validated', 2 => 'Closed'); + $this->statuts = array(0 => 'Draft', 1 => 'Validated', 2 => 'Closed'); + return 1; } @@ -327,7 +329,6 @@ class Deplacement extends CommonObject } if ($mode == 4) { - //if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]); if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]); if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]); } From 667908baf83ae837bb7563b6ff10f8fdfb6fdd81 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 16:37:33 +0100 Subject: [PATCH 074/177] Fix: Missing lang loading --- htdocs/commande/stats/index.php | 2 ++ htdocs/core/tpl/document_actions_post_headers.tpl.php | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index a7b51fb5fb0..45d242bd4e5 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -52,7 +52,9 @@ $startyear=$year-1; $endyear=$year; $langs->load('orders'); +$langs->load('companies'); $langs->load('other'); +$langs->load('suppliers'); /* diff --git a/htdocs/core/tpl/document_actions_post_headers.tpl.php b/htdocs/core/tpl/document_actions_post_headers.tpl.php index 5e06b585b57..20005b08528 100644 --- a/htdocs/core/tpl/document_actions_post_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_post_headers.tpl.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,12 +17,13 @@ * or see http://www.gnu.org/ */ +$langs->load("link"); /* * Confirm suppression */ -if ($action == 'delete') +if ($action == 'delete') { $ret = $form->form_confirm( $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int'), From 5b40eff0fa588e11c431976f3d3faa3e2952e412 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 18:30:35 +0100 Subject: [PATCH 075/177] Fix: W3C. Input fields can be between a table and tr tag. --- htdocs/core/class/html.form.class.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8c1c4ac7987..f2a3ea58754 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2525,6 +2525,19 @@ class Form if (is_array($formquestion) && ! empty($formquestion)) { + // First add hidden fields and value + foreach ($formquestion as $key => $input) + { + if (is_array($input) && ! empty($input)) + { + if ($input['type'] == 'hidden') + { + $more.=''."\n"; + } + } + } + + // Now add questions $more.=''."\n"; $more.=''."\n"; foreach ($formquestion as $key => $input) @@ -2584,10 +2597,6 @@ class Form $more.=$input['value']; $more.=''."\n"; } - else if ($input['type'] == 'hidden') - { - $more.=''; - } } } $more.='
'.(! empty($formquestion['text'])?$formquestion['text']:'').'
'."\n"; From 2d8214a94071c8833ae10e2308a4fdcb340ab705 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Jan 2014 18:37:26 +0100 Subject: [PATCH 076/177] Fix: The delete button into ecm module does not work when ajax disabled. --- htdocs/core/ajax/ajaxdirpreview.php | 46 ++++++++++++++--------- htdocs/core/class/html.formfile.class.php | 7 +++- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 2389a681000..e2ad29b8562 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -213,30 +213,42 @@ if ($type == 'directory') $textifempty = $langs->trans('NoFileFound'); } else $textifempty=($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection")); - + $formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty,$maxlengthname,'',$url); } } -if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) + +if ($section) { - if ($section) - { - $param.=($param?'?':'').(preg_replace('/^&/','',$param)); + $useajax=1; + if (! empty($conf->dol_use_jmobile)) $useajax=0; + if (empty($conf->use_javascript_ajax)) $useajax=0; + if (! empty($conf->global->MAIN_ECM_DISABLE_JS)) $useajax=0; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; - $useglobalvars=1; - $form = new Form($db); - $formquestion=array('urlfile'=>array('type'=>'hidden','value'=>'','name'=>'urlfile')); - print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",'deletefile'); + $param.=($param?'?':'').(preg_replace('/^&/','',$param)); - // Enable jquery handlers on new generated HTML objects - print ''."\n"; - } + if ($useajax || $action == 'delete') + { + $urlfile=''; + if ($action == 'delete') $urlfile=GETPOST('urlfile'); + + require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; + $useglobalvars=1; + $form = new Form($db); + $formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile')); + print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); + } + + if ($useajax) + { + // Enable jquery handlers on new generated HTML objects + print ''."\n"; + } } // Close db if mode is not noajax diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 0559c7b56da..9c0968436d3 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -813,7 +813,12 @@ class FormFile else $filepath=$file['name']; */ - print ''.img_delete().''; + $useajax=1; + if (! empty($conf->dol_use_jmobile)) $useajax=0; + if (empty($conf->use_javascript_ajax)) $useajax=0; + if (! empty($conf->global->MAIN_ECM_DISABLE_JS)) $useajax=0; + + print ''.img_delete().''; } else print ' '; print "
'."\n"; print'
'."\n"; print ''."\n"; -print ''."\n"; +print ''."\n"; print '
'."\n"; -//test de remplissage des cases -$testremplissage = ''; -for ($i=0;$i<$_SESSION["nbrecases"];$i++) -{ - if (isset($_POST["choix"][$i])) - { - $testremplissage="ok"; - } -} - -//message d'erreur si aucun champ renseigné -if ($testremplissage != "ok" && (isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"]))) { - print "
" . $langs->trans("ErrorOpenSurveyOneChoice") . "

"."\n"; - $erreur = true; -} - -//message d'erreur si mauvaise date -if ($testdate === false) { - print "
" . $langs->trans("ErrorOpenSurveyDateFormat") . "

"."\n"; -} - -if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur) { - //demande de la date de fin du sondage - print '
'."\n"; - print '
'."\n"; - print '
'. $langs->trans("InfoExpiration") .'

'."\n"; - print $langs->trans("RemovalDate") .' : DD/MM/YYYY'; - print '
'."\n"; - print '
'."\n"; - print ''."\n"; - print ''."\n"; - print '
'. $langs->trans("CreatePoll") .'
'."\n"; -} - //fin du formulaire et bandeau de pied print '
'."\n"; diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/public/choix_date.php index 8afb1477303..b2c8f998351 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/public/choix_date.php @@ -27,19 +27,115 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); +//le format du sondage est DATE +$_SESSION["formatsondage"] = "D"; + +//traitement de l'entrée des heures dans les cases texte +$erreur = false; /* * Actions */ // Insert survey -if (GETPOST('confirmation') || GETPOST('confirmation_x')) +if (GETPOST('confirmation')) { - if (is_array($_SESSION['totalchoixjour'])) + + //On sauvegarde les heures deja entrées + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true) { $nbofchoice=count($_SESSION["totalchoixjour"]); - for ($i = 0; $i < $nbofchoice; $i++) - { + + for ($i = 0; $i < $nbofchoice; $i++) { + //affichage des 5 cases horaires + for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { + + $_SESSION["horaires$i"][$j] = $_POST["horaires$i"][$j]; + + $case = $j + 1; + + if (isset($_POST['horaires'.$i]) === false || isset($_POST['horaires'.$i][$j]) === false) { + $errheure[$i][$j]=true; + $erreur=true; + continue; + } + + //si c'est un creneau type 8:00-11:00 + if (preg_match("/(\d{1,2}:\d{2})-(\d{1,2}:\d{2})/", $_POST["horaires$i"][$j], $creneaux)) { + //on recupere les deux parties du preg_match qu'on redécoupe autour des ":" + $debutcreneau=explode(":", $creneaux[1]); + $fincreneau=explode(":", $creneaux[2]); + + //comparaison des heures de fin et de debut + //si correctes, on entre les données dans la variables de session + if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) { + $_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j]=true; + $erreur=true; + } + } elseif (preg_match(";^(\d{1,2}h\d{0,2})-(\d{1,2}h\d{0,2})$;i", $_POST["horaires$i"][$j], $creneaux)) { //si c'est un creneau type 8h00-11h00 + //on recupere les deux parties du preg_match qu'on redécoupe autour des "H" + $debutcreneau=preg_split("/h/i", $creneaux[1]); + $fincreneau=preg_split("/h/i", $creneaux[2]); + + //comparaison des heures de fin et de debut + //si correctes, on entre les données dans la variables de session + if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) { + $_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j]=true; + $erreur=true; + } + } elseif (preg_match(";^(\d{1,2}):(\d{2})$;", $_POST["horaires$i"][$j], $heures)) { //si c'est une heure simple type 8:00 + //si valeures correctes, on entre les données dans la variables de session + if ($heures[1] < 24 && $heures[2] < 60) { + $_SESSION["horaires$i"][$j] = $heures[0]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j]=true; + $erreur=true; + } + } elseif (preg_match(";^(\d{1,2})h(\d{0,2})$;i", $_POST["horaires$i"][$j], $heures)) { //si c'est une heure encore plus simple type 8h + //si valeures correctes, on entre les données dans la variables de session + if ($heures[1] < 24 && $heures[2] < 60) { + $_SESSION["horaires$i"][$j] = $heures[0]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j]=true; + $erreur=true; + } + } elseif (preg_match(";^(\d{1,2})-(\d{1,2})$;", $_POST["horaires$i"][$j], $heures)) { //si c'est un creneau simple type 8-11 + //si valeures correctes, on entre les données dans la variables de session + if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) { + $_SESSION["horaires$i"][$j] = $heures[0]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j]=true; + $erreur=true; + } + } elseif (preg_match(";^(\d{1,2})h-(\d{1,2})h$;", $_POST["horaires$i"][$j], $heures)) { //si c'est un creneau H type 8h-11h + //si valeures correctes, on entre les données dans la variables de session + if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) { + $_SESSION["horaires$i"][$j] = $heures[0]; + } else { //sinon message d'erreur et nettoyage de la case + $errheure[$i][$j]=true; + $erreur=true; + } + } elseif ($_POST["horaires$i"][$j]=="") { //Si la case est vide + unset($_SESSION["horaires$i"][$j]); + } else { //pour tout autre format, message d'erreur + $errheure[$i][$j]=true; + $erreur=true; + } + + if (issetAndNoEmpty('horaires'.$i, $_SESSION) === false || issetAndNoEmpty($j, $_SESSION['horaires'.$i]) === false) { + if (issetAndNoEmpty('horaires'.$i, $_SESSION) === true) { + $_SESSION["horaires$i"][$j] = ''; + } else { + $_SESSION["horaires$i"] = array(); + $_SESSION["horaires$i"][$j] = ''; + } + } + } + if ($_SESSION["horaires$i"][0] == "" && $_SESSION["horaires$i"][1] == "" && $_SESSION["horaires$i"][2] == "" && $_SESSION["horaires$i"][3] == "" && $_SESSION["horaires$i"][4] == "") { $choixdate.=","; $choixdate .= $_SESSION["totalchoixjour"][$i]; @@ -55,11 +151,22 @@ if (GETPOST('confirmation') || GETPOST('confirmation_x')) } } } + + if (isset($errheure)) { + setEventMessage($langs->trans("ErrorBadFormat"), 'errors'); + } } - else dol_print_error('','array not defined'); - $_SESSION["toutchoix"]=substr("$choixdate",1); - ajouter_sondage(); + //If just one day and no other time options, error message + if (count($_SESSION["totalchoixjour"])=="1" && $_POST["horaires0"][0]=="" && $_POST["horaires0"][1]=="" && $_POST["horaires0"][2]=="" && $_POST["horaires0"][3]=="" && $_POST["horaires0"][4]=="") { + setEventMessage($langs->trans("MoreChoices"), 'errors'); + $erreur=true; + } + + if (!$erreur) { + $_SESSION["toutchoix"]=substr("$choixdate",1); + ajouter_sondage(); + } } // Reset days @@ -96,7 +203,7 @@ if (! isset($_SESSION["nbrecaseshoraires"])) { $_SESSION["nbrecaseshoraires"]=5; } -elseif ((GETPOST('ajoutcases') || GETPOST('ajoutcases_x')) && $_SESSION["nbrecaseshoraires"] == 5) +elseif (GETPOST('ajoutcases') && $_SESSION["nbrecaseshoraires"] == 5) { $_SESSION["nbrecaseshoraires"]=10; } @@ -112,14 +219,14 @@ if (! isset($_SESSION['mois'])) $_SESSION['mois']= date('n'); if (! isset($_SESSION['annee'])) $_SESSION['annee']= date('Y'); //mise a jour des valeurs de session si bouton retour a aujourd'hui -if ((!issetAndNoEmpty('anneeavant_x') && !issetAndNoEmpty('anneeapres_x') && !issetAndNoEmpty('moisavant_x') && !issetAndNoEmpty('moisapres_x') && !issetAndNoEmpty('choixjourajout')) && !issetAndNoEmpty('choixjourretrait') || (issetAndNoEmpty('retourmois') || issetAndNoEmpty('retourmois_x'))){ +if ((!issetAndNoEmpty('choixjourajout')) && !issetAndNoEmpty('choixjourretrait') || issetAndNoEmpty('retourmois')){ $_SESSION["jour"]=date("j"); $_SESSION["mois"]=date("n"); $_SESSION["annee"]=date("Y"); } //mise a jour des valeurs de session si mois avant -if (issetAndNoEmpty('moisavant') || issetAndNoEmpty('moisavant_x')) { +if (issetAndNoEmpty('moisavant')) { if ($_SESSION["mois"] == 1) { $_SESSION["mois"] = 12; $_SESSION["annee"] = $_SESSION["annee"]-1; @@ -141,7 +248,7 @@ if (issetAndNoEmpty('moisavant') || issetAndNoEmpty('moisavant_x')) { } //mise a jour des valeurs de session si mois apres -if (issetAndNoEmpty('moisapres') || issetAndNoEmpty('moisapres_x')) { +if (issetAndNoEmpty('moisapres')) { if ($_SESSION["mois"] == 12) { $_SESSION["mois"] = 1; $_SESSION["annee"] += 1; @@ -164,7 +271,7 @@ if (issetAndNoEmpty('moisapres') || issetAndNoEmpty('moisapres_x')) { } //mise a jour des valeurs de session si annee avant -if (issetAndNoEmpty('anneeavant') || issetAndNoEmpty('anneeavant_x')) { +if (issetAndNoEmpty('anneeavant')) { $_SESSION["annee"] -= 1; //On sauvegarde les heures deja entrées @@ -181,7 +288,7 @@ if (issetAndNoEmpty('anneeavant') || issetAndNoEmpty('anneeavant_x')) { } //mise a jour des valeurs de session si annee apres -if (issetAndNoEmpty('anneeapres') || issetAndNoEmpty('anneeapres_x')) { +if (issetAndNoEmpty('anneeapres')) { $_SESSION["annee"] += 1; //On sauvegarde les heures deja entrées @@ -201,9 +308,6 @@ if (issetAndNoEmpty('anneeapres') || issetAndNoEmpty('anneeapres_x')) { $nbrejourmois = date("t", mktime(0, 0, 0, $_SESSION["mois"], 1, $_SESSION["annee"])); $premierjourmois = date("N", mktime(0, 0, 0, $_SESSION["mois"], 1, $_SESSION["annee"])) - 1; -//le format du sondage est DATE -$_SESSION["formatsondage"] = "D"; - //traduction de la valeur du mois if (is_integer($_SESSION["mois"]) && $_SESSION["mois"] > 0 && $_SESSION["mois"] < 13) { @@ -380,113 +484,10 @@ print '
'."\n"; print '
'."\n"; -//traitement de l'entrée des heures dans les cases texte -$errheure = $erreur = false; -if (issetAndNoEmpty('choixheures') || issetAndNoEmpty('choixheures_x')) { - //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true) - { - $nbofchoice=count($_SESSION["totalchoixjour"]); - for ($i = 0; $i < $nbofchoice; $i++) { - //affichage des 5 cases horaires - for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { - $_SESSION["horaires$i"][$j] = $_POST["horaires$i"][$j]; - } - } - } - - //affichage des horaires - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true) - { - $nbofchoice=count($_SESSION["totalchoixjour"]); - for ($i = 0; $i < $nbofchoice; $i++) { - //affichage des 5 cases horaires - for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { - $case = $j + 1; - - if (isset($_POST['horaires'.$i]) === false || isset($_POST['horaires'.$i][$j]) === false) { - $errheure[$i][$j]=true; - $erreur=true; - $_SESSION["horaires$i"][$j]=$_POST["horaires$i"][$j]; - continue; - } - - //si c'est un creneau type 8:00-11:00 - if (preg_match("/(\d{1,2}:\d{2})-(\d{1,2}:\d{2})/", $_POST["horaires$i"][$j], $creneaux)) { - //on recupere les deux parties du preg_match qu'on redécoupe autour des ":" - $debutcreneau=explode(":", $creneaux[1]); - $fincreneau=explode(":", $creneaux[2]); - - //comparaison des heures de fin et de debut - //si correctes, on entre les données dans la variables de session - if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) { - $_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j]=true; - $erreur=true; - } - } elseif (preg_match(";^(\d{1,2}h\d{0,2})-(\d{1,2}h\d{0,2})$;i", $_POST["horaires$i"][$j], $creneaux)) { //si c'est un creneau type 8h00-11h00 - //on recupere les deux parties du preg_match qu'on redécoupe autour des "H" - $debutcreneau=preg_split("/h/i", $creneaux[1]); - $fincreneau=preg_split("/h/i", $creneaux[2]); - - //comparaison des heures de fin et de debut - //si correctes, on entre les données dans la variables de session - if ($debutcreneau[0] < 24 && $fincreneau[0] < 24 && $debutcreneau[1] < 60 && $fincreneau[1] < 60 && ($debutcreneau[0] < $fincreneau[0] || ($debutcreneau[0] == $fincreneau[0] && $debutcreneau[1] < $fincreneau[1]))) { - $_SESSION["horaires$i"][$j] = $creneaux[1].'-'.$creneaux[2]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j]=true; - $erreur=true; - } - } elseif (preg_match(";^(\d{1,2}):(\d{2})$;", $_POST["horaires$i"][$j], $heures)) { //si c'est une heure simple type 8:00 - //si valeures correctes, on entre les données dans la variables de session - if ($heures[1] < 24 && $heures[2] < 60) { - $_SESSION["horaires$i"][$j] = $heures[0]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j]=true; - $erreur=true; - } - } elseif (preg_match(";^(\d{1,2})h(\d{0,2})$;i", $_POST["horaires$i"][$j], $heures)) { //si c'est une heure encore plus simple type 8h - //si valeures correctes, on entre les données dans la variables de session - if ($heures[1] < 24 && $heures[2] < 60) { - $_SESSION["horaires$i"][$j] = $heures[0]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j]=true; - $erreur=true; - } - } elseif (preg_match(";^(\d{1,2})-(\d{1,2})$;", $_POST["horaires$i"][$j], $heures)) { //si c'est un creneau simple type 8-11 - //si valeures correctes, on entre les données dans la variables de session - if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) { - $_SESSION["horaires$i"][$j] = $heures[0]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j]=true; - $erreur=true; - } - } elseif (preg_match(";^(\d{1,2})h-(\d{1,2})h$;", $_POST["horaires$i"][$j], $heures)) { //si c'est un creneau H type 8h-11h - //si valeures correctes, on entre les données dans la variables de session - if ($heures[1] < $heures[2] && $heures[1] < 24 && $heures[2] < 24) { - $_SESSION["horaires$i"][$j] = $heures[0]; - } else { //sinon message d'erreur et nettoyage de la case - $errheure[$i][$j]=true; - $erreur=true; - } - } elseif ($_POST["horaires$i"][$j]=="") { //Si la case est vide - unset($_SESSION["horaires$i"][$j]); - } else { //pour tout autre format, message d'erreur - //$errheure[$i][$j]=true; - //$erreur=true; - $_SESSION["horaires$i"][$j] = $_POST["horaires$i"][$j]; - } - } - } - } -} - print '
'."\n"; // affichage de tous les jours choisis -if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheures_x') || $erreur)) -//if (1==1 || GETPOST($_SESSION['totalchoixjour']) && (! GETPOST('choixheures_x') || $erreur)) +if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) { //affichage des jours print '
'."\n"; @@ -509,37 +510,22 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheur //affichage de la liste des jours choisis $nbofchoice=count($_SESSION["totalchoixjour"]); + for ($i=0; $i<$nbofchoice; $i++) { print ''."\n"; print ''.dol_print_date($_SESSION["totalchoixjour"][$i], 'daytext').' ('.dol_print_date($_SESSION["totalchoixjour"][$i], '%A').')'; - $affichageerreurfindeligne=false; - //affichage des cases d'horaires for ($j=0;$j<$_SESSION["nbrecaseshoraires"];$j++) { //si on voit une erreur, le fond de la case est rouge if (isset($errheure[$i][$j]) && $errheure[$i][$j]) { print ''."\n"; - $affichageerreurfindeligne=true; } else { //sinon la case est vide normalement - if (issetAndNoEmpty('horaires'.$i, $_SESSION) === false || issetAndNoEmpty($j, $_SESSION['horaires'.$i]) === false) { - if (issetAndNoEmpty('horaires'.$i, $_SESSION) === true) { - $_SESSION["horaires$i"][$j] = ''; - } else { - $_SESSION["horaires$i"] = array(); - $_SESSION["horaires$i"][$j] = ''; - } - } - + print ''."\n"; } } - - if ($affichageerreurfindeligne) { - print ''. $langs->trans("ErrorBadFormat") .''."\n"; - } - print ''."\n"; } @@ -550,27 +536,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) && (!issetAndNoEmpty('choixheur print ''."\n"; print ''."\n"; print'

'."\n"; - print ''."\n"; - print ''."\n"; - - //si un seul jour et aucunes horaires choisies, : message d'erreur - if ((GETPOST('choixheures') || GETPOST('choixheures_x')) && (count($_SESSION["totalchoixjour"])=="1" && $_POST["horaires0"][0]=="" && $_POST["horaires0"][1]=="" && $_POST["horaires0"][2]=="" && $_POST["horaires0"][3]=="" && $_POST["horaires0"][4]=="")) { - print '
'. $langs->trans("MoreChoices") .'
'."\n"; - $erreur=true; - } -} - -//s'il n'y a pas d'erreur et que le bouton de creation est activé, on demande confirmation -if (!$erreur && (GETPOST('choixheures') || GETPOST('choixheures_x'))) { - $taille_tableau=count($_SESSION["totalchoixjour"])-1; - $jour_arret = $_SESSION["totalchoixjour"][$taille_tableau]+200000; - $date_fin=dol_print_date($jour_arret, 'dayhourtext'); - - print '
'. $langs->trans("PollWillExpire",2) .'
'. $langs->trans("RemovalDate") .' : '.$date_fin.'
'."\n"; - print '
'."\n"; - print ''."\n"; - print ''."\n"; - print''."\n"; + print ''."\n"; print '
'. $langs->trans("BackToHoursSetup") .'
'. $langs->trans("CreatePoll") .'
'."\n"; } diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index 850a87b9dbd..9a178b280ee 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -78,10 +78,32 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GET } else { $_SESSION['allow_spy'] = false; } + + $testdate = false; + + if (GETPOST('champdatefin')) + { + $registredate=explode("/",$_POST["champdatefin"]); + if (is_array($registredate) && count($registredate) === 3) { + $time = mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]); + + if ($time !== false && date('d/m/Y', $time) === $_POST["champdatefin"]) { + //Expire date is not before today + if ($time - dol_now() > 0) { + $testdate = true; + $_SESSION['champdatefin'] = $time; + } + } + } + } + + if (!$testdate) { + setEventMessage($langs->trans('ErrorOpenSurveyDateFormat'), 'errors'); + } if (! isValidEmail($adresse)) $erreur_adresse = true; - if ($titre && $nom && $adresse && !$erreur_adresse) + if ($titre && $nom && $adresse && !$erreur_adresse && $testdate) { if (! empty($creation_sondage_date)) { @@ -104,6 +126,8 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GET * View */ +$form = new Form($db); + $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); llxHeader('', $langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); @@ -122,7 +146,7 @@ print ''."\n"; print ''."\n"; if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) { - print ""."\n"; + setEventMessage($langs->trans("FieldMandatory"), 'errors'); } print ''."\n"; @@ -134,7 +158,7 @@ print '" . $langs->trans("FieldMandatory") . ""."\n"; + setEventMessage($langs->trans("FieldMandatory"), 'errors'); } print ''."\n"; @@ -144,13 +168,24 @@ print '" .$langs->trans("FieldMandatory") . " "."\n"; + setEventMessage($langs->trans("FieldMandatory"), 'errors'); } elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) { $langs->load('errors'); - print ""."\n"; + setEventMessage($langs->trans("ErrorBadEMail", $adresse), 'errors'); } +print ''."\n"; print '
'. $langs->trans("PollTitle") .'" . $langs->trans("FieldMandatory") . "
" . $langs->trans("ErrorBadEMail", $adresse) . "
'. $langs->trans("ExpireDate") .''; + +if (!GETPOST('champdatefin')) { + //172800 = 48 hours + $champdatefin = time() + 172800; +} else { + $champdatefin = -1; +} + +print $form->select_date($champdatefin,'champdatefin','','','',"add",1,1); + print '
'."\n"; From 832fc8e0f33073afe7750e98c31fe26088dad1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 18:42:08 +0100 Subject: [PATCH 078/177] Renamed NextStep button to CreatePoll --- htdocs/opensurvey/public/choix_autre.php | 4 ++-- htdocs/opensurvey/public/choix_date.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index 1037be6f714..0d156b751b7 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -45,12 +45,12 @@ if (isset($_SESSION["nbrecases"])) { $_SESSION["nbrecases"]=5; } -if (isset($_POST["ajoutcases"]) || isset($_POST["ajoutcases_x"])) { +if (isset($_POST["ajoutcases"])) { $_SESSION["nbrecases"]=$_SESSION["nbrecases"]+5; } // Create survey into database -if (isset($_POST["confirmecreation"]) || isset($_POST["confirmecreation_x"])) +if (isset($_POST["confirmecreation"])) { //recuperation des données de champs textes $toutchoix = ''; diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/public/choix_date.php index b2c8f998351..d6708b3f902 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/public/choix_date.php @@ -536,7 +536,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) print ''."\n"; print ''."\n"; print'

'."\n"; - print ''."\n"; + print ''."\n"; print ''."\n"; } From acd847c4199db41ee6400abe187793608acceb9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 18:42:30 +0100 Subject: [PATCH 079/177] Fixed SQL error in opensurvey poll list --- htdocs/opensurvey/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 73442d3cf6d..745bee3a22c 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -88,7 +88,7 @@ if ($action == 'delete') print ''."\n"; print ''."\n"; -$sql = "SELECT id_sondage, mail_admin, format, origin, date_fin, titre, nom_admin"; +$sql = "SELECT id_sondage, mail_admin, format, date_fin, titre, nom_admin"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as p"; // Count total nb of records $nbtotalofrecords = 0; From 33ec2814249a63a7202e36fde7434d00332f3fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 18:44:19 +0100 Subject: [PATCH 080/177] Removed unexisting input checks in poll creation --- htdocs/opensurvey/public/create_survey.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index 9a178b280ee..f3851648d25 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -34,7 +34,7 @@ $origin=GETPOST('origin','alpha'); // On teste toutes les variables pour supprimer l'ensemble des warnings PHP // On transforme en entites html les données afin éviter les failles XSS -$post_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_date_x', 'creation_sondage_autre', 'creation_sondage_autre_x'); +$post_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre'); foreach ($post_var as $var) { $$var = GETPOST($var); @@ -53,7 +53,7 @@ $cocheplus = ''; $cochemail = ''; // Jump to correct page -if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GETPOST("creation_sondage_date_x") || GETPOST("creation_sondage_autre_x")) +if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) { $_SESSION["titre"] = $titre; $_SESSION["nom"] = $nom; @@ -144,7 +144,7 @@ print '
'."\n"; print '
'. $langs->trans("Ref").''. $langs->trans("Title") .''. $langs->trans("Type") .''. $langs->trans("Author") .''. $langs->trans("ExpireDate") .''. $langs->trans("NbOfVoters") .' 
'."\n"; print ''."\n"; -if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) +if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { setEventMessage($langs->trans("FieldMandatory"), 'errors'); } @@ -156,7 +156,7 @@ print ''."\n"; -if (! $_SESSION["nom"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) +if (! $_SESSION["nom"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { setEventMessage($langs->trans("FieldMandatory"), 'errors'); } @@ -166,10 +166,10 @@ print ''."\n"; -if (!$_SESSION["adresse"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) +if (!$_SESSION["adresse"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { setEventMessage($langs->trans("FieldMandatory"), 'errors'); -} elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) +} elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { $langs->load('errors'); setEventMessage($langs->trans("ErrorBadEMail", $adresse), 'errors'); From adcc4090b07ac32bbc2beb7cacbf906a91cfa90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 18:46:04 +0100 Subject: [PATCH 081/177] =?UTF-8?q?Removed=20=E2=80=9Ctoday=E2=80=9D=20but?= =?UTF-8?q?ton=20of=20expire=20date=20input=20in=20poll=20creation=20form?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/opensurvey/public/create_survey.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index f3851648d25..3cf7aea6a74 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -184,7 +184,7 @@ if (!GETPOST('champdatefin')) { $champdatefin = -1; } -print $form->select_date($champdatefin,'champdatefin','','','',"add",1,1); +print $form->select_date($champdatefin,'champdatefin','','','',"add",1,0); print ''."\n"; print '
'. $langs->trans("PollTitle") .'
'. $langs->trans("OpenSurveyYourName") .'
'. $langs->trans("OpenSurveyYourEMail") . print '
'."\n"; From 4cdafba7a287af869917152b5ff3704fbbd3f45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 18:49:49 +0100 Subject: [PATCH 082/177] =?UTF-8?q?Removed=20=E2=80=9Corigin=E2=80=9D=20in?= =?UTF-8?q?put=20use=20in=20poll=20creation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/opensurvey/public/create_survey.php | 7 ++----- htdocs/opensurvey/public/index.php | 5 +---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index 3cf7aea6a74..e9df55effd8 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -29,8 +29,6 @@ require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); $langs->load("opensurvey"); -$origin=GETPOST('origin','alpha'); - // On teste toutes les variables pour supprimer l'ensemble des warnings PHP // On transforme en entites html les données afin éviter les failles XSS @@ -107,13 +105,13 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) { if (! empty($creation_sondage_date)) { - header("Location: choix_date.php".($origin?'?origin='.$origin:'')); + header("Location: choix_date.php"); exit(); } if (! empty($creation_sondage_autre)) { - header("Location: choix_autre.php".($origin?'?origin='.$origin:'')); + header("Location: choix_autre.php"); exit(); } } @@ -136,7 +134,6 @@ print_fiche_titre($langs->trans("CreatePoll").' (1 / 2)'); //debut du formulaire print '
'."\n"; -print ''; print '
'."\n"; diff --git a/htdocs/opensurvey/public/index.php b/htdocs/opensurvey/public/index.php index cc4693c76a3..80bf73707d0 100644 --- a/htdocs/opensurvey/public/index.php +++ b/htdocs/opensurvey/public/index.php @@ -28,8 +28,6 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); -$origin=GETPOST('origin','alpha'); - $langs->load("opensurvey"); @@ -42,8 +40,7 @@ $arrayofcss=array('/opensurvey/css/style.css'); llxHeader('', $langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); print '
- -'; +'; print '

'.$langs->trans("OrganizeYourMeetingEasily").'


From a5a0962dab9047e98544de370dfd2cbb250b05c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 18:55:56 +0100 Subject: [PATCH 083/177] Fixed JS errors and little style changes --- htdocs/opensurvey/public/choix_autre.php | 6 ++++-- htdocs/opensurvey/public/choix_date.php | 2 +- htdocs/opensurvey/public/create_survey.php | 7 ++----- htdocs/opensurvey/public/index.php | 4 +++- htdocs/opensurvey/public/studs.php | 2 +- htdocs/opensurvey/results.php | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/public/choix_autre.php index 0d156b751b7..41467471340 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/public/choix_autre.php @@ -113,12 +113,14 @@ if (empty($_SESSION['titre']) || empty($_SESSION['nom']) || empty($_SESSION['adr //partie creation du sondage dans la base SQL //On prépare les données pour les inserer dans la base -print ''."\n"; +print ''."\n"; print_fiche_titre($langs->trans("CreatePoll").' (2 / 2)'); -print '
'."\n"; + print '
'. $langs->trans("PollOnChoice") .'

'."\n"; + +print '
'."\n"; print ''."\n"; //affichage des cases texte de formulaire diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/public/choix_date.php index d6708b3f902..7a67c313739 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/public/choix_date.php @@ -320,7 +320,7 @@ else //Debut du formulaire et bandeaux de tete -print ''."\n"; +print ''."\n"; print_fiche_titre($langs->trans("CreatePoll").' (2 / 2)'); diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index e9df55effd8..43d77593313 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -128,14 +128,12 @@ $form = new Form($db); $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); -llxHeader('', $langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); +llxHeader('', $langs->trans("OpenSurvey"), '', "", 0, 0, $arrayofjs, $arrayofcss); print_fiche_titre($langs->trans("CreatePoll").' (1 / 2)'); //debut du formulaire -print ''."\n"; - -print '
'."\n"; +print ''."\n"; //Affichage des différents champs textes a remplir print '
'."\n"; @@ -225,7 +223,6 @@ else print '
'."\n"; } print '


'."\n"; -print '
'."\n"; print ''."\n"; llxFooter(); diff --git a/htdocs/opensurvey/public/index.php b/htdocs/opensurvey/public/index.php index 80bf73707d0..f070a2f6f12 100644 --- a/htdocs/opensurvey/public/index.php +++ b/htdocs/opensurvey/public/index.php @@ -37,7 +37,9 @@ $langs->load("opensurvey"); $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); -llxHeader('', $langs->trans("OpenSurvey"), "", 0, 0, $arrayofjs, $arrayofcss); +llxHeader('', $langs->trans("OpenSurvey"), '', "", 0, 0, $arrayofjs, $arrayofcss); + +print_fiche_titre($langs->trans("CreatePoll")); print '
'; diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 0620c2070b4..80d210d167c 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -256,7 +256,7 @@ if ($object->commentaires) print '
'."\n"; -print ''."\n"; +print ''."\n"; print ''; print '
'."\n"; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index eadb4d26f17..cac6f7a4a9e 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -418,7 +418,7 @@ $toutsujet=str_replace("@","
",$toutsujet); $toutsujet=str_replace("°","'",$toutsujet); -print ''."\n"; +print ''."\n"; $head = opensurvey_prepare_head($object); From 2393e7c73291ef7480cc4aa6c2b2b61a31db4a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 19:03:33 +0100 Subject: [PATCH 084/177] Moved creation poll wizard out of public folder --- htdocs/core/modules/modOpenSurvey.class.php | 2 +- htdocs/opensurvey/{public/images => img}/date.png | Bin .../opensurvey/{public/images => img}/sondage2.png | Bin .../opensurvey/{public => wizard}/choix_autre.php | 6 +++--- htdocs/opensurvey/{public => wizard}/choix_date.php | 12 ++++++------ .../opensurvey/{public => wizard}/create_survey.php | 8 ++++---- htdocs/opensurvey/{public => wizard}/index.php | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) rename htdocs/opensurvey/{public/images => img}/date.png (100%) rename htdocs/opensurvey/{public/images => img}/sondage2.png (100%) rename htdocs/opensurvey/{public => wizard}/choix_autre.php (96%) rename htdocs/opensurvey/{public => wizard}/choix_date.php (98%) rename htdocs/opensurvey/{public => wizard}/create_survey.php (96%) rename htdocs/opensurvey/{public => wizard}/index.php (90%) diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index 98830509bd7..6743d415ff1 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -157,7 +157,7 @@ class modOpenSurvey extends DolibarrModules 'titre'=>'NewSurvey', 'mainmenu'=>'opensurvey', 'leftmenu'=>'opensurvey_new', - 'url'=>'/opensurvey/public/index.php', + 'url'=>'/opensurvey/wizard/index.php', 'langs'=>'opensurvey', 'position'=>210, 'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled. diff --git a/htdocs/opensurvey/public/images/date.png b/htdocs/opensurvey/img/date.png similarity index 100% rename from htdocs/opensurvey/public/images/date.png rename to htdocs/opensurvey/img/date.png diff --git a/htdocs/opensurvey/public/images/sondage2.png b/htdocs/opensurvey/img/sondage2.png similarity index 100% rename from htdocs/opensurvey/public/images/sondage2.png rename to htdocs/opensurvey/img/sondage2.png diff --git a/htdocs/opensurvey/public/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php similarity index 96% rename from htdocs/opensurvey/public/choix_autre.php rename to htdocs/opensurvey/wizard/choix_autre.php index 41467471340..aec26c5ca48 100644 --- a/htdocs/opensurvey/public/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/opensurvey/public/choix_autre.php + * \file htdocs/opensurvey/wizard/choix_autre.php * \ingroup opensurvey * \brief Page to create a new survey (choice selection) */ @@ -139,12 +139,12 @@ print ''."\n"; //ajout de cases supplementaires print ''."\n"; -print ''."\n"; +print ''."\n"; print '
'. $langs->trans("5MoreChoices") .''. $langs->trans("5MoreChoices") .'
'."\n"; print'
'."\n"; print ''."\n"; -print ''."\n"; +print ''."\n"; print '
'."\n"; //fin du formulaire et bandeau de pied diff --git a/htdocs/opensurvey/public/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php similarity index 98% rename from htdocs/opensurvey/public/choix_date.php rename to htdocs/opensurvey/wizard/choix_date.php index 7a67c313739..606b1ecf873 100644 --- a/htdocs/opensurvey/public/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/opensurvey/public/choix_date.php + * \file htdocs/opensurvey/wizard/choix_date.php * \ingroup opensurvey * \brief Page to create a new survey (date selection) */ @@ -320,7 +320,7 @@ else //Debut du formulaire et bandeaux de tete -print ''."\n"; +print ''."\n"; print_fiche_titre($langs->trans("CreatePoll").' (2 / 2)'); @@ -332,11 +332,11 @@ print '
'."\n"; //debut du tableau qui affiche le calendrier print '
'."\n"; print ''."\n"; -print ''; +print ''; print ''; -print ''; +print ''."\n"; print '
'.$motmois.' '.$_SESSION["annee"].'
'; print ''; -print '
'; +print ''; print '
'."\n"; print ''."\n"; @@ -503,7 +503,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) } if ($_SESSION["nbrecaseshoraires"] < 10) { - print ''."\n"; + print ''."\n"; } print ''."\n"; diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php similarity index 96% rename from htdocs/opensurvey/public/create_survey.php rename to htdocs/opensurvey/wizard/create_survey.php index 43d77593313..cad66b34d4a 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/opensurvey/public/create_survey.php + * \file htdocs/opensurvey/wizard/create_survey.php * \ingroup opensurvey * \brief Page to create a new survey */ @@ -133,7 +133,7 @@ llxHeader('', $langs->trans("OpenSurvey"), '', "", 0, 0, $arrayofjs, $arrayofcss print_fiche_titre($langs->trans("CreatePoll").' (1 / 2)'); //debut du formulaire -print ''."\n"; +print ''."\n"; //Affichage des différents champs textes a remplir print '
'."\n"; @@ -217,9 +217,9 @@ else //affichage des boutons pour choisir sondage date ou autre print '
'."\n"; print ' '."\n"; - print ''."\n"; + print ''."\n"; print ' '."\n"; - print ''."\n"; + print ''."\n"; print '
'. $langs->trans("CreateSurveyDate") .'
'. $langs->trans("CreateSurveyStandard") .'
'."\n"; } print '


'."\n"; diff --git a/htdocs/opensurvey/public/index.php b/htdocs/opensurvey/wizard/index.php similarity index 90% rename from htdocs/opensurvey/public/index.php rename to htdocs/opensurvey/wizard/index.php index f070a2f6f12..6bb6403ff72 100644 --- a/htdocs/opensurvey/public/index.php +++ b/htdocs/opensurvey/wizard/index.php @@ -46,8 +46,8 @@ print '
print '

'.$langs->trans("OrganizeYourMeetingEasily").'


-
-
+
+
'; From 044d81b0a56af053982b7fab51a6407db39809ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 19:04:32 +0100 Subject: [PATCH 085/177] Removed unused images --- htdocs/opensurvey/img/accept-32.png | Bin 2449 -> 0 bytes htdocs/opensurvey/img/add.png | Bin 2017 -> 0 bytes htdocs/opensurvey/img/back-32.png | Bin 2026 -> 0 bytes htdocs/opensurvey/img/csv.png | Bin 804 -> 0 bytes htdocs/opensurvey/img/ical.png | Bin 829 -> 0 bytes htdocs/opensurvey/img/info.png | Bin 777 -> 0 bytes htdocs/opensurvey/img/next-32.png | Bin 2017 -> 0 bytes htdocs/opensurvey/img/opensurvey_logo.png | Bin 37593 -> 0 bytes htdocs/opensurvey/img/reload.png | Bin 1544 -> 0 bytes htdocs/opensurvey/public/images/accept-24.png | Bin 1696 -> 0 bytes htdocs/opensurvey/public/images/accept-32.png | Bin 2449 -> 0 bytes htdocs/opensurvey/public/images/accept.png | Bin 901 -> 0 bytes htdocs/opensurvey/public/images/add-16.png | Bin 845 -> 0 bytes htdocs/opensurvey/public/images/add-24.png | Bin 1393 -> 0 bytes htdocs/opensurvey/public/images/add.png | Bin 2017 -> 0 bytes htdocs/opensurvey/public/images/back-32.png | Bin 2026 -> 0 bytes htdocs/opensurvey/public/images/calendar-32.png | Bin 2155 -> 0 bytes htdocs/opensurvey/public/images/cancel.png | Bin 587 -> 0 bytes htdocs/opensurvey/public/images/chart-32.png | Bin 2059 -> 0 bytes htdocs/opensurvey/public/images/csv.png | Bin 804 -> 0 bytes htdocs/opensurvey/public/images/fforward.png | Bin 1359 -> 0 bytes htdocs/opensurvey/public/images/ical.png | Bin 829 -> 0 bytes htdocs/opensurvey/public/images/info.png | Bin 777 -> 0 bytes htdocs/opensurvey/public/images/medaille.png | Bin 753 -> 0 bytes htdocs/opensurvey/public/images/next-32.png | Bin 2017 -> 0 bytes htdocs/opensurvey/public/images/next.png | Bin 1349 -> 0 bytes htdocs/opensurvey/public/images/previous.png | Bin 1388 -> 0 bytes htdocs/opensurvey/public/images/reload.png | Bin 1544 -> 0 bytes htdocs/opensurvey/public/images/rewind.png | Bin 1364 -> 0 bytes 29 files changed, 0 insertions(+), 0 deletions(-) delete mode 100755 htdocs/opensurvey/img/accept-32.png delete mode 100755 htdocs/opensurvey/img/add.png delete mode 100755 htdocs/opensurvey/img/back-32.png delete mode 100755 htdocs/opensurvey/img/csv.png delete mode 100755 htdocs/opensurvey/img/ical.png delete mode 100755 htdocs/opensurvey/img/info.png delete mode 100755 htdocs/opensurvey/img/next-32.png delete mode 100644 htdocs/opensurvey/img/opensurvey_logo.png delete mode 100755 htdocs/opensurvey/img/reload.png delete mode 100755 htdocs/opensurvey/public/images/accept-24.png delete mode 100755 htdocs/opensurvey/public/images/accept-32.png delete mode 100755 htdocs/opensurvey/public/images/accept.png delete mode 100755 htdocs/opensurvey/public/images/add-16.png delete mode 100755 htdocs/opensurvey/public/images/add-24.png delete mode 100755 htdocs/opensurvey/public/images/add.png delete mode 100755 htdocs/opensurvey/public/images/back-32.png delete mode 100644 htdocs/opensurvey/public/images/calendar-32.png delete mode 100755 htdocs/opensurvey/public/images/cancel.png delete mode 100644 htdocs/opensurvey/public/images/chart-32.png delete mode 100755 htdocs/opensurvey/public/images/csv.png delete mode 100755 htdocs/opensurvey/public/images/fforward.png delete mode 100755 htdocs/opensurvey/public/images/ical.png delete mode 100755 htdocs/opensurvey/public/images/info.png delete mode 100755 htdocs/opensurvey/public/images/medaille.png delete mode 100755 htdocs/opensurvey/public/images/next-32.png delete mode 100755 htdocs/opensurvey/public/images/next.png delete mode 100755 htdocs/opensurvey/public/images/previous.png delete mode 100755 htdocs/opensurvey/public/images/reload.png delete mode 100755 htdocs/opensurvey/public/images/rewind.png diff --git a/htdocs/opensurvey/img/accept-32.png b/htdocs/opensurvey/img/accept-32.png deleted file mode 100755 index c94c066edee91b802be27455483a21113fd1c1eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2449 zcmV;C32y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NpWA;M57o&L+#HKVPqt(gf0 zgDrdkH-6E3H{iAkD|9M@vdN&RM~!U(Zgwp>>&*lB+sQvraOt3{I7FbvdL=_a-MHW-RrgKrxlLS#5@I~?Nf@V24G&A9FXuHK? zU9x)5?WocPVbj_WNpw+qjY2CF;>T0A!KojU2b7a<#ZyhV0nE_Z-+|`NO{lXZN1bCKYq|$wC^gQ-s=7zu>2$A`2{c$NmP3aF`>_4X-=aht zB?qv%o1luxBZ5 zDUIM#ElWXjAX|*USBhI+-3!aOkoswRjW$N+n+kT7V-2!2uxx`a|)~h zi)vrQ81t1%C46(!1GvJt8+v~9DtzelI=W#qu(shTL_+oqZ;JJw3;>RFqbhyGAZb&ysKwiQO`Z9?IPZI=4|_c~nWGELr1HM5MFjnJ5XQ zw+m$jQwe+-WyG-v`28~Yyo$1_(aZ7+B>X1Ib+4GsmW5ela5A_DE#ZBXh}tMA^-x;w zqlMZ0qLjo^^A^e-#dPX1m|&ZQTE`7!3Rd2)iDX<}URL?d50l}|PmZb4=r-&1dV5x) zIzM_0K1xKPLKr{oN|u@vKtYA5X4DvFpBP+_bmYw_rhL_+c8;JS+Ps&Dr+8{Wcn zMKc+3H9bmKYPC9-{4ka40Qm|gvoU3khBGMt%jI&&WHN}wV(rOf;(0;EKkY0k`RU}uW#Ng84APnrGsmdkD+t12hokVap6CAuvts8*RzbkI P00000NkvXXu0mjfpFpSJ diff --git a/htdocs/opensurvey/img/add.png b/htdocs/opensurvey/img/add.png deleted file mode 100755 index 7409ef332d2435c3fb43c879a80c9fcb5820f796..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2017 zcmV<72Oju|P)h@HZ0;rAVR0}k zN|%}V@?{*#?f~YON|>7~f@Kv9d3jvv;Lv`S!Nt!dw4Y3f@u2c4efJXaf4(VzBI4K5 za`{yi>m5wR3KMd&WVq5rWIGdZIV3o&lI9^8;SeD91$p>FJVwV@ockn!bMJ?hkVia1 zejX?8{W<{FFg)HWUX_`-pxS{fm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K|> zQm^as;HM{#Qwj<3}(>R-AM4&+cd0t49%y2X`UaCBJg8YmB)K#uA{Z>9n zOp8>WCg#&r06`o8oz6gaIn`fY2FR)ssCr@3rc|5f%`bIJO$zbt__PK3gH51Sff`H}0ZWac9&q~*( zO@qNscV0VSU%X#sYO9)Qx4M=(eR(m}UFhondELHSnO2hr&mMO3 zv6gmw!P2y#u0c!?LPO88NyxOTj>XWm>*77F&55fo9Z?)iynObdfA;SdwVRl$W~G3* zEGt!2+1T-%ja32&!XdoMS_mM#IQK#{6D_nvjYu`GlvO3XdE)qYJJ;7ocW)c+jOW~JAFIgF1o0T4m{`Me0Ihhnq8)+Ikio?}&cs%LUgQ}P7&W|_$6rf8V4wuF1uIBp>J(ogED1)JBC6~kD zP&5UGq9EYXkjBMfez<4nQ*XPTaCRaB5|PMofXCxHNJYiiKkd>_VaBl7d|p-?2UwsUiH`)6im z?yv$yMMbG9rD{AmB{|(-FhHl*V`yjy3kxpvJ?q7jZYx$-R}l;bVS8$YTrNjPXQ#Wf zqaz%{6L!FlkB`6CL3SG&?$SP=k3DR$SYWf+NL2-PcXv@=Umwm7tyT-C(}}{u!g6wU z{OlqLYieu14BGA5qoX4Pi2c^qRumT(~!u^5Y?}wKVy~N$&;UT#MG=j?2u{vCRsT!qzu8H?ctwUf0&vu#sL z`${Uzkw_m%Q)kJMMFRidrcptD(PKhdAeUsCe7gvI{~G7tEBZ7YHBni200000NkvXX Hu0mjf!zXq{ diff --git a/htdocs/opensurvey/img/info.png b/htdocs/opensurvey/img/info.png deleted file mode 100755 index 4c665a4f0a10633d475480553f673bceb10f594a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 777 zcmV+k1NQuhP)2Rxem5IpiJG?3n;E5IYLG=}N_7!xQP~$15m*-)L}4Iw6GYKXN|*+M zrQQg2;YafWLX*(SCOWm5Ij3$qx3%qkdz?+|5kZ3BwVCn0t=d9> zXg}b{sq^mi!mCn2wiO<)hvb8p@nGcH=i{+zX0?nEnUu=nz%QHewz+DC05N_*@yYT* zU2a)gtS$o!HXcD@K&oKykY9lpz`5Xu5Yb=8#9%K*3^knu$O)8CrQMcVnOAbz-!{7& zSfB+lb%E{?5i}=eYtMzFuD3qA1IPT-bpqTA0KzF7^#$j`)A#LyOvYey3RDW6PG!iY z1S8P=BGA>`3R7PrWRtyl4L#%S8z0gkN-aC`%DA-LZ0NNNQ4$8)2kVl6&Pia{@Crsl zBjhFna^kG$`iMPs1J=Ivr%aFolxjoN8ck$eDpZ@c_%CnCV#3_S5LRZ4keT}-ag5&YGbu)2kHks7bO=lgU1AuDDys3k>KYjSBeJ)s zauOp}+N0$R`|Cd8#ba3%?*>FV*vg00000NkvXX Hu0mjf>jh(& diff --git a/htdocs/opensurvey/img/next-32.png b/htdocs/opensurvey/img/next-32.png deleted file mode 100755 index 934a254f307b0d140219e13c723a4fc6836ed881..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2017 zcmV<72Oju|P)t&MbGtffxkXglqcc4|fH zfYbqN;)o+m?eyWGbQEE%1Ox<3c!Usw33=__%_iCG`+4u)o_jA@ve~eN`Xy)g?)RO0 z&hIPIY0^>Q5w@)EFRi^#XeVY5iE7$sGLKg7XD>Im9NUpowvqEUYYea`p zFNd~+0dyVodSp?4lH?wo3V^5iY;N!Dx?-+)t`3X8<;C}^{4g03;}oVVpZFY(vTzLQ z&~GUaya9@hP7@s6 zGOq9KPl#S|Bk4IX8Gvd=&z>%Ps=~B*X$;S-b%5vP6yZ^kMJUW75@R8fxf2OZgiN0j zea92D^8`z-U{e4o{Owmw=(#9EXzU5gvBV;J<-&LX9MRdVm8IWV_6Ua;9_vr>vm(Il z<5mC4a^@qWEQdr6?wAgdIDt^W5U?0MUurku`q3bKAKF`q?Op}<7=Svq%+fgT=QFT# zOBZyyn>%+?WDj|CwA=J>DK;%cN!B7bLSGP_Nm)w}5?4r%;jlhsBQ33F*c*Ex^#z|M zwkAa?OLWEb=-rij{v=@5j7ahY=O_v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QxW<<^yct2s{bAa00000NkvXXu0mjfHOJ}V diff --git a/htdocs/opensurvey/img/opensurvey_logo.png b/htdocs/opensurvey/img/opensurvey_logo.png deleted file mode 100644 index eb266ae05cf56559595b9580f33aeb9f4c4fced1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37593 zcmYg&2{_bU*!~P<%aVPY$WoRhvW@I}lr3b*7H@Mrf<67<;Gv8SzSE`ZdwAvUDf8&=gIJPKjiqH$J&W+EkR+9Zcn% zX&a>(#iMi8j)C#YyQb5bQO#zjIqVZDSnQa(8zVWg`KU6D6L<&aNB^cLk8%5TiOE$B zw2zJkjurozkN;Ft^J%1GUQw}2UIIZ6e{P{Dl@)_ak!IhkFQ}`lFKkc-tIdv5W-jt0 ze;l*5tMm$sjLZuSJT}gbaEAZLle>)g;JI{+p59R46FuIBo=&zIwc#vHPluhB}k7I(If zS7c;lN)Aq#Nkc`FLqm{BRgA4MjFQp7+}x>l{ygIOX)Y|a?A)`87a@_67sFv_rsIz< zANy>3QZa*0!m;z}y@3|wR~3Kb&gXNq>dEo+TI%ZT4Q$vDWyHqD26}tyX=>#zH*)xx zvZnmhmP~>#bM5P>NJ0BZ!h~H3o9gS6{)*hgZZhF?+(l!Kt&ez`-F=wwmIyagyez%v z9_MBDICooK-ZqMqoLTO;mZoigMO4t<%Fe!M)t`%LK?mE-?pBfBtv*=vG@EDQ%2v)9 z-ptt3+SlrJ8!geO=16)z+mgn^H#G-4^WF<(17CSIPfzkB#q^4|Jj#k~kP(4BVA6hK zTViHgW^uE`?3EM8f9B2OpF@#|-M`6g{_{&yMZ4K>B}aw{!GD@NSBYplKHxu{QFV!B^- z3bEXO!~ON^*D8mK=FdxD!7RNe9yUkpiU$8g%kw&>S=?$hOlX!lOAL5=584Q|1T?(| zDH$~aaf}36z0%A{IVRA4k+@R+Gje0%ZZ9dv{Vu=!pKqNZZqeE#8BDTxASNvhDS5!cNTvk?AP*|7* z5!P_?tyu~0FZrwR*O=KKQ+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{XzKi=gCAEF9QTc{o7lBF$qZVfAHS&zZIeX#}{dhp-(oe z#vWFTcQca$f<1efxXb%N#@o8U=P2jTq#na^xKnI>Q(6Vt2tMUIcg|6td z2Aspe$59O*Ed>W9Jn>ioXa5i!4Bq`My@5Azmx)^AmDn~FXnzX5xp7xHeAw{Y1}_VP zE4(@AGS%A36=)PY?hE~^E7DWlR++y!doS?`F3L+YES>v$W_EqCW`y07M(f2{!*s<^ zO5P>zaB12xCOAv{#5ue-qfFuXQ$;WuwJ|2w%g`YIniNqgJUgH3hEFdKAIF*IL}`h{ zbG&nxQ64PzqKIN&2|O0-a4Mtryf)kXVC6HT_w?lG=%-=>%vU<^FWzKEHD|a1UaBu# zm?5;snn~~DVqLYTZ_3`(lGRQ#F|FN}!g$3Qb>j-hU}%6H7%VlnCAL2z$2rq>*mZQQ zn9-1yV(ZGarMLt$i<$a&g?sDtgO$QQ21Y@yEk?m1R7sMNcNkffrry0n#$9hCd}dJR zoF!qz#mZn|&2eN)65h2nEdR0#*;SzM<0%Or27*TS4_Fpvo{yZ)RnO4+GlYH?PBcO> zA^=(JtWU{i4tCr(DMr|Aq;Ggd2@FSzg-?p%fx%Zy#1@xX9-pm7z5Wns!339r z)}sE5=&Gag*%E4cv6!k{1g$rig|4P+6`zyu=1Y`L0Sr28{DA=W+kgL%mn%$~`wI>U Td-d diff --git a/htdocs/opensurvey/img/reload.png b/htdocs/opensurvey/img/reload.png deleted file mode 100755 index 9a2b2e82d365739d12d026dba599afa059bf2486..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1544 zcmV+j2KV`iP)7u0}Ark%-ooabuhQJ(6X(Mb?y4Px9#=sEtCO8Px2={|2_Zr{pWw3GW_>? zndEI=iQ?>hR+O17WinDY+L*J=ESbUrF4Oin$<5~hu;=JUDtK%!cwJL6vQ))}6$5>< zMdYLl;5Z4b9V%E`m8iY~{CQfG?p_N19t~qH*;W1@fr4a9=FpUNBNrOEfrSwa&hw*3 zdKf$}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zgDrdkH-6E3H{iAkD|9M@vdN&RM~!U(Zgwp>>&*lB+sQvraOt3{I7FbvdL=_a-MHW-RrgKrxlLS#5@I~?Nf@V24G&A9FXuHK? zU9x)5?WocPVbj_WNpw+qjY2CF;>T0A!KojU2b7a<#ZyhV0nE_Z-+|`NO{lXZN1bCKYq|$wC^gQ-s=7zu>2$A`2{c$NmP3aF`>_4X-=aht zB?qv%o1luxBZ5 zDUIM#ElWXjAX|*USBhI+-3!aOkoswRjW$N+n+kT7V-2!2uxx`a|)~h zi)vrQ81t1%C46(!1GvJt8+v~9DtzelI=W#qu(shTL_+oqZ;JJw3;>RFqbhyGAZb&ysKwiQO`Z9?IPZI=4|_c~nWGELr1HM5MFjnJ5XQ zw+m$jQwe+-WyG-v`28~Yyo$1_(aZ7+B>X1Ib+4GsmW5ela5A_DE#ZBXh}tMA^-x;w zqlMZ0qLjo^^A^e-#dPX1m|&ZQTE`7!3Rd2)iDX<}URL?d50l}|PmZb4=r-&1dV5x) zIzM_0K1xKPLKr{oN|u@vKtYA5X4DvFpBP+_bmYw_rhL_+c8;JS+Ps&Dr+8{Wcn zMKc+3H9bmKYPC9-{4ka40Qm|gvoU3khBGMt%jI&&WHN}wV(rOf;(0;EKkY0k`RU}uW#Ng84APnrGsmdkD+t12hokVap6CAuvts8*RzbkI P00000NkvXXu0mjfpFpSJ diff --git a/htdocs/opensurvey/public/images/accept.png b/htdocs/opensurvey/public/images/accept.png deleted file mode 100755 index ada57a9ae60ebccf4cf8f4fcb9523cffbc6c51d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 901 zcmV;01A6?4P)dCy7H)TT{LFKH{8ZL@ZD61C8Mkl_ujB9adZqJv$Wvbir}b(lh?Vj@yy zDnk@6=ob|fyNMvPxT#26S7&h_#@ZFqW~3%<(zI#pN#FFGvo{Bgm-o}*egDtz{BIA3 z_fBYJ*hNHfhb+r0HC=NVmpVd9M){3WdZE6yKJ<1x_xfWbJRe9DU?H*mDuKLMu!}dV|-2 z45dgg;18dCg;ra0C(CAY4q}9iMqdPei9Yrn>bnGIu^lD>ka-;?R*t=c9xG1%eKlLHJi06p~{2TaLg&ig2L! z6s`_-;ojO)S(C!Mxp*QTI6iRR_bl3v@&dwwIF^9`!V3(*8-ULmze9s9r&2v_z1v!>vKds9;V5t*Gna;{QRw;{mX?1CZ~d1BsJ;6n(zDN4 zc@z_~3WA>Vz1-CFWc2&)^<^GA6Y6#NdhtQr{O25oll>@?i?P#l6lP+<-QjNB9{dTF z7Bd{C1fGtKBe3jN%mDbGtS@USwZm;&i{&-ng3TWfMy{jWQjJFYawKP`ao|xKD&z<& zFAAI4iRXzp{GQGjmrkd9I{LS_SjiY>XcFFr(`c}-X6ft3{5aN!;2$Tz(QB-%DWepN z>_D74u&0rgkeo~g?nW;AhT>=0*i|MFvB~`-njGtl;OFrnoPFwr)11j~pQ;O}weP}; z(k(%5e0J`}e@s+Ipl8rHU zIgy+Q49)cUejW0$fT>py9`r+6Ldk{IAM8gZzo;{l$!xBvS)k_4l!HhTIjoV)zP}S)WN_kl zq-G<=TaoNUed!7`l&s2XirA5*)L&Iy^TteXpIlD}Av;8oFgvS;ojIKg(JVFWTv1W^ bj-CGpV^3H~a~vrn00000NkvXXu0mjfc^9ui diff --git a/htdocs/opensurvey/public/images/add-16.png b/htdocs/opensurvey/public/images/add-16.png deleted file mode 100755 index 23d5bed776023cee0402e7c0b1649d57704e36d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 845 zcmV-T1G4;yP)|8WvWN;ij47sw?j7x|_Q?^be&3;f({(`?mg#x_uO;8OYpDlu%$EA zuI)_08kf3~5Dg=PhA~gC`Z^j=n`pc{F_|RbG;;=ff73Dh!F}Z_$ypIYvPFd)CkRH8 zFyS|%$E|674QDu1^om z4GRUdj@Jnc>8AE0x1B{bB>{*sgK2u=tYCmbPggZiClKOvf8L1Mc>^Ueqwlh>BOZwD zULZKQ<^0mts}}=$(CartQV3YWp={MNy}cH11r$v{jFOCmID|zO@7e(0U2iENX=Zoh zdqYWPs)R2-D`K>R1zT#_fa=^%9XAc{#FW^thTMNd>FUGgcaDkycR~r z0*-aUZOXa`9)tk2x67Y+FPAjnZVL=n#> zu3=(+9KBy0`0;ciK$fj#+;uPQB_I8E_=Vpypih@;Uyp`uE&B5G+cFGC1{PHlj<6W= zS`fYFY15za#6x?lbsdLZJ{6kwE6L?phe!F%I z+R$Fnl(x$&CBqZ7>xuLdc(S!g$4B2)LxiB?XpkT@#XxEBw1XG-{E>2I)@D;z{)O~B zo)&%;Y?xJ9D8FjJasZ=fh|j2)3u;gve;dR|q;OHnzb)OmjBRvPr4=V{w2_c(#EhJz z3nwlCl1SzJDWWMa$6FDKo&5VVC0d~|m964j)&k-*X3JE*Qa~D$hiALAh`ey8p2Xyz X@8?yrXY&hd00000NkvXXu0mjf$sm%K diff --git a/htdocs/opensurvey/public/images/add-24.png b/htdocs/opensurvey/public/images/add-24.png deleted file mode 100755 index c63af7f39062ad0d5b9f1c5f9afa617e7ada0d5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1393 zcmV-%1&;cOP)6#sqq-gdW-t$P6jF>D#QF+f0xI6@`_MgoI~JVHX0#Az@Rd1!=13>pF5Wz9XWWc(0uI%Mny0zW9+x2yOZ?9i(N7-nn;Up(HJ?A^;_ucdQ zO7P$GBIWg*1|<`6$@HuVN*19CS1)n*b}1G~#C7_!hVs3!0+2EE^B4}5`LFSd=ap&6 zoDyL2gfMb4M6j#^$AA_#hX!~50PdU*D{WVUzeglgP`}&%2f$F?mo;1e$-HtCJFQSg z(G)+jGbC`F0x3cuN(@4j{UHV(frZ1VMQ0nq?c;*%yzBpx`hP|_k_>>Qd~)Kd?2U8Q z7_hR~jTfE|(4f(PPXa&Y*l(iBeQpkI?L3-medsyo`T+{wq_O0u0ghyru4^f1@@;i`2UrSZ0n1X!LjE91h--A1x) zjV+!E!Ovnq;1Cj-q=ga{27@98Aw9gL2)qgqpqFW=?#))e1j$R(V06Xfo>+{Yc*SJWPJBO~JrsIuKc7cA0#c5DM25Ir@j|vcP z^_4{ds+S$edAnkZQ%y^^D+NwLn~;w3slQ^PevT?X@;9Q|x+LL@T}Xk|rB`dxT1VUY zptYJn$F)?|8wzLS`QfFvHrotPl*D|$S8xTBh5_sp;M>-v31^~ice+jR1UL)~aA^Ig zwV9+$)&**sWIm!0bhvmp1`}@|r4I@(W3pkkD);#A;Tub7(sSMYJX(7VYUf#Yclt^0 z%NphIl~~s_+EU>Qv6z}xjE#ARVdS#ojvT{-A+c_XC=uFe!MJTma^Y0R4p@acc!Ml3f z+xxRlA64A!N>>3k=O4ntNo$`8;D-GSjy?R40ubCB25?vX9VDrlFdu9*7Ks$O-e!U? zOvgepU|IGiq-nF_0T$)Gj&xltWuAZw*E-IPXi+yVxlSU;`QWE1`pcTCPPk{!1530` zkMFr`EYHm4(Cjv%$IFjyi(xu4|13@0%;9u2VSD|EIT*2U`ua6!x6`4siwNvDpNN`P zlx|76uw<(q{Q(Vb^=2eZ!Lj1gC@{qUS_hl3xo%zZT6E~>24E4qXovjUBX!VNoryH< zxR_qZ=vdtEH^JuT6CA%=_#=waXQ*<1%cSAh|-GL ztNHV#pQaH%t-)<~1_Vhn%DEzc7s_XCRORXir%?Iut5NoF2yogs1nDl4PIoG3aIT>0 zUq-I$uNUo1+gh;7s1~|WFu^UQJSoQzi)H%Qa9#3W1~JNUTO^>s=OnSnp zB+X|us2smAwIp+aiD>f;2orYHb14RZpw)*^L%$Mf?7s?G*+u;to(?n?z+;+Ac^%PS8~fPv4sYG{I}))SONY8M7L~y&{-FO00000NkvXXu0mjf-!+?f diff --git a/htdocs/opensurvey/public/images/add.png b/htdocs/opensurvey/public/images/add.png deleted file mode 100755 index 7409ef332d2435c3fb43c879a80c9fcb5820f796..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2017 zcmV<72Oju|P)h@HZ0;rAVR0}k zN|%}V@?{*#?f~YON|>7~f@Kv9d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|&n z3rQNTKPS>v6}lXTK~Iy=w1pnDL#{cB$i@BJ39qax!CYy??~2f|@*<%cq}IFhdnt=RV*XVj>!7>^=p#f)sMnlm;A z(D=}Y)!(1Pkf&3yr8qBUZ}9~1{ts37`Fg9!8$(ekC)^ab8axM9U*l2tMcRs;Z&(Kn zgHEx`BS2j83>PZqjfYAn+fiAAEywF16Tp%eGV#%(NhGm>uTEUXhRRy_nG~xDdQgT& ziKlklhxf?(FS)re>7~VooimpTcD2(d7G^kXcyscz*z?zI)cGP*i_F9u94Db05fU481fQKDe;!;ocW)c+jOW~JAFIgF1o0T4m{`Me0Ihhnq8)+Ikio?}&cs%LUgQ}P7&W|_$6rf8V4wuF1uIBp>J(ogED1)JBC6~kD zP&5UGq9EYXkjBMfez<4nQ*XPTaCRaB5|PMofXCxHNJYiiKkd>_VaBl7d|p-?2UwsUiH`)6im z?yv$yMMbG9rD{AmB{|(-FhHl*V`yjy3kxpvJ?q7jZYx$-R}l;bVS8$YTrNjPXQ#Wf zqaz%{6L!FlkB`6CL3SG&?$SP=k3DR$SYWf+NL2-PcXv@=Umwm7tyT-C(}}{u!g6wU z{OlqLYieu14BGA5qoX4Pi2c^qRumT(~!u^5Y?}wKVy~N$&;UT#MG=j?2u{vCRsT!qzu8H?ctwUf0&vu#sL z`${Uzkw_m%Q)kJMMFRidrcptD(PKhdAeUsCe7gvI{~G7tEBZ7YHBni200000NkvXX Hu0mjf!zXq{ diff --git a/htdocs/opensurvey/public/images/info.png b/htdocs/opensurvey/public/images/info.png deleted file mode 100755 index 4c665a4f0a10633d475480553f673bceb10f594a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 777 zcmV+k1NQuhP)2Rxem5IpiJG?3n;E5IYLG=}N_7!xQP~$15m*-)L}4Iw6GYKXN|*+M zrQQg2;YafWLX*(SCOWm5Ij3$qx3%qkdz?+|5kZ3BwVCn0t=d9> zXg}b{sq^mi!mCn2wiO<)hvb8p@nGcH=i{+zX0?nEnUu=nz%QHewz+DC05N_*@yYT* zU2a)gtS$o!HXcD@K&oKykY9lpz`5Xu5Yb=8#9%K*3^knu$O)8CrQMcVnOAbz-!{7& zSfB+lb%E{?5i}=eYtMzFuD3qA1IPT-bpqTA0KzF7^#$j`)A#LyOvYey3RDW6PG!iY z1S8P=BGA>`3R7PrWRtyl4L#%S8z0gkN-aC`%DA-LZ0NNNQ4$8)2kVl6&Pia{@Crsl zBjhFna^kG$`iMPs1J=Ivr%aFolxjoN8ck$eDpZ@c_%CnCV#3_S5LRZ4keT}-ag5&YGbu)2kHks7bO=lgU1AuDDys3k>KYjSBeJ)s zauOp}+N0$R`|Cd8#ba3%?*>FV*vg00000NkvXX Hu0mjf>jh(& diff --git a/htdocs/opensurvey/public/images/medaille.png b/htdocs/opensurvey/public/images/medaille.png deleted file mode 100755 index 97a22b72eea2e8d65655993c68a9e03f6a40aa9e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 753 zcmVPWf;dl@9%f?!cp_eSg3A+l4!Fq^t+ti}&IAe0X@D=QWZj zM%;Z?uCWO_G=wDZ9(j)>jD55+NwV|jvC>tN3^K{^fV>&V*w6!et5~&pa*WZwJy*mn$*RS=E{iBzuX~I|52pZlZsC^BkvS{J~dNA2rd+&Bn zDPttzeo9qHVOn0H7x@0?K2+P{2W3YuKv0gI{t`DZ{% z^)uSl+#vB}3L>aG4!cswJw`5%TN)=W%p(lmIqdQjHn;eWkwjs@obZk>!UG>wB^pj6 zJBPQA@h%5(0Th8rU=r2%$dMnrMsDoxS0p)Oii?!LYWDh=q4NEw(&6(bk$r@sRpbjO zUIP;n<+9A(?2qj-J%=u`3F{W-TmM-l$V z6zWcE#Z*)dyL<*2KpukuZ7vZZD=nXBc*ijUh^IQs>R!T_1d1YTE{iGKO;BD#`7_Tp z-nnR6O6#}%g{8r#E4*kAYY&kBcxtMq4O+!H+m&<9B%$t@BKNE>6je&Y}T$>)>rA=-mt&MbGtffxkXglqcc4|fH zfYbqN;)o+m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zWj1zvcOUW$g(>rb-;Vmvo`6%|pH!}7)s8MRf)OndMRvAB7Q)Mt#c1<^?8?&lnj0>R zSm6vCZ?p3!%g*(TU+Gmjfx06G_ zubndS%Msw8-7U0IgK-UsGUn^En3In-<(aH^>C{ffPHt!mKJv(;DZK;<|qus6GX-7-z_5+(K4(w9E03+MS?fBfmYueW1Gy$o6QC6 zU+&vhz~#&_-styP3`9*Bh?@~g@EL=Xl@j1W5)vU<>jxF(y+Ozau8Hu+Hxo-r$8xJE zTg&S3cGU)(t$dA*9Cfn|_lZ14CA|tHMwL);50ki|IG#X)a=bX!Nh{CCoWQ4cHzZjp zmxm@Q%2a8}iT0Rh=vGv$%VqLvvmtR@#yf&IHWvY6Eu`}^LB>e*187&XNiVBYDRuV~ zHSk&N1GWVg&iu_R=t@msY~*_d5GAj8SVnYMM6552c&8uY6|ab}^f9!{X>%swcT#K1 zh*m+no_|~Y%`@5Btwi?G=h*eU`G%<-QxW<<^yct2s{bAa00000NkvXXu0mjfHOJ}V diff --git a/htdocs/opensurvey/public/images/next.png b/htdocs/opensurvey/public/images/next.png deleted file mode 100755 index 24d94e830a33157c791a714ab60565f9aebf0d6e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1349 zcmV-L1-kl)P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igW1 z5hpUz)>8fe00hNJL_t(Y$BmXrY+OYUhQIE9%e?W79pfwxORy4$m?T&sL1aOg9fCLj zVmSbU2ysD3zzKwekPrwFaRG!7%LNhO64na{5MqgR~3P>KRv+y>qK7QzA9w{sEjCZIv>H#~45ati_dLTsgtUF*b^@afC}s1eG>S9HCi`HZo8pNMcO68$YuDY#H6V z6&Q4YBP_pFU3>Se8OxRwo{3<>5F15c45)$}A*vYXaBXF94yn}(Z;}{|=9tFrEh~`x z84Iip=dbB&?_b&i$2nj!496j^oDj~Q*)m?5dm`Z}EBk=UEO1TRic4_iQUMPC&cO27 z3D2(W<>GnmXr3KYda4073J5yeQ4vhwDD|!axW*E-tuCLo1Vm5~)C-#XmVv7m&g9bh zT|9S19~-V*!onG)qdfTOz*yl)rHpYF6(O8G55n>)>#DPQf{tndo_jRU(L5&~87UG) zwU~|J+*3Pw=ceU6c>V%9LetXyS3IsQLA_w25L-T>$GS?j)Fg4LGC+1<7*r0+#K2nC zEkBu$Z(GGp{c~IU&2uIUix7)ohSzcgxk01MUD3IF0PqTe{76&s=1{BS*g48fP z%7c;G1dqM3jTb%}!bf2X&^IznSa>Y;2@oMaxDQRowm2ZSrOJ(Q&lyFYH5Eo{$oK@a z+hWc;eJ&f`|CV)6f57J7Mp0v0L>?X*!5^xjxhLKA5&3~1?>B%mN%gz#JD=|}VM2bW zhNKNN_n7)PT2644GBS}K%|m@0lY6L?!CJJDA+>QNtugxcLp!ulU+MrQZ|s)Z$PIDt z*~U0qfO&x+00m96Vtu4oSLldBo+INEs0ia=PbYk z0h%@nKANHUFYz92G{6h#;3m?Y?>`AVb!0zyFa7b$MJ7y^hTXj_(lnb)ykh~YVnk8z zQ4!MbKV*FS8?OMjAFJUg@Oootdzc>>S`*IcwYF5jMj-@6bu~rJz!-xuwy5MH__1N? zTVKx8!A%bXcTH`X(>48-xL|$UyLzCsaFq#WEdb*VOCrru^8JIPL!WEo=Py1){5`-I z$NQ>ijx&L4vB7|ApS8%ul`a%y;?S^+{ka3lo6nYSrUUo~KxWuI!U%fE00000NkvXX Hu0mjfSMp}6 diff --git a/htdocs/opensurvey/public/images/previous.png b/htdocs/opensurvey/public/images/previous.png deleted file mode 100755 index b4b79aeec517f11788920581a3b6044a2bf80930..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1388 zcmV-y1(W)TP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igW1 z5he=b&)XpY00itwL_t(Y$BmX-Y+cn6hQC>BU(Px9v13dclL})chM1CCsZ!wtkRy5# z;SGs^#6^G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0e@tuwwccln@oQZIN!hffU)m z+y1dAyL1Z`cY@tj)Cq$e2wyme$fcvA(PZZIR41?A<6~AQ)XrePDDJnaE@r_)!h45F z;#T8^dHw6rAbG#3#)yTod$O4C%9(vIK7SSC{PS8i6m8H|)E$zjLU9+J`N@dg_&cAp zfAlSrFT5|lQ{b8~M>L#9RO#f=;EWr+S9hfDB*GP?J4w5SKYC!`upd0LmM?ZqoZH(M zJZa+aqlC(s|Md)@=;h-GSN-}UJz0)N3>+?;+;wp?mdTQPsNh&v6yjGErDu@0 z<{|!R2uifB0QXu|nyR;uvIql=%)XKb*|N=^HP!DJGlf}(XY!F|CbWBW8VU`Y+jWTE zIAg@>&mE^h{Q;dj_fU|JVRs^}h4c%G80000 Date: Sun, 5 Jan 2014 19:09:20 +0100 Subject: [PATCH 086/177] Removed odd html attributes --- htdocs/opensurvey/wizard/choix_autre.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index aec26c5ca48..fb869d65c69 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -139,12 +139,12 @@ print ''."\n"; //ajout de cases supplementaires print ''."\n"; -print ''."\n"; +print ''."\n"; print '
'. $langs->trans("5MoreChoices") .''. $langs->trans("5MoreChoices") .'
'."\n"; print'
'."\n"; print ''."\n"; -print ''."\n"; +print ''."\n"; print '
'."\n"; //fin du formulaire et bandeau de pied From 0a3a6c0f88790863f87fabb7074eac7842b477d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 19:13:12 +0100 Subject: [PATCH 087/177] Restricted survey creation to $user->rights->opensurvey->write --- htdocs/opensurvey/wizard/choix_autre.php | 3 +++ htdocs/opensurvey/wizard/choix_date.php | 3 +++ htdocs/opensurvey/wizard/create_survey.php | 4 +++- htdocs/opensurvey/wizard/index.php | 4 +++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index fb869d65c69..302cbfccf6a 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -27,6 +27,9 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); +// Security check +if (!$user->rights->opensurvey->write) accessforbidden (); + /* * Action */ diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index 606b1ecf873..25f6ddc2453 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -27,6 +27,9 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); +// Security check +if (!$user->rights->opensurvey->write) accessforbidden (); + //le format du sondage est DATE $_SESSION["formatsondage"] = "D"; diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index cad66b34d4a..a8169d9d5da 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -27,8 +27,10 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); -$langs->load("opensurvey"); +// Security check +if (!$user->rights->opensurvey->write) accessforbidden (); +$langs->load("opensurvey"); // On teste toutes les variables pour supprimer l'ensemble des warnings PHP // On transforme en entites html les données afin éviter les failles XSS diff --git a/htdocs/opensurvey/wizard/index.php b/htdocs/opensurvey/wizard/index.php index 6bb6403ff72..fab1a86320d 100644 --- a/htdocs/opensurvey/wizard/index.php +++ b/htdocs/opensurvey/wizard/index.php @@ -28,8 +28,10 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); -$langs->load("opensurvey"); +// Security check +if (!$user->rights->opensurvey->write) accessforbidden (); +$langs->load("opensurvey"); /* * View From f5201b97a54ebd9a7449adc0483a38594e239a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 19:15:48 +0100 Subject: [PATCH 088/177] The voter does not have to know which user created the poll --- htdocs/opensurvey/public/studs.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 80d210d167c..4ac633e52f8 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -242,13 +242,9 @@ print '
'."\n"; $titre=str_replace("\\","",$object->titre); print ''.htmlentities($titre).'
'."\n"; -//affichage du nom de l'auteur du sondage -print $langs->trans("InitiatorOfPoll") .' : '.htmlentities($object->nom_admin).'
'."\n"; - //affichage des commentaires du sondage if ($object->commentaires) { - print '
'.$langs->trans("Description") .' :
'."\n"; $commentaires=dol_nl2br(htmlentities($object->commentaires)); print $commentaires; print '
'."\n"; From f7809906d91daf62445ed38e9d08a8b4f5571e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 19:38:39 +0100 Subject: [PATCH 089/177] Removed massive deletion feature of polls as it is not a common case --- htdocs/opensurvey/list.php | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 745bee3a22c..53a200b2d65 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -42,28 +42,6 @@ $limit = $conf->liste_limit; $offset = $limit * $page; -/* - * Actions - */ - -if ($action == 'delete_confirm') -{ - // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); - - require_once DOL_DOCUMENT_ROOT.'/opensurvey/class/opensurveysondage.class.php'; - - $db->begin(); - - $object=new Opensurveysondage($db); - - $result=$object->delete($user,'',$numsondage); - - $db->commit(); -} - - - /* * View */ @@ -77,16 +55,9 @@ print '
'."\n"; print_fiche_titre($langs->trans("OpenSurveyArea")); - -if ($action == 'delete') -{ - print $form->formconfirm($_SERVER["PHP_SELF"].'?&id='.$id, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll",$id), 'delete_confirm', '', '', 1); -} - - // tableau qui affiche tous les sondages de la base print ''."\n"; -print ''."\n"; +print ''."\n"; $sql = "SELECT id_sondage, mail_admin, format, date_fin, titre, nom_admin"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as p"; @@ -134,13 +105,6 @@ while ($i < min($num,$limit)) print ''; print''."\n"; - print ''."\n"; print ''."\n"; $i++; From c891f4afc486d05fccaa4018e847fd88bb3be758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 19:40:49 +0100 Subject: [PATCH 090/177] Fixed coding standard problems --- htdocs/opensurvey/wizard/choix_autre.php | 2 +- htdocs/opensurvey/wizard/choix_date.php | 2 +- htdocs/opensurvey/wizard/create_survey.php | 2 +- htdocs/opensurvey/wizard/index.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index 302cbfccf6a..092aa2d9535 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -28,7 +28,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); // Security check -if (!$user->rights->opensurvey->write) accessforbidden (); +if (!$user->rights->opensurvey->write) accessforbidden(); /* * Action diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index 25f6ddc2453..4783e461a07 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -28,7 +28,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); // Security check -if (!$user->rights->opensurvey->write) accessforbidden (); +if (!$user->rights->opensurvey->write) accessforbidden(); //le format du sondage est DATE $_SESSION["formatsondage"] = "D"; diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index a8169d9d5da..2bef67552c9 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -28,7 +28,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); // Security check -if (!$user->rights->opensurvey->write) accessforbidden (); +if (!$user->rights->opensurvey->write) accessforbidden(); $langs->load("opensurvey"); diff --git a/htdocs/opensurvey/wizard/index.php b/htdocs/opensurvey/wizard/index.php index fab1a86320d..87852231f80 100644 --- a/htdocs/opensurvey/wizard/index.php +++ b/htdocs/opensurvey/wizard/index.php @@ -29,7 +29,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); // Security check -if (!$user->rights->opensurvey->write) accessforbidden (); +if (!$user->rights->opensurvey->write) accessforbidden(); $langs->load("opensurvey"); From b32fafef17b0b84470ecda7c0f4ce4328c26153b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:10:39 +0100 Subject: [PATCH 091/177] Fixed problem with visualization of previous votes in poll voting page --- htdocs/opensurvey/public/studs.php | 247 +++++++++++++++-------------- 1 file changed, 125 insertions(+), 122 deletions(-) diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 4ac633e52f8..96aa63104eb 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -361,43 +361,112 @@ else // Loop on each answer -if ($object->allow_spy) { - $sumfor = array(); - $sumagainst = array(); - $compteur = 0; - $sql ="SELECT id_users, nom, id_sondage, reponses"; - $sql.=" FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; - $sql.=" WHERE id_sondage = '".$db->escape($numsondage)."'"; - dol_syslog('sql='.$sql); - $resql=$db->query($sql); - if (! $resql) - { - dol_print_error($db); - exit; +$sumfor = array(); +$sumagainst = array(); +$compteur = 0; +$sql ="SELECT id_users, nom, id_sondage, reponses"; +$sql.=" FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; +$sql.=" WHERE id_sondage = '".$db->escape($numsondage)."'"; +dol_syslog('sql='.$sql); +$resql=$db->query($sql); +if (! $resql) +{ + dol_print_error($db); + exit; +} +$num=$db->num_rows($resql); +while ($compteur < $num) +{ + $obj=$db->fetch_object($resql); + + $ensemblereponses = $obj->reponses; + + // ligne d'un usager pré-authentifié + $mod_ok = (in_array($obj->nom, $listofvoters)); + + if (!$mod_ok && !$object->allow_spy) { + $compteur++; + continue; } - $num=$db->num_rows($resql); - while ($compteur < $num) + + print ''."\n"; + + // Name + print ''."\n"; + + // si la ligne n'est pas a changer, on affiche les données + if (! $testligneamodifier) { - $obj=$db->fetch_object($resql); + for ($i = 0; $i < $nbcolonnes; $i++) + { + $car = substr($ensemblereponses, $i, 1); + //print 'xx'.$i."-".$car.'-'.$listofanswers[$i]['format'].'zz'; - $ensemblereponses = $obj->reponses; - - print ''."\n"; - - // ligne d'un usager pré-authentifié - $mod_ok = (! empty($nombase) && in_array($nombase, $listofvoters)); - - // Name - print ''."\n"; - - // si la ligne n'est pas a changer, on affiche les données - if (! $testligneamodifier) + if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) + { + if (((string) $car) == "1") print ''."\n"; + else print ''."\n"; + // Total + if (! isset($sumfor[$i])) $sumfor[$i] = 0; + if (((string) $car) == "1") $sumfor[$i]++; + } + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') + { + if (((string) $car) == "1") print ''."\n"; + else if (((string) $car) == "0") print ''."\n"; + else print ''."\n"; + // Total + if (! isset($sumfor[$i])) $sumfor[$i] = 0; + if (! isset($sumagainst[$i])) $sumagainst[$i] = 0; + if (((string) $car) == "1") $sumfor[$i]++; + if (((string) $car) == "0") $sumagainst[$i]++; + } + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') + { + if (((string) $car) == "1") print ''."\n"; + else if (((string) $car) == "0") print ''."\n"; + else print ''."\n"; + // Total + if (! isset($sumfor[$i])) $sumfor[$i] = 0; + if (! isset($sumagainst[$i])) $sumagainst[$i] = 0; + if (((string) $car) == "1") $sumfor[$i]++; + if (((string) $car) == "0") $sumagainst[$i]++; + } + } + } + else + { + //sinon on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs + if ($compteur == $ligneamodifier) + { + for ($i = 0; $i < $nbcolonnes; $i++) + { + $car = substr($ensemblereponses, $i, 1); + print ''."\n"; + } + } + else { for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); - //print 'xx'.$i."-".$car.'-'.$listofanswers[$i]['format'].'zz'; - if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) { if (((string) $car) == "1") print ''."\n"; @@ -408,8 +477,8 @@ if ($object->allow_spy) { } if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { - if (((string) $car) == "1") print ''."\n"; - else if (((string) $car) == "0") print ''."\n"; + if (((string) $car) == "1") print ''."\n"; + else if (((string) $car) == "0") print ''."\n"; else print ''."\n"; // Total if (! isset($sumfor[$i])) $sumfor[$i] = 0; @@ -430,97 +499,31 @@ if ($object->allow_spy) { } } } - else - { - //sinon on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs - if ($compteur == $ligneamodifier) - { - for ($i = 0; $i < $nbcolonnes; $i++) - { - $car = substr($ensemblereponses, $i, 1); - print ''."\n"; - } - } - else - { - for ($i = 0; $i < $nbcolonnes; $i++) - { - $car = substr($ensemblereponses, $i, 1); - if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) - { - if (((string) $car) == "1") print ''."\n"; - else print ''."\n"; - // Total - if (! isset($sumfor[$i])) $sumfor[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - } - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { - if (((string) $car) == "1") print ''."\n"; - else if (((string) $car) == "0") print ''."\n"; - else print ''."\n"; - // Total - if (! isset($sumfor[$i])) $sumfor[$i] = 0; - if (! isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; - } - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { - if (((string) $car) == "1") print ''."\n"; - else if (((string) $car) == "0") print ''."\n"; - else print ''."\n"; - // Total - if (! isset($sumfor[$i])) $sumfor[$i] = 0; - if (! isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; - } - } - } - } - - // Button edit at end of line - if ($compteur != $ligneamodifier && $mod_ok) - { - print ''."\n"; - } - - //demande de confirmation pour modification de ligne - for ($i=0; $i<$nblignes; $i++) - { - if (isset($_POST["modifierligne".$i])) - { - if ($compteur == $i) - { - print ''."\n"; - } - } - } - - $compteur++; - print ''."\n"; } + + // Button edit at end of line + if ($compteur != $ligneamodifier && $mod_ok) + { + print ''."\n"; + } + + //demande de confirmation pour modification de ligne + for ($i=0; $i<$nblignes; $i++) + { + if (isset($_POST["modifierligne".$i])) + { + if ($compteur == $i) + { + print ''."\n"; + } + } + } + + $compteur++; + print ''."\n"; } // Add line to add new record From 0f08fd3f06bd1864bba6e783ea70e8cc905faa5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:18:02 +0100 Subject: [PATCH 092/177] Replaced usage of htmlentities with dol_htmlentities --- htdocs/opensurvey/card.php | 12 ++++++------ htdocs/opensurvey/list.php | 4 ++-- htdocs/opensurvey/public/studs.php | 12 ++++++------ htdocs/opensurvey/results.php | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 48a537b25e9..c1515267c83 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -207,24 +207,24 @@ $adresseadmin=$object->mail_admin; print $langs->trans("Title") .''; // Auteur print ''; // Description print ''; // EMail @@ -330,7 +330,7 @@ if ($comments) { print ' '.img_picto('', 'delete.png').' '; } - print htmlentities($comment->usercomment).': '.dol_nl2br(htmlentities($comment->comment))."
"; + print dol_htmlentities($comment->usercomment).': '.dol_nl2br(dol_htmlentities($comment->comment))."
"; } } else diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 53a200b2d65..26754dcebac 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -94,11 +94,11 @@ while ($i < min($num,$limit)) print ''; print ''; + print ''; print ''."\n"; + print ''."\n"; } else { print ''."\n"; } @@ -392,7 +392,7 @@ while ($compteur < $num) print ''."\n"; // Name - print ''."\n"; + print ''."\n"; // si la ligne n'est pas a changer, on affiche les données if (! $testligneamodifier) @@ -650,7 +650,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) { else { $tmps=explode('@',$toutsujet[$i]); - $meilleursujet .= htmlentities($tmps[0]); + $meilleursujet .= dol_htmlentities($tmps[0]); } $compteursujet++; @@ -689,7 +689,7 @@ if ($comments) foreach ($comments as $obj) { print '
'; if (in_array($obj->usercomment, $listofvoters)) print ' '.img_picto('', 'delete.png').' '; - print htmlentities($obj->usercomment).' : '.dol_nl2br(htmlentities($obj->comment))."
"; + print dol_htmlentities($obj->usercomment).' :'.dol_nl2br(dol_htmlentities($obj->comment)).""; } } diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index cac6f7a4a9e..fe4c53d3390 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -691,7 +691,7 @@ if ($object->format=="D"||$object->format=="D+") for ($i = 0; isset($toutsujet[$i]); $i++) { $heures=explode('@', $toutsujet[$i]); if (isset($heures[1])) { - print ''."\n"; + print ''."\n"; } else { print ''."\n"; } @@ -714,7 +714,7 @@ else for ($i = 0; isset($toutsujet[$i]); $i++) { $tmp=explode('@',$toutsujet[$i]); - print ''."\n"; + print ''."\n"; } print ''."\n"; @@ -750,7 +750,7 @@ while ($compteur < $num) } // Name - print ''."\n"; + print ''."\n"; // si la ligne n'est pas a changer, on affiche les données if (! $testligneamodifier) @@ -1017,7 +1017,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) { else { $tmps=explode('@',$toutsujet[$i]); - $meilleursujet .= htmlentities($tmps[0]); + $meilleursujet .= dol_htmlentities($tmps[0]); } $compteursujet++; From b68f5b62516e7d1c0f47168cbabfa4a2a4984fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:21:06 +0100 Subject: [PATCH 093/177] Removed unexisting input checks --- htdocs/opensurvey/results.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index fe4c53d3390..ad424dd20df 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -52,7 +52,7 @@ $nblignes=count($object->fetch_lines()); $nbcolonnes = substr_count($object->sujet, ',') + 1; // Add vote -if (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"])) +if (isset($_POST["boutonp"])) { if (GETPOST('nom')) { @@ -275,7 +275,7 @@ if (isset($_POST["ajoutercolonne"]) && ($object->format == "D" || $object->forma // Delete line for ($i = 0; $i < $nblignes; $i++) { - if (isset($_POST["effaceligne$i"]) || isset($_POST['effaceligne'.$i.'_x'])) + if (isset($_POST["effaceligne$i"])) { // Security check if (!$user->rights->opensurvey->write) accessforbidden(); @@ -310,7 +310,7 @@ for ($i = 0; $i < $nblignes; $i++) // Delete column for ($i = 0; $i < $nbcolonnes; $i++) { - if ((isset($_POST["effacecolonne$i"]) || isset($_POST['effacecolonne'.$i.'_x'])) && $nbcolonnes > 1) + if (isset($_POST["effacecolonne$i"]) && $nbcolonnes > 1) { // Security check if (!$user->rights->opensurvey->write) accessforbidden(); @@ -979,7 +979,7 @@ if ($nbofcheckbox >= 2) } // S'il a oublié de remplir un nom -if ((isset($_POST["boutonp"]) || isset($_POST["boutonp_x"])) && $_POST["nom"] == "") { +if (isset($_POST["boutonp"]) && $_POST["nom"] == "") { setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name")), 'errors'); } From ef44db8bd86828aa1e6c896ca17afc1aae845c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:28:32 +0100 Subject: [PATCH 094/177] Removed unused constants & functions and added new comment insert error message --- htdocs/langs/en_US/opensurvey.lang | 1 + htdocs/opensurvey/card.php | 2 +- htdocs/opensurvey/fonctions.php | 32 ------------------------------ htdocs/opensurvey/public/studs.php | 2 +- htdocs/opensurvey/results.php | 2 +- 5 files changed, 4 insertions(+), 35 deletions(-) diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 9f9f3fe3abc..5c24f982aba 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -65,4 +65,5 @@ BackToCurrentMonth=Back to current month ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation ErrorOpenSurveyOneChoice=Enter at least one choice ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY +ErrorInsertingComment=There was an error while inserting your comment MoreChoices=Enter more choices for the voters \ No newline at end of file diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index c1515267c83..83e14232e8f 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -130,7 +130,7 @@ if (GETPOST('ajoutcomment')) if (! $resql) { - $err |= COMMENT_INSERT_FAILED; + setEventMessage($langs->trans('ErrorInsertingComment'), 'errors'); } } } diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index b3aa1c15cfc..be7b25005c2 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -144,24 +144,6 @@ function get_server_name() return $url; } - -/** - * is_error - * - * @param unknown_type $cerr error number - * @return boolean Error key found or not - */ -function is_error($cerr) -{ - global $err; - if ( $err == 0 ) { - return false; - } - - return (($err & $cerr) != 0 ); -} - - /** * Fonction vérifiant l'existance et la valeur non vide d'une clé d'un tableau * @@ -264,18 +246,4 @@ function ajouter_sondage() exit(); } - - -define('COMMENT_EMPTY', 0x0000000001); -define('COMMENT_USER_EMPTY', 0x0000000010); -define('COMMENT_INSERT_FAILED', 0x0000000100); -define('NAME_EMPTY', 0x0000001000); -define('NAME_TAKEN', 0x0000010000); -define('NO_POLL', 0x0000100000); -define('NO_POLL_ID', 0x0001000000); -define('INVALID_EMAIL', 0x0010000000); -define('TITLE_EMPTY', 0x0100000000); -define('INVALID_DATE', 0x1000000000); -$err = 0; - ?> diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 3a4b92e7337..2b8e02c31e0 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -546,7 +546,7 @@ if ($ligneamodifier < 0 && (! isset($_SESSION['nom']))) if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) { print ' Date: Sun, 5 Jan 2014 20:30:53 +0100 Subject: [PATCH 095/177] Removed space before colon --- htdocs/opensurvey/public/studs.php | 6 +++--- htdocs/opensurvey/results.php | 12 ++++++------ htdocs/opensurvey/wizard/choix_autre.php | 2 +- htdocs/opensurvey/wizard/choix_date.php | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 2b8e02c31e0..ec3d50b2026 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -684,12 +684,12 @@ $comments = $object->getComments(); if ($comments) { - print "
" . $langs->trans("CommentsOfVoters") . " :
\n"; + print "
" . $langs->trans("CommentsOfVoters") . ":
\n"; foreach ($comments as $obj) { print '
'; if (in_array($obj->usercomment, $listofvoters)) print ' '.img_picto('', 'delete.png').' '; - print dol_htmlentities($obj->usercomment).' : '.dol_nl2br(dol_htmlentities($obj->comment))."
"; + print dol_htmlentities($obj->usercomment).': '.dol_nl2br(dol_htmlentities($obj->comment)).""; } } @@ -698,7 +698,7 @@ if ($object->allow_comments) { print '
' .$langs->trans("AddACommentForPoll") . "
\n"; print '
'."\n"; - print $langs->trans("Name") .' : '; + print $langs->trans("Name") .': '; print '   '."\n"; print '
'."\n"; print ''."\n"; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index cf5086907e6..cf8488474a5 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -484,7 +484,7 @@ if (GETPOST('ajoutsujet')) // Add new column if ($object->format=="A"||$object->format=="A+") { - print $langs->trans("AddNewColumn") .' :

'; + print $langs->trans("AddNewColumn") .':

'; print $langs->trans("Title").'
'; $tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList")); print $langs->trans("Type").' '.$form->selectarray("typecolonne", $tmparray, GETPOST('typecolonne')).'

'; @@ -499,7 +499,7 @@ if (GETPOST('ajoutsujet')) $formother=new FormOther($db); //ajout d'une date avec creneau horaire - print $langs->trans("AddADate") .' :

'."\n"; + print $langs->trans("AddADate") .':

'."\n"; print ' '."\n"; print ''."\n"; for ($i = 0; $i < 24; $i++) { @@ -527,7 +527,7 @@ if (GETPOST('ajoutsujet')) print ''."\n"; print ''."\n"; print ''."\n"; - print '

'. $langs->trans("AddEndHour") .' :

'."\n"; + print '

'. $langs->trans("AddEndHour") .':

'."\n"; print '
'."\n"; diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index 4783e461a07..0d78e5969b0 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -494,7 +494,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) { //affichage des jours print '
'."\n"; - print ''. $langs->trans("SelectedDays") .' :'."
\n"; + print ''. $langs->trans("SelectedDays") .':'."
\n"; print $langs->trans("SelectDayDesc")."
\n"; print '
'. $langs->trans("Ref").''. $langs->trans("Title") .''. $langs->trans("Type") .''. $langs->trans("Author") .''. $langs->trans("ExpireDate") .''. $langs->trans("NbOfVoters") .' 
'. $langs->trans("Ref").''. $langs->trans("Title") .''. $langs->trans("Type") .''. $langs->trans("Author") .''. $langs->trans("ExpireDate") .''. $langs->trans("NbOfVoters") .''.$nbuser.''; - - if ($user->rights->opensurvey->write) { - print ''.img_picto('', 'delete.png').''; - } - - print '
'.htmlentities($obj->nom).'
'.htmlentities($obj->nom).'OKKO'.$langs->trans("Yes").''.$langs->trans("No").' '.$langs->trans("For").''.$langs->trans("Against").' '; + if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) + { + print ''; + } + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') + { + $arraychoice=array('2'=>' ','0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")); + print $form->selectarray("choix".$i, $arraychoice, $car); + } + if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') + { + $arraychoice=array('2'=>' ','0'=>$langs->trans("Against"),'1'=>$langs->trans("For")); + print $form->selectarray("choix".$i, $arraychoice, $car); + } + print 'OK'.$langs->trans("Yes").''.$langs->trans("No").''.$langs->trans("For").''.$langs->trans("Against").' '; - if (empty($listofanswers[$i]['format']) || ! in_array($listofanswers[$i]['format'],array('yesno','foragainst'))) - { - print ''; - } - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { - $arraychoice=array('2'=>' ','0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")); - print $form->selectarray("choix".$i, $arraychoice, $car); - } - if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { - $arraychoice=array('2'=>' ','0'=>$langs->trans("Against"),'1'=>$langs->trans("For")); - print $form->selectarray("choix".$i, $arraychoice, $car); - } - print 'OKKO'.$langs->trans("For").''.$langs->trans("Against").' '.$langs->trans("For").''.$langs->trans("Against").' '; - print ''; - print ''; - print '
'; + print ''; + print ''; + print '
'; if ($action == 'edit') { - print ''; + print ''; } -else print htmlentities($object->titre); +else print dol_htmlentities($object->titre); print '
'; print $langs->trans("Author") .''; -print htmlentities($object->nom_admin); +print dol_htmlentities($object->nom_admin); print '
'.$langs->trans("Description") .''; if ($action == 'edit') { - print ''."\n"; + print ''."\n"; } -else print dol_nl2br(htmlentities($object->commentaires)); +else print dol_nl2br(dol_htmlentities($object->commentaires)); print '
'; print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; - print ''.htmlentities($obj->titre).''; + print ''.dol_htmlentities($obj->titre).''; $type=($obj->format=='A' || $obj->format=='A+')?'classic':'date'; print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate"); - print ''.htmlentities($obj->nom_admin).''.dol_htmlentities($obj->nom_admin).''.dol_print_date($db->jdate($obj->date_fin),'day'); if ($db->jdate($obj->date_fin) < time()) { print ' '.img_warning(); } diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 96aa63104eb..3a4b92e7337 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -240,12 +240,12 @@ print '
'."\n"; //affichage du titre du sondage $titre=str_replace("\\","",$object->titre); -print ''.htmlentities($titre).'
'."\n"; +print ''.dol_htmlentities($titre).'
'."\n"; //affichage des commentaires du sondage if ($object->commentaires) { - $commentaires=dol_nl2br(htmlentities($object->commentaires)); + $commentaires=dol_nl2br(dol_htmlentities($object->commentaires)); print $commentaires; print '
'."\n"; } @@ -335,7 +335,7 @@ if ($object->format=="D"||$object->format=="D+") for ($i=0; isset($toutsujet[$i]); $i++) { $heures=explode('@',$toutsujet[$i]); if (isset($heures[1])) { - print '
'.htmlentities($heures[1]).''.dol_htmlentities($heures[1]).'
'.htmlentities($obj->nom).''.dol_htmlentities($obj->nom).' '.htmlentities($heures[1]).''.dol_htmlentities($heures[1]).''.htmlentities($tmp[0]).''.dol_htmlentities($tmp[0]).''.img_picto('',dol_buildpath('/opensurvey/img/add-16.png',1),'',1).''.htmlentities($obj->nom).''.dol_htmlentities($obj->nom).'
'. $langs->trans("TitleChoice") .' '.$j.' : '; + print '
'. $langs->trans("TitleChoice") .' '.$j.': '; $tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList")); print '   '.$langs->trans("Type").' '.$form->selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]); print '
'."\n"; print ''."\n"; From 1afdce2c16b84982c23d8402b97929563f202ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:34:43 +0100 Subject: [PATCH 096/177] Cancel button when adding a new poll column was not working --- htdocs/opensurvey/results.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index cf8488474a5..cf403949994 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -49,6 +49,12 @@ $nblignes=count($object->fetch_lines()); * Actions */ +//Return to the results +if (GETPOST('retoursondage')) { + header('Location: results.php?id='.$_GET['id']); + die; +} + $nbcolonnes = substr_count($object->sujet, ',') + 1; // Add vote @@ -467,7 +473,6 @@ print ''.$langs print ''; - // Add form to add a field if (GETPOST('ajoutsujet')) { From 60cff505a71f243df38af0c4521121c543069b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:36:40 +0100 Subject: [PATCH 097/177] Fixed always-checked mail when a new person votes feature --- htdocs/opensurvey/wizard/create_survey.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 2bef67552c9..ad849ded5bb 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -60,8 +60,7 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) $_SESSION["adresse"] = $adresse; $_SESSION["commentaires"] = $commentaires; - unset($_SESSION["mailsonde"]); - if ($mailsonde !== null) { + if (GETPOST('mailsonde') == 'on') { $_SESSION["mailsonde"] = true; } else { $_SESSION["mailsonde"] = false; From a15806715015f2cb323574550f93df86eb1095c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:39:53 +0100 Subject: [PATCH 098/177] Improved error feedback when empty required inputs are submitted --- htdocs/langs/en_US/opensurvey.lang | 1 - htdocs/opensurvey/wizard/create_survey.php | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index 5c24f982aba..ce6987f4bac 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -14,7 +14,6 @@ OpenSurveyYourEMail=Your email address ToReceiveEMailForEachVote=To receive an email for each vote TypeDate=Type date TypeClassic=Type standard -FieldMandatory=Field mandatory OpenSurveyStep2=Select your dates amoung the free days (green). The selected days are in blue. You can unselect a day previously selected by clicking again on it RemoveAllDays=Remove all days CopyHoursOfFirstDay=Copy hours of first day diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index ad849ded5bb..6e1927b7f2b 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -142,7 +142,7 @@ print '
'."\n"; print ''."\n"; if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { - setEventMessage($langs->trans("FieldMandatory"), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PollTitle")), 'errors'); } print ''."\n"; @@ -154,7 +154,7 @@ print 'trans("FieldMandatory"), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("OpenSurveyYourName")), 'errors'); } print ''."\n"; @@ -164,7 +164,7 @@ print 'trans("FieldMandatory"), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("OpenSurveyYourEMail")), 'errors'); } elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { $langs->load('errors'); From 291267953a2c3e9bb1f0c480205edd5070c7edbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:46:45 +0100 Subject: [PATCH 099/177] =?UTF-8?q?Added=20a=20new=20check=20to=20don?= =?UTF-8?q?=E2=80=99t=20allow=20users=20create=20standard=20polls=20withou?= =?UTF-8?q?t=20any=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/opensurvey/wizard/choix_autre.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index d388e60c111..c02fe4822db 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -80,7 +80,7 @@ if (isset($_POST["confirmecreation"])) } //message d'erreur si aucun champ renseigné - if ($testremplissage != "ok") { + if ($testremplissage != "ok" || (!$toutchoix)) { setEventMessage($langs->trans("ErrorOpenSurveyOneChoice"), 'errors'); } else { From 1e6c0c0b1a557e6b189c54bf813594d208d75a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:48:20 +0100 Subject: [PATCH 100/177] There is no poll format A+ or D+ --- htdocs/opensurvey/card.php | 2 +- htdocs/opensurvey/exportcsv.php | 2 +- htdocs/opensurvey/list.php | 2 +- htdocs/opensurvey/public/studs.php | 4 ++-- htdocs/opensurvey/results.php | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 83e14232e8f..ca43feb70a2 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -196,7 +196,7 @@ print ''; print ''; // Type -$type=($object->format=="A"||$object->format=="A+")?'classic':'date'; +$type=($object->format=="A")?'classic':'date'; print ''; diff --git a/htdocs/opensurvey/exportcsv.php b/htdocs/opensurvey/exportcsv.php index 12e5fbb0489..ec48b65ce17 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -59,7 +59,7 @@ $toutsujet=explode(",",$object->sujet); $input.=$langs->trans("Name").";"; for ($i=0;$toutsujet[$i];$i++) { - if ($object->format=="D"||$object->format=="D+") + if ($object->format=="D") { $input.=''.dol_print_date($toutsujet[$i],'dayhour').';'; } else { diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 26754dcebac..d5554315194 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -95,7 +95,7 @@ while ($i < min($num,$limit)) print ''; diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index ec3d50b2026..a8274ddeb79 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -262,7 +262,7 @@ print '

'."\n"; print '
'. $langs->trans("PollTitle") .'
'.$langs->trans("Type").''; print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate").'
'; print ''.img_picto('','object_opensurvey').' '.$obj->id_sondage.''; print ''.dol_htmlentities($obj->titre).''; - $type=($obj->format=='A' || $obj->format=='A+')?'classic':'date'; + $type=($obj->format=='A')?'classic':'date'; print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate"); print ''.dol_htmlentities($obj->nom_admin).'
'."\n"; // Show choice titles -if ($object->format=="D"||$object->format=="D+") +if ($object->format=="D") { //affichage des sujets du sondage print ''."\n"; @@ -637,7 +637,7 @@ $meilleursujet = ''; for ($i = 0; $i < $nbcolonnes; $i++) { if (isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) { $meilleursujet.=", "; - if ($object->format=="D"||$object->format=="D+") { + if ($object->format=="D") { $meilleursujetexport = $toutsujet[$i]; if (strpos($toutsujet[$i], '@') !== false) { diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index cf403949994..2d6796024af 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" || $object->format == "A+")) +if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format == "A")) { // Security check if (!$user->rights->opensurvey->write) accessforbidden(); @@ -178,7 +178,7 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format } // Add column (with format date) -if (isset($_POST["ajoutercolonne"]) && ($object->format == "D" || $object->format == "D+")) +if (isset($_POST["ajoutercolonne"]) && ($object->format == "D")) { // Security check if (!$user->rights->opensurvey->write) accessforbidden(); @@ -443,7 +443,7 @@ print ''; print ''; // Type -$type=($object->format=="A"||$object->format=="A+")?'classic':'date'; +$type=($object->format=="A")?'classic':'date'; print ''; @@ -487,7 +487,7 @@ if (GETPOST('ajoutsujet')) print "

"."\n"; // Add new column - if ($object->format=="A"||$object->format=="A+") + if ($object->format=="A") { print $langs->trans("AddNewColumn") .':

'; print $langs->trans("Title").'
'; @@ -593,7 +593,7 @@ print ''."\n"; // Show choice titles -if ($object->format=="D"||$object->format=="D+") +if ($object->format=="D") { //affichage des sujets du sondage print '
'."\n"; @@ -1009,7 +1009,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) { if (isset($sumfor[$i]) === true && isset($meilleurecolonne) === true && $sumfor[$i] == $meilleurecolonne) { $meilleursujet.=", "; - if ($object->format == "D" || $object->format == "D+") { + if ($object->format == "D") { $meilleursujetexport = $toutsujet[$i]; if (strpos($toutsujet[$i], '@') !== false) { From 224208c9bbbbc3d4db09d9d833fb5166795f3800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 20:58:27 +0100 Subject: [PATCH 101/177] Unified comment deletion in Opensurveysondage::deleteComment --- htdocs/opensurvey/card.php | 3 +-- .../class/opensurveysondage.class.php | 17 +++++++++++++++++ htdocs/opensurvey/public/studs.php | 3 +-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index ca43feb70a2..474d7db85f4 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -142,8 +142,7 @@ if ($idcomment) // Security check if (!$user->rights->opensurvey->write) accessforbidden(); - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$idcomment; - $resql = $db->query($sql); + $resql = $object->deleteComment($idcomment); } if ($action == 'edit') { diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 5d532fead5b..45c58688969 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -478,6 +478,23 @@ class Opensurveysondage extends CommonObject return true; } + /** + * Deletes a comment of the poll + * + * @param int $id_comment Id of the comment + * @return boolean False in case of the query fails, true if it was successful + */ + public function deleteComment($id_comment) { + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$id_comment.' AND id_sondage = '.$this->id_sondage; + $resql = $this->db->query($sql); + + if (!$resql) { + return false; + } + + return true; + } + /** * Cleans all the class variables before doing an update or an insert * diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index a8274ddeb79..6042aafd37b 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -205,8 +205,7 @@ if ($testmodifier) $idcomment=GETPOST('deletecomment','int'); if ($idcomment) { - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$idcomment; - $resql = $db->query($sql); + $resql = $object->deleteComment($idcomment); } From b12b7d965a9dcf1e21c4a63dd98d548504112bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 21:00:54 +0100 Subject: [PATCH 102/177] =?UTF-8?q?Fixed=20=E2=80=9Ccancel=E2=80=9D=20butt?= =?UTF-8?q?on=20on=20creation=20in=20new=20column=20of=20standard=20poll?= =?UTF-8?q?=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/opensurvey/results.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 2d6796024af..81242a56ae1 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -495,7 +495,7 @@ if (GETPOST('ajoutsujet')) print $langs->trans("Type").' '.$form->selectarray("typecolonne", $tmparray, GETPOST('typecolonne')).'

'; print ''; print '     '; - print ''; + print ''; print '

'."\n"; } else From e7d2765fc6294ebf8eb7ebe1bbfac06d8edd89d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 21:08:37 +0100 Subject: [PATCH 103/177] Replaced use of htmlentities with dol_htmlentities --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1ec90826662..6ffb94a1bc9 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -968,8 +968,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs $appli='Dolibarr'; if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE; - if ($title) print ''.$appli.' - '.htmlentities($title).''; - else print "".$appli.""; + if ($title) print ''.dol_htmlentities($appli.' - '.$title).''; + else print "".dol_htmlentities($appli).""; print "\n"; if (! defined('DISABLE_JQUERY') && ! $disablejs && $conf->use_javascript_ajax) From 45aa6767e0f503b6728da1f7d67f20ea176cffd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 21:20:08 +0100 Subject: [PATCH 104/177] Return back to the results page when a new column is created --- htdocs/opensurvey/results.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 81242a56ae1..769eb3e2d51 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -175,6 +175,9 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format dol_syslog("sql=".$sql); $resql = $db->query($sql); if (! $resql) dol_print_error($db); + else { + header('Location: results.php?id='.$object->id_sondage); + } } // Add column (with format date) @@ -267,6 +270,9 @@ if (isset($_POST["ajoutercolonne"]) && ($object->format == "D")) dol_syslog("sql=".$sql); $resql = $db->query($sql); if (! $resql) dol_print_error($db); + else { + header('Location: results.php?id='.$object->id_sondage); + } } } From aa25d2cb8123df5ad6ba855286abfe23ab6fa573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 21:23:00 +0100 Subject: [PATCH 105/177] End date of the survey was altered when creating a new column in date poll format --- htdocs/opensurvey/results.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 769eb3e2d51..365ea3cd9e3 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -260,19 +260,8 @@ if (isset($_POST["ajoutercolonne"]) && ($object->format == "D")) dol_syslog("sql=".$sql); $resql = $db->query($sql); if (! $resql) dol_print_error($db); - - if ($nouvelledate > strtotime($object->date_fin)) - { - $date_fin=$nouvelledate+200000; - $sql = 'UPDATE '.MAIN_DB_PREFIX.'opensurvey_sondage'; - $sql.= " SET date_fin = '".$db->escape($date_fin)."'"; - $sql.= " WHERE id_sondage = '".$db->escape($numsondage)."'"; - dol_syslog("sql=".$sql); - $resql = $db->query($sql); - if (! $resql) dol_print_error($db); - else { - header('Location: results.php?id='.$object->id_sondage); - } + else { + header('Location: results.php?id='.$object->id_sondage); } } From ff7e4e49f3a517c1662f8986c1adfdffed99c601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 21:54:12 +0100 Subject: [PATCH 106/177] Limiting the voting time of the survey --- htdocs/langs/en_US/opensurvey.lang | 3 ++- htdocs/opensurvey/public/studs.php | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index ce6987f4bac..d598a385f00 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -65,4 +65,5 @@ ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll ErrorOpenSurveyOneChoice=Enter at least one choice ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY ErrorInsertingComment=There was an error while inserting your comment -MoreChoices=Enter more choices for the voters \ No newline at end of file +MoreChoices=Enter more choices for the voters +SurveyExpiredInfo=The voting time of this poll has expired. \ No newline at end of file diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 6042aafd37b..9eac7face2c 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -45,6 +45,9 @@ if ($result <= 0) dol_print_error('','Failed to get survey id '.$numsondage); $nblignes=count($object->fetch_lines()); +//If the survey has not yet finished, then it can be modified +$canbemodified = ($object->date_fin > dol_now()); + /* * Actions @@ -57,6 +60,8 @@ $listofvoters=explode(',',$_SESSION["savevoter"]); // Add comment if (GETPOST('ajoutcomment')) { + if (!$canbemodified) accessforbidden(); + $error=0; if (! GETPOST('comment')) @@ -82,8 +87,10 @@ if (GETPOST('ajoutcomment')) } // Add vote -if (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"])) +if (isset($_POST["boutonp"])) { + if (!$canbemodified) accessforbidden(); + //Si le nom est bien entré if (GETPOST('nom')) { @@ -190,6 +197,8 @@ if ($testmodifier) $nouveauchoix.="0"; } } + + if (!$canbemodified) accessforbidden(); $idtomodify=$_POST["idtomodify".$modifier]; $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_user_studs"; @@ -205,6 +214,8 @@ if ($testmodifier) $idcomment=GETPOST('deletecomment','int'); if ($idcomment) { + if (!$canbemodified) accessforbidden(); + $resql = $object->deleteComment($idcomment); } @@ -251,6 +262,16 @@ if ($object->commentaires) print ''."\n"; +//The survey has expired, users can't vote or do any action +if (!$canbemodified) { + + print '

'.$langs->trans('SurveyExpiredInfo').'

'; + llxFooterSurvey(); + + $db->close(); + die; +} + print '
'."\n"; print ''; From b8b7dbbed4a65575351acdf43468c4090022242d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 22:05:56 +0100 Subject: [PATCH 107/177] Created triggers OPENSURVEY_CREATE and OPENSURVEY_DELETE --- ChangeLog | 2 +- .../class/opensurveysondage.class.php | 22 +++++++------------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index e85b76eaebc..7f320073bed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,7 +17,7 @@ For developers: - New: More phpunit tests. - New: Payments and supplier payment pages tabs can now be extended from modules. - New: Opensurvey polls tab cards can now be extended from external modules. - +- New: Triggers OPENSURVEY_CREATE, OPENSURVEY_DELETE ***** ChangeLog for 3.5 compared to 3.4.* ***** For users: diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 45c58688969..7630cb39e8e 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -134,14 +134,11 @@ class Opensurveysondage extends CommonObject { if (! $notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. - //// Call triggers - //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); - //if ($result < 0) { $error++; $this->errors=$interface->errors; } + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('OPENSURVEY_CREATE',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } } @@ -331,14 +328,11 @@ class Opensurveysondage extends CommonObject { if (! $notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. - //// Call triggers - //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); - //if ($result < 0) { $error++; $this->errors=$interface->errors; } + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('OPENSURVEY_DELETE',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } //// End call triggers } } From e0c7eb545c79fcaffb1775477e92a6f13ad0d62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 05:08:42 +0100 Subject: [PATCH 108/177] Email and poll author are now retrieved from the logged user --- .../install/mysql/migration/3.5.0-3.6.0.sql | 3 +- .../mysql/tables/llx_opensurvey_sondage.sql | 1 + htdocs/opensurvey/card.php | 26 ++++++++---- .../class/opensurveysondage.class.php | 18 +++++--- htdocs/opensurvey/fonctions.php | 8 +++- htdocs/opensurvey/list.php | 18 +++++++- htdocs/opensurvey/public/studs.php | 42 ++++++++----------- htdocs/opensurvey/wizard/choix_autre.php | 2 +- htdocs/opensurvey/wizard/choix_date.php | 2 +- htdocs/opensurvey/wizard/create_survey.php | 33 ++------------- 10 files changed, 78 insertions(+), 75 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 4d85adb9782..6a189c4c756 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -24,4 +24,5 @@ ALTER TABLE `llx_opensurvey_sondage` DROP INDEX `idx_id_sondage_admin` ; ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `id_sondage_admin` ; ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `canedit` ; ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_spy` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allow_comments` ; -ALTER TABLE `llx_opensurvey_sondage` DROP `origin` ; \ No newline at end of file +ALTER TABLE `llx_opensurvey_sondage` DROP `origin` ; +ALTER TABLE `llx_opensurvey_sondage` ADD `fk_user_creat` INT( 11 ) UNSIGNED NOT NULL AFTER `nom_admin` ; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index ce4add9e9f5..db1231588f3 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -20,6 +20,7 @@ CREATE TABLE llx_opensurvey_sondage ( commentaires text, mail_admin VARCHAR(128), nom_admin VARCHAR(64), + fk_user_creat INT(11) UNSIGNED NOT NULL, titre TEXT, date_fin DATETIME, format VARCHAR(2), diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 474d7db85f4..1fac0c16ed8 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -211,10 +211,17 @@ if ($action == 'edit') else print dol_htmlentities($object->titre); print '
'; -// Auteur +// Author print ''; // Description @@ -227,13 +234,16 @@ else print dol_nl2br(dol_htmlentities($object->commentaires)); print ''; // EMail -print ''; } -else print dol_print_email($object->mail_admin); -print ''; // Receive an email with each vote print ''; print ''; // Users can comment From fc7d3d47713ffd7cc3d47cea85ca1c274ec03fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 05:39:22 +0100 Subject: [PATCH 115/177] Modified migration script to not remove columns --- .../install/mysql/migration/3.5.0-3.6.0.sql | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 01fbbd4ddeb..4e0b0192d79 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -18,15 +18,15 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); ALTER TABLE llx_bookmark ADD COLUMN entity integer DEFAULT 1 NOT NULL; -ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_comments` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT 1 AFTER `canedit` ; -ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `survey_link_visible` ; -ALTER TABLE `llx_opensurvey_sondage` DROP INDEX `idx_id_sondage_admin` ; -ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `id_sondage_admin` ; -ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `canedit` ; -ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_spy` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allow_comments` ; -ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `origin` ; -ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `fk_user_creat` INT( 11 ) UNSIGNED NOT NULL AFTER `nom_admin` ; -ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `mailsonde` `mailsonde` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `titre` `titre` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `date_fin` `date_fin` DATETIME NOT NULL; -ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `format` `format` VARCHAR( 2 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; \ No newline at end of file +ALTER TABLE llx_opensurvey_sondage ADD COLUMN allow_comments TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT 1 AFTER canedit ; +-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN survey_link_visible ; +ALTER TABLE llx_opensurvey_sondage DROP INDEX idx_id_sondage_admin ; +-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN id_sondage_admin ; +-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN canedit ; +ALTER TABLE llx_opensurvey_sondage ADD COLUMN allow_spy TINYINT( 1 ) UNSIGNED NOT NULL AFTER allow_comments ; +-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN origin ; +ALTER TABLE llx_opensurvey_sondage ADD COLUMN fk_user_creat INT( 11 ) UNSIGNED NOT NULL AFTER nom_admin ; +ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN mailsonde mailsonde TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN titre titre TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN date_fin date_fin DATETIME NOT NULL; +ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN format format VARCHAR( 2 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; \ No newline at end of file From 2313ea01dda16f3dc73c718bee2bf1c38291fa49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 05:46:47 +0100 Subject: [PATCH 116/177] Updated changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 7f320073bed..15e06d16728 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ For users: - New: Add graph stats for suppliers orders in tab "stats" on products. - New: Add option MAIN_HIDE_INACTIVETAB_ON_PRINT to hide inactive tabs when you use the "print" view on screen. +- New: Improved Opensurvey module and added options to disable comments and disable public votes For translators: - Update language files. From 0622fc4ffdc5603ebd1a5a98337c7ead5155471e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 06:03:26 +0100 Subject: [PATCH 117/177] Added missing translation key --- htdocs/langs/en_US/companies.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index d999442f84d..b5c2a7339f8 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -82,6 +82,7 @@ DefaultLang=Language by default VATIsUsed=VAT is used VATIsNotUsed=VAT is not used CopyAddressFromSoc=Fill address with thirdparty address +NoEmailDefined=There is no email defined ##### Local Taxes ##### LocalTax1IsUsedES= RE is used LocalTax1IsNotUsedES= RE is not used From 2a41a29306ce3d377b76d9c2f0f6afc2de2e2ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 06:05:14 +0100 Subject: [PATCH 118/177] Fixed bad translation --- htdocs/langs/en_US/compta.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 139807eaa20..b505efef8bc 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -160,9 +160,9 @@ AccountancyDashboard=Accountancy summary ByProductsAndServices=By products and services RefExt=External ref ToCreateAPredefinedInvoice=To create a predefined invoice, create a standard invoice then, without validating it, click onto button "Convert to predefined invoice". -LinkedOrder=linked to command +LinkedOrder=linked to order ReCalculate=Recalculate -Mode1=Methode 1 +Mode1=Method 1 Mode2=Method 2 CalculationRuleDesc=To calculate total VAT, there is two methods:
Method 1 is rounding vat on each line, then summing them.
Method 2 is summing all vat on each line, then rounding result.
Final result may differs from few cents. Default mode is mode %s. CalculationRuleDescSupplier=according to supplier, choose appropriate method to apply same calculation rule and get same result expected by your supplier. From 7afdad60a04cfa89348773700e2e169e9c6cf43c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jan 2014 12:42:50 +0100 Subject: [PATCH 119/177] Fix: [ bug #1208 ] Users without read permission on the tasks can still see all project tasks --- htdocs/core/lib/project.lib.php | 18 +++++++++++++++++- htdocs/projet/tasks/index.php | 4 ++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 5e096760fce..1fc2592c6a5 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -257,6 +257,22 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } } } + else + { + // Caller did not ask to filter on tasks of a specific user (this probably means he want also tasks of all users, into public project + // or into all other projects if user has permission to). + if (empty($user->rights->project->all->lire)) + { + // User is not allowed on this project and project is not public, so we hide line + if (! in_array($lines[$i]->fk_project, $projectsArrayId)) + { + // TODO + // If user is assigned to a task into a private project user has no permission on, we must use showlinegray=1 (to show task without showing project) + // if user is not assigned to any task into tree, we must use showline=0 + $showline=0; + } + } + } if ($showline) { @@ -367,7 +383,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if (! $showlineingray) $inc++; $level++; - if ($lines[$i]->id) projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId); + if ($lines[$i]->id) projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId, 0, $showalsopublicproj); $level--; $total += $lines[$i]->duration; } diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index 077a56c1976..8795cf98486 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -80,7 +80,7 @@ else else print $langs->trans("ProjectsPublicDesc").'

'; } -// Get list of project id allowed to user +// Get list of project id allowed to user (in a string list separated by coma) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1,$socid); // Get list of tasks in tasksarray and taskarrayfiltered @@ -121,7 +121,7 @@ print "\n"; // Show all lines in taskarray (recursive function to go down on tree) $j=0; $level=0; -$nboftaskshown=projectLinesa($j, 0, $tasksarray, $level, true, 1, $tasksrole, $projectsListId); +$nboftaskshown=projectLinesa($j, 0, $tasksarray, $level, true, 1, $tasksrole, $projectsListId, 0); print "
'.$langs->trans("Type").''; print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate").'
'; print $langs->trans("Author") .''; -print dol_htmlentities($object->nom_admin); +if ($object->fk_user_creat) { + $userstatic = new User($db); + $userstatic->fetch($object->fk_user_creat); + + print $userstatic->getLoginUrl(1); +} else { + print dol_htmlentities($object->nom_admin); +} print '
'.$langs->trans("EMail") .''; -if ($action == 'edit') -{ - print ''; +//If linked user, then emails are going to be sent to users' email +if (!$object->fk_user_creat) { + print '
'.$langs->trans("EMail") .''; + if ($action == 'edit') + { + print ''; + } + else print dol_print_email($object->mail_admin); + print '
'.$langs->trans('ToReceiveEMailForEachVote').''; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 7630cb39e8e..a4f81ced81c 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -44,8 +44,16 @@ class Opensurveysondage extends CommonObject var $id_sondage; var $commentaires; + var $mail_admin; var $nom_admin; + + /** + * Id of user author of the poll + * @var int + */ + public $fk_user_creat; + var $titre; var $date_fin=''; var $format; @@ -99,8 +107,7 @@ class Opensurveysondage extends CommonObject $sql.= "id_sondage,"; $sql.= "commentaires,"; - $sql.= "mail_admin,"; - $sql.= "nom_admin,"; + $sql.= "fk_user_creat,"; $sql.= "titre,"; $sql.= "date_fin,"; $sql.= "format,"; @@ -112,8 +119,7 @@ class Opensurveysondage extends CommonObject $sql.= "'".$this->db->escape($this->id_sondage)."',"; $sql.= " ".(empty($this->commentaires)?'NULL':"'".$this->db->escape($this->commentaires)."'").","; - $sql.= " ".(empty($this->mail_admin)?'NULL':"'".$this->db->escape($this->mail_admin)."'").","; - $sql.= " '".$this->db->escape($this->nom_admin)."',"; + $sql.= " ".$user->id.","; $sql.= " '".$this->db->escape($this->titre)."',"; $sql.= " '".$this->db->idate($this->date_fin)."',"; $sql.= " '".$this->db->escape($this->format)."',"; @@ -142,7 +148,7 @@ class Opensurveysondage extends CommonObject //// End call triggers } } - + // Commit or rollback if ($error) { @@ -176,6 +182,7 @@ class Opensurveysondage extends CommonObject $sql.= " t.commentaires,"; $sql.= " t.mail_admin,"; $sql.= " t.nom_admin,"; + $sql.= " t.fk_user_creat,"; $sql.= " t.titre,"; $sql.= " t.date_fin,"; $sql.= " t.format,"; @@ -209,6 +216,7 @@ class Opensurveysondage extends CommonObject $this->allow_comments = $obj->allow_comments; $this->allow_spy = $obj->allow_spy; $this->sujet = $obj->sujet; + $this->fk_user_creat = $obj->fk_user_creat; $this->date_m = $this->db->jdate($obj->tls); $ret=1; diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index be7b25005c2..c3c80a59b86 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -204,7 +204,7 @@ function dol_survey_random($car) */ function ajouter_sondage() { - global $db; + global $db, $user; require_once DOL_DOCUMENT_ROOT.'/opensurvey/class/opensurveysondage.class.php'; @@ -227,7 +227,11 @@ function ajouter_sondage() $opensurveysondage->allow_spy = $allow_spy; $opensurveysondage->sujet = $_SESSION['toutchoix']; - $opensurveysondage->create(null); + $res = $opensurveysondage->create($user); + + if ($res < 0) { + dol_print_error($db); + } unset($_SESSION["titre"]); unset($_SESSION["nom"]); diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index d5554315194..a9b36ca7a1c 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -59,8 +59,9 @@ print_fiche_titre($langs->trans("OpenSurveyArea")); print ''."\n"; print ''."\n"; -$sql = "SELECT id_sondage, mail_admin, format, date_fin, titre, nom_admin"; +$sql = "SELECT id_sondage, fk_user_creat, u.login, format, date_fin, titre, nom_admin"; $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as p"; +$sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."user u ON u.rowid = p.fk_user_creat"; // Count total nb of records $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) @@ -98,7 +99,20 @@ while ($i < min($num,$limit)) $type=($obj->format=='A')?'classic':'date'; print img_picto('',dol_buildpath('/opensurvey/img/'.($type == 'classic'?'chart-32.png':'calendar-32.png'),1),'width="16"',1); print ' '.$langs->trans($type=='classic'?"TypeClassic":"TypeDate"); - print ''; + print ''; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; - -if (! $_SESSION["nom"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) -{ - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("OpenSurveyYourName")), 'errors'); -} - -print ''."\n"; -print ''."\n"; - -if (!$_SESSION["adresse"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) -{ - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("OpenSurveyYourEMail")), 'errors'); -} elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) -{ - $langs->load('errors'); - setEventMessage($langs->trans("ErrorBadEMail", $adresse), 'errors'); -} print '
'. $langs->trans("Ref").''. $langs->trans("Title") .''. $langs->trans("Type") .''. $langs->trans("Author") .''. $langs->trans("ExpireDate") .''. $langs->trans("NbOfVoters") .''.dol_htmlentities($obj->nom_admin).''; + + // Author + if ($obj->fk_user_creat) { + $userstatic = new User($db); + $userstatic->id = $obj->fk_user_creat; + $userstatic->login = $obj->login; + + print $userstatic->getLoginUrl(1); + } else { + print dol_htmlentities($obj->nom_admin); + } + + print ''.dol_print_date($db->jdate($obj->date_fin),'day'); if ($db->jdate($obj->date_fin) < time()) { print ' '.img_warning(); } diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 9eac7face2c..162643cf149 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -133,18 +133,25 @@ if (isset($_POST["boutonp"])) $_SESSION["savevoter"]=$nom.','.(empty($_SESSION["savevoter"])?'':$_SESSION["savevoter"]); // Save voter $listofvoters=explode(',',$_SESSION["savevoter"]); - if (! empty($object->mailsonde)) + if ($object->mailsonde) { - include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $cmailfile=new CMailFile("[".MAIN_APPLICATION_TITLE."] ".$langs->trans("Poll").': '.$object->titre, $object->mail_admin, $conf->global->MAIN_MAIL_EMAIL_FROM, $nom." has filled a line.\nYou can find your poll at the link:\n".getUrlSondage($numsondage)); - $result=$cmailfile->sendfile(); - if ($result) - { - + if ($object->fk_user_creat) { + $userstatic = new User($db); + $userstatic->fetch($object->fk_user_creat); + + $email = $userstatic->email; + } else { + $email = $object->mail_admin; } - else - { - + + //Linked user may not have an email set + if ($email) { + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + + $body = $langs->trans('EmailSomeoneVoted', $nom, getUrlSondage($numsondage, true)); + + $cmailfile=new CMailFile("[".MAIN_APPLICATION_TITLE."] ".$langs->trans("Poll").': '.$object->titre, $email, $conf->global->MAIN_MAIL_EMAIL_FROM, $body); + $result=$cmailfile->sendfile(); } } } @@ -728,21 +735,6 @@ if ($object->allow_comments) { print '

'; -/* -// Define $urlwithroot -$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); -$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file -//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - -$message=''; -$url=$urlwithouturlroot.dol_buildpath('/opensurvey/public/studs.php',1).'?sondage='.$numsondage; -$urlvcal=''.$url.''; -$message.=img_picto('','object_globe.png').' '.$langs->trans("UrlForSurvey").': '.$urlvcal; - -print '
'.$message.'
'; -*/ - - print ''."\n"; llxFooterSurvey(); diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index c02fe4822db..c00ddf38384 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -105,7 +105,7 @@ $arrayofjs=array(); $arrayofcss=array('/opensurvey/css/style.css'); llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss); -if (empty($_SESSION['titre']) || empty($_SESSION['nom']) || empty($_SESSION['adresse'])) +if (empty($_SESSION['titre'])) { dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); llxFooterSurvey(); diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index 0d78e5969b0..3de7d10f8a1 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -191,7 +191,7 @@ if (GETPOST('reset')) { * View */ -if (! isset($_SESSION['nom']) && ! isset($_SESSION['adresse']) && ! isset($_SESSION['commentaires']) && ! isset($_SESSION['mail'])) +if (! isset($_SESSION['commentaires']) && ! isset($_SESSION['mail'])) { dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); exit; diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 6e1927b7f2b..26411fa18b5 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -34,21 +34,20 @@ $langs->load("opensurvey"); // On teste toutes les variables pour supprimer l'ensemble des warnings PHP // On transforme en entites html les données afin éviter les failles XSS -$post_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre'); +$post_var = array('titre', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre'); foreach ($post_var as $var) { $$var = GETPOST($var); } // On initialise egalement la session car sinon bonjour les warning :-) -$session_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde'); +$session_var = array('titre', 'commentaires', 'mailsonde'); foreach ($session_var as $var) { if (isset($_SESSION[$var])) $_SESSION[$var] = null; } // On initialise également les autres variables -$erreur_adresse = false; $cocheplus = ''; $cochemail = ''; @@ -56,8 +55,6 @@ $cochemail = ''; if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) { $_SESSION["titre"] = $titre; - $_SESSION["nom"] = $nom; - $_SESSION["adresse"] = $adresse; $_SESSION["commentaires"] = $commentaires; if (GETPOST('mailsonde') == 'on') { @@ -100,9 +97,7 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) setEventMessage($langs->trans('ErrorOpenSurveyDateFormat'), 'errors'); } - if (! isValidEmail($adresse)) $erreur_adresse = true; - - if ($titre && $nom && $adresse && !$erreur_adresse && $testdate) + if ($titre && $testdate) { if (! empty($creation_sondage_date)) { @@ -148,28 +143,6 @@ if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creati print '
'. $langs->trans("Description") .'
'. $langs->trans("OpenSurveyYourName") .''; - -print '
'. $langs->trans("OpenSurveyYourEMail") .''; - -print '
'. $langs->trans("ExpireDate") .''; From dafe05d15d4a59eabd0fa920e5e5806f2f20122f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 05:09:17 +0100 Subject: [PATCH 109/177] Fixed a problem with open survey creation trigger --- htdocs/opensurvey/class/opensurveysondage.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index a4f81ced81c..862381d2322 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -140,6 +140,8 @@ class Opensurveysondage extends CommonObject { if (! $notrigger) { + global $langs, $conf; + //// Call triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); From e09af20899d1853b2732438d1fb1d74b7c23dcb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 05:09:36 +0100 Subject: [PATCH 110/177] Removed unused translations from opensurvey.lang --- htdocs/langs/en_US/opensurvey.lang | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang index d598a385f00..a7b865454c6 100644 --- a/htdocs/langs/en_US/opensurvey.lang +++ b/htdocs/langs/en_US/opensurvey.lang @@ -9,8 +9,6 @@ AddACommentForPoll=You can add a comment into survey... AddComment=Add comment CreatePoll=Create poll PollTitle=Poll title -OpenSurveyYourName=Your name -OpenSurveyYourEMail=Your email address ToReceiveEMailForEachVote=To receive an email for each vote TypeDate=Type date TypeClassic=Type standard @@ -23,14 +21,11 @@ TheBestChoice=The best choice currently is TheBestChoices=The best choices currently are with=with OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line. -InitiatorOfPoll=Initiator of the poll CommentsOfVoters=Comments of voters ConfirmRemovalOfPoll=Are you sure you want to remove this poll (and all votes) RemovePoll=Remove poll -PollManagement=Polls management -BackToHoursSetup=Back to hours setup UrlForSurvey=URL to communicate to get a direct access to survey -PollOnChoice=Your are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll: +PollOnChoice=You are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll: CreateSurveyDate=Create a date survey CreateSurveyStandard=Create a standard survey CheckBox=Simple checkbox @@ -66,4 +61,5 @@ ErrorOpenSurveyOneChoice=Enter at least one choice ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY ErrorInsertingComment=There was an error while inserting your comment MoreChoices=Enter more choices for the voters -SurveyExpiredInfo=The voting time of this poll has expired. \ No newline at end of file +SurveyExpiredInfo=The voting time of this poll has expired. +EmailSomeoneVoted=%s has filled a line.\nYou can find your poll at the link: \n%s \ No newline at end of file From c2c97ec82a5837a57a299d556ad9ddfdb81bc4ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 05:12:47 +0100 Subject: [PATCH 111/177] Mailsonde should not be a varchar --- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 5 +++-- htdocs/install/mysql/tables/llx_opensurvey_sondage.sql | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 6a189c4c756..65f8064f366 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -24,5 +24,6 @@ ALTER TABLE `llx_opensurvey_sondage` DROP INDEX `idx_id_sondage_admin` ; ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `id_sondage_admin` ; ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `canedit` ; ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_spy` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allow_comments` ; -ALTER TABLE `llx_opensurvey_sondage` DROP `origin` ; -ALTER TABLE `llx_opensurvey_sondage` ADD `fk_user_creat` INT( 11 ) UNSIGNED NOT NULL AFTER `nom_admin` ; \ No newline at end of file +ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `origin` ; +ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `fk_user_creat` INT( 11 ) UNSIGNED NOT NULL AFTER `nom_admin` ; +ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `mailsonde` `mailsonde` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index db1231588f3..6301c22a2b3 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -24,7 +24,7 @@ CREATE TABLE llx_opensurvey_sondage ( titre TEXT, date_fin DATETIME, format VARCHAR(2), - mailsonde varchar(2) DEFAULT '0', + mailsonde TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0', allow_comments TINYINT(1) unsigned NOT NULL DEFAULT 1, allow_spy TINYINT(1) unsigned NOT NULL DEFAULT 1, tms TIMESTAMP, From c245e86b604edd55d29ce8e4174ef0b6c934f019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 05:17:02 +0100 Subject: [PATCH 112/177] Little changes to the opensurvey_sondage table definition --- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 5 ++++- htdocs/install/mysql/tables/llx_opensurvey_sondage.sql | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 65f8064f366..01fbbd4ddeb 100755 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -26,4 +26,7 @@ ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `canedit` ; ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `allow_spy` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allow_comments` ; ALTER TABLE `llx_opensurvey_sondage` DROP COLUMN `origin` ; ALTER TABLE `llx_opensurvey_sondage` ADD COLUMN `fk_user_creat` INT( 11 ) UNSIGNED NOT NULL AFTER `nom_admin` ; -ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `mailsonde` `mailsonde` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; \ No newline at end of file +ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `mailsonde` `mailsonde` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `titre` `titre` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `date_fin` `date_fin` DATETIME NOT NULL; +ALTER TABLE `llx_opensurvey_sondage` CHANGE COLUMN `format` `format` VARCHAR( 2 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index 6301c22a2b3..a8ee5031dc5 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -21,12 +21,12 @@ CREATE TABLE llx_opensurvey_sondage ( mail_admin VARCHAR(128), nom_admin VARCHAR(64), fk_user_creat INT(11) UNSIGNED NOT NULL, - titre TEXT, - date_fin DATETIME, - format VARCHAR(2), + titre TEXT NOT NULL, + date_fin DATETIME NOT NULL, + format VARCHAR(2) NOT NULL, mailsonde TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0', allow_comments TINYINT(1) unsigned NOT NULL DEFAULT 1, allow_spy TINYINT(1) unsigned NOT NULL DEFAULT 1, tms TIMESTAMP, sujet TEXT -) ENGINE=InnoDB; +) ENGINE=InnoDB; \ No newline at end of file From 2c816e09a5d380313472bb38a61c5f3ecd20862c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 05:20:08 +0100 Subject: [PATCH 113/177] If no spy option is enabled, users should not now which is the most voted option --- htdocs/opensurvey/public/studs.php | 80 +++++++++++++++--------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 162643cf149..3467988f99a 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -655,52 +655,54 @@ if ($object->allow_spy) { print '
'."\n"; print ''."\n"; -$toutsujet=explode(",",$object->sujet); -$toutsujet=str_replace("°","'",$toutsujet); +if ($object->allow_spy) { + $toutsujet=explode(",",$object->sujet); + $toutsujet=str_replace("°","'",$toutsujet); -$compteursujet=0; -$meilleursujet = ''; + $compteursujet=0; + $meilleursujet = ''; -for ($i = 0; $i < $nbcolonnes; $i++) { - if (isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) { - $meilleursujet.=", "; - if ($object->format=="D") { - $meilleursujetexport = $toutsujet[$i]; + for ($i = 0; $i < $nbcolonnes; $i++) { + if (isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) { + $meilleursujet.=", "; + if ($object->format=="D") { + $meilleursujetexport = $toutsujet[$i]; - if (strpos($toutsujet[$i], '@') !== false) { - $toutsujetdate = explode("@", $toutsujet[$i]); - $meilleursujet .= dol_print_date($toutsujetdate[0],'daytext'). ' ('.dol_print_date($toutsujetdate[0],'%A').')' . ' - ' . $toutsujetdate[1]; - } else { - $meilleursujet .= dol_print_date($toutsujet[$i],'daytext'). ' ('.dol_print_date($toutsujet[$i],'%A').')'; + if (strpos($toutsujet[$i], '@') !== false) { + $toutsujetdate = explode("@", $toutsujet[$i]); + $meilleursujet .= dol_print_date($toutsujetdate[0],'daytext'). ' ('.dol_print_date($toutsujetdate[0],'%A').')' . ' - ' . $toutsujetdate[1]; + } else { + $meilleursujet .= dol_print_date($toutsujet[$i],'daytext'). ' ('.dol_print_date($toutsujet[$i],'%A').')'; + } } + else + { + $tmps=explode('@',$toutsujet[$i]); + $meilleursujet .= dol_htmlentities($tmps[0]); + } + + $compteursujet++; } - else - { - $tmps=explode('@',$toutsujet[$i]); - $meilleursujet .= dol_htmlentities($tmps[0]); - } - - $compteursujet++; - } -} - -$meilleursujet=substr("$meilleursujet", 1); -$meilleursujet = str_replace("°", "'", $meilleursujet); - - -// Show best choice -if ($nbofcheckbox >= 2) -{ - $vote_str = $langs->trans('votes'); - print '

'."\n"; - - if (isset($meilleurecolonne) && $compteursujet == "1") { - print ' ' . $langs->trans('TheBestChoice') . ": ".$meilleursujet." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; - } elseif (isset($meilleurecolonne)) { - print ' ' . $langs->trans('TheBestChoices') . ": ".$meilleursujet." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; } - print '


'."\n"; + $meilleursujet=substr("$meilleursujet", 1); + $meilleursujet = str_replace("°", "'", $meilleursujet); + + + // Show best choice + if ($nbofcheckbox >= 2) + { + $vote_str = $langs->trans('votes'); + print '

'."\n"; + + if (isset($meilleurecolonne) && $compteursujet == "1") { + print ' ' . $langs->trans('TheBestChoice') . ": ".$meilleursujet." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; + } elseif (isset($meilleurecolonne)) { + print ' ' . $langs->trans('TheBestChoices') . ": ".$meilleursujet." " . $langs->trans('with') . " $meilleurecolonne " . $vote_str . ".\n"; + } + + print '


'."\n"; + } } print '
'; From 55014b3338d908b4ef48d112ff1b941ab1cf70d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 6 Jan 2014 05:29:07 +0100 Subject: [PATCH 114/177] =?UTF-8?q?If=20user=20does=20not=20have=20an=20em?= =?UTF-8?q?ail=20and=20option=20=E2=80=9CMailsonde=E2=80=9D=20is=20active,?= =?UTF-8?q?=20then=20we=20show=20a=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/opensurvey/card.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 1fac0c16ed8..7bd3471c825 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -156,6 +156,11 @@ if ($action == 'edit') { * View */ +if ($object->fk_user_creat) { + $userstatic = new User($db); + $userstatic->fetch($object->fk_user_creat); +} + $form=new Form($db); $arrayofjs=array(); @@ -215,9 +220,6 @@ print '
'; print $langs->trans("Author") .''; if ($object->fk_user_creat) { - $userstatic = new User($db); - $userstatic->fetch($object->fk_user_creat); - print $userstatic->getLoginUrl(1); } else { print dol_htmlentities($object->nom_admin); @@ -251,7 +253,16 @@ if ($action == 'edit') { print 'mailsonde?' checked="true"':'').'">'; } -else print yn($object->mailsonde); +else { + print yn($object->mailsonde); + + //If option is active and linked user does not have an email, we show a warning + if ($object->fk_user_creat && $object->mailsonde) { + if (!$userstatic->email) { + print ' '.img_warning($langs->trans('NoEMail')); + } + } +} print '
"; print ''; From 7fd34e5ff6a7633bb04542a880971f5803ffaf6f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jan 2014 13:02:20 +0100 Subject: [PATCH 120/177] Fix: [ bug #1208 ] Users without read permission on the tasks can still see all project tasks Fix: function clean_orhpelins was reporting wrong number of cleaned orphelins. --- htdocs/core/lib/project.lib.php | 12 ++++++------ htdocs/projet/class/project.class.php | 17 +++++++++++------ htdocs/projet/tasks.php | 22 ++++++++++++---------- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 1fc2592c6a5..751ebbdfc5f 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -207,7 +207,7 @@ function project_admin_prepare_head() * @param string $var Color * @param int $showproject Show project columns * @param int &$taskrole Array of roles of user for each tasks - * @param int $projectsListId List of id of project allowed to user (separated with comma) + * @param int $projectsListId List of id of project allowed to user (string separated with comma) * @param int $addordertick Add a tick to move task * @return void */ @@ -261,15 +261,15 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t { // Caller did not ask to filter on tasks of a specific user (this probably means he want also tasks of all users, into public project // or into all other projects if user has permission to). - if (empty($user->rights->project->all->lire)) + if (empty($user->rights->projet->all->lire)) { // User is not allowed on this project and project is not public, so we hide line if (! in_array($lines[$i]->fk_project, $projectsArrayId)) { - // TODO - // If user is assigned to a task into a private project user has no permission on, we must use showlinegray=1 (to show task without showing project) - // if user is not assigned to any task into tree, we must use showline=0 - $showline=0; + // Note that having a user assigned to a task into a project user has no permission on, should not be possible + // because assignement on task can be done only on contact of project. + // If assignement was done and after, was removed from contact of project, then we can hide the line. + $showline=0; } } } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index cea067d67e5..9924dddf4f4 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1281,7 +1281,7 @@ class Project extends CommonObject } /** - * Clean task not linked to a parent + * Clean tasks not linked to an existing parent * * @return int Nb of records deleted */ @@ -1292,7 +1292,7 @@ class Project extends CommonObject // There is orphelins. We clean that $listofid=array(); - // Get list of id in array listofid + // Get list of all id in array listofid $sql='SELECT rowid FROM '.MAIN_DB_PREFIX.'projet_task'; $resql = $this->db->query($sql); if ($resql) @@ -1313,19 +1313,24 @@ class Project extends CommonObject if (count($listofid)) { - // Removed orphelins records - print 'Some orphelins were found and restored to be parents so records are visible again: '; - print join(',',$listofid); + print 'Code asked to check and clean orphelins.'; $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task"; $sql.= " SET fk_task_parent = 0"; - $sql.= " WHERE fk_task_parent NOT IN (".join(',',$listofid).")"; + $sql.= " WHERE fk_task_parent NOT IN (".join(',',$listofid).")"; // So we update only records linked to a non existing parent $resql = $this->db->query($sql); if ($resql) { $nb=$this->db->affected_rows($sql); + if ($nb > 0) + { + // Removed orphelins records + print 'Some orphelins were found and modified to be parent so records are visible again: '; + print join(',',$listofid); + } + return $nb; } else diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index c45248db741..794a1198c35 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -79,7 +79,7 @@ $userAccess=0; /* * Actions -*/ + */ if ($action == 'createtask' && $user->rights->projet->creer) { @@ -396,8 +396,7 @@ else print ''; // Get list of tasks in tasksarray and taskarrayfiltered - // We need all tasks (even not limited to a user because a task to user - // can have a parent that is not affected to him). + // We need all tasks (even not limited to a user because a task to user can have a parent that is not affected to him). $tasksarray=$taskstatic->getTasksArray(0, 0, $object->id, $socid, 0); // We load also tasks limited to a particular user $tasksrole=($mode=='mine' ? $taskstatic->getUserRolesForProjectsOrTasks(0,$user,$object->id,0) : ''); @@ -426,7 +425,7 @@ else { // Show all lines in taskarray (recursive function to go down on tree) $j=0; - $nboftaskshown=projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole, '', 1); + $nboftaskshown=projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole, $id, 1); } else { @@ -437,13 +436,16 @@ else // Test if database is clean. If not we clean it. //print 'mode='.$_REQUEST["mode"].' $nboftaskshown='.$nboftaskshown.' count($tasksarray)='.count($tasksarray).' count($tasksrole)='.count($tasksrole).'
'; - if ($mode=='mine') + if (! empty($user->rights->projet->all->lire)) // We make test to clean only if user has permission to see all (test may report false positive otherwise) { - if ($nboftaskshown < count($tasksrole)) $object->clean_orphelins(); - } - else - { - if ($nboftaskshown < count($tasksarray)) $object->clean_orphelins(); + if ($mode=='mine') + { + if ($nboftaskshown < count($tasksrole)) $object->clean_orphelins(); + } + else + { + if ($nboftaskshown < count($tasksarray)) $object->clean_orphelins(); + } } } From 0e3184c436c69716bcf457e44f9084992aa42db9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jan 2014 17:17:57 +0100 Subject: [PATCH 121/177] Fix: W3C. Fix: Permission on a button. Conflicts: htdocs/core/lib/company.lib.php htdocs/societe/soc.php Fix: Some menu entry not visible. --- htdocs/comm/fiche.php | 9 ++-- htdocs/core/lib/company.lib.php | 28 ++++++---- htdocs/core/menus/standard/eldy.lib.php | 70 +++++-------------------- htdocs/societe/agenda.php | 9 +++- htdocs/societe/soc.php | 12 ++--- 5 files changed, 51 insertions(+), 77 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 29ee792c738..67e6fb1d17a 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -250,9 +250,12 @@ if ($id > 0) // Country print ''.$langs->trans("Country").''; - $img=picto_from_langcode($object->country_code); - if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0); - else print ($img?$img.' ':'').$object->country; + if (! empty($object->country_code)) + { + $img=picto_from_langcode($object->country_code); + if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0); + else print ($img?$img.' ':'').$object->country; + } print ''; // EMail diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 58ad856a62b..bcd6c53d489 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -567,7 +567,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') if ($search_status != '') $param.='&search_status='.$search_status; if ($search_name != '') $param.='&search_name='.urlencode($search_name); - $colspan=8; + $colspan=9; print ''; print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"p.lastname","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Poste"),$_SERVER["PHP_SELF"],"p.poste","",$param,'',$sortfield,$sortorder); @@ -581,17 +581,16 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''.$langs->trans("Skype").''; } print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$param,'',$sortfield,$sortorder); + // Copy to clipboard print " "; + // Add to agenda if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) { $colspan++; print ' '; } - if ($user->rights->societe->contact->creer) - { - $colspan++; - print ' '; - } + // Edit + print ' '; print ""; @@ -613,19 +612,23 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $colspan++; print ' '; } + // Status print ''; print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print ''; + // Copy to clipboard print " "; + + // Add to agenda if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) { $colspan++; print ' '; } - + // Edit print ''; print ''; print ''; @@ -688,9 +691,10 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''; } + // Status print ''.$contactstatic->getLibStatut(5).''; - // copy in clipboard + // Copy to clipboard $coords = ''; if (!empty($object->name)) $coords .= addslashes($object->name)."
"; @@ -721,10 +725,12 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') if (!empty($object->country)) $coords .= "
".addslashes($object->country); } + print '
'; print img_picto($langs->trans("Address"), 'object_address.png'); print ''; + // Add to agenda if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) { print ''; @@ -738,8 +744,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print img_object($langs->trans("Event"),"action"); print ''; } - - + + // Edit if ($user->rights->societe->contact->creer) { print ''; @@ -747,7 +753,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print img_edit(); print ''; } - + else print ' '; print "\n"; $i++; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 230287420b5..954cdc1c2d1 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -613,11 +613,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("suppliers"); $newmenu->add("/fourn/liste.php?leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 1, $user->rights->fournisseur->lire, '', $mainmenu, 'suppliers'); - - if (empty($user->societe_id)) - { - $newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && $user->rights->fournisseur->lire); - } + $newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && $user->rights->fournisseur->lire); //$newmenu->add("/fourn/liste.php?leftmenu=suppliers", $langs->trans("List"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire); //$newmenu->add("/contact/list.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire && $user->rights->societe->contact->lire); } @@ -640,25 +636,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { // Categories prospects/customers $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $langs->trans("CustomersProspectsCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - if (empty($user->societe_id)) - { - $newmenu->add("/categories/fiche.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); - } + $newmenu->add("/categories/fiche.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); } // Categories Contact $newmenu->add("/categories/index.php?leftmenu=cat&type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - if (empty($user->societe_id)) - { - $newmenu->add("/categories/fiche.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); - } + $newmenu->add("/categories/fiche.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); // Categories suppliers if (! empty($conf->fournisseur->enabled)) { $newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire); - if (empty($user->societe_id)) - { - $newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); - } + $newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); } //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } @@ -752,10 +739,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("bills"); $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills'); - if (empty($user->societe_id)) - { - $newmenu->add("/compta/facture.php?action=create&leftmenu=customers_bills",$langs->trans("NewBill"),1,$user->rights->facture->creer); - } + $newmenu->add("/compta/facture.php?action=create&leftmenu=customers_bills",$langs->trans("NewBill"),1,$user->rights->facture->creer); $newmenu->add("/compta/facture/fiche-rec.php?leftmenu=customers_bills",$langs->trans("Repeatables"),1,$user->rights->facture->lire); $newmenu->add("/compta/facture/impayees.php?leftmenu=customers_bills",$langs->trans("Unpaid"),1,$user->rights->facture->lire); @@ -778,10 +762,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("bills"); $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),0,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills'); - if (empty($user->societe_id)) - { - $newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer); - } + $newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer); $newmenu->add("/fourn/facture/impayees.php", $langs->trans("Unpaid"),1,$user->rights->fournisseur->facture->lire); $newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"),1,$user->rights->fournisseur->facture->lire); @@ -959,11 +940,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->product->enabled)) { $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product'); - if (empty($user->societe_id)) - { - $newmenu->add("/product/fiche.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer); - $newmenu->add("/product/liste.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire); - } + $newmenu->add("/product/fiche.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer); + $newmenu->add("/product/liste.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire); if (! empty($conf->propal->enabled)) { $newmenu->add("/product/popuprop.php?leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire && $user->rights->propale->lire); @@ -978,10 +956,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->service->enabled)) { $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service'); - if (empty($user->societe_id)) - { - $newmenu->add("/product/fiche.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer); - } + $newmenu->add("/product/fiche.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer); $newmenu->add("/product/liste.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire); if (! empty($conf->propal->enabled)) { @@ -994,10 +969,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("categories"); $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - if (empty($user->societe_id)) - { - $newmenu->add("/categories/fiche.php?action=create&type=0", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); - } + $newmenu->add("/categories/fiche.php?action=create&type=0", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } @@ -1039,10 +1011,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/fourn/index.php?leftmenu=suppliers", $langs->trans("Suppliers"), 0, $user->rights->societe->lire && $user->rights->fournisseur->lire, '', $mainmenu, 'suppliers'); // Security check - if (empty($user->societe_id)) - { - $newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("NewSupplier"), 1, $user->rights->societe->creer && $user->rights->fournisseur->lire); - } + $newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("NewSupplier"), 1, $user->rights->societe->creer && $user->rights->fournisseur->lire); $newmenu->add("/fourn/liste.php",$langs->trans("List"), 1, $user->rights->societe->lire && $user->rights->fournisseur->lire); $newmenu->add("/contact/list.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 1, $user->rights->societe->contact->lire && $user->rights->fournisseur->lire); $newmenu->add("/fourn/stats.php",$langs->trans("Statistics"), 1, $user->rights->societe->lire && $user->rights->fournisseur->lire); @@ -1052,12 +1021,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("bills"); $newmenu->add("/fourn/facture/list.php?leftmenu=orders", $langs->trans("Bills"), 0, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'orders'); - - if (empty($user->societe_id)) - { - $newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"), 1, $user->rights->fournisseur->facture->creer); - } - + $newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"), 1, $user->rights->fournisseur->facture->creer); $newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"), 1, $user->rights->fournisseur->facture->lire); } @@ -1073,10 +1037,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("categories"); $newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - if (empty($user->societe_id)) - { - $newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); - } + $newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } @@ -1196,10 +1157,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("categories"); $newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - if (empty($user->societe_id)) - { - $newmenu->add("/categories/fiche.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); - } + $newmenu->add("/categories/fiche.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index ec258dda9d8..a1c2d641b71 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -158,7 +158,14 @@ if ($socid) if (! empty($conf->agenda->enabled)) { - print ''.$langs->trans("AddAction").''; + if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create)) + { + print ''.$langs->trans("AddAction").''; + } + else + { + print ''.$langs->trans("AddAction").''; + } } print '
'; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 4655c04fc8e..5e1a6ed40d7 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1576,12 +1576,12 @@ else // Country print ''.$langs->trans("Country").''; - if ($object->country_code) - { - $img=picto_from_langcode($object->country_code); - if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0); - else print ($img?$img.' ':'').$object->country; - } + if (! empty($object->country_code)) + { + $img=picto_from_langcode($object->country_code); + if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0); + else print ($img?$img.' ':'').$object->country; + } print ''; // State From eb5b6efd4000c822fe29589990b65ff9612f85c2 Mon Sep 17 00:00:00 2001 From: "cam.lafit" Date: Mon, 6 Jan 2014 19:25:25 +0100 Subject: [PATCH 122/177] Execute in background process libreoffice listener * If listener is not started, script try to run it but can't continue processus --- scripts/odt2pdf/odt2pdf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/odt2pdf/odt2pdf.sh b/scripts/odt2pdf/odt2pdf.sh index 9268b4a680f..0599e4291c5 100755 --- a/scripts/odt2pdf/odt2pdf.sh +++ b/scripts/odt2pdf/odt2pdf.sh @@ -22,7 +22,7 @@ if [ -f "$1.odt" ] nbprocess=$(pgrep -c soffice) if [ $nbprocess -ne 1 ] then - soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless + soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless& retcode=$? if [ $retcode -ne 0 ] then From 1229842dc67a9a046e7e12d526685d737afacb0f Mon Sep 17 00:00:00 2001 From: "cam.lafit" Date: Mon, 6 Jan 2014 19:27:12 +0100 Subject: [PATCH 123/177] Provide a new constant about odt2pdf mangement : Don't remove odt source * MAIN_ODT_AS_PDF_DEL_SOURCE by default disable * If set then initial behaviour is conserved, odt file is removed --- htdocs/includes/odtphp/odf.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index d2cb8e0b6e1..2848ddc8ddb 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -478,7 +478,8 @@ IMG; header('Content-Disposition: attachment; filename="'.$name.'.pdf"'); readfile("$name.pdf"); } - unlink("$name.odt"); + if (!empty($conf->global->MAIN_ODT_AS_PDF_DEL_SOURCE)) + unlink("$name.odt"); } else { dol_syslog(get_class($this).'::exportAsAttachedPDF $ret_val='.$retval, LOG_DEBUG); dol_syslog(get_class($this).'::exportAsAttachedPDF $output_arr='.var_export($output_arr,true), LOG_DEBUG); @@ -555,4 +556,4 @@ IMG; } } -?> \ No newline at end of file +?> From b8550bb9859507cff7131e7eaba15b2f54eb811c Mon Sep 17 00:00:00 2001 From: simnandez Date: Tue, 7 Jan 2014 12:16:16 +0100 Subject: [PATCH 124/177] Fix: Bad get of localtaxes into contracts add lines --- ChangeLog | 3 +++ htdocs/contrat/fiche.php | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9701182bcd..c976fe08a27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -135,6 +135,9 @@ parameter. All methods addline in this case were modified to remove this paramet +***** ChangeLog for 3.4.3 compared to 3.4.2 ***** +Fix: Bad get of localtaxes into contracts add lines + ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** Fix: field's problem into company's page (RIB). Fix: Document cerfa doesn't contained firstname & lastname from donator. diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index f045fb30cc3..06b408d4fa2 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -3,8 +3,8 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2012 Juanjo Menent - * Copyright (C) 2013 Christophe Battarel + * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -448,8 +448,8 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $desc=$product_desc; } - $localtax1_tx=get_localtax($tva_tx,1,$object->societe); - $localtax2_tx=get_localtax($tva_tx,2,$object->societe); + $localtax1_tx=get_localtax($tva_tx,1,$object->thirdparty); + $localtax2_tx=get_localtax($tva_tx,2,$object->thirdparty); // ajout prix achat $fk_fournprice = $_POST['fournprice']; From 035670dce36624f44ffa1ba7f3dbe0b9d3cbdf44 Mon Sep 17 00:00:00 2001 From: simnandez Date: Tue, 7 Jan 2014 12:16:16 +0100 Subject: [PATCH 125/177] Fix: Bad get of localtaxes into contracts add lines --- ChangeLog | 3 +++ htdocs/contrat/fiche.php | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63c19ea52e6..4e6616c604f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -153,6 +153,9 @@ parameter. All methods addline in this case were modified to remove this paramet +***** ChangeLog for 3.4.3 compared to 3.4.2 ***** +Fix: Bad get of localtaxes into contracts add lines + ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** Fix: field's problem into company's page (RIB) Fix: Document cerfa doesn't contained firstname & lastname from donator diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index f045fb30cc3..06b408d4fa2 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -3,8 +3,8 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2012 Juanjo Menent - * Copyright (C) 2013 Christophe Battarel + * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -448,8 +448,8 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $desc=$product_desc; } - $localtax1_tx=get_localtax($tva_tx,1,$object->societe); - $localtax2_tx=get_localtax($tva_tx,2,$object->societe); + $localtax1_tx=get_localtax($tva_tx,1,$object->thirdparty); + $localtax2_tx=get_localtax($tva_tx,2,$object->thirdparty); // ajout prix achat $fk_fournprice = $_POST['fournprice']; From 89c772459fb0b6537cd20aba242c046f3a02fbed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jan 2014 14:55:03 +0100 Subject: [PATCH 126/177] Fix: Bugs into permissions for module category --- htdocs/categories/class/categorie.class.php | 4 ++-- htdocs/categories/viewcat.php | 2 ++ htdocs/core/class/conf.class.php | 2 +- htdocs/core/lib/security.lib.php | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 4ab19b7f915..9f4be55eb40 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -528,13 +528,13 @@ class Categorie } /** - * Return list of contents of a category + * Return list of id of elements having this category * * @param string $field Field name for select in table. Full field name will be fk_field. * @param string $classname PHP Class of object to store entity * @param string $category_table Table name for select in table. Full table name will be PREFIX_categorie_table. * @param string $object_table Table name for select in table. Full table name will be PREFIX_table. - * @return void + * @return mixed -1 if KO, array of instance of object if OK */ function get_type($field,$classname,$category_table='',$object_table='') { diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 6316436f69a..7aa9aa0b964 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -365,6 +365,8 @@ if($object->type == 2) $var=true; foreach ($socs as $key => $soc) { + if ($user->societe_id > 0 && $soc->id != $user->societe_id) continue; // External user always see only themself + $i++; $var=!$var; print "\t\n"; diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 2ed38d94e4a..64dd4c8b9fa 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -403,7 +403,7 @@ class Conf $this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : $this->global->MAIN_UPLOAD_DOC * 1024); // Define list of limited modules - if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,facture,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda'; // '' means 'all'. Note that contact is added here as it should be a module later. + if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,facture,categorie,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda'; // '' means 'all'. Note that contact is added here as it should be a module later. // Timeouts if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT=10; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 24227832370..b9dcda4b55a 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -341,7 +341,7 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checksoc)) + else if (in_array($feature,$checksoc)) // We check feature = checksoc { // If external user: Check permission for external users if ($user->societe_id > 0) @@ -450,7 +450,7 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature } } - //print $sql."
"; + //print "sql=".$sql."
"; if ($sql) { $resql=$db->query($sql); From 4d379e572a32a28434f1468ab2c465555ad39ce8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jan 2014 14:55:03 +0100 Subject: [PATCH 127/177] Fix: Bugs into permissions for module category --- htdocs/categories/class/categorie.class.php | 4 ++-- htdocs/categories/viewcat.php | 2 ++ htdocs/core/class/conf.class.php | 2 +- htdocs/core/lib/security.lib.php | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 4ab19b7f915..9f4be55eb40 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -528,13 +528,13 @@ class Categorie } /** - * Return list of contents of a category + * Return list of id of elements having this category * * @param string $field Field name for select in table. Full field name will be fk_field. * @param string $classname PHP Class of object to store entity * @param string $category_table Table name for select in table. Full table name will be PREFIX_categorie_table. * @param string $object_table Table name for select in table. Full table name will be PREFIX_table. - * @return void + * @return mixed -1 if KO, array of instance of object if OK */ function get_type($field,$classname,$category_table='',$object_table='') { diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 6316436f69a..7aa9aa0b964 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -365,6 +365,8 @@ if($object->type == 2) $var=true; foreach ($socs as $key => $soc) { + if ($user->societe_id > 0 && $soc->id != $user->societe_id) continue; // External user always see only themself + $i++; $var=!$var; print "\t\n"; diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 2ed38d94e4a..64dd4c8b9fa 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -403,7 +403,7 @@ class Conf $this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : $this->global->MAIN_UPLOAD_DOC * 1024); // Define list of limited modules - if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,facture,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda'; // '' means 'all'. Note that contact is added here as it should be a module later. + if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,facture,categorie,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda'; // '' means 'all'. Note that contact is added here as it should be a module later. // Timeouts if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT=10; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 24227832370..b9dcda4b55a 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -341,7 +341,7 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature $sql.= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else if (in_array($feature,$checksoc)) + else if (in_array($feature,$checksoc)) // We check feature = checksoc { // If external user: Check permission for external users if ($user->societe_id > 0) @@ -450,7 +450,7 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature } } - //print $sql."
"; + //print "sql=".$sql."
"; if ($sql) { $resql=$db->query($sql); From 1df18f1e93f3e6fd10405b0fe95d24a70c6019da Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jan 2014 16:11:08 +0100 Subject: [PATCH 128/177] Fix: Function GETPOST not found --- htdocs/public/paypal/paymentko.php | 10 +++++----- htdocs/public/paypal/paymentok.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/public/paypal/paymentko.php b/htdocs/public/paypal/paymentko.php index 012880f817a..5a59e288662 100644 --- a/htdocs/public/paypal/paymentko.php +++ b/htdocs/public/paypal/paymentko.php @@ -29,16 +29,16 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module. This should be useless. Because entity must be retreive from object ref and not from url. -$entity=GETPOST('entity')?GETPOST('entity','int'):1; -if (is_int($entity)) define("DOLENTITY", $entity); - - require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +// For MultiCompany module. +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=GETPOST('entity')?GETPOST('entity','int'):1; +if (is_int($entity)) define("DOLENTITY", $entity); + // Security check if (empty($conf->paypal->enabled)) accessforbidden('',1,1,1); diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php index 47fd55dc5d6..d4aed404597 100644 --- a/htdocs/public/paypal/paymentok.php +++ b/htdocs/public/paypal/paymentok.php @@ -29,16 +29,16 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module. This should be useless. Because entity must be retreive from object ref and not from url. -$entity=GETPOST('entity')?GETPOST('entity','int'):1; -if (is_int($entity)) define("DOLENTITY", $entity); - - require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +// For MultiCompany module +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=GETPOST('entity')?GETPOST('entity','int'):1; +if (is_int($entity)) define("DOLENTITY", $entity); + // Security check if (empty($conf->paypal->enabled)) accessforbidden('',1,1,1); From 6e5f3b8bddf39371f0d72847e4e3f15facc91171 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jan 2014 16:29:25 +0100 Subject: [PATCH 129/177] Fix: entity into public pages not set at correct place --- htdocs/public/members/new.php | 9 ++++----- htdocs/public/members/public_card.php | 11 +++++------ htdocs/public/members/public_list.php | 11 +++++------ htdocs/public/paybox/newpayment.php | 6 ++++++ htdocs/public/paybox/paymentko.php | 6 ++++++ htdocs/public/paybox/paymentok.php | 6 ++++++ htdocs/public/paypal/newpayment.php | 9 ++++----- htdocs/public/paypal/paymentko.php | 11 ++++++----- htdocs/public/paypal/paymentok.php | 11 ++++++----- 9 files changed, 48 insertions(+), 32 deletions(-) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 3e3082cc981..34a96f7bcb6 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -38,12 +38,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) -{ - define("DOLENTITY", $entity); -} +if (is_int($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index 0fc725c8ed4..2a9b3465543 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -27,12 +27,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module -$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : 1); -if (is_int($entity)) -{ - define("DOLENTITY", $entity); -} +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_int($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index d186467ee04..1b6d23d946c 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -27,12 +27,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module -$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : 1); -if (is_int($entity)) -{ - define("DOLENTITY", $entity); -} +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_int($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index 77437c110d2..b8bad33c08f 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -27,6 +27,12 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_int($entity)) define("DOLENTITY", $entity); + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paybox/lib/paybox.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/public/paybox/paymentko.php b/htdocs/public/paybox/paymentko.php index f01628324bb..a9da81d0e68 100644 --- a/htdocs/public/paybox/paymentko.php +++ b/htdocs/public/paybox/paymentko.php @@ -26,6 +26,12 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_int($entity)) define("DOLENTITY", $entity); + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paybox/lib/paybox.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/public/paybox/paymentok.php b/htdocs/public/paybox/paymentok.php index e204b6d6697..350d409735c 100644 --- a/htdocs/public/paybox/paymentok.php +++ b/htdocs/public/paybox/paymentok.php @@ -26,6 +26,12 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_int($entity)) define("DOLENTITY", $entity); + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paybox/lib/paybox.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php index 81c362633ed..91d1f67a3b9 100644 --- a/htdocs/public/paypal/newpayment.php +++ b/htdocs/public/paypal/newpayment.php @@ -29,12 +29,11 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. -// For MultiCompany module +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_int($entity)) -{ - define("DOLENTITY", $entity); -} +if (is_int($entity)) define("DOLENTITY", $entity); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; diff --git a/htdocs/public/paypal/paymentko.php b/htdocs/public/paypal/paymentko.php index 5a59e288662..3427f6a9b82 100644 --- a/htdocs/public/paypal/paymentko.php +++ b/htdocs/public/paypal/paymentko.php @@ -29,16 +29,17 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_int($entity)) define("DOLENTITY", $entity); + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -// For MultiCompany module. -// TODO This should be useless. Because entity must be retreive from object ref and not from url. -$entity=GETPOST('entity')?GETPOST('entity','int'):1; -if (is_int($entity)) define("DOLENTITY", $entity); - // Security check if (empty($conf->paypal->enabled)) accessforbidden('',1,1,1); diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php index d4aed404597..68420f3bbd8 100644 --- a/htdocs/public/paypal/paymentok.php +++ b/htdocs/public/paypal/paymentok.php @@ -29,16 +29,17 @@ define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK",1); // We accept to go on this page from external web site. +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_int($entity)) define("DOLENTITY", $entity); + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -// For MultiCompany module -// TODO This should be useless. Because entity must be retreive from object ref and not from url. -$entity=GETPOST('entity')?GETPOST('entity','int'):1; -if (is_int($entity)) define("DOLENTITY", $entity); - // Security check if (empty($conf->paypal->enabled)) accessforbidden('',1,1,1); From 267716b557e1ad161d22ab2414e9ca19ccc2bb5c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jan 2014 16:53:07 +0100 Subject: [PATCH 130/177] Just a space between default message and setup message --- htdocs/public/paybox/paymentko.php | 2 +- htdocs/public/paybox/paymentok.php | 2 +- htdocs/public/paypal/paymentko.php | 2 +- htdocs/public/paypal/paymentok.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/public/paybox/paymentko.php b/htdocs/public/paybox/paymentko.php index a9da81d0e68..b1639ec379e 100644 --- a/htdocs/public/paybox/paymentko.php +++ b/htdocs/public/paybox/paymentko.php @@ -101,7 +101,7 @@ llxHeaderPayBox($langs->trans("PaymentForm")); print ''."\n"; print '
'."\n"; -print $langs->trans("YourPaymentHasNotBeenRecorded")."
\n"; +print $langs->trans("YourPaymentHasNotBeenRecorded")."

\n"; if (! empty($conf->global->PAYBOX_MESSAGE_KO)) print $conf->global->PAYBOX_MESSAGE_KO; diff --git a/htdocs/public/paybox/paymentok.php b/htdocs/public/paybox/paymentok.php index 350d409735c..159d29bb78c 100644 --- a/htdocs/public/paybox/paymentok.php +++ b/htdocs/public/paybox/paymentok.php @@ -124,7 +124,7 @@ if (! empty($conf->global->PAYBOX_PAYONLINE_SENDEMAIL)) } -print $langs->trans("YourPaymentHasBeenRecorded")."
\n"; +print $langs->trans("YourPaymentHasBeenRecorded")."

\n"; if (! empty($conf->global->PAYBOX_MESSAGE_OK)) print $conf->global->PAYBOX_MESSAGE_OK; diff --git a/htdocs/public/paypal/paymentko.php b/htdocs/public/paypal/paymentko.php index 3427f6a9b82..6076c54bd03 100644 --- a/htdocs/public/paypal/paymentko.php +++ b/htdocs/public/paypal/paymentko.php @@ -101,7 +101,7 @@ llxHeaderPaypal($langs->trans("PaymentForm")); // Show ko message print ''."\n"; print '
'."\n"; -print $langs->trans("YourPaymentHasNotBeenRecorded")."
"; +print $langs->trans("YourPaymentHasNotBeenRecorded")."

"; $PAYPALTOKEN=GETPOST('TOKEN'); if (empty($PAYPALTOKEN)) $PAYPALTOKEN=GETPOST('token'); diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php index 68420f3bbd8..631aa922eda 100644 --- a/htdocs/public/paypal/paymentok.php +++ b/htdocs/public/paypal/paymentok.php @@ -184,7 +184,7 @@ if ($PAYPALTOKEN) $NOTE=urldecode($resArray["NOTE"]); print $langs->trans("YourPaymentHasBeenRecorded")."
\n"; - print $langs->trans("ThisIsTransactionId",$TRANSACTIONID)."
\n"; + print $langs->trans("ThisIsTransactionId",$TRANSACTIONID)."

\n"; if (! empty($conf->global->PAYPAL_MESSAGE_OK)) print $conf->global->PAYPAL_MESSAGE_OK; // Appel des triggers From 68e42bc24e5817458445925bcbecf20839809be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Mon, 6 Jan 2014 11:28:41 +0100 Subject: [PATCH 131/177] fixed wrong thumbnails directory --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 748388ff99c..ecb90bb66ce 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2946,7 +2946,7 @@ class Product extends CommonObject // Objet $obj=array(); $obj['photo']=$photo; - if ($photo_vignette && dol_is_file($dirthumb.$photo_vignette)) $obj['photo_vignette']=$dirthumb . $photo_vignette; + if ($photo_vignette && dol_is_file($dirthumb.$photo_vignette)) $obj['photo_vignette']='thumbs/' . $photo_vignette; else $obj['photo_vignette']=""; $tabobj[$nbphoto-1]=$obj; From 58bc3b14579223c087e3fbeb2123569cbb0e7ec1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jan 2014 17:34:25 +0100 Subject: [PATCH 132/177] New: For paypal payment confirmation, send email ok only if payment is confirmed. Otherwise send ko email. --- htdocs/public/paypal/paymentok.php | 77 +++++++++++++++++++----------- 1 file changed, 50 insertions(+), 27 deletions(-) diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php index 631aa922eda..28ddd1a4efc 100644 --- a/htdocs/public/paypal/paymentok.php +++ b/htdocs/public/paypal/paymentok.php @@ -129,33 +129,6 @@ if ($PAYPALTOKEN) dol_syslog("Call paymentok with token=".$token." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag, LOG_DEBUG, 0, '_paypal'); - // Send an email - //if (! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL) && preg_match('/MEM=/',$fulltag)) - if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL)) - { - //$sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL; - $sendto=$conf->global->PAYPAL_PAYONLINE_SENDEMAIL; - $from=$conf->global->MAILING_EMAIL_FROM; - require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mailfile = new CMailFile( - '['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("NewPaypalPaymentReceived"), - $sendto, - $from, - $langs->transnoentitiesnoconv("NewPaypalPaymentReceived")."\ntag=".$fulltag."\ntoken=".$token." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt - ); - - $result=$mailfile->sendfile(); - if ($result) - { - dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_paypal'); - } - else - { - dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_paypal'); - } - } - - // Validate record if (! empty($paymentType)) { @@ -193,6 +166,31 @@ if ($PAYPALTOKEN) $result=$interface->run_triggers('PAYPAL_PAYMENT_OK',$object,$user,$langs,$conf); if ($result < 0) { $error++; $errors=$interface->errors; } // Fin appel triggers + + // Send an email + if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL)) + { + //$sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL; + $sendto=$conf->global->PAYPAL_PAYONLINE_SENDEMAIL; + $from=$conf->global->MAILING_EMAIL_FROM; + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $mailfile = new CMailFile( + '['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("NewPaypalPaymentReceived"), + $sendto, + $from, + $langs->transnoentitiesnoconv("NewPaypalPaymentReceived")."\ntag=".$fulltag."\ntoken=".$token." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt + ); + + $result=$mailfile->sendfile(); + if ($result) + { + dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_paypal'); + } + else + { + dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_paypal'); + } + } } else { @@ -209,6 +207,31 @@ if ($PAYPALTOKEN) echo "Error Severity Code: " . $ErrorSeverityCode; if ($mysoc->email) echo "\nPlease, send a screenshot of this page to ".$mysoc->email; + + // Send an email + if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL)) + { + //$sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL; + $sendto=$conf->global->PAYPAL_PAYONLINE_SENDEMAIL; + $from=$conf->global->MAILING_EMAIL_FROM; + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $mailfile = new CMailFile( + '['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("ValidationOfPaypalPaymentFailed"), + $sendto, + $from, + $langs->transnoentitiesnoconv("PaypalConfirmPaymentPageWasCalledButFailed")."\ntag=".$fulltag."\ntoken=".$token." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt."\nErrorCode=".$ErrorCode."\nErrorLongMsg=".$ErrorLongMsg + ); + + $result=$mailfile->sendfile(); + if ($result) + { + dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_paypal'); + } + else + { + dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_paypal'); + } + } } } else From bc51065ff1088482953e44364c73852b9b19621f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jan 2014 17:35:33 +0100 Subject: [PATCH 133/177] New: For paypal payment confirmation, send email ok only if payment is confirmed. Otherwise send ko email. --- htdocs/public/paypal/paymentok.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php index 28ddd1a4efc..32aa3fd4b49 100644 --- a/htdocs/public/paypal/paymentok.php +++ b/htdocs/public/paypal/paymentok.php @@ -170,7 +170,6 @@ if ($PAYPALTOKEN) // Send an email if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL)) { - //$sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL; $sendto=$conf->global->PAYPAL_PAYONLINE_SENDEMAIL; $from=$conf->global->MAILING_EMAIL_FROM; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; @@ -211,7 +210,6 @@ if ($PAYPALTOKEN) // Send an email if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL)) { - //$sendto=$conf->global->MEMBER_PAYONLINE_SENDEMAIL; $sendto=$conf->global->PAYPAL_PAYONLINE_SENDEMAIL; $from=$conf->global->MAILING_EMAIL_FROM; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; From 0876e2cf3fddec52fd166e4fb18c755215eb0412 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jan 2014 17:48:01 +0100 Subject: [PATCH 134/177] Qual: Add phpunit test for paypal module --- test/phpunit/PaypalTest.php | 146 ++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 test/phpunit/PaypalTest.php diff --git a/test/phpunit/PaypalTest.php b/test/phpunit/PaypalTest.php new file mode 100644 index 00000000000..017f4affbc6 --- /dev/null +++ b/test/phpunit/PaypalTest.php @@ -0,0 +1,146 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ + +/** + * \file test/phpunit/PaypalTest.php + * \ingroup test + * \brief PHPUnit test + * \remarks To run this script as CLI: phpunit filename.php + */ + +global $conf,$user,$langs,$db; +//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver +require_once 'PHPUnit/Autoload.php'; +require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; +require_once dirname(__FILE__).'/../../htdocs/core/lib/geturl.lib.php'; +require_once dirname(__FILE__).'/../../htdocs/paypal/lib/paypal.lib.php'; + +if (empty($user->id)) +{ + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); +} +$conf->global->MAIN_DISABLE_ALL_MAILS=1; + + +/** + * Class for PHPUnit tests + * + * @backupGlobals disabled + * @backupStaticAttributes enabled + * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. + */ +class PaypalTest extends PHPUnit_Framework_TestCase +{ + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + + /** + * Constructor + * We save global variables into local variables + * + * @return ProductTest + */ + function __construct() + { + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } + + // Static methods + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + + if (empty($conf->paypal->enabled)) { print __METHOD__." Module Paypal must be enabled.\n"; die(); } + + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + + print __METHOD__."\n"; + } + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); + + print __METHOD__."\n"; + } + + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + print __METHOD__."\n"; + } + + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } + + /** + * testProductCreate + * + * @return void + */ + public function testPaypalOk() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $urltotest=getPaypalPaymentUrl(1,'free'); + print "urltotest=".$urltotest."\n"; + + $result=getURLContent($urltotest, 'GET'); + + print __METHOD__." result=".$result."\n"; + $this->assertLessThanOrEqual($result, 0); + + return $result; + } + +} +?> \ No newline at end of file From 923ff008c2b39ffa67ff0e231f3778c7016ac77b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jan 2014 19:16:44 +0100 Subject: [PATCH 135/177] Update doc --- build/debian/README.howto | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/debian/README.howto b/build/debian/README.howto index cbd4e13f993..6adf020dbfd 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -120,8 +120,11 @@ Puis pour se connecter et préparer l'environnement > apt-get install links mysql-client Pour tester un package -> cp *.deb /srv/chroot/unstable/tmp +> cp ../build-area/* /srv/chroot/unstable/tmp > sudo schroot -c name_of_chroot +> cd /tmp +> lintian --pedantic -E -I dolibarr*.deb +> lintian --pedantic -E -I dolibarr*.dsc > dpkg -i dolibarr*.deb > apt-get install -f From 0e3757aa5ce5a1a854ab5e51b45cb63f00480ba8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jan 2014 00:05:14 +0100 Subject: [PATCH 136/177] New: Add option 'az' into GETPOST --- htdocs/core/lib/functions.lib.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 89c12902f90..96e3cd7dcd2 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -172,7 +172,7 @@ function dol_shutdown() * Return value of a param into GET or POST supervariable * * @param string $paramname Name of parameter to found - * @param string $check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's alpha only, 'array'=check it's array) + * @param string $check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's text and sign, 'az'=check it's a-z only, 'array'=check it's array) * @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get, 4 = post then get then cookie) * @return string Value found, or '' if check fails */ @@ -198,6 +198,13 @@ function GETPOST($paramname,$check='',$method=0) if (preg_match('/"/',$out)) $out=''; else if (preg_match('/\.\.\//',$out)) $out=''; } + elseif ($check == 'az') + { + $out=trim($out); + // '"' is dangerous because param in url can close the href= or src= and add javascript functions. + // '../' is dangerous because it allows dir transversals + if (preg_match('/[^a-z]+/',$out)) $out=''; + } elseif ($check == 'array') { if (! is_array($out) || empty($out)) $out=array(); From 5f15dcded7a97a6d692dc4f503e6bc7cf66afafb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jan 2014 00:05:42 +0100 Subject: [PATCH 137/177] New: Work on a basic print barcode page --- htdocs/barcode/printsheet.php | 304 +++++++++++++++++++++++----------- 1 file changed, 204 insertions(+), 100 deletions(-) diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index 5737b632b32..926bdbf18a6 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -26,6 +26,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/printsheet/modules_labels.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; $langs->load("admin"); $langs->load("errors"); @@ -36,124 +37,166 @@ $year=dol_print_date($now,'%Y'); $month=dol_print_date($now,'%m'); $day=dol_print_date($now,'%d'); $forbarcode=GETPOST('forbarcode'); -$forbartype=GETPOST('forbartype'); +$fk_barcode_type=GETPOST('fk_barcode_type'); $mode=GETPOST('mode'); -$model=GETPOST("model"); // Doc template to use for business cards -$modellabel=GETPOST("modellabel"); // Doc template to use for address sheet +$modellabel=GETPOST("modellabel"); // Doc template to use +$numberofsticker=GETPOST('numberofsticker','int'); + $mesg=''; +$action=GETPOST('action'); + /* * Actions */ -if ($action == 'builddoc' && empty($forbarcode)) +if ($action == 'builddoc') { - $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Barcode")); -} -if ($action == 'builddoc' && empty($forbartype)) -{ - $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("BarcodeType")); -} + $result=0; $error=0; -if ((! empty($forbarcode) || ! empty($forbartype) || ! empty($mode)) && ! $mesg) -{ - // List of values to scan for a replacement - $substitutionarray = array ( - '%LOGIN%'=>$user->login, - '%COMPANY%'=>$mysoc->name, - '%ADDRESS%'=>$mysoc->address, - '%ZIP%'=>$mysoc->zip, - '%TOWN%'=>$mysoc->town, - '%COUNTRY%'=>$mysoc->country, - '%COUNTRY_CODE%'=>$mysoc->country_code, - '%EMAIL%'=>$mysoc->email, - '%YEAR%'=>$year, - '%MONTH%'=>$month, - '%DAY%'=>$day, - '%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT, - '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/" - ); - complete_substitutions_array($substitutionarray, $langs); - - // For business cards - if (empty($mode) || $mode=='card' || $mode=='cardlogin') + if (empty($forbarcode)) // barcode value { - $textleft=make_substitutions($conf->global->ADHERENT_CARD_TEXT, $substitutionarray); - $textheader=make_substitutions($conf->global->ADHERENT_CARD_HEADER_TEXT, $substitutionarray); - $textfooter=make_substitutions($conf->global->ADHERENT_CARD_FOOTER_TEXT, $substitutionarray); - $textright=make_substitutions($conf->global->ADHERENT_CARD_TEXT_RIGHT, $substitutionarray); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("BarcodeValue")),'errors'); + $error++; + } + if (empty($fk_barcode_type)) // barcode type = barcode encoding + { + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("BarcodeType")),'errors'); + $error++; + } - if (is_numeric($forbarcode) || $forbartype) + if (! $error) + { + // Get encoder (barcode_type_coder) from barcode type id (barcode_type) + $stdobject=new GenericObject($db); + $stdobject->barcode_type=$fk_barcode_type; + $result=$stdobject->fetch_barcode(); + if ($result <= 0) { - for($j=0;$j<100;$j++) + $error++; + setEventMessage('Failed to get bar code type information '.$stdobject->error, 'errors'); + } + } + + if (! $error) + { + $code=$forbarcode; + $generator=$stdobject->barcode_type_coder; + $encoding=strtoupper($stdobject->barcode_type_code); + $barcodeimage=$conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; + + $diroutput=$conf->barcode->dir_temp; + dol_mkdir($diroutput); + + // Generate barcode + $dirbarcode=array_merge(array("/core/modules/barcode/"),$conf->modules_parts['barcode']); + + foreach($dirbarcode as $reldir) + { + $dir=dol_buildpath($reldir,0); + $newdir=dol_osencode($dir); + + // Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php) + if (! is_dir($newdir)) continue; + + $result=@include_once $newdir.$generator.'.modules.php'; + if ($result) break; + } + + // Load barcode class + $classname = "mod".ucfirst($generator); + $module = new $classname($db); + if ($module->encodingIsSupported($encoding)) + { + dol_delete_file($barcodeimage); + // File is created with full name $barcodeimage = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; + $result=$module->writeBarCode($code,$encoding,'Y',4); + + if ($result <= 0 || ! dol_is_file($barcodeimage)) + { + $error++; + setEventMessage('Failed to generate image file of barcode for code='.$code.' encoding='.$encoding.' file='.basename($barcodeimage), 'errors'); + } + } + else + { + $error++; + setEventMessage("Error, encoding ".$encoding." is not supported by encoder ".$generator.'. You must choose another barcode type or install a barcode generation engine that support '.$encoding, 'errors'); + } + } + + if (! $error) + { + // List of values to scan for a replacement + $substitutionarray = array ( + '%LOGIN%'=>$user->login, + '%COMPANY%'=>$mysoc->name, + '%ADDRESS%'=>$mysoc->address, + '%ZIP%'=>$mysoc->zip, + '%TOWN%'=>$mysoc->town, + '%COUNTRY%'=>$mysoc->country, + '%COUNTRY_CODE%'=>$mysoc->country_code, + '%EMAIL%'=>$mysoc->email, + '%YEAR%'=>$year, + '%MONTH%'=>$month, + '%DAY%'=>$day, + '%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT, + '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/" + ); + complete_substitutions_array($substitutionarray, $langs); + + // For labels + if ($mode == 'label') + { + if (empty($conf->global->ADHERENT_ETIQUETTE_TEXT)) $conf->global->ADHERENT_ETIQUETTE_TEXT="%PHOTO%"; + $textleft=make_substitutions($conf->global->ADHERENT_ETIQUETTE_TEXT, $substitutionarray); + $textheader=''; + $textfooter=''; + $textright=''; + $forceimgscalewidth=(empty($conf->global->BARCODE_FORCEIMGSCALEWIDTH)?1:$conf->global->BARCODE_FORCEIMGSCALEWIDTH); + $forceimgscaleheight=(empty($conf->global->BARCODE_FORCEIMGSCALEHEIGHT)?1:$conf->global->BARCODE_FORCEIMGSCALEHEIGHT); + + for ($i=0; $i < $numberofsticker; $i++) { $arrayofmembers[]=array( - 'textleft'=>$textleft, - 'textheader'=>$textheader, - 'textfooter'=>$textfooter, - 'textright'=>$textright, - 'id'=>$objp->rowid, - 'photo'=>$objp->photo + 'textleft'=>$textleft, + 'textheader'=>$textheader, + 'textfooter'=>$textfooter, + 'textright'=>$textright, + 'photo'=>$barcodeimage // Photo must be a file that exists with format supported by TCPDF ); } } - else + + $i++; + $mesg=''; + + // Build and output PDF + if ($mode == 'label') { - $arrayofmembers[]=array( - 'textleft'=>$textleft, - 'textheader'=>$textheader, - 'textfooter'=>$textfooter, - 'textright'=>$textright, - 'id'=>$objp->rowid, - 'photo'=>$objp->photo - ); + if (! count($arrayofmembers)) + { + $mesg=$langs->trans("ErrorRecordNotFound"); + } + if (empty($modellabel) || $modellabel == '-1') + { + $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DescADHERENT_ETIQUETTE_TYPE")); + } + if (! $mesg) $result=members_label_pdf_create($db, $arrayofmembers, $modellabel, $outputlangs, $diroutput); } - } - // For labels - if ($mode == 'label') - { - if (empty($conf->global->ADHERENT_ETIQUETTE_TEXT)) $conf->global->ADHERENT_ETIQUETTE_TEXT="%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%"; - $textleft=make_substitutions($conf->global->ADHERENT_ETIQUETTE_TEXT, $substitutionarray); - $textheader=''; - $textfooter=''; - $textright=''; - - $arrayofmembers[]=array('textleft'=>$textleft, - 'textheader'=>$textheader, - 'textfooter'=>$textfooter, - 'textright'=>$textright, - 'id'=>$objp->rowid, - 'photo'=>$objp->photo); - } - - $i++; - - // Build and output PDF - if ($mode == 'label') - { - if (! count($arrayofmembers)) + if ($result <= 0) { - $mesg=$langs->trans("ErrorRecordNotFound"); + dol_print_error('',$result); } - if (empty($modellabel) || $modellabel == '-1') - { - $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DescADHERENT_ETIQUETTE_TYPE")); - } - if (! $mesg) $result=members_label_pdf_create($db, $arrayofmembers, $modellabel, $outputlangs); - } - if ($result <= 0) - { - dol_print_error('',$result); + if (! $mesg) + { + $db->close(); + exit; + } } - - if (! $mesg) - { - $db->close(); - exit; - } } @@ -168,16 +211,25 @@ llxHeader('',$langs->trans("BarCodePrintsheet")); print_fiche_titre($langs->trans("BarCodePrintsheet")); print '
'; -print $langs->trans("PageToGenerateBarCodeSheets").'
'; +print $langs->trans("PageToGenerateBarCodeSheets",$langs->transnoentitiesnoconv("BuildPageToPrint")).'
'; print '
'; dol_htmloutput_errors($mesg); -print img_picto('','puce').' '.$langs->trans("BarCodePrintsheet").' '; +//print img_picto('','puce').' '.$langs->trans("PrintsheetForOneBarCode").'
'; +//print '
'; + print '
'; print ''; print ''; -print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").' '; + +print '
'; + +// Sheet format +print '
'; +print '
'; +print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").'   '; +print '
'; // List of possible labels (defined into $_Avery_Labels variable set into format_cards.lib.php) $arrayoflabels=array(); foreach(array_keys($_Avery_Labels) as $codecards) @@ -185,12 +237,64 @@ foreach(array_keys($_Avery_Labels) as $codecards) $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } print $form->selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); -print '
'.$langs->trans("Barcode").': '; -print '
'.$langs->trans("Bartype").': '; +print '
'; +// Number of stickers to print +print '
'; +print '
'; +print $langs->trans("NumberOfStickers").'   '; +print '
'; +print ''; +print '
'; + +print '
'; + + +print '
'; + +// Checkbox to select from free text +print ' '.$langs->trans("FillBarCodeTypeAndValueManually").'   '; +print '
'; + +/* +print ' '.$langs->trans("FillBarCodeTypeAndValueFromProduct").'   '; +print $form->select_produits(GETPOST('productid'), 'productid', ''); +print '
'; + +print ' '.$langs->trans("FillBarCodeTypeAndValueFromThirdParty").'   '; +print $form->select_company(GETPOST('socid'), 'socid', '', 1); +print '
'; +*/ + +print '
'; + +// Barcode type +print '
'; +print '
'; +print $langs->trans("BarcodeType").'   '; +print '
'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; +$formbarcode = new FormBarCode($db); +$formbarcode->select_barcode_type($fk_barcode_type, 'fk_barcode_type', 1); +print '
'; + +// Barcode value +print '
'; +print '
'; +print $langs->trans("BarcodeValue").'   '; +print '
'; +print ''; +print '
'; + +/* $barcodestickersmask=GETPOST('barcodestickersmask'); -print '
'.$langs->trans("BarcodeStickersMask").': '; -print '
'; +print '
'.$langs->trans("BarcodeStickersMask").':
'; +print ''; +print '
'; +*/ + +print '
'; + print ''; print '
'; From 9a33d6752781ca4a0c1adfee96d4bb8ac516ebf4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jan 2014 00:07:05 +0100 Subject: [PATCH 138/177] Update doc --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2d9dc0ee0f4..9f6a03d5d0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,7 +17,8 @@ For developers: - New: Add path file of trigger into admin trigger list page. - New: More phpunit tests. - New: Payments and supplier payment pages tabs can now be extended from modules. - +- New: Add option 'az' into GETPOST function to check parameters conatins + only a to z characters. ***** ChangeLog for 3.5 compared to 3.4.* ***** From 6ff337ccad2912584c6213c52091ca6cfa7eb9b2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jan 2014 00:10:39 +0100 Subject: [PATCH 139/177] New: Add option 'aZ' into GETPOST function to check parameters contains only a to z or A to Z characters. --- ChangeLog | 4 ++-- htdocs/core/lib/functions.lib.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9f6a03d5d0e..c56f5a0b9e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,8 +17,8 @@ For developers: - New: Add path file of trigger into admin trigger list page. - New: More phpunit tests. - New: Payments and supplier payment pages tabs can now be extended from modules. -- New: Add option 'az' into GETPOST function to check parameters conatins - only a to z characters. +- New: Add option 'aZ' into GETPOST function to check parameters contains + only a to z or A to Z characters. ***** ChangeLog for 3.5 compared to 3.4.* ***** diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 96e3cd7dcd2..d7d81ac0e18 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -198,12 +198,12 @@ function GETPOST($paramname,$check='',$method=0) if (preg_match('/"/',$out)) $out=''; else if (preg_match('/\.\.\//',$out)) $out=''; } - elseif ($check == 'az') + elseif ($check == 'aZ') { $out=trim($out); // '"' is dangerous because param in url can close the href= or src= and add javascript functions. // '../' is dangerous because it allows dir transversals - if (preg_match('/[^a-z]+/',$out)) $out=''; + if (preg_match('/[^a-z]+/i',$out)) $out=''; } elseif ($check == 'array') { From 622fe72abfe64c0c2e561ca1bbebeebf3b7868f2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jan 2014 15:13:41 +0100 Subject: [PATCH 140/177] Fix: A lot of fix into sticker sheet dimension management. Fix: Size of font too large to print sticker pages. --- htdocs/core/lib/format_cards.lib.php | 76 ++++++++++--------- .../modules/member/doc/pdf_standard.class.php | 16 ++-- .../doc/pdf_standardlabel.class.php | 16 ++-- 3 files changed, 60 insertions(+), 48 deletions(-) diff --git a/htdocs/core/lib/format_cards.lib.php b/htdocs/core/lib/format_cards.lib.php index 5f18cb1a976..e45ff13be59 100644 --- a/htdocs/core/lib/format_cards.lib.php +++ b/htdocs/core/lib/format_cards.lib.php @@ -27,56 +27,59 @@ global $_Avery_Labels; - +// Unit of metric are defined into field 'metric' in mm. +// To get into inch, just /25.4 +// Size of pages available on: http://www.worldlabel.com/Pages/pageaverylabels.htm +// _PosX = marginLeft+(_COUNTX*(width+SpaceX)); $_Avery_Labels = array ( - '5160'=>array('name'=>'5160 (Letter)', + '5160'=>array('name'=>'Avery-5160, WL-875WX', 'paper-size'=>'letter', 'metric'=>'mm', - 'marginLeft'=>1.762, - 'marginTop'=>10.7, + 'marginLeft'=>5.58165, // 0.21975 inch + 'marginTop'=>12.7, // 0.5 inch 'NX'=>3, 'NY'=>10, - 'SpaceX'=>3.175, + 'SpaceX'=>3.556, // 0.14 inch 'SpaceY'=>0, - 'width'=>66.675, - 'height'=>25.4, - 'font-size'=>8), - '5161'=>array('name'=>'5161 (Letter)', + 'width'=>65.8749, // 2.59350 inch + 'height'=>25.4, // 1 inch + 'font-size'=>7), + '5161'=>array('name'=>'Avery-5161, WL-75WX', 'paper-size'=>'letter', 'metric'=>'mm', - 'marginLeft'=>0.967, - 'marginTop'=>10.7, + 'marginLeft'=>4.445, // 0.175 inch + 'marginTop'=>12.7, 'NX'=>2, 'NY'=>10, - 'SpaceX'=>3.967, + 'SpaceX'=>3.968, // 0.15625 inch 'SpaceY'=>0, - 'width'=>101.6, - 'height'=>25.4, - 'font-size'=>8), - '5162'=>array('name'=>'5162 (Letter)', + 'width'=>101.6, // 4 inch + 'height'=>25.4, // 1 inch + 'font-size'=>7), + '5162'=>array('name'=>'Avery-5162, WL-100WX', 'paper-size'=>'letter', 'metric'=>'mm', - 'marginLeft'=>0.97, - 'marginTop'=>20.224, + 'marginLeft'=>3.8735, // 0.1525 inch + 'marginTop'=>22.352, // 0.88 inch 'NX'=>2, 'NY'=>7, - 'SpaceX'=>4.762, + 'SpaceX'=>4.954, // 0.195 inch 'SpaceY'=>0, - 'width'=>100.807, - 'height'=>35.72, + 'width'=>101.6, // 4 inch + 'height'=>33.781, // 1.33 inch 'font-size'=>8), - '5163'=>array('name'=>'5163 (Letter)', + '5163'=>array('name'=>'Avery-5163, WL-125WX', 'paper-size'=>'letter', 'metric'=>'mm', - 'marginLeft'=>1.762, - 'marginTop'=>10.7, + 'marginLeft'=>4.572, // 0.18 inch + 'marginTop'=>12.7, // 0.5 inch 'NX'=>2, 'NY'=>5, - 'SpaceX'=>3.175, + 'SpaceX'=>3.556, // 0.14 inch 'SpaceY'=>0, - 'width'=>101.6, - 'height'=>50.8, - 'font-size'=>8), + 'width'=>101.6, // 4 inch + 'height'=>50.8, // 2 inch + 'font-size'=>10), /* Bugged '5164'=>array('name'=>'5164 (Letter)', 'paper-size'=>'letter', 'metric'=>'in', @@ -89,7 +92,7 @@ $_Avery_Labels = array ( 'width'=>4.0, 'height'=>3.33, 'font-size'=>12), */ - '8600'=>array('name'=>'8600 (Letter)', + '8600'=>array('name'=>'Avery-8600', 'paper-size'=>'letter', 'metric'=>'mm', 'marginLeft'=>7.1, @@ -100,8 +103,8 @@ $_Avery_Labels = array ( 'SpaceY'=>3.1, 'width'=>66.6, 'height'=>25.4, - 'font-size'=>8), - 'L7163'=>array('name'=>'L7163 (A4)', + 'font-size'=>7), + 'L7163'=>array('name'=>'Avery-L7163', 'paper-size'=>'A4', 'metric'=>'mm', 'marginLeft'=>5, @@ -112,8 +115,9 @@ $_Avery_Labels = array ( 'SpaceY'=>0, 'width'=>99.1, 'height'=>38.1, - 'font-size'=>10), - 'AVERYC32010'=>array('name'=>'AVERY-C32010 (A4)', + 'font-size'=>8), + // 85.0 x 54.0 mm + 'AVERYC32010'=>array('name'=>'Avery-C32010', 'paper-size'=>'A4', 'metric'=>'mm', 'marginLeft'=>15, @@ -125,7 +129,7 @@ $_Avery_Labels = array ( 'width'=>85, 'height'=>54, 'font-size'=>10), - 'CARD'=>array('name'=>'Dolibarr Business cards (A4)', + 'CARD'=>array('name'=>'Dolibarr Business cards', 'paper-size'=>'A4', 'metric'=>'mm', 'marginLeft'=>15, @@ -139,5 +143,9 @@ $_Avery_Labels = array ( 'font-size'=>10) ); +foreach($_Avery_Labels as $key => $val) +{ + $_Avery_Labels[$key]['name'].=' ('.$_Avery_Labels[$key]['paper-size'].' - '.$_Avery_Labels[$key]['NX'].'x'.$_Avery_Labels[$key]['NY'].')'; +} ?> \ No newline at end of file diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 7c0d4c4a53e..a7d23402d23 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -114,7 +114,7 @@ class pdf_standard /** - * Output a sticker on page at position _COUNTX + * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) * - %LOGO% is replace with company logo * - %PHOTO% is replace with photo provided as parameter * @@ -186,25 +186,27 @@ class pdf_standard $pdf->image($backgroundimage,$_PosX,$_PosY,$this->_Width,$this->_Height); } + $xleft=2; $ytop=2; + // Top if ($header!='') { if ($this->code == "CARD") { $pdf->SetDrawColor(128,128,128); - $pdf->Line($_PosX, $_PosY+$this->_Line_Height+1, $_PosX+$this->_Width, $_PosY+$this->_Line_Height+1); + $pdf->Line($_PosX, $_PosY+$this->_Line_Height+1, $_PosX+$this->_Width, $_PosY+$this->_Line_Height+1); // Only 1 mm and not ytop for top text $pdf->SetDrawColor(0,0,0); } - $pdf->SetXY($_PosX, $_PosY+1); - $pdf->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); + $pdf->SetXY($_PosX+$xleft, $_PosY+1); // Only 1 mm and not ytop for top text + $pdf->Cell($this->_Width-2*$xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); } - $xleft=2; $ytop=2+(empty($header)?0:1+$this->_Line_Height); - $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); - $defaultratio=($maxwidthtouse/$maxheighttouse); + $ytop+=(empty($header)?0:(1+$this->_Line_Height)); // Define widthtouse and heighttouse + $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); + $defaultratio=($maxwidthtouse/$maxheighttouse); $widthtouse=$maxwidthtouse; $heighttouse=0; // old value for image $tmp=dol_getImageSize($photo, false); if ($tmp['height']) diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index 4f85ccdf09d..811333b1d8f 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -113,7 +113,7 @@ class pdf_standardlabel } /** - * Output a sticker on page at position _COUNTX + * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) * - %LOGO% is replace with company logo * - %PHOTO% is replace with photo provided as parameter * @@ -174,25 +174,27 @@ class pdf_standardlabel $pdf->image($backgroundimage,$_PosX,$_PosY,$this->_Width,$this->_Height); } + $xleft=2; $ytop=2; + // Top if ($header!='') { if ($this->code == "CARD") { $pdf->SetDrawColor(128,128,128); - $pdf->Line($_PosX, $_PosY+$this->_Line_Height+1, $_PosX+$this->_Width, $_PosY+$this->_Line_Height+1); + $pdf->Line($_PosX, $_PosY+$this->_Line_Height+1, $_PosX+$this->_Width, $_PosY+$this->_Line_Height+1); // Only 1 mm and not ytop for top text $pdf->SetDrawColor(0,0,0); } - $pdf->SetXY($_PosX, $_PosY+1); - $pdf->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); + $pdf->SetXY($_PosX+$xleft, $_PosY+1); // Only 1 mm and not ytop for top text + $pdf->Cell($this->_Width-2*$xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); } - $xleft=2; $ytop=2+(empty($header)?0:1+$this->_Line_Height); - $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); - $defaultratio=($maxwidthtouse/$maxheighttouse); + $ytop+=(empty($header)?0:(1+$this->_Line_Height)); // Define widthtouse and heighttouse + $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); + $defaultratio=($maxwidthtouse/$maxheighttouse); $widthtouse=$maxwidthtouse; $heighttouse=0; // old value for image $tmp=dol_getImageSize($photo, false); if ($tmp['height']) From c0c555b78f38496e954f75a77fc9cebec7ab4a11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jan 2014 15:16:56 +0100 Subject: [PATCH 141/177] Fix: A lot of fix into sticker sheet dimension management. Fix: Size of font too large to print sticker pages. Conflicts: htdocs/core/modules/member/doc/pdf_standard.class.php htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php --- htdocs/core/lib/format_cards.lib.php | 76 ++++++++++--------- .../modules/member/doc/pdf_standard.class.php | 18 +++-- .../doc/pdf_standardlabel.class.php | 18 +++-- 3 files changed, 64 insertions(+), 48 deletions(-) diff --git a/htdocs/core/lib/format_cards.lib.php b/htdocs/core/lib/format_cards.lib.php index 5f18cb1a976..e45ff13be59 100644 --- a/htdocs/core/lib/format_cards.lib.php +++ b/htdocs/core/lib/format_cards.lib.php @@ -27,56 +27,59 @@ global $_Avery_Labels; - +// Unit of metric are defined into field 'metric' in mm. +// To get into inch, just /25.4 +// Size of pages available on: http://www.worldlabel.com/Pages/pageaverylabels.htm +// _PosX = marginLeft+(_COUNTX*(width+SpaceX)); $_Avery_Labels = array ( - '5160'=>array('name'=>'5160 (Letter)', + '5160'=>array('name'=>'Avery-5160, WL-875WX', 'paper-size'=>'letter', 'metric'=>'mm', - 'marginLeft'=>1.762, - 'marginTop'=>10.7, + 'marginLeft'=>5.58165, // 0.21975 inch + 'marginTop'=>12.7, // 0.5 inch 'NX'=>3, 'NY'=>10, - 'SpaceX'=>3.175, + 'SpaceX'=>3.556, // 0.14 inch 'SpaceY'=>0, - 'width'=>66.675, - 'height'=>25.4, - 'font-size'=>8), - '5161'=>array('name'=>'5161 (Letter)', + 'width'=>65.8749, // 2.59350 inch + 'height'=>25.4, // 1 inch + 'font-size'=>7), + '5161'=>array('name'=>'Avery-5161, WL-75WX', 'paper-size'=>'letter', 'metric'=>'mm', - 'marginLeft'=>0.967, - 'marginTop'=>10.7, + 'marginLeft'=>4.445, // 0.175 inch + 'marginTop'=>12.7, 'NX'=>2, 'NY'=>10, - 'SpaceX'=>3.967, + 'SpaceX'=>3.968, // 0.15625 inch 'SpaceY'=>0, - 'width'=>101.6, - 'height'=>25.4, - 'font-size'=>8), - '5162'=>array('name'=>'5162 (Letter)', + 'width'=>101.6, // 4 inch + 'height'=>25.4, // 1 inch + 'font-size'=>7), + '5162'=>array('name'=>'Avery-5162, WL-100WX', 'paper-size'=>'letter', 'metric'=>'mm', - 'marginLeft'=>0.97, - 'marginTop'=>20.224, + 'marginLeft'=>3.8735, // 0.1525 inch + 'marginTop'=>22.352, // 0.88 inch 'NX'=>2, 'NY'=>7, - 'SpaceX'=>4.762, + 'SpaceX'=>4.954, // 0.195 inch 'SpaceY'=>0, - 'width'=>100.807, - 'height'=>35.72, + 'width'=>101.6, // 4 inch + 'height'=>33.781, // 1.33 inch 'font-size'=>8), - '5163'=>array('name'=>'5163 (Letter)', + '5163'=>array('name'=>'Avery-5163, WL-125WX', 'paper-size'=>'letter', 'metric'=>'mm', - 'marginLeft'=>1.762, - 'marginTop'=>10.7, + 'marginLeft'=>4.572, // 0.18 inch + 'marginTop'=>12.7, // 0.5 inch 'NX'=>2, 'NY'=>5, - 'SpaceX'=>3.175, + 'SpaceX'=>3.556, // 0.14 inch 'SpaceY'=>0, - 'width'=>101.6, - 'height'=>50.8, - 'font-size'=>8), + 'width'=>101.6, // 4 inch + 'height'=>50.8, // 2 inch + 'font-size'=>10), /* Bugged '5164'=>array('name'=>'5164 (Letter)', 'paper-size'=>'letter', 'metric'=>'in', @@ -89,7 +92,7 @@ $_Avery_Labels = array ( 'width'=>4.0, 'height'=>3.33, 'font-size'=>12), */ - '8600'=>array('name'=>'8600 (Letter)', + '8600'=>array('name'=>'Avery-8600', 'paper-size'=>'letter', 'metric'=>'mm', 'marginLeft'=>7.1, @@ -100,8 +103,8 @@ $_Avery_Labels = array ( 'SpaceY'=>3.1, 'width'=>66.6, 'height'=>25.4, - 'font-size'=>8), - 'L7163'=>array('name'=>'L7163 (A4)', + 'font-size'=>7), + 'L7163'=>array('name'=>'Avery-L7163', 'paper-size'=>'A4', 'metric'=>'mm', 'marginLeft'=>5, @@ -112,8 +115,9 @@ $_Avery_Labels = array ( 'SpaceY'=>0, 'width'=>99.1, 'height'=>38.1, - 'font-size'=>10), - 'AVERYC32010'=>array('name'=>'AVERY-C32010 (A4)', + 'font-size'=>8), + // 85.0 x 54.0 mm + 'AVERYC32010'=>array('name'=>'Avery-C32010', 'paper-size'=>'A4', 'metric'=>'mm', 'marginLeft'=>15, @@ -125,7 +129,7 @@ $_Avery_Labels = array ( 'width'=>85, 'height'=>54, 'font-size'=>10), - 'CARD'=>array('name'=>'Dolibarr Business cards (A4)', + 'CARD'=>array('name'=>'Dolibarr Business cards', 'paper-size'=>'A4', 'metric'=>'mm', 'marginLeft'=>15, @@ -139,5 +143,9 @@ $_Avery_Labels = array ( 'font-size'=>10) ); +foreach($_Avery_Labels as $key => $val) +{ + $_Avery_Labels[$key]['name'].=' ('.$_Avery_Labels[$key]['paper-size'].' - '.$_Avery_Labels[$key]['NX'].'x'.$_Avery_Labels[$key]['NY'].')'; +} ?> \ No newline at end of file diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 00aba591add..4f8e909d2b1 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -114,7 +114,9 @@ class pdf_standard /** - * On imprime une etiquette + * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) + * - %LOGO% is replace with company logo + * - %PHOTO% is replace with photo provided as parameter * * @param PDF &$pdf PDF * @param string $textleft Textleft @@ -184,25 +186,27 @@ class pdf_standard $pdf->image($backgroundimage,$_PosX,$_PosY,$this->_Width,$this->_Height); } + $xleft=2; $ytop=2; + // Top if ($header!='') { if ($this->code == "CARD") { $pdf->SetDrawColor(128,128,128); - $pdf->Line($_PosX, $_PosY+$this->_Line_Height+1, $_PosX+$this->_Width, $_PosY+$this->_Line_Height+1); + $pdf->Line($_PosX, $_PosY+$this->_Line_Height+1, $_PosX+$this->_Width, $_PosY+$this->_Line_Height+1); // Only 1 mm and not ytop for top text $pdf->SetDrawColor(0,0,0); } - $pdf->SetXY($_PosX, $_PosY+1); - $pdf->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); + $pdf->SetXY($_PosX+$xleft, $_PosY+1); // Only 1 mm and not ytop for top text + $pdf->Cell($this->_Width-2*$xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); } - $xleft=2; $ytop=2+(empty($header)?0:1+$this->_Line_Height); - $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); - $defaultratio=($maxwidthtouse/$maxheighttouse); + $ytop+=(empty($header)?0:(1+$this->_Line_Height)); // Define widthtouse and heighttouse + $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); + $defaultratio=($maxwidthtouse/$maxheighttouse); $widthtouse=$maxwidthtouse; $heighttouse=0; // old value for image $tmp=dol_getImageSize($photo, false); if ($tmp['height']) diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index c05f168d2a8..9c6d1eb3353 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -113,7 +113,9 @@ class pdf_standardlabel } /** - * On imprime une etiquette + * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) + * - %LOGO% is replace with company logo + * - %PHOTO% is replace with photo provided as parameter * * @param PDF &$pdf PDF * @param string $textleft Text left @@ -172,25 +174,27 @@ class pdf_standardlabel $pdf->image($backgroundimage,$_PosX,$_PosY,$this->_Width,$this->_Height); } + $xleft=2; $ytop=2; + // Top if ($header!='') { if ($this->code == "CARD") { $pdf->SetDrawColor(128,128,128); - $pdf->Line($_PosX, $_PosY+$this->_Line_Height+1, $_PosX+$this->_Width, $_PosY+$this->_Line_Height+1); + $pdf->Line($_PosX, $_PosY+$this->_Line_Height+1, $_PosX+$this->_Width, $_PosY+$this->_Line_Height+1); // Only 1 mm and not ytop for top text $pdf->SetDrawColor(0,0,0); } - $pdf->SetXY($_PosX, $_PosY+1); - $pdf->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); + $pdf->SetXY($_PosX+$xleft, $_PosY+1); // Only 1 mm and not ytop for top text + $pdf->Cell($this->_Width-2*$xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($header),0,1,'C'); } - $xleft=2; $ytop=2+(empty($header)?0:1+$this->_Line_Height); - $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); - $defaultratio=($maxwidthtouse/$maxheighttouse); + $ytop+=(empty($header)?0:(1+$this->_Line_Height)); // Define widthtouse and heighttouse + $maxwidthtouse=round(($this->_Width - 2*$xleft)*$imgscalewidth); $maxheighttouse=round(($this->_Height - 2*$ytop)*$imgscaleheight); + $defaultratio=($maxwidthtouse/$maxheighttouse); $widthtouse=$maxwidthtouse; $heighttouse=0; // old value for image $tmp=dol_getImageSize($photo, false); if ($tmp['height']) From fac3593f7cf036bea449cff9ff13fc9920a89630 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jan 2014 15:50:11 +0100 Subject: [PATCH 142/177] Missing lang file --- htdocs/barcode/printsheet.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index 926bdbf18a6..2ed50dc6f2a 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/printsheet/modules_labels.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; $langs->load("admin"); +$langs->load("members"); $langs->load("errors"); // Choix de l'annee d'impression ou annee courante. From 855487a3840c6c256cf5f1b732fde927e3ad402b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jan 2014 20:40:30 +0100 Subject: [PATCH 143/177] Fix: Missing alias befofe field into sql request and removed bad join on table making some record to disappear. --- htdocs/comm/action/index.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index c97b841e3a1..f3b4f5e1d5e 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -312,11 +312,9 @@ $sql.= ' a.priority, a.fulldayevent, a.location,'; $sql.= ' a.fk_soc, a.fk_contact,'; $sql.= ' ca.code'; $sql.= ' FROM ('.MAIN_DB_PREFIX.'c_actioncomm as ca,'; -$sql.= " ".MAIN_DB_PREFIX.'user as u,'; $sql.= " ".MAIN_DB_PREFIX."actioncomm as a)"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; $sql.= ' WHERE a.fk_action = ca.id'; -$sql.= ' AND a.fk_user_author = u.rowid'; $sql.= ' AND a.entity IN ('.getEntity().')'; if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'"; if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid); @@ -325,28 +323,28 @@ if ($user->societe_id) $sql.= ' AND a.fk_soc = '.$user->societe_id; // To limit if ($action == 'show_day') { $sql.= " AND ("; - $sql.= " (datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; $sql.= " OR "; - $sql.= " (datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; $sql.= " OR "; - $sql.= " (datep < '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; - $sql.= " AND datep2 > '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; + $sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; $sql.= ')'; } else { // To limit array $sql.= " AND ("; - $sql.= " (datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; // Start 7 days before + $sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; // Start 7 days before $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; // End 7 days after + 3 to go from 28 to 31 $sql.= " OR "; - $sql.= " (datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; + $sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; $sql.= " OR "; - $sql.= " (datep < '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; - $sql.= " AND datep2 > '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; + $sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; + $sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; $sql.= ')'; } if ($type) $sql.= " AND ca.id = ".$type; @@ -1012,7 +1010,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // Must defined rule to choose color of who to use. // event->usertodo->id will still contains user id of owner // event->userstodo will be an array in future. - // $color=$user->color; + // $color=$user->color; } else if ($event->type_code == 'ICALEVENT') { From 63ecb859d62aafa03f15f8e2e88b0ef09b9c30a8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 Jan 2014 20:40:30 +0100 Subject: [PATCH 144/177] Fix: Missing alias befofe field into sql request and removed bad join on table making some record to disappear. --- htdocs/comm/action/index.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index c97b841e3a1..f3b4f5e1d5e 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -312,11 +312,9 @@ $sql.= ' a.priority, a.fulldayevent, a.location,'; $sql.= ' a.fk_soc, a.fk_contact,'; $sql.= ' ca.code'; $sql.= ' FROM ('.MAIN_DB_PREFIX.'c_actioncomm as ca,'; -$sql.= " ".MAIN_DB_PREFIX.'user as u,'; $sql.= " ".MAIN_DB_PREFIX."actioncomm as a)"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; $sql.= ' WHERE a.fk_action = ca.id'; -$sql.= ' AND a.fk_user_author = u.rowid'; $sql.= ' AND a.entity IN ('.getEntity().')'; if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'"; if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid); @@ -325,28 +323,28 @@ if ($user->societe_id) $sql.= ' AND a.fk_soc = '.$user->societe_id; // To limit if ($action == 'show_day') { $sql.= " AND ("; - $sql.= " (datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; $sql.= " OR "; - $sql.= " (datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; $sql.= " OR "; - $sql.= " (datep < '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; - $sql.= " AND datep2 > '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; + $sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; $sql.= ')'; } else { // To limit array $sql.= " AND ("; - $sql.= " (datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; // Start 7 days before + $sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; // Start 7 days before $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; // End 7 days after + 3 to go from 28 to 31 $sql.= " OR "; - $sql.= " (datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; + $sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; $sql.= " OR "; - $sql.= " (datep < '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; - $sql.= " AND datep2 > '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; + $sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; + $sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; $sql.= ')'; } if ($type) $sql.= " AND ca.id = ".$type; @@ -1012,7 +1010,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // Must defined rule to choose color of who to use. // event->usertodo->id will still contains user id of owner // event->userstodo will be an array in future. - // $color=$user->color; + // $color=$user->color; } else if ($event->type_code == 'ICALEVENT') { From f1d1522478e7971a5fcf5f9cc2d725014948f32e Mon Sep 17 00:00:00 2001 From: jfefe Date: Thu, 9 Jan 2014 01:49:59 +0100 Subject: [PATCH 145/177] Fix : when using several field for label into sellist extrafields traduction is not needed. Without this, the list display "not defined". The key can't exists because label displayed is build from several field so we show raw data --- htdocs/core/class/extrafields.class.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 39916775507..b68e395580a 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -753,6 +753,7 @@ class ExtraFields $fields_label = explode('|',$InfoFieldList[1]); if(is_array($fields_label)) { + $notrans = true; foreach ($fields_label as $field_toshow) { $labeltoshow.= $obj->$field_toshow.' '; @@ -778,12 +779,15 @@ class ExtraFields } else { - $translabel=$langs->trans($obj->$InfoFieldList[1]); - if ($translabel!=$obj->$InfoFieldList[1]) { - $labeltoshow=dol_trunc($translabel,18); - } - else { - $labeltoshow=dol_trunc($obj->$InfoFieldList[1],18); + if(!$notrans) + { + $translabel=$langs->trans($obj->$InfoFieldList[1]); + if ($translabel!=$obj->$InfoFieldList[1]) { + $labeltoshow=dol_trunc($translabel,18); + } + else { + $labeltoshow=dol_trunc($obj->$InfoFieldList[1],18); + } } if (empty($labeltoshow)) $labeltoshow='(not defined)'; if ($value==$obj->rowid) From f5544646904bf7ae18dabe0ab938188ac4691034 Mon Sep 17 00:00:00 2001 From: jfefe Date: Thu, 9 Jan 2014 02:10:03 +0100 Subject: [PATCH 146/177] New : ajax list for extrafields list and sellist --- htdocs/core/class/extrafields.class.php | 34 +++++++++++++++++++------ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 39916775507..46d03246fe3 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -670,7 +670,14 @@ class ExtraFields } elseif ($type == 'select') { - $out=''; foreach ($param['options'] as $key=>$val ) { list($val, $parent) = explode('|', $val); @@ -683,7 +690,14 @@ class ExtraFields } elseif ($type == 'sellist') { - $out=''; if (is_array($param['options'])) { $param_list=array_keys($param['options']); @@ -753,6 +767,7 @@ class ExtraFields $fields_label = explode('|',$InfoFieldList[1]); if(is_array($fields_label)) { + $notrans = true; foreach ($fields_label as $field_toshow) { $labeltoshow.= $obj->$field_toshow.' '; @@ -778,12 +793,15 @@ class ExtraFields } else { - $translabel=$langs->trans($obj->$InfoFieldList[1]); - if ($translabel!=$obj->$InfoFieldList[1]) { - $labeltoshow=dol_trunc($translabel,18); - } - else { - $labeltoshow=dol_trunc($obj->$InfoFieldList[1],18); + if(!$notrans) + { + $translabel=$langs->trans($obj->$InfoFieldList[1]); + if ($translabel!=$obj->$InfoFieldList[1]) { + $labeltoshow=dol_trunc($translabel,18); + } + else { + $labeltoshow=dol_trunc($obj->$InfoFieldList[1],18); + } } if (empty($labeltoshow)) $labeltoshow='(not defined)'; if ($value==$obj->rowid) From 77a1d6a43a4f8b38271e23da00a8dfbb42d8c284 Mon Sep 17 00:00:00 2001 From: jfefe Date: Thu, 9 Jan 2014 02:40:34 +0100 Subject: [PATCH 147/177] Bad value display when using several label into sellist extrafield --- htdocs/core/class/extrafields.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index b68e395580a..22b159cbe3d 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -958,11 +958,11 @@ class ExtraFields { foreach ($fields_label as $field_toshow) { - $translabel=$langs->trans($obj->$InfoFieldList[1]); - if ($translabel!=$obj->$InfoFieldList[1]) { - $value=dol_trunc($translabel,18).' '; + $translabel=$langs->trans($field_toshow); + if ($translabel!=$field_toshow) { + $value.=dol_trunc($translabel,18).' '; }else { - $value=$obj->$InfoFieldList[1].' '; + $value.=$obj->$field_toshow.' '; } } } From e959568a1d75dae9f1d3acc96b7074ac781510fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Wed, 8 Jan 2014 17:06:52 +0100 Subject: [PATCH 148/177] Added details to the contact created by create_individual --- htdocs/societe/class/societe.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 664be4b9a05..941a5445ff1 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -306,6 +306,12 @@ class Societe extends CommonObject $contact->socid = $this->id; // fk_soc $contact->statut = 1; $contact->priv = 0; + $contact->country_id = $this->country_id; + $contact->address = $this->address; + $contact->email = $this->email; + $contact->zip = $this->zip; + $contact->town = $this->town; + $contact->phone_pro = $this->phone; $result = $contact->create($user); if ($result < 0) { $this->error = $contact->error; From 7b63ce1f31650df9898c8cd17a94d12069159976 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 Jan 2014 00:57:17 +0100 Subject: [PATCH 149/177] Doxygen --- htdocs/core/class/html.form.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f2a3ea58754..d0df5591880 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -122,7 +122,7 @@ class Form * @param object $object Object * @param boolean $perm Permission to allow button to edit parameter * @param string $typeofdata Type of data ('string' by default, 'amount', 'email', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select:xxx'...) - * @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of value) + * @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of value). Use '' to use same than $value * @param object $extObject External object * @param string $success Success message * @param string $moreparam More param to add on a href URL @@ -189,7 +189,14 @@ class Form $ret.=$doleditor->Create(1); } $ret.=''; - if ($typeofdata != 'day' && $typeofdata != 'datepicker' && $typeofdata != 'datehourpicker') $ret.=''; + if ($typeofdata != 'day' && $typeofdata != 'datepicker' && $typeofdata != 'datehourpicker') + { + $ret.=''; + // TODO Add a button Cancel + //$ret.='

'."\n"; + //$ret.=''; + $ret.=''; + } $ret.=''."\n"; $ret.=''."\n"; } From 7809e0baa9371a7a93d4ba06a601396dac680f81 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 Jan 2014 01:25:28 +0100 Subject: [PATCH 150/177] Fix: dol_htmlentitiesbr behaviour was different if input was html or not. Add phpunit test to avoid that in future. --- htdocs/core/lib/functions.lib.php | 13 ++++----- test/phpunit/FunctionsTest.php | 45 ++++++++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d7d81ac0e18..c287ddad528 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3459,25 +3459,25 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false) * This function is called to encode a string into a HTML string but differs from htmlentities because * all entities but &,<,> are converted. This permits to encode special chars to entities with no double * encoding for already encoded HTML strings. - * This function also remove last CR/BR. + * This function also remove last EOL or BR if $removelasteolbr=1 (default). * For PDF usage, you can show text by 2 ways: * - writeHTMLCell -> param must be encoded into HTML. * - MultiCell -> param must not be encoded into HTML. * Because writeHTMLCell convert also \n into
, if function - * is used to build PDF, nl2brmode must be 1 + * is used to build PDF, nl2brmode must be 1. * * @param string $stringtoencode String to encode * @param int $nl2brmode 0=Adding br before \n, 1=Replacing \n by br (for use with FPDF writeHTMLCell function for example) * @param string $pagecodefrom Pagecode stringtoencode is encoded * @return string String encoded */ -function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8') +function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8',$removelasteolbr=1) { + $newstring=$stringtoencode; if (dol_textishtml($stringtoencode)) { - $newstring=$stringtoencode; $newstring=preg_replace('//i','
',$newstring); // Replace "
" by "
". It's same and avoid pb with FPDF. - $newstring=preg_replace('/
$/i','',$newstring); // Remove last
+ if ($removelasteolbr) $newstring=preg_replace('/
$/i','',$newstring); // Remove last
(remove only last one) $newstring=strtr($newstring,array('&'=>'__and__','<'=>'__lt__','>'=>'__gt__','"'=>'__dquot__')); $newstring=dol_htmlentities($newstring,ENT_COMPAT,$pagecodefrom); // Make entity encoding $newstring=strtr($newstring,array('__and__'=>'&','__lt__'=>'<','__gt__'=>'>','__dquot__'=>'"')); @@ -3485,7 +3485,8 @@ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8') } else { - $newstring=dol_nl2br(dol_htmlentities($stringtoencode,ENT_COMPAT,$pagecodefrom),$nl2brmode); + if ($removelasteolbr) $newstring=preg_replace('/(\r\n|\r|\n)$/i','',$newstring); // Remove last \n (may remove several) + $newstring=dol_nl2br(dol_htmlentities($newstring,ENT_COMPAT,$pagecodefrom),$nl2brmode); } // Other substitutions that htmlentities does not do //$newstring=str_replace(chr(128),'€',$newstring); // 128 = 0x80. Not in html entity table. // Seems useles with TCPDF. Make bug with UTF8 languages diff --git a/test/phpunit/FunctionsTest.php b/test/phpunit/FunctionsTest.php index 1fa41f0c460..c58da9efa38 100755 --- a/test/phpunit/FunctionsTest.php +++ b/test/phpunit/FunctionsTest.php @@ -192,15 +192,30 @@ class FunctionsTest extends PHPUnit_Framework_TestCase */ public function testDolHtmlCleanLastBr() { + $input="A string\n"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string",$after); + + $input="A string first\nA string second\n"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string first\nA string second",$after); + + $input="A string\n\n\n"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string",$after); + $input="A string
"; $after=dol_htmlcleanlastbr($input); $this->assertEquals("A string",$after); + $input="A string first
\nA string second
"; $after=dol_htmlcleanlastbr($input); $this->assertEquals("A string first
\nA string second",$after); + $input="A string\n
\n"; $after=dol_htmlcleanlastbr($input); $this->assertEquals("A string",$after); + $input="A string\n

\n\n"; $after=dol_htmlcleanlastbr($input); $this->assertEquals("A string",$after); @@ -215,22 +230,44 @@ class FunctionsTest extends PHPUnit_Framework_TestCase */ public function testDolHtmlEntitiesBr() { - $input="A string\nwith a é, &, < and >."; // Text not already HTML + // Text not already HTML + + $input="A string\nwith a é, &, < and >."; $after=dol_htmlentitiesbr($input,0); // Add
before \n $this->assertEquals("A string
\nwith a é, &, < and >.",$after); - $input="A string\nwith a é, &, < and >."; // Text not already HTML + $input="A string\nwith a é, &, < and >."; $after=dol_htmlentitiesbr($input,1); // Replace \n with
$this->assertEquals("A string
with a é, &, < and >.",$after); - $input="A string
\nwith a é, &, < and >."; // Text already HTML, so &,<,> should not be converted + $input="A string\nwith a é, &, < and >.\n\n"; // With some \n at end that should be cleaned + $after=dol_htmlentitiesbr($input,0); // Add
before \n + $this->assertEquals("A string
\nwith a é, &, < and >.",$after); + + $input="A string\nwith a é, &, < and >.\n\n"; // With some \n at end that should be cleaned + $after=dol_htmlentitiesbr($input,1); // Replace \n with
+ $this->assertEquals("A string
with a é, &, < and >.",$after); + + // Text already HTML, so &,<,> should not be converted + + $input="A string
\nwith a é, &, < and >."; $after=dol_htmlentitiesbr($input); $this->assertEquals("A string
\nwith a é, &, < and >.",$after); - $input="
  • \nA string with a é, &, < and >.
  • \nAnother string"; // Text already HTML, so &,<,> should not be converted + $input="
  • \nA string with a é, &, < and >.
  • \nAnother string"; $after=dol_htmlentitiesbr($input); $this->assertEquals("
  • \nA string with a é, &, < and >.
  • \nAnother string",$after); + $input="A string
    \nwith a é, &, < and >.
    "; // With some
    at end that should be cleaned + $after=dol_htmlentitiesbr($input); + $this->assertEquals("A string
    \nwith a é, &, < and >.",$after); + + $input="
  • \nA string with a é, &, < and >.
  • \nAnother string
    "; // With some
    at end that should be cleaned + $after=dol_htmlentitiesbr($input); + $this->assertEquals("
  • \nA string with a é, &, < and >.
  • \nAnother string",$after); + + // TODO Add test with param $removelasteolbr = 0 + return true; } From 9b9492a5d6db8a4e63bb411fe5ab726f6013dae7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 Jan 2014 01:31:23 +0100 Subject: [PATCH 151/177] New: Start to work on option MAIN_AUTO_TIMESTAMP_IN_NOTES to automatically add timestamp and user line into comment. Remain to do: Add button "cancel" into note edition mode. --- ChangeLog | 5 ++++- htdocs/core/tpl/notes.tpl.php | 31 +++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c56f5a0b9e8..e04040366a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,8 +7,11 @@ For users: - New: Add list of orders products in tab "consumption" on thirdparties. - New: Add graph stats for suppliers orders in tab "stats" on products. - New: Add option MAIN_HIDE_INACTIVETAB_ON_PRINT to hide inactive tabs when you - use the "print" view on screen. + use the "print" view on screen. - New: Add menu entry to barcode genration page. +- New: Start to work on option MAIN_AUTO_TIMESTAMP_IN_NOTES to + automatically add timestamp and user line into comment. Remain to do: + Add button "cancel" into note edition mode. For translators: - Update language files. diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index 7dd836240aa..1a690dd7950 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -1,6 +1,7 @@ - * Copyright (C) 2013 Florian Henry +/* Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +24,24 @@ $note_private = 'note_private'; $colwidth=(isset($colwidth)?$colwidth:25); $permission=(isset($permission)?$permission:(isset($user->rights->$module->creer)?$user->rights->$module->creer:0)); // If already defined by caller page $moreparam=(isset($moreparam)?$moreparam:''); +$value_public=$object->note_public; +$value_private=$object->note_private; +if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_NOTES)) +{ + $stringtoadd=dol_print_date(dol_now(), 'dayhour').' '.$user->getFullName($langs).' --'; + if (GETPOST('action') == 'edit'.$note_public) + { + $value_public=dol_concatdesc($value_public, ($value_public?"\n":"")."-- ".$stringtoadd); + if (dol_textishtml($value_public)) $value_public.="
    \n"; + else $value_public.="\n"; + } + if (GETPOST('action') == 'edit'.$note_private) + { + $value_private=dol_concatdesc($value_private, ($value_private?"\n":"")."-- ".$stringtoadd); + if (dol_textishtml($value_private)) $value_private.="
    \n"; + else $value_private.="\n"; + } +} // Special cases if ($module == 'propal') { $permission=$user->rights->propale->creer;} @@ -43,13 +62,13 @@ else $typeofdata='textarea:12:100';
    -
    >editfieldkey("NotePublic", $note_public, $object->note_public, $object, $permission, $typeofdata, $moreparam); ?>
    -
    editfieldval("NotePublic", $note_public, $object->note_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
    +
    >editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?>
    +
    editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
    societe_id) { ?>
    -
    >editfieldkey("NotePrivate", $note_private, $object->note_private, $object, $permission, $typeofdata, $moreparam); ?>
    -
    editfieldval("NotePrivate", $note_private, $object->note_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
    +
    >editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?>
    +
    editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
    From 2c310e26a6d769a14c2d23218972e8c4497fbf56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 Jan 2014 01:37:41 +0100 Subject: [PATCH 152/177] Fix: Missing lang file --- htdocs/fourn/facture/fiche.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 7402272fe73..21883b8ede6 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -50,9 +50,11 @@ if (!empty($conf->projet->enabled)) { $langs->load('bills'); +$langs->load('compta'); $langs->load('suppliers'); $langs->load('companies'); $langs->load('products'); +$langs->load('banks'); $mesg=''; $errors=array(); From 5bdd7fc074f59c9867fa013677e95e7ce7ef665a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 Jan 2014 03:39:43 +0100 Subject: [PATCH 153/177] Fix: Doxygen --- htdocs/core/lib/functions.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c287ddad528..6054cfff399 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3469,6 +3469,7 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false) * @param string $stringtoencode String to encode * @param int $nl2brmode 0=Adding br before \n, 1=Replacing \n by br (for use with FPDF writeHTMLCell function for example) * @param string $pagecodefrom Pagecode stringtoencode is encoded + * @param int $removelasteolbr 1=Remove last br or lasts \n (default), 0=Do nothing * @return string String encoded */ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8',$removelasteolbr=1) From dd3da37ce644367a55f91000a311be89b8160d89 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Fri, 10 Jan 2014 10:35:42 +0100 Subject: [PATCH 154/177] Update modFacture.class.php remplace price by subprice on export invoice --- htdocs/core/modules/modFacture.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 4e88c561306..76647f4a1b5 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -178,10 +178,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancyBuyCode'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancyBuyCode'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.subprice'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product'); $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; From 171e74ae7e3f76b1ab05762f677ded235b56aac8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 11 Jan 2014 13:31:12 +0100 Subject: [PATCH 155/177] Reduce time to hide/show --- htdocs/core/tpl/bloc_showhide.tpl.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/tpl/bloc_showhide.tpl.php b/htdocs/core/tpl/bloc_showhide.tpl.php index 2ac7ce4a397..2c5d71c79d5 100644 --- a/htdocs/core/tpl/bloc_showhide.tpl.php +++ b/htdocs/core/tpl/bloc_showhide.tpl.php @@ -28,13 +28,13 @@ if (isset($object->extraparams[$blocname]['showhide'])) $hide = (empty($object-> $(document).ready(function() { $("#hide-").click(function(){ setShowHide(0); - $("#_bloc").hide("blind", {direction: "vertical"}, 800).removeClass("nohideobject"); + $("#_bloc").hide("blind", {direction: "vertical"}, 300).removeClass("nohideobject"); $(this).hide(); $("#show-").show(); }); $("#show-").click(function(){ setShowHide(1); - $("#_bloc").show("blind", {direction: "vertical"}, 800).addClass("nohideobject"); + $("#_bloc").show("blind", {direction: "vertical"}, 300).addClass("nohideobject"); $(this).hide(); $("#hide-").show(); }); @@ -43,7 +43,7 @@ $(document).ready(function() { var element = 'element; ?>'; var htmlelement = ''; var type = 'showhide'; - + $.get("?id="+id+"&element="+element+"&htmlelement="+htmlelement+"&type="+type+"&value="+status); } }); From 23eb0f3770b28a9155f82226e82af9d73668aa8d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 11 Jan 2014 13:33:30 +0100 Subject: [PATCH 156/177] Qual: Mutualize code for actions of editing notes New: Add button 'cancel' to cancel edition of a note (private or public) --- htdocs/comm/propal.php | 16 +++------ htdocs/comm/propal/note.php | 16 +++------ htdocs/commande/fiche.php | 22 ++++--------- htdocs/commande/note.php | 15 ++------- htdocs/compta/deplacement/fiche.php | 29 +++++++---------- htdocs/compta/facture.php | 18 +++------- htdocs/compta/facture/note.php | 33 +++++++------------ htdocs/contact/note.php | 43 +++++++++--------------- htdocs/contrat/fiche.php | 16 +++------ htdocs/contrat/note.php | 24 +++++--------- htdocs/core/actions_setnotes.inc.php | 47 +++++++++++++++++++++++++++ htdocs/core/class/html.form.class.php | 7 ++-- htdocs/expedition/note.php | 32 +++++++----------- htdocs/fichinter/fiche.php | 31 +++++++----------- htdocs/fichinter/note.php | 13 ++------ htdocs/fourn/commande/fiche.php | 20 ++++-------- htdocs/fourn/commande/note.php | 13 ++------ htdocs/fourn/facture/fiche.php | 15 ++------- htdocs/fourn/facture/note.php | 18 +++------- htdocs/projet/note.php | 21 +++--------- htdocs/projet/tasks/note.php | 13 +------- htdocs/societe/note.php | 19 +++-------- 22 files changed, 176 insertions(+), 305 deletions(-) create mode 100644 htdocs/core/actions_setnotes.inc.php diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index ef37fa534bd..a4767f26ed1 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -96,6 +96,7 @@ if ($id > 0 || ! empty($ref)) // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('propalcard')); +$permissionnote=$user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php /* @@ -105,6 +106,9 @@ $hookmanager->initHooks(array('propalcard')); $parameters=array('socid'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + + // Action clone object if ($action == 'confirm_clone' && $confirm == 'yes') { @@ -232,18 +236,6 @@ else if ($action == 'set_ref_client' && $user->rights->propal->creer) $object->set_ref_client($user, $_POST['ref_client']); } -else if ($action == 'setnote_public' && $user->rights->propal->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -else if ($action == 'setnote_private' && $user->rights->propal->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} - // Create proposal else if ($action == 'add' && $user->rights->propal->creer) { diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 2855a296010..7e31518d402 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -44,23 +44,15 @@ $result = restrictedArea($user, 'propale', $id, 'propal'); $object = new Propal($db); + /******************************************************************************/ /* Actions */ /******************************************************************************/ -if ($action == 'setnote_public' && $user->rights->propale->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} +$permission=$user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once -else if ($action == 'setnote_private' && $user->rights->propale->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} /******************************************************************************/ diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index d40d8bf5a7c..f326cf33b8f 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -93,14 +93,18 @@ if ($id > 0 || ! empty($ref)) // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('ordercard')); +$permissionnote=$user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ + +/* + * Actions + */ $parameters=array('socid'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + // Action clone object if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande->creer) { @@ -552,18 +556,6 @@ else if ($action == 'setremiseabsolue' && $user->rights->commande->creer) $result = $object->set_remise_absolue($user, GETPOST('remise_absolue')); } -else if ($action == 'setnote_public' && $user->rights->commande->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -else if ($action == 'setnote_private' && $user->rights->commande->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private'); - if ($result < 0) dol_print_error($db,$object->error); -} - // Add a new line else if ($action == 'addline' && $user->rights->commande->creer) { diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 58023beec33..9d740dc1089 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -50,24 +50,15 @@ if (! $object->fetch($id, $ref) > 0) dol_print_error($db); } +$permissionnote=$user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php + /* * Actions */ -if ($action == 'setnote_public' && $user->rights->commande->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once -else if ($action == 'setnote_private' && $user->rights->commande->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} /* * View diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 808d9163222..6d5f08873e3 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -51,10 +51,15 @@ $object = new Deplacement($db); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('tripsandexpensescard')); +$permissionnote=$user->rights->deplacement->creer; // Used by the include of actions_setnotes.inc.php + /* * Actions -*/ + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + if ($action == 'validate' && $user->rights->deplacement->creer) { $object->fetch($id); @@ -231,23 +236,11 @@ else if ($action == 'setkm' && $user->rights->deplacement->creer) $result=$object->setValueFrom('km',GETPOST('km','int')); if ($result < 0) dol_print_error($db, $object->error); } -else if ($action == 'setnote_public' && $user->rights->deplacement->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db, $object->error); -} -else if ($action == 'setnote_private' && $user->rights->deplacement->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db, $object->error); -} /* * View -*/ + */ llxHeader(); @@ -301,7 +294,7 @@ if ($action == 'create') print ''; print ''.$langs->trans('NotePublic').''; print ''; - + $doleditor = new DolEditor('note_public', GETPOST('note_public', 'alpha'), 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100); print $doleditor->Create(1); @@ -313,7 +306,7 @@ if ($action == 'create') print ''; print ''.$langs->trans('NotePrivate').''; print ''; - + $doleditor = new DolEditor('note_private', GETPOST('note_private', 'alpha'), 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100); print $doleditor->Create(1); @@ -400,7 +393,7 @@ else if ($id) $doleditor = new DolEditor('note_public', $object->note_public, 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '100'); print $doleditor->Create(1); - + print ""; // Private note @@ -437,7 +430,7 @@ else if ($id) if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); - + } $soc = new Societe($db); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 044cc203cf8..d059e47d555 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -100,6 +100,8 @@ if ($id > 0 || ! empty($ref)) // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('invoicecard')); +$permissionnote=$user->rights->facture->creer; // Used by the include of actions_setnotes.inc.php + /* * Actions @@ -108,6 +110,8 @@ $hookmanager->initHooks(array('invoicecard')); $parameters=array('socid'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + // Action clone object if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->facture->creer) @@ -367,20 +371,6 @@ else if ($action == 'set_ref_client' && $user->rights->facture->creer) $object->set_ref_client($_POST['ref_client']); } -else if ($action == 'setnote_public' && $user->rights->facture->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -else if ($action == 'setnote_private' && $user->rights->facture->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} - // Classify to validated else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->facture->valider) { diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 6092ba39e85..001473b0568 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -45,29 +45,20 @@ $result=restrictedArea($user,'facture',$id,''); $object = new Facture($db); $object->fetch($id); - -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ - -if ($action == 'setnote_public' && $user->rights->facture->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -else if ($action == 'setnote_private' && $user->rights->facture->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} +$permissionnote=$user->rights->facture->creer; // Used by the include of actions_setnotes.inc.php -/******************************************************************************/ -/* Affichage fiche */ -/******************************************************************************/ +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + + + +/* + * View + */ llxHeader(); diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 27a56b48825..4adb109b89f 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -41,26 +41,15 @@ $result = restrictedArea($user, 'societe', $id, '&societe'); $object = new Contact($db); if ($id > 0) $object->fetch($id); +$permissionnote=$user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php + + /* * Actions */ -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ -if ($action == 'setnote_public' && $user->rights->societe->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) setEventMessage($object->error,'errors'); -} +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once -else if ($action == 'setnote_private' && $user->rights->societe->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) setEventMessage($object->error,'errors'); -} /* * View @@ -91,16 +80,16 @@ if ($id > 0) print ''; $linkback = ''.$langs->trans("BackToList").''; - + // Ref print ''; - + // Name print ''; print ''; - + // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { @@ -108,10 +97,10 @@ if ($id > 0) { $objsoc = new Societe($db); $objsoc->fetch($object->socid); - + print ''; } - + else { print ''; } } - + // Civility print ''; - + // Date To Birth print ''; if (! empty($object->birthday)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - + print '"; } print ""; - + print "
    '.$langs->trans("Ref").''; print $form->showrefnav($object, 'id', $linkback); print '
    '.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.''.$langs->trans("Firstname").''.$object->firstname.'
    '.$langs->trans("Company").''.$objsoc->getNomUrl(1).'
    '.$langs->trans("Company").''; @@ -119,20 +108,20 @@ if ($id > 0) print '
    '.$langs->trans("UserTitle").''; print $object->getCivilityLabel(); print '
    '.$langs->trans("DateToBirth").''.dol_print_date($object->birthday,"day"); - + print '   '; //var_dump($birthdatearray); $ageyear=convertSecondToTime($now-$object->birthday,'year')-1970; @@ -140,8 +129,8 @@ if ($id > 0) if ($ageyear >= 2) print '('.$ageyear.' '.$langs->trans("DurationYears").')'; else if ($agemonth >= 2) print '('.$agemonth.' '.$langs->trans("DurationMonths").')'; else print '('.$agemonth.' '.$langs->trans("DurationMonth").')'; - - + + print '   -   '; if ($object->birthday_alert) print $langs->trans("BirthdayAlertOn"); else print $langs->trans("BirthdayAlertOff"); @@ -152,7 +141,7 @@ if ($id > 0) print ''.$langs->trans("DateToBirth").''.$langs->trans("Unknown")."
    "; print '
    '; diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 06b408d4fa2..ca87d798507 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -66,11 +66,15 @@ $hookmanager->initHooks(array('contractcard')); $object = new Contrat($db); +$permissionnote=$user->rights->contrat->creer; // Used by the include of actions_setnotes.inc.php + /* * Actions */ +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer) { $object->fetch($id); @@ -669,18 +673,6 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra } } -else if ($action == 'setnote_public' && $user->rights->contrat->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -else if ($action == 'setnote_private' && $user->rights->contrat->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} - if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat->creer) { if ($action == 'addcontact') diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index e2bac1c6016..05c4608da8a 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -43,28 +43,20 @@ $result=restrictedArea($user,'contrat',$id); $object = new Contrat($db); $object->fetch($id,$ref); +$permissionnote=$user->rights->contrat->creer; // Used by the include of actions_setnotes.inc.php -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ -if ($action == 'setnote_public' && $user->rights->contrat->creer) -{ - $result=$object->update_note(dol_html_entity_decode(dol_htmlcleanlastbr(GETPOST('note_public')), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} +/* + * Actions + */ -else if ($action == 'setnote_private' && $user->rights->contrat->creer) -{ - $result=$object->update_note(dol_html_entity_decode(dol_htmlcleanlastbr(GETPOST('note_private')), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once -/******************************************************************************/ -/* Affichage fiche */ -/******************************************************************************/ +/* + * View + */ llxHeader(); diff --git a/htdocs/core/actions_setnotes.inc.php b/htdocs/core/actions_setnotes.inc.php new file mode 100644 index 00000000000..3b2bbef75bb --- /dev/null +++ b/htdocs/core/actions_setnotes.inc.php @@ -0,0 +1,47 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/actions_setnotes.inc.php + * \brief Code for actions on setting notes of object page + */ + + +// $action must be defined +// $permission must be defined to permission to edit object +// $object must be defined (object is loaded in this file with fetch) +// $id must be defined (object is loaded in this file with fetch) + +// Set public note +if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel')) +{ + if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before'); + if (empty($object->id)) $object->fetch($id); // Fetch may not be already done + $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); + if ($result < 0) setEventMessage($object->error,'errors'); +} +// Set public note +else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel')) +{ + if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before'); + if (empty($object->id)) $object->fetch($id); // Fetch may not be already done + $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); + if ($result < 0) setEventMessage($object->error,'errors'); +} + +?> \ No newline at end of file diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d0df5591880..ba76f142534 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -191,10 +191,9 @@ class Form $ret.=''; if ($typeofdata != 'day' && $typeofdata != 'datepicker' && $typeofdata != 'datehourpicker') { - $ret.=''; - // TODO Add a button Cancel - //$ret.='

    '."\n"; - //$ret.=''; + $ret.=''; + $ret.='

    '."\n"; + $ret.=''; $ret.=''; } $ret.=''."\n"; diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index d0300dad278..0ef603a23f9 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -53,29 +53,19 @@ $result=restrictedArea($user, $origin, $origin_id); $object = new Expedition($db); $object->fetch($id); - -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ - -if ($action == 'setnote_public' && $user->rights->facture->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -else if ($action == 'setnote_private' && $user->rights->facture->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} +$permissionnote=$user->rights->expedition->creer; // Used by the include of actions_setnotes.inc.php -/******************************************************************************/ -/* Affichage fiche */ -/******************************************************************************/ +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + + +/* + * View + */ llxHeader(); diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 36178057338..ba5f4d986c4 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -88,12 +88,15 @@ if ($id > 0 || ! empty($ref)) if ($ret < 0) dol_print_error('',$object->error); } +$permissionnote=$user->rights->ficheinter->creer; // Used by the include of actions_setnotes.inc.php /* * Actions */ +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $result = $object->setValid($user); @@ -399,16 +402,6 @@ else if ($action == 'setdescription' && $user->rights->ficheinter->creer) $result=$object->set_description($user,GETPOST('description')); if ($result < 0) dol_print_error($db,$object->error); } -else if ($action == 'setnote_public' && $user->rights->ficheinter->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} -else if ($action == 'setnote_private' && $user->rights->ficheinter->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private'); - if ($result < 0) dol_print_error($db,$object->error); -} // Add line else if ($action == "addline" && $user->rights->ficheinter->creer) @@ -781,7 +774,7 @@ else if ($action == 'update_extras') $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute')); if ($ret < 0) $error++; - + if (! $error) { // Actions on extra fields (by external module or standard code) @@ -799,7 +792,7 @@ else if ($action == 'update_extras') } else if ($reshook < 0) $error++; } - + if ($error) $action = 'edit_extras'; } @@ -973,7 +966,7 @@ if ($action == 'create') if (! empty($conf->projet->enabled)) { $formproject=new FormProjets($db); - + $langs->load("project"); print ''.$langs->trans("Project").''; @@ -1103,7 +1096,7 @@ else if ($id > 0 || ! empty($ref)) if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1); - + } // Confirmation validation @@ -1127,21 +1120,21 @@ else if ($id > 0 || ! empty($ref)) $text=$langs->trans('ConfirmValidateIntervention',$numref); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate','',0,1); - + } // Confirmation de la validation de la fiche d'intervention if ($action == 'modify') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1); - + } // Confirmation de la suppression d'une ligne d'intervention if ($action == 'ask_deleteline') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&line_id='.GETPOST('line_id','int'), $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1); - + } print ''; @@ -1286,9 +1279,9 @@ else if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; - + print $extrafields->showInputField($key,$value); - + print ''; print ''; } diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index 3b7e8b5c960..6eea406fbfc 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -41,22 +41,13 @@ $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); $object->fetch($id,$ref); +$permissionnote=$user->rights->ficheinter->creer; // Used by the include of actions_setnotes.inc.php /* * Actions */ -if ($action == 'setnote_public' && $user->rights->ficheinter->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -else if ($action == 'setnote_private' && $user->rights->ficheinter->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once /* diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index dba0d7c8acc..214fc41770b 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -98,9 +98,15 @@ else if (! empty($socid) && $socid > 0) if ($ret < 0) dol_print_error($db,$object->error); } +$permissionnote=$user->rights->fournisseur->commande->creer; // Used by the include of actions_setnotes.inc.php + + /* * Actions */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer) { $result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha')); @@ -137,23 +143,11 @@ else if ($action == 'classin' && $user->rights->fournisseur->commande->creer) $object->setProject($projectid); } -else if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer) +else if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer) { $result = $object->set_remise($user, $_POST['remise_percent']); } -else if ($action == 'setnote_public' && $user->rights->fournisseur->commande->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -else if ($action == 'setnote_private' && $user->rights->fournisseur->commande->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} - else if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver) { if (in_array($object->statut, array(1, 5, 6, 7, 9))) diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 9e629414b63..7220f132f9c 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -44,21 +44,14 @@ $result = restrictedArea($user, 'fournisseur', $id, '', 'commande'); $object = new CommandeFournisseur($db); $object->fetch($id, $ref); +$permissionnote=$user->rights->fournisseur->commande->creer; // Used by the include of actions_setnotes.inc.php + /* * Actions */ -if ($action == 'setnote_public' && $user->rights->fournisseur->commande->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} -elseif ($action == 'setnote_private' && $user->rights->fournisseur->commande->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private'); - if ($result < 0) dol_print_error($db,$object->error); -} +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once /* diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 7402272fe73..6eb94d3ce07 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -82,12 +82,15 @@ if ($id > 0 || ! empty($ref)) $ret=$object->fetch($id, $ref); } +$permissionnote=$user->rights->fournisseur->facture->creer; // Used by the include of actions_setnotes.inc.php /* * Actions */ +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + // Action clone object if ($action == 'confirm_clone' && $confirm == 'yes') { @@ -237,18 +240,6 @@ elseif ($action == 'setdate_lim_reglement' && $user->rights->fournisseur->factur $result=$object->update($user); if ($result < 0) dol_print_error($db,$object->error); } -elseif ($action == 'setnote_public' && $user->rights->fournisseur->facture->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} -elseif ($action == 'setnote_private' && $user->rights->fournisseur->facture->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} // Delete payment elseif ($action == 'deletepaiement') diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index b4bb99dcefc..942d06daa94 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -43,22 +43,14 @@ $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $object = new FactureFournisseur($db); $object->fetch($id, $ref); +$permissionnote=$user->rights->fournisseur->facture->creer; // Used by the include of actions_setnotes.inc.php -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ +/* + * Actions + */ -if ($action == 'setnote_public' && $user->rights->fournisseur->facture->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} -elseif ($action == 'setnote_private' && $user->rights->fournisseur->facture->creer) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) dol_print_error($db,$object->error); -} +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once // Set label if ($action == 'setlabel' && $user->rights->fournisseur->facture->creer) diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index dddab2a5e79..9eb3ca646b3 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -47,25 +47,14 @@ $socid=0; if ($user->societe_id > 0) $socid=$user->societe_id; $result = restrictedArea($user, 'projet', $id); +$permissionnote=$user->rights->projet->creer; // Used by the include of actions_setnotes.inc.php -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ +/* + * Actions + */ -if ($action == 'setnote_public' && $user->rights->projet->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -if ($action == 'setnote_private' && $user->rights->projet->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private'); - if ($result < 0) dol_print_error($db,$object->error); -} +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once /* diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 1b6bebeb9d5..c2e2451263d 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -85,18 +85,7 @@ $permission=($user->rights->projet->creer || $user->rights->projet->all->creer); * Actions */ -if ($action == 'setnote_public' && ! empty($permission)) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) dol_print_error($db,$object->error); -} - -else if ($action == 'setnote_private' && ! empty($permission)) -{ - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private'); - if ($result < 0) dol_print_error($db,$object->error); -} - +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; /* diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 1928ba914a0..0d87f98854b 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -40,26 +40,15 @@ $result = restrictedArea($user, 'societe', $id, '&societe'); $object = new Societe($db); if ($id > 0) $object->fetch($id); +$permissionnote=$user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php + + /* * Actions */ -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ -if ($action == 'setnote_public' && $user->rights->societe->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) setEventMessage($object->error,'errors'); -} +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once -else if ($action == 'setnote_private' && $user->rights->societe->creer) -{ - $object->fetch($id); - $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) setEventMessage($object->error,'errors'); -} /* * View From eaf3bd5679f0c0d3bee3b0930be67fd03e0916dd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 11 Jan 2014 13:34:39 +0100 Subject: [PATCH 157/177] Update doc --- ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e04040366a9..d065830edb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,9 +9,9 @@ For users: - New: Add option MAIN_HIDE_INACTIVETAB_ON_PRINT to hide inactive tabs when you use the "print" view on screen. - New: Add menu entry to barcode genration page. -- New: Start to work on option MAIN_AUTO_TIMESTAMP_IN_NOTES to - automatically add timestamp and user line into comment. Remain to do: - Add button "cancel" into note edition mode. +- New: Add option MAIN_AUTO_TIMESTAMP_IN_NOTES to automatically add timestamp + and user line into editionf field when editing a note. +- New: Add button cancel into edition of notes. For translators: - Update language files. From 02989b9f32c125fcf45ea34b67d9906bafaf4a0d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Jan 2014 14:11:03 +0100 Subject: [PATCH 158/177] New: An external module can add tabs with a label that is a dynamic value. Qual: The deprecated way (with 4 parameters) to declare a new tab into a module descriptor file has been removed. You must now use the 6 parameters way. See file modMyModule.class.php for example. --- ChangeLog | 6 ++++++ htdocs/core/lib/functions.lib.php | 31 +++++++++++++++++++------------ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index d065830edb9..55e398c9bd9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,12 @@ For developers: - New: Add option 'aZ' into GETPOST function to check parameters contains only a to z or A to Z characters. +WARNING: Following change may create regression for some external modules, but was necessary to make +Dolibarr better: + +- The deprecated way (with 4 parameters) to declare a new tab into a module descriptor file has been +removed. You must now use the 6 parameters way. See file modMyModule.class.php for example. + ***** ChangeLog for 3.5 compared to 3.4.* ***** For users: diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6054cfff399..906eb08dd81 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4330,30 +4330,37 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode= if (verifCond($values[4])) { if ($values[3]) $langs->load($values[3]); + if (preg_match('/SUBSTITUTION_([^_]+)/i',$values[2],$reg)) + { + $substitutionarray=array(); + complete_substitutions_array($substitutionarray,$langs,$object); + $label=make_substitutions($reg[1], $substitutionarray); + } + else $label=$langs->trans($values[2]); + $head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', ((is_object($object) && ! empty($object->id))?$object->id:''), $values[5]), 1); - $head[$h][1] = $langs->trans($values[2]); + $head[$h][1] = $label; $head[$h][2] = str_replace('+','',$values[1]); $h++; } } - else if (count($values) == 5) // new declaration + else if (count($values) == 5) // deprecated { if ($values[0] != $type) continue; if ($values[3]) $langs->load($values[3]); + if (preg_match('/SUBSTITUTION_([^_]+)/i',$values[2],$reg)) + { + $substitutionarray=array(); + complete_substitutions_array($substitutionarray,$langs,$object); + $label=make_substitutions($reg[1], $substitutionarray); + } + else $label=$langs->trans($values[2]); + $head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', ((is_object($object) && ! empty($object->id))?$object->id:''), $values[4]), 1); - $head[$h][1] = $langs->trans($values[2]); + $head[$h][1] = $label; $head[$h][2] = str_replace('+','',$values[1]); $h++; } - else if (count($values) == 4) // old declaration, for backward compatibility - { - if ($values[0] != $type) continue; - if ($values[2]) $langs->load($values[2]); - $head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', ((is_object($object) && ! empty($object->id))?$object->id:''), $values[3]), 1); - $head[$h][1] = $langs->trans($values[1]); - $head[$h][2] = 'tab'.$values[1]; - $h++; - } } else if ($mode == 'remove' && preg_match('/^\-/',$values[1])) { From c3360c4c304e3f092bb34f17f17bed3352065eab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Jan 2014 14:51:54 +0100 Subject: [PATCH 159/177] Fix: Bad merge --- ChangeLog | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e76e259c9b6..27ce4abbbcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,9 +22,10 @@ For developers: - New: Add path file of trigger into admin trigger list page. - New: More phpunit tests. - New: Payments and supplier payment pages tabs can now be extended from modules. -<<<<<<< HEAD - New: Add option 'aZ' into GETPOST function to check parameters contains only a to z or A to Z characters. +- New: Opensurvey polls tab cards can now be extended from external modules. +- New: Triggers OPENSURVEY_CREATE, OPENSURVEY_DELETE WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: @@ -32,10 +33,6 @@ Dolibarr better: - The deprecated way (with 4 parameters) to declare a new tab into a module descriptor file has been removed. You must now use the 6 parameters way. See file modMyModule.class.php for example. -======= -- New: Opensurvey polls tab cards can now be extended from external modules. -- New: Triggers OPENSURVEY_CREATE, OPENSURVEY_DELETE ->>>>>>> 2313ea01dda16f3dc73c718bee2bf1c38291fa49 ***** ChangeLog for 3.5 compared to 3.4.* ***** For users: From 28204d66b1046ff8a5c62b87bd1955495689e4e2 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Fri, 10 Jan 2014 10:35:42 +0100 Subject: [PATCH 160/177] Update modFacture.class.php remplace price by subprice on export invoice --- htdocs/core/modules/modFacture.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 4e88c561306..76647f4a1b5 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -178,10 +178,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancyBuyCode'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancyBuyCode'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.subprice'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product'); $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; From 1cf058b8e953a9a4b521adb05f39fa9ca58f892a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Jan 2014 15:12:25 +0100 Subject: [PATCH 161/177] Bad comment --- htdocs/webservices/server_productorservice.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 55de6300de9..6d845a42c26 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -333,11 +333,11 @@ function getProductOrService($authentication,$id='',$ref='',$ref_ext='') { $product=new Product($db); $result=$product->fetch($id,$ref,$ref_ext); - + if ($result > 0) { $product->load_stock(); - + $dir = (!empty($conf->product->dir_output)?$conf->product->dir_output:$conf->service->dir_output); $pdir = get_exdir($product->id,2) . $product->id ."/photos/"; $dir = $dir . '/'. $pdir; @@ -552,7 +552,7 @@ function updateProductOrService($authentication,$product) $newobject=new Product($db); $newobject->fetch($product['id']); - + if (isset($product['ref'])) $newobject->ref=$product['ref']; if (isset($product['ref_ext'])) $newobject->ref_ext=$product['ref_ext']; $newobject->type=$product['type']; @@ -741,7 +741,7 @@ function getProductsForCategory($authentication,$id) $sql .= " ORDER BY fk_".$field." ASC" ; - dol_syslog("GetProductsForCategory::get_type sql=".$sql); + dol_syslog("getProductsForCategory get id of product into category sql=".$sql); $res = $db->query($sql); if ($res) { From 51b455b85aa4658eae5cb9d8dd922ab4fb45c45c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Jan 2014 15:54:28 +0100 Subject: [PATCH 162/177] Start to normalize code for category to not use named table, columns but only type of category. --- htdocs/categories/class/categorie.class.php | 57 ++++++++++++--------- htdocs/categories/viewcat.php | 16 +++--- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 9f4be55eb40..7a6e34ec346 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -499,7 +499,7 @@ class Categorie $column_name=$type; if ($type=='contact') $column_name='socpeople'; if ($type=='fournisseur') $column_name='societe'; - + $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_".$type; $sql .= " WHERE fk_categorie = ".$this->id; $sql .= " AND fk_".$column_name." = ".$obj->id; @@ -528,16 +528,20 @@ class Categorie } /** - * Return list of id of elements having this category + * Return list of fetched instance of elements having this category * - * @param string $field Field name for select in table. Full field name will be fk_field. - * @param string $classname PHP Class of object to store entity - * @param string $category_table Table name for select in table. Full table name will be PREFIX_categorie_table. - * @param string $object_table Table name for select in table. Full table name will be PREFIX_table. - * @return mixed -1 if KO, array of instance of object if OK + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') + * @return mixed -1 if KO, array of instance of object if OK */ - function get_type($field,$classname,$category_table='',$object_table='') + function getObjectsInCateg($type) { + $field=''; $classname=''; $category_table=''; $object_table=''; + if ($type=='product') { $field='product'; $classname='Product'; } + if ($type=='customer') { $field='societe'; $classname='Societe'; } + if ($type=='supplier') { $field='societe'; $classname='Fournisseur'; $category_table='fournisseur'; } + if ($type=='member') { $field='member'; $classname='Adherent'; $category_table=''; $object_table='adherent'; } + if ($type=='contact') { $field='socpeople'; $classname='Contact'; $category_table='contact'; $object_table='socpeople'; } + $objs = array(); // Clean parameters @@ -551,7 +555,7 @@ class Categorie $sql.= " AND c.fk_categorie = ".$this->id; $sql.= " AND c.fk_".$field." = o.rowid"; - dol_syslog(get_class($this)."::get_type sql=".$sql); + dol_syslog(get_class($this)."::getObjectsInCateg sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -566,7 +570,7 @@ class Categorie else { $this->error=$this->db->error().' sql='.$sql; - dol_syslog(get_class($this)."::get_type ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::getObjectsInCateg ".$this->error, LOG_ERR); return -1; } } @@ -583,7 +587,6 @@ class Categorie $sql.= " WHERE fk_parent = ".$this->id; $res = $this->db->query($sql); - if ($res) { $cats = array (); @@ -1054,23 +1057,24 @@ class Categorie } /** - * Return list of categories linked to element of id $id and type $typeid + * Return list of categories (id or instances) linked to element of id $id and type $type + * Should be named getListOfCategForObject * * @param int $id Id of element - * @param int $typeid Type of link (0 or 'product', 1 or 'supplier', 2 or 'customer', 3 or 'member', ...) - * @param string $mode 'object'=Get array of categories, 'label'=Get array of category labels + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact'). Old mode (0, 1, 2, ...) is deprecated. + * @param string $mode 'object'=Get array of fetched category instances, 'label'=Get array of category labels * @return mixed Array of category objects or < 0 if KO */ - function containing($id,$typeid,$mode='object') + function containing($id,$type,$mode='object') { $cats = array(); - $table=''; $type=''; - if ($typeid == 0 || $typeid == 'product') { $typeid=0; $table='product'; $type='product'; } - else if ($typeid == 1 || $typeid == 'supplier') { $typeid=1; $table='societe'; $type='fournisseur'; } - else if ($typeid == 2 || $typeid == 'customer') { $typeid=2; $table='societe'; $type='societe'; } - else if ($typeid == 3 || $typeid == 'member') { $typeid=3; $table='member'; $type='member'; } - else if ($typeid == 4 || $typeid == 'contact') { $typeid=4; $table='socpeople'; $type='contact'; } + $typeid=-1; $table='';; + if ($type == '0' || $type == 'product') { $typeid=0; $table='product'; $type='product'; } + else if ($type == '1' || $type == 'supplier') { $typeid=1; $table='societe'; $type='fournisseur'; } + else if ($type == '2' || $type == 'customer') { $typeid=2; $table='societe'; $type='societe'; } + else if ($type == '3' || $type == 'member') { $typeid=3; $table='member'; $type='member'; } + else if ($type == '4' || $type == 'contact') { $typeid=4; $table='socpeople'; $type='contact'; } $sql = "SELECT ct.fk_categorie, c.label"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie_".$type." as ct, ".MAIN_DB_PREFIX."categorie as c"; @@ -1110,7 +1114,7 @@ class Categorie * * @param int $id Id * @param string $nom Name - * @param string $type Type + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact'). Old mode (0, 1, 2, ...) is deprecated. * @param boolean $exact Exact string search (true/false) * @param boolean $case Case sensitive (true/false) * @return array Array of category id @@ -1119,9 +1123,16 @@ class Categorie { $cats = array(); + $typeid=-1; + if ($type == 0 || $type == 'product') { $typeid=0; } + else if ($type == 1 || $type == 'supplier') { $typeid=1; } + else if ($type == 2 || $type == 'customer') { $typeid=2; } + else if ($type == 3 || $type == 'member') { $typeid=3; } + else if ($type == 4 || $type == 'contact') { $typeid=4; } + // Generation requete recherche $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie"; - $sql.= " WHERE type = ".$type." "; + $sql.= " WHERE type = ".$typeid; $sql.= " AND entity IN (".getEntity('category',1).")"; if ($nom) { diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 7aa9aa0b964..53bd6179000 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -92,13 +92,13 @@ if ($id > 0 && $removeelem > 0) $elementtype = 'member'; } else if ($type == 4 && $user->rights->societe->creer) { - + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $tmpobject = new Contact($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'contact'; } - + $result=$object->del_type($tmpobject,$elementtype); if ($result < 0) dol_print_error('',$object->error); } @@ -247,7 +247,7 @@ else if ($object->type == 0) { - $prods = $object->get_type("product","Product"); + $prods = $object->getObjectsInCateg("product"); if ($prods < 0) { dol_print_error(); @@ -297,7 +297,7 @@ if ($object->type == 0) if ($object->type == 1) { - $socs = $object->get_type("societe","Fournisseur","fournisseur"); + $socs = $object->getObjectsInCateg("supplier"); if ($socs < 0) { dol_print_error(); @@ -334,7 +334,7 @@ if ($object->type == 1) print $langs->trans("DeleteFromCat").""; } print ''; - + print "\n"; } } @@ -348,7 +348,7 @@ if ($object->type == 1) if($object->type == 2) { - $socs = $object->get_type("societe","Societe"); + $socs = $object->getObjectsInCateg("customer"); if ($socs < 0) { dol_print_error(); @@ -404,7 +404,7 @@ if ($object->type == 3) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; - $prods = $object->get_type("member","Adherent","","adherent"); + $prods = $object->getObjectsInCateg("member"); if ($prods < 0) { dol_print_error($db,$object->error); @@ -456,7 +456,7 @@ if ($object->type == 3) //Categorie contact if($object->type == 4) { - $contacts = $object->get_type("socpeople","Contact",'contact',"socpeople"); + $contacts = $object->getObjectsInCateg("contact"); if ($contacts < 0) { dol_print_error(); From ffeb2778e59de27d891026b004015373cde8f97f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Jan 2014 19:23:36 +0100 Subject: [PATCH 163/177] Fix: path to image must not be hardcoded but use dol_buildpath or img_picto with param src=1. --- htdocs/fourn/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 87c3c7e6dc8..f7d62f8692e 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -217,7 +217,7 @@ if ($user->rights->fournisseur->facture->lire) print ''; print "\n"; From 0990ef39618fb81f75f4430a95e681c28605e250 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Jan 2014 20:02:41 +0100 Subject: [PATCH 164/177] Update code comments and add log warning to help debug --- htdocs/core/class/conf.class.php | 12 ++++++++---- htdocs/main.inc.php | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 64dd4c8b9fa..903694128f9 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -156,15 +156,19 @@ class Conf if ($value && preg_match('/^MAIN_MODULE_/',$key)) { - // If this is constant for a new tab page activated by a module. + // If this is constant for a new tab page activated by a module. It initializes modules_parts['tabs']. if (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_TABS_/i',$key)) { $partname = 'tabs'; $params=explode(':',$value,2); if (! isset($this->modules_parts[$partname]) || ! is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } - $this->modules_parts[$partname][$params[0]][]=$value; + $this->modules_parts[$partname][$params[0]][]=$value; // $value may be a string or an array } - // If this is constant for all generic part activated by a module + // If this is constant for all generic part activated by a module. It initializes + // modules_parts['login'], modules_parts['menus'], modules_parts['substitutions'], modules_parts['triggers'], modules_parts['tpl'], + // modules_parts['models'], modules_parts['theme'] + // modules_parts['sms'], + // modules_parts['css'], ... elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_([A-Z]+)$/i',$key,$reg)) { $modulename = strtolower($reg[1]); @@ -176,7 +180,7 @@ class Conf else if (in_array($partname,array('models','theme'))) $value = '/'.$modulename.'/'; else if (in_array($partname,array('sms'))) $value = $modulename; else if ($value == 1) $value = '/'.$modulename.'/core/modules/'.$partname.'/'; // ex: partname = societe - $this->modules_parts[$partname] = array_merge($this->modules_parts[$partname], array($modulename => $value)); + $this->modules_parts[$partname] = array_merge($this->modules_parts[$partname], array($modulename => $value)); // $value may be a string or an array } // If this is a module constant (must be at end) elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)$/i',$key,$reg)) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 6ffb94a1bc9..6f535821abe 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1047,6 +1047,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs $filescss=(array) $filescss; // To be sure filecss is an array foreach($filescss as $cssfile) { + if (empty($cssfile)) dol_syslog("Warning: module ".$modcss." declared a css path file into its descriptor that is empty.", LOG_WARNING); // cssfile is a relative path print ''."\n".''."\n"; From 4d298b1891d4e2036a50539529b326b56096e425 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Jan 2014 20:02:41 +0100 Subject: [PATCH 165/177] Update code comments and add log warning to help debug --- htdocs/core/class/conf.class.php | 12 ++++++++---- htdocs/main.inc.php | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 64dd4c8b9fa..903694128f9 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -156,15 +156,19 @@ class Conf if ($value && preg_match('/^MAIN_MODULE_/',$key)) { - // If this is constant for a new tab page activated by a module. + // If this is constant for a new tab page activated by a module. It initializes modules_parts['tabs']. if (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_TABS_/i',$key)) { $partname = 'tabs'; $params=explode(':',$value,2); if (! isset($this->modules_parts[$partname]) || ! is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } - $this->modules_parts[$partname][$params[0]][]=$value; + $this->modules_parts[$partname][$params[0]][]=$value; // $value may be a string or an array } - // If this is constant for all generic part activated by a module + // If this is constant for all generic part activated by a module. It initializes + // modules_parts['login'], modules_parts['menus'], modules_parts['substitutions'], modules_parts['triggers'], modules_parts['tpl'], + // modules_parts['models'], modules_parts['theme'] + // modules_parts['sms'], + // modules_parts['css'], ... elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_([A-Z]+)$/i',$key,$reg)) { $modulename = strtolower($reg[1]); @@ -176,7 +180,7 @@ class Conf else if (in_array($partname,array('models','theme'))) $value = '/'.$modulename.'/'; else if (in_array($partname,array('sms'))) $value = $modulename; else if ($value == 1) $value = '/'.$modulename.'/core/modules/'.$partname.'/'; // ex: partname = societe - $this->modules_parts[$partname] = array_merge($this->modules_parts[$partname], array($modulename => $value)); + $this->modules_parts[$partname] = array_merge($this->modules_parts[$partname], array($modulename => $value)); // $value may be a string or an array } // If this is a module constant (must be at end) elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)$/i',$key,$reg)) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index e8342224c4b..d931eb526f3 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1047,6 +1047,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs $filescss=(array) $filescss; // To be sure filecss is an array foreach($filescss as $cssfile) { + if (empty($cssfile)) dol_syslog("Warning: module ".$modcss." declared a css path file into its descriptor that is empty.", LOG_WARNING); // cssfile is a relative path print ''."\n".''."\n"; From 0f329e72efb871dc9f1bf1ca759a9d421f8a57c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Jan 2014 20:22:35 +0100 Subject: [PATCH 166/177] Fix: MAIN_FORCETHEME was not working when user set its own theme --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index d931eb526f3..9e48cb25812 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -680,8 +680,8 @@ if (! defined('NOLOGIN')) if (isset($user->conf->MAIN_SIZE_LISTE_LIMIT)) $conf->liste_limit = $user->conf->MAIN_SIZE_LISTE_LIMIT; // Can be 0 if (isset($user->conf->PRODUIT_LIMIT_SIZE)) $conf->product->limit_size = $user->conf->PRODUIT_LIMIT_SIZE; // Can be 0 - // Replace conf->css by personalized value - if (isset($user->conf->MAIN_THEME) && $user->conf->MAIN_THEME) + // Replace conf->css by personalized value if theme not forced + if (empty($conf->global->MAIN_FORCETHEME) && ! empty($user->conf->MAIN_THEME)) { $conf->theme=$user->conf->MAIN_THEME; $conf->css = "/theme/".$conf->theme."/style.css.php"; From 911c43c86281bb54c3e99c91800393e3602e1754 Mon Sep 17 00:00:00 2001 From: Cedric GROSS Date: Mon, 13 Jan 2014 19:46:23 +0100 Subject: [PATCH 167/177] Fix bug on stock calculation for replenishment: wrong order in ifsql. --- htdocs/product/stock/replenish.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 788bd8fee09..27bab21d2e8 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -176,7 +176,7 @@ $sql = 'SELECT p.rowid, p.ref, p.label, p.price,'; $sql.= ' p.price_ttc, p.price_base_type,p.fk_product_type,'; $sql.= ' p.tms as datem, p.duration, p.tobuy, p.seuil_stock_alerte,'; $sql.= ' p.desiredstock,'; -$sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "s.reel", "0").') as stock_physique'; +$sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') as stock_physique'; $sql.= ' FROM ' . MAIN_DB_PREFIX . 'product as p'; $sql.= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s'; $sql.= ' ON p.rowid = s.fk_product'; @@ -219,7 +219,7 @@ $sql.= ' HAVING p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel $sql.= ' AND p.desiredstock > 0'; if ($salert == 'on') // Option to see when stock is lower than alert { - $sql .= ' AND SUM('.$db->ifsql("s.reel IS NULL", "s.reel", "0").') < p.seuil_stock_alerte AND p.seuil_stock_alerte is not NULL'; + $sql .= ' AND SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') < p.seuil_stock_alerte AND p.seuil_stock_alerte is not NULL'; $alertchecked = 'checked="checked"'; } $sql.= $db->order($sortfield,$sortorder); From fce9baddf09ceff31e768aa52d332f2bd30181f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jan 2014 17:21:13 +0100 Subject: [PATCH 168/177] New: Add substitution key into emailing module to include securitykey used for paypal links into email. --- htdocs/comm/mailing/fiche.php | 14 ++++++++++++-- scripts/emailings/mailing-send.php | 30 ++++++++++++++++++------------ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 3510df7339e..dfd88d42cbd 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -71,6 +71,11 @@ $object->substitutionarray=array( '__UNSUBSCRIBE__' => 'TagUnsubscribe' //,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet ); +if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN)) +{ + $object->substitutionarray['__SECUREKEYPAYPAL__']='SecureKeyPaypal'; + if (! empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $object->substitutionarray['__SECUREKEYPAYPAL_MEMBER__']='SecureKeyPaypalUniquePerMember'; +} $object->substitutionarrayfortest=array( '__ID__' => 'TESTIdRecord', @@ -86,7 +91,7 @@ $object->substitutionarrayfortest=array( '__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$user->signature:''), '__CHECK_READ__' => 'TagCheckMail', '__UNSUBSCRIBE__' => 'TagUnsubscribe' -//,'__PERSONALIZED__' => 'TESTPersonalized' // Not used yet + //,'__PERSONALIZED__' => 'TESTPersonalized' // Not used yet ); @@ -222,7 +227,12 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') '__OTHER4__' => $other4, '__OTHER5__' => $other5 ); - + if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN)) + { + $substitutionarray['__SECUREKEYPAYPAL__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); + if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $substitutionarray['__SECUREKEYPAYPAL_MEMBER__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); + else $substitutionarray['__SECUREKEYPAYPAL_MEMBER__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . 'membersubscription' . $obj->source_id, 2); + } $substitutionisok=true; complete_substitutions_array($substitutionarray, $langs); $newsubject=make_substitutions($subject,$substitutionarray); diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index c6fffdcc59f..4742cf59b18 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -145,19 +145,25 @@ if ($resql) $other4=$other[3]; $other5=$other[4]; $substitutionarray=array( - '__ID__' => $obj->source_id, - '__EMAIL__' => $obj->email, - '__CHECK_READ__' => '', - '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', - '__MAILTOEMAIL__' => ''.$obj2->email.'', - '__LASTNAME__' => $obj2->lastname, - '__FIRSTNAME__' => $obj2->firstname, - '__OTHER1__' => $other1, - '__OTHER2__' => $other2, - '__OTHER3__' => $other3, - '__OTHER4__' => $other4, - '__OTHER5__' => $other5 + '__ID__' => $obj->source_id, + '__EMAIL__' => $obj->email, + '__CHECK_READ__' => '', + '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', + '__MAILTOEMAIL__' => ''.$obj2->email.'', + '__LASTNAME__' => $obj2->lastname, + '__FIRSTNAME__' => $obj2->firstname, + '__OTHER1__' => $other1, + '__OTHER2__' => $other2, + '__OTHER3__' => $other3, + '__OTHER4__' => $other4, + '__OTHER5__' => $other5 ); + if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN)) + { + $substitutionarray['__SECUREKEYPAYPAL__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); + if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $substitutionarray['__SECUREKEYPAYPAL_MEMBER__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); + else $substitutionarray['__SECUREKEYPAYPAL_MEMBER__']=dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . 'membersubscription' . $obj->source_id, 2); + } complete_substitutions_array($substitutionarray,$langs); $newsubject=make_substitutions($subject,$substitutionarray); From b5620d5f154fbd76e26152f1d3250c1a53ea8a64 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jan 2014 17:52:16 +0100 Subject: [PATCH 169/177] New: The box "balance of bank accounts" show all opened accounts. --- ChangeLog | 1 + htdocs/core/boxes/box_comptes.php | 2 +- htdocs/langs/en_US/boxes.lang | 4 ++-- htdocs/langs/fr_FR/boxes.lang | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27ce4abbbcf..ad9fd2c08f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ For users: - New: Add button cancel into edition of notes. - New: Improved Opensurvey module and added options to disable comments and disable public votes +- New: The box "balance of bank accounts" show all opened accounts. For translators: - Update language files. diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 9b80ffefb74..17fd2a63fed 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -85,7 +85,7 @@ class box_comptes extends ModeleBoxes $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql.= " WHERE entity = ".$conf->entity; $sql.= " AND clos = 0"; - $sql.= " AND courant = 1"; + //$sql.= " AND courant = 1"; $sql.= " ORDER BY label"; $sql.= $db->plimit($max, 0); diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index aceee7db3a0..e7e9da7dc1b 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -18,7 +18,7 @@ BoxLastContracts=Last contracts BoxLastContacts=Last contacts/addresses BoxLastMembers=Last members BoxFicheInter=Last interventions -BoxCurrentAccounts=Current accounts balance +BoxCurrentAccounts=Opened accounts balance BoxSalesTurnover=Sales turnover BoxTotalUnpaidCustomerBills=Total unpaid customer's invoices BoxTotalUnpaidSuppliersBills=Total unpaid supplier's invoices @@ -43,7 +43,7 @@ BoxTitleLastModifiedMembers=Last %s modified members BoxTitleLastFicheInter=Last %s modified intervention BoxTitleOldestUnpaidCustomerBills=Oldest %s unpaid customer's invoices BoxTitleOldestUnpaidSupplierBills=Oldest %s unpaid supplier's invoices -BoxTitleCurrentAccounts=Current account's balances +BoxTitleCurrentAccounts=Opened account's balances BoxTitleSalesTurnover=Sales turnover BoxTitleTotalUnpaidCustomerBills=Unpaid customer's invoices BoxTitleTotalUnpaidSuppliersBills=Unpaid supplier's invoices diff --git a/htdocs/langs/fr_FR/boxes.lang b/htdocs/langs/fr_FR/boxes.lang index 314faf964bc..bef2dea85fe 100644 --- a/htdocs/langs/fr_FR/boxes.lang +++ b/htdocs/langs/fr_FR/boxes.lang @@ -18,7 +18,7 @@ BoxLastContracts=Derniers contrats BoxLastContacts=Derniers contacts/adresses BoxLastMembers=Derniers adhérents modifiés BoxFicheInter=Dernières fiches d'intervention modifiées -BoxCurrentAccounts=Soldes des comptes courants +BoxCurrentAccounts=Soldes des comptes ouverts BoxSalesTurnover=Chiffre d'affaires BoxTotalUnpaidCustomerBills=Total des factures clients impayées BoxTotalUnpaidSuppliersBills=Total des factures fournisseurs impayées @@ -43,7 +43,7 @@ BoxTitleLastModifiedMembers=Les %s derniers adhérents modifiés BoxTitleLastFicheInter=Les %s dernières fiches d'intervention modifiées BoxTitleOldestUnpaidCustomerBills=Les %s plus anciennes factures clients impayées BoxTitleOldestUnpaidSupplierBills=Les %s plus anciennes factures fournisseurs impayées -BoxTitleCurrentAccounts=Les soldes des comptes courants +BoxTitleCurrentAccounts=Les soldes des comptes ouverts BoxTitleSalesTurnover=Le chiffre d'affaires réalisé BoxTitleTotalUnpaidCustomerBills=Impayés clients BoxTitleTotalUnpaidSuppliersBills=Impayés fournisseurs From ad5fc43e5b09cc1e950b6ed1be18a35812a6274a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jan 2014 18:20:24 +0100 Subject: [PATCH 170/177] doxygen --- htdocs/core/modules/modOpenSurvey.class.php | 5 +---- htdocs/core/modules/modSkype.class.php | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index 6743d415ff1..9f643170588 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -17,11 +17,8 @@ */ /** - * \defgroup opensurvey Module OpenSurvey + * \defgroup opensurvey Module opensurvey * \brief Module to OpenSurvey integration. - */ - -/** * \file htdocs/core/modules/modOpenSurvey.class.php * \ingroup opensurvey * \brief Description and activation file for module OpenSurvey diff --git a/htdocs/core/modules/modSkype.class.php b/htdocs/core/modules/modSkype.class.php index 6f7da0d3e73..6a009956b5b 100644 --- a/htdocs/core/modules/modSkype.class.php +++ b/htdocs/core/modules/modSkype.class.php @@ -16,11 +16,11 @@ */ /** - * \defgroup Skype Module Skype + * \defgroup Skype Module skype * \brief Add a skype button. * \file htdocs/core/modules/modSkype.class.php * \ingroup Skype - * \brief Description and activation file for module Skype + * \brief Description and activation file for module skype */ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; From aa69927089744ec3644e0bd94b26c9cd0f52bd8e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jan 2014 18:35:15 +0100 Subject: [PATCH 171/177] Move table title nowrap tag at a better place. --- htdocs/core/lib/functions.lib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 906eb08dd81..31e2a1344b4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2406,8 +2406,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m // If field is used as sort criteria we use a specific class // Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom") - if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel'.($field?' nowrap':'').'" '. $moreattrib.'>'; - else $out.= '<'.$tag.' class="liste_titre'.($field?' nowrap':'').'" '. $moreattrib.'>'; + if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel" '. $moreattrib.'>'; + else $out.= '<'.$tag.' class="liste_titre" '. $moreattrib.'>'; if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field { @@ -2435,7 +2435,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m if (! preg_match('/^&/',$options)) $options='&'.$options; //print " "; - $out.= ''; + $out.= ''; if (! $sortorder || $field != $sortfield) { @@ -2453,6 +2453,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m $out.= ''.img_up("Z-A",0).''; } } + + $out.= ''; } $out.=''; From b3229a402196259fda8d0003d385942b40281b04 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jan 2014 19:23:33 +0100 Subject: [PATCH 172/177] Qual: Add error message if using wrong parameter into upgrade.php script First try to test migration into travis. --- .travis.yml | 7 ++-- htdocs/install/upgrade.php | 81 +++++++++++++++++++++----------------- 2 files changed, 48 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26d4c64fef2..70c20af872d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ before_script: - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE myapp_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'DROP DATABASE IF EXISTS myapp_test;'; fi" - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS myapp_test;'; fi" - - sh -c "if [ '$DB' = 'mysql' ]; then mysql -D myapp_test < $(pwd)/dev/initdata/mysqldump_dolibarr_3.5.0.sql; fi" + - sh -c "if [ '$DB' = 'mysql' ]; then mysql -D myapp_test < $(pwd)/dev/initdata/mysqldump_dolibarr_3.4.0.sql; fi" - echo Create config file htdocs/conf/conf.php - echo ' htdocs/conf/conf.php - sh -c "if [ '$DB' = 'pgsql' ]; then echo '$'dolibarr_main_db_type=\'pgsql\'';' >> htdocs/conf/conf.php; fi" @@ -84,13 +84,14 @@ before_script: script: + - cd htdocs/install; php upgrade.php 3.4.0 3.5.0 # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php # - phpcs --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php - - phpcs --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . +# - phpcs --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . # - phpcs --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . - - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php +# - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php after_script: # - echo Output dolibarr log file; cat $(pwd)/htdocs/documents/dolibarr.log diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 904144cad66..ccb19aa352a 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -365,47 +365,54 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) } } - // Loop on each migrate files - foreach($filelist as $file) + if (count($filelist) == 0) { - print ''; - print ''."\n"; - - // Run sql script - $ok=run_sql($dir.$file, 0, '', 1); - - // Scan if there is migration scripts for modules htdocs/module/sql or htdocs/custom/module/sql - $modulesfile = array(); - foreach ($conf->file->dol_document_root as $type => $dirroot) - { - $handlemodule=@opendir($dirroot); // $dirroot may be '..' - if (is_resource($handlemodule)) - { - while (($filemodule = readdir($handlemodule))!==false) - { - if (! preg_match('/\./',$filemodule) && is_dir($dirroot.'/'.$filemodule.'/sql')) // We exclude filemodule that contains . (are not directories) and are not directories. - { - //print "Scan for ".$dirroot . '/' . $filemodule . '/sql/'.$file; - if (is_file($dirroot . '/' . $filemodule . '/sql/'.$file)) - { - $modulesfile[$dirroot . '/' . $filemodule . '/sql/'.$file] = '/' . $filemodule . '/sql/'.$file; - } - } - } - closedir($handlemodule); - } - } - - foreach ($modulesfile as $modulefilelong => $modulefileshort) - { - print ''; - print ''."\n"; + print '
    '.$langs->trans("ErrorNoMigrationFilesFoundForParameters").'
    '; + } + else + { + // Loop on each migrate files + foreach($filelist as $file) + { + print ''; + print ''."\n"; // Run sql script - $okmodule=run_sql($modulefilelong, 0, '', 1); // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not. - } + $ok=run_sql($dir.$file, 0, '', 1); - } + // Scan if there is migration scripts for modules htdocs/module/sql or htdocs/custom/module/sql + $modulesfile = array(); + foreach ($conf->file->dol_document_root as $type => $dirroot) + { + $handlemodule=@opendir($dirroot); // $dirroot may be '..' + if (is_resource($handlemodule)) + { + while (($filemodule = readdir($handlemodule))!==false) + { + if (! preg_match('/\./',$filemodule) && is_dir($dirroot.'/'.$filemodule.'/sql')) // We exclude filemodule that contains . (are not directories) and are not directories. + { + //print "Scan for ".$dirroot . '/' . $filemodule . '/sql/'.$file; + if (is_file($dirroot . '/' . $filemodule . '/sql/'.$file)) + { + $modulesfile[$dirroot . '/' . $filemodule . '/sql/'.$file] = '/' . $filemodule . '/sql/'.$file; + } + } + } + closedir($handlemodule); + } + } + + foreach ($modulesfile as $modulefilelong => $modulefileshort) + { + print ''; + print ''."\n"; + + // Run sql script + $okmodule=run_sql($modulefilelong, 0, '', 1); // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not. + } + + } + } } print '
    '; print ''; print ''; - print ''; + print ''; print '

    '.$langs->trans("ChoosedMigrateScript").''.$file.'

    '.$langs->trans("ChoosedMigrateScript").' (external modules)'.$modulefileshort.'

    '.$langs->trans("ChoosedMigrateScript").''.$file.'

    '.$langs->trans("ChoosedMigrateScript").' (external modules)'.$modulefileshort.'
    '; From 38a7513fccaecbb645c7594b6cc45cb1010988c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jan 2014 19:55:29 +0100 Subject: [PATCH 173/177] Qual: Include migration script into continuous integration. --- .travis.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 70c20af872d..b14888ea828 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,18 +80,23 @@ before_script: - sudo /etc/init.d/apache2 restart - wget http://localhost/ - cat index.html - + script: - - cd htdocs/install; php upgrade.php 3.4.0 3.5.0 + - cd htdocs/install; php upgrade.php 3.4.0 3.5.0 > upgrade.log + - cd htdocs/install; php upgrade.php2 3.4.0 3.5.0 > upgrade2.log + - cd htdocs/install; php upgrade.php 3.5.0 3.6.0 >> upgrade.log + - cd htdocs/install; php upgrade.php2 3.5.0 3.6.0 >> upgrade2.log +# - cat upgrade.log +# - cat upgrade2.log # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php # - phpcs --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php -# - phpcs --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . + - phpcs --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . # - phpcs --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . -# - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php + - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php after_script: # - echo Output dolibarr log file; cat $(pwd)/htdocs/documents/dolibarr.log From 6f4e2dd9fcaded81364c90127f49a9ecba6aa2ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jan 2014 20:33:40 +0100 Subject: [PATCH 174/177] Qual: Include migration script into continuous integration. --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index b14888ea828..1d359cf4ed8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,10 +84,12 @@ before_script: script: - - cd htdocs/install; php upgrade.php 3.4.0 3.5.0 > upgrade.log - - cd htdocs/install; php upgrade.php2 3.4.0 3.5.0 > upgrade2.log - - cd htdocs/install; php upgrade.php 3.5.0 3.6.0 >> upgrade.log - - cd htdocs/install; php upgrade.php2 3.5.0 3.6.0 >> upgrade2.log + - cd htdocs/install + - php upgrade.php 3.4.0 3.5.0 > upgrade.log + - php upgrade2.php 3.4.0 3.5.0 > upgrade2.log + - php upgrade.php 3.5.0 3.6.0 >> upgrade.log + - php upgrade2.php 3.5.0 3.6.0 >> upgrade2.log + - cd # - cat upgrade.log # - cat upgrade2.log # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php From f83044c5c5dea8ef89209f98c29ecb86e74c4120 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jan 2014 21:35:49 +0100 Subject: [PATCH 175/177] Qual: Include migration script into continuous integration. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1d359cf4ed8..a4f8ecd8270 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,7 +89,7 @@ script: - php upgrade2.php 3.4.0 3.5.0 > upgrade2.log - php upgrade.php 3.5.0 3.6.0 >> upgrade.log - php upgrade2.php 3.5.0 3.6.0 >> upgrade2.log - - cd + - cd ../.. # - cat upgrade.log # - cat upgrade2.log # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php From c5bcc92651d623f1f282899bfb822a78b6f13786 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 16 Jan 2014 00:07:45 +0100 Subject: [PATCH 176/177] Rename tag note to differentiate public and private note --- htdocs/core/class/commondocgenerator.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 86d924b5fa2..ee5ab2cbae9 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -170,7 +170,8 @@ abstract class CommonDocGenerator 'company_idprof4'=>$object->idprof4, 'company_idprof5'=>$object->idprof5, 'company_idprof6'=>$object->idprof6, - 'company_note'=>$object->note + 'company_note_public'=>$object->note_public, + 'company_note_private'=>$object->note_private ); // Retrieve extrafields @@ -260,7 +261,7 @@ abstract class CommonDocGenerator $array_key.'_total_localtax2'=>price2num($object->total_localtax2), $array_key.'_total_ttc'=>price2num($object->total_ttc), $array_key.'_total_discount_ht' => price2num($object->getTotalDiscount()), - + $array_key.'_vatrate'=>vatrate($object->tva), $array_key.'_note_private'=>$object->note, $array_key.'_note'=>$object->note_public, @@ -314,7 +315,7 @@ abstract class CommonDocGenerator 'line_date_end'=>$line->date_end ); } - + /** * Define array with couple substitution key => substitution value * From 0bdcd108f5f76817b6d26ddb2c8c124d8c8f649d Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 16 Jan 2014 11:04:56 +0100 Subject: [PATCH 177/177] Add supplier informations in product export (supplier name, supplier product ref and supplier unit price) --- htdocs/core/modules/modProduct.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 088c688a4fd..43cab4f72cf 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2014 Christophe Battarel * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -140,12 +141,15 @@ class modProduct extends DolibarrModules $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.customcode'=>'CustomCode','p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy",'p.datec'=>'DateCreation','p.tms'=>'DateModification'); if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Stock','p.pmp'=>'PMPValue')); if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.barcode'=>'BarCode')); + if (! empty($conf->fournisseur->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('s.nom'=>'Supplier','pf.ref_fourn'=>'SupplierRef','pf.unitprice'=>'SuppliersPrices')); $this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.length'=>"Number",'p.surface'=>"Number",'p.volume'=>"Number",'p.weight'=>"Number",'p.customcode'=>'Text','p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean",'p.datec'=>'Date','p.tms'=>'Date'); if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.pmp'=>'Number')); if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.barcode'=>'Text')); - $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.label'=>"product",'p.description'=>"product",'p.accountancy_code_sell'=>'product','p.note'=>"product",'p.length'=>"product",'p.surface'=>"product",'p.volume'=>"product",'p.weight'=>"product",'p.customcode'=>'product','p.price_base_type'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>"product",'p.tosell'=>"product",'p.tobuy'=>"product",'p.datec'=>"product",'p.tms'=>"product"); + if (! empty($conf->fournisseur->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('s.nom'=>'Text','pf.ref_fourn'=>'Text','pf.unitprice'=>'Number')); + $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.label'=>"product",'p.description'=>"product",'p.accountancy_code_sell'=>'product','p.accountancy_code_sell'=>'product','p.note'=>"product",'p.length'=>"product",'p.surface'=>"product",'p.volume'=>"product",'p.weight'=>"product",'p.customcode'=>'product','p.price_base_type'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>"product",'p.tosell'=>"product",'p.tobuy'=>"product",'p.datec'=>"product",'p.tms'=>"product"); if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.stock'=>'product','p.pmp'=>'product')); if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.barcode'=>'product')); + if (! empty($conf->fournisseur->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('s.nom'=>'product','pf.ref_fourn'=>'product','pf.unitprice'=>'product')); // Add extra fields $sql="SELECT name, label, type FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'"; $resql=$this->db->query($sql); @@ -184,6 +188,7 @@ class modProduct extends DolibarrModules $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object'; + if (! empty($conf->fournisseur->enabled)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc'; $this->export_sql_end[$r] .=' WHERE p.fk_product_type = 0 AND p.entity IN ('.getEntity("product", 1).')';