cvsimport
This commit is contained in:
commit
27093cf2ce
@ -2,7 +2,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \version $Id: makepack-dolibarr.pl,v 1.109 2011/07/11 11:09:02 eldy Exp $
|
||||
# \version $Id: makepack-dolibarr.pl,v 1.110 2011/07/18 01:48:21 eldy Exp $
|
||||
# \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@ -48,7 +48,7 @@ if (-d "/usr/src/RPM") {
|
||||
|
||||
|
||||
use vars qw/ $REVISION $VERSION /;
|
||||
$REVISION='$Revision: 1.109 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
|
||||
$REVISION='$Revision: 1.110 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
|
||||
$VERSION="1.0 (build $REVISION)";
|
||||
|
||||
|
||||
@ -250,8 +250,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/DoliWamp-*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/DoliMamp-*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/DoliW*-*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/DoliM*-*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.deb`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.rpm`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar`;
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \file htdocs/comm/action/fiche.php
|
||||
* \ingroup agenda
|
||||
* \brief Page for event card
|
||||
* \version $Id$
|
||||
* \version $Id: fiche.php,v 1.226 2011/07/18 01:44:15 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@ -471,8 +471,7 @@ if ($action == 'create')
|
||||
if (GETPOST("actioncode") == 'AC_RDV') print_fiche_titre ($langs->trans("AddActionRendezVous"));
|
||||
else print_fiche_titre ($langs->trans("AddAnAction"));
|
||||
|
||||
if ($mesg) print $mesg.'<br>';
|
||||
else print "<br>";
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -1023,7 +1022,7 @@ if ($id)
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/18 01:44:15 $ - $Revision: 1.226 $');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \file htdocs/comm/addpropal.php
|
||||
* \ingroup propal
|
||||
* \brief Page to add a new commercial proposal
|
||||
* \version $Id$
|
||||
* \version $Id: addpropal.php,v 1.130 2011/07/17 19:08:33 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -121,12 +121,12 @@ if ($_GET["action"] == 'create')
|
||||
// Ref
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" value="'.$numpr.'"></td></tr>';
|
||||
|
||||
// Reference client
|
||||
// Ref customer
|
||||
print '<tr><td>'.$langs->trans('RefCustomer').'</td><td colspan="2">';
|
||||
print '<input type="text" name="ref_client" value=""></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Societe
|
||||
// Third party
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Company').'</td><td colspan="2">'.$soc->getNomUrl(1);
|
||||
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
|
||||
print '</td>';
|
||||
@ -153,10 +153,11 @@ if ($_GET["action"] == 'create')
|
||||
$html->select_date('','','','','',"addprop");
|
||||
print '</td></tr>';
|
||||
|
||||
// Validaty duration
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("ValidityDuration").'</td><td colspan="2"><input name="duree_validite" size="5" value="'.$conf->global->PROPALE_VALIDITY_DURATION.'"> '.$langs->trans("days").'</td></tr>';
|
||||
|
||||
// Terms of payment
|
||||
print '<tr><td nowrap>'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
|
||||
print '<tr><td nowrap="nowrap" class="fieldrequired">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
|
||||
$html->select_conditions_paiements($soc->cond_reglement,'cond_reglement_id');
|
||||
print '</td></tr>';
|
||||
|
||||
@ -170,9 +171,9 @@ if ($_GET["action"] == 'create')
|
||||
$html->select_demand_reason($propal->demand_reason,'demand_reason_id',"SRC_PROP",1);
|
||||
print '</td></tr>';
|
||||
|
||||
// delai de livraison
|
||||
// Delivery delay
|
||||
print '<tr><td>'.$langs->trans('AvailabilityPeriod').'</td><td colspan="2">';
|
||||
$html->select_availability($propal->availability,'availability_id');
|
||||
$html->select_availability($propal->availability,'availability_id','',1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Delivery date (or manufacturing)
|
||||
@ -338,5 +339,5 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/17 19:08:33 $ - $Revision: 1.130 $');
|
||||
?>
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
* \file htdocs/comm/propal.php
|
||||
* \ingroup propale
|
||||
* \brief Page of commercial proposals card and list
|
||||
* \version $Id: propal.php,v 1.610 2011/07/10 20:03:41 eldy Exp $
|
||||
* \version $Id: propal.php,v 1.611 2011/07/17 19:01:28 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -1114,11 +1114,6 @@ if ($id > 0 || ! empty($ref))
|
||||
print $formconfirm;
|
||||
|
||||
|
||||
/*
|
||||
* Fiche propal
|
||||
*
|
||||
*/
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback="<a href=\"propal.php?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder\">".$langs->trans("BackToList")."</a>";
|
||||
@ -1233,7 +1228,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td valign="top" colspan="2" width="50%" rowspan="'.$rowspan.'">'.$langs->trans('NotePublic').' :<br>'. nl2br($object->note_public).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date fin propal
|
||||
// Date end proposal
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
@ -1266,6 +1261,25 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Payment term
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
print '</td>';
|
||||
if ($action != 'editconditions' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editconditions')
|
||||
{
|
||||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'none');
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Delivery date
|
||||
$langs->load('deliveries');
|
||||
print '<tr><td>';
|
||||
@ -1314,7 +1328,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Availability
|
||||
// Delivery delay
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('AvailabilityPeriod');
|
||||
@ -1325,11 +1339,11 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editavailability')
|
||||
{
|
||||
$html->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'availability_id');
|
||||
$html->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'availability_id',1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'none');
|
||||
$html->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'none',1);
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
@ -1356,25 +1370,6 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Payment term
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
print '</td>';
|
||||
if ($action != 'editconditions' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editconditions')
|
||||
{
|
||||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'none');
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Payment mode
|
||||
print '<tr>';
|
||||
print '<td width="25%">';
|
||||
@ -1975,6 +1970,6 @@ else
|
||||
}
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/10 20:03:41 $ - $Revision: 1.610 $');
|
||||
llxFooter('$Date: 2011/07/17 19:01:28 $ - $Revision: 1.611 $');
|
||||
|
||||
?>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
* \file htdocs/comm/remx.php
|
||||
* \ingroup societe
|
||||
* \brief Page to edit absolute discounts for a customer
|
||||
* \version $Id: remx.php,v 1.50 2011/07/08 18:39:14 eldy Exp $
|
||||
* \version $Id: remx.php,v 1.51 2011/07/17 20:02:10 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -210,7 +210,7 @@ llxHeader();
|
||||
|
||||
if ($_socid > 0)
|
||||
{
|
||||
if ($mesg) print $mesg."<br>";
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
// On recupere les donnees societes par l'objet
|
||||
$objsoc = new Societe($db);
|
||||
@ -539,5 +539,5 @@ if ($_socid > 0)
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/08 18:39:14 $ - $Revision: 1.50 $');
|
||||
llxFooter('$Date: 2011/07/17 20:02:10 $ - $Revision: 1.51 $');
|
||||
?>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
* \file htdocs/compta/facture.php
|
||||
* \ingroup facture
|
||||
* \brief Page to create/see an invoice
|
||||
* \version $Id: facture.php,v 1.848 2011/07/10 20:03:40 eldy Exp $
|
||||
* \version $Id: facture.php,v 1.849 2011/07/17 19:58:55 eldy Exp $
|
||||
*/
|
||||
|
||||
require('../main.inc.php');
|
||||
@ -739,62 +739,69 @@ if ($action == 'add' && $user->rights->facture->creer)
|
||||
|
||||
for ($i=0;$i<$num;$i++)
|
||||
{
|
||||
$desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle);
|
||||
$product_type=($lines[$i]->product_type?$lines[$i]->product_type:0);
|
||||
|
||||
// Date start
|
||||
// TODO mutualiser
|
||||
$date_start=false;
|
||||
if ($lines[$i]->date_debut_prevue) $date_start=$lines[$i]->date_debut_prevue;
|
||||
if ($lines[$i]->date_debut_reel) $date_start=$lines[$i]->date_debut_reel;
|
||||
if ($lines[$i]->date_start) $date_start=$lines[$i]->date_start;
|
||||
|
||||
//Date end
|
||||
// TODO mutualiser
|
||||
$date_end=false;
|
||||
if ($lines[$i]->date_fin_prevue) $date_end=$lines[$i]->date_fin_prevue;
|
||||
if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel;
|
||||
if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end;
|
||||
|
||||
// Reset fk_parent_line for no child products and special product
|
||||
if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) {
|
||||
$fk_parent_line = 0;
|
||||
}
|
||||
|
||||
$result = $object->addline(
|
||||
$id,
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$lines[$i]->rang,
|
||||
$lines[$i]->special_code,
|
||||
$object->origin,
|
||||
$lines[$i]->rowid,
|
||||
$fk_parent_line
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
if ($lines[$i]->subprice < 0)
|
||||
{
|
||||
$error++;
|
||||
break;
|
||||
// Negative line, we create a discount line
|
||||
// TODO
|
||||
}
|
||||
else
|
||||
{
|
||||
// Positive line
|
||||
$desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle);
|
||||
$product_type=($lines[$i]->product_type?$lines[$i]->product_type:0);
|
||||
|
||||
// Defined the new fk_parent_line
|
||||
if ($result > 0 && $lines[$i]->product_type == 9) {
|
||||
$fk_parent_line = $result;
|
||||
// Date start
|
||||
$date_start=false;
|
||||
if ($lines[$i]->date_debut_prevue) $date_start=$lines[$i]->date_debut_prevue;
|
||||
if ($lines[$i]->date_debut_reel) $date_start=$lines[$i]->date_debut_reel;
|
||||
if ($lines[$i]->date_start) $date_start=$lines[$i]->date_start;
|
||||
|
||||
//Date end
|
||||
$date_end=false;
|
||||
if ($lines[$i]->date_fin_prevue) $date_end=$lines[$i]->date_fin_prevue;
|
||||
if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel;
|
||||
if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end;
|
||||
|
||||
// Reset fk_parent_line for no child products and special product
|
||||
if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) {
|
||||
$fk_parent_line = 0;
|
||||
}
|
||||
|
||||
$result = $object->addline(
|
||||
$id,
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
$lines[$i]->tva_tx,
|
||||
$lines[$i]->localtax1_tx,
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent,
|
||||
$date_start,
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
$lines[$i]->rang,
|
||||
$lines[$i]->special_code,
|
||||
$object->origin,
|
||||
$lines[$i]->rowid,
|
||||
$fk_parent_line
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
||||
// Defined the new fk_parent_line
|
||||
if ($result > 0 && $lines[$i]->product_type == 9) {
|
||||
$fk_parent_line = $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3241,5 +3248,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/10 20:03:40 $ - $Revision: 1.848 $');
|
||||
llxFooter('$Date: 2011/07/17 19:58:55 $ - $Revision: 1.849 $');
|
||||
?>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
* \file htdocs/core/class/commonobject.class.php
|
||||
* \ingroup core
|
||||
* \brief File of parent class of all other business classes (invoices, contracts, proposals, orders, ...)
|
||||
* \version $Id: commonobject.class.php,v 1.146 2011/07/13 16:55:25 eldy Exp $
|
||||
* \version $Id: commonobject.class.php,v 1.147 2011/07/17 18:33:31 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1480,7 +1480,7 @@ class CommonObject
|
||||
$this->hooks[$i]['modules'][$objModule->module_number] = $objModule;
|
||||
}
|
||||
|
||||
// FIXME storing dao is useless here. It's goal of controller to known which dao to manage
|
||||
// TODO storing dao is useless here. It's goal of controller to known which dao to manage
|
||||
if ($resdao)
|
||||
{
|
||||
// Instantiate dataservice class (model)
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
* \file htdocs/core/class/html.form.class.php
|
||||
* \ingroup core
|
||||
* \brief File of class with all html predefined components
|
||||
* \version $Id: html.form.class.php,v 1.189 2011/07/13 14:03:15 eldy Exp $
|
||||
* \version $Id: html.form.class.php,v 1.190 2011/07/17 19:01:26 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1497,8 +1497,8 @@ class Form
|
||||
* Retourne la liste des types de delais de livraison possibles
|
||||
* @param selected Id du type de delais pre-selectionne
|
||||
* @param htmlname Nom de la zone select
|
||||
* @param filtertype Pour filtre
|
||||
* @param addempty Ajoute entree vide
|
||||
* @param filtertype To add a filter
|
||||
* @param addempty Add empty entry
|
||||
*/
|
||||
function select_availability($selected='',$htmlname='availid',$filtertype='',$addempty=0)
|
||||
{
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/core/class/menubase.class.php
|
||||
* \ingroup core
|
||||
* \version $Id: menubase.class.php,v 1.25 2011/07/13 22:18:48 eldy Exp $
|
||||
* \version $Id: menubase.class.php,v 1.26 2011/07/17 19:56:51 hregis Exp $
|
||||
* \brief File of class to manage dynamic menu entries
|
||||
* \remarks Initialy built by build_class_from_table on 2008-01-12 14:19
|
||||
*/
|
||||
@ -578,11 +578,12 @@ class Menubase
|
||||
$tabMenu[$b][0] = $menu['rowid'];
|
||||
$tabMenu[$b][1] = $menu['fk_menu'];
|
||||
$tabMenu[$b][2] = $menu['url'];
|
||||
if (! preg_match("/^(http:\/\/|https:\/\/)/i",$tabMenu[$b][2]))
|
||||
// FIXME idmenu is already added in auguria.lib.php
|
||||
/*if (! preg_match("/^(http:\/\/|https:\/\/)/i",$tabMenu[$b][2]))
|
||||
{
|
||||
if (preg_match('/\?/',$tabMenu[$b][2])) $tabMenu[$b][2].='&idmenu='.$menu['rowid'];
|
||||
else $tabMenu[$b][2].='?idmenu='.$menu['rowid'];
|
||||
}
|
||||
}*/
|
||||
$tabMenu[$b][3] = $chaine;
|
||||
$tabMenu[$b][5] = $menu['target'];
|
||||
$tabMenu[$b][6] = $menu['leftmenu'];
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/ecm/index.php
|
||||
* \ingroup ecm
|
||||
* \brief Main page for ECM section area
|
||||
* \version $Id: index.php,v 1.101 2011/07/06 21:12:34 eldy Exp $
|
||||
* \version $Id: index.php,v 1.102 2011/07/18 01:44:15 eldy Exp $
|
||||
* \author Laurent Destailleur
|
||||
*/
|
||||
|
||||
@ -372,7 +372,7 @@ if (GETPOST('action') == 'delete')
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
if ($mesg) { print $mesg."<br>"; }
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
// Toolbar
|
||||
//$head = ecm_prepare_head_fm($fac);
|
||||
@ -889,5 +889,5 @@ else
|
||||
// End of page
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/06 21:12:34 $ - $Revision: 1.101 $');
|
||||
llxFooter('$Date: 2011/07/18 01:44:15 $ - $Revision: 1.102 $');
|
||||
?>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/ftp/index.php
|
||||
* \ingroup ftp
|
||||
* \brief Main page for FTP section area
|
||||
* \version $Id$
|
||||
* \version $Id: index.php,v 1.23 2011/07/18 00:49:19 eldy Exp $
|
||||
* \author Laurent Destailleur
|
||||
*/
|
||||
|
||||
@ -39,14 +39,11 @@ $langs->load("other");
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'ftp','');
|
||||
|
||||
// Load permissions
|
||||
$user->getrights('ftp');
|
||||
|
||||
// Get parameters
|
||||
$action = isset($_GET["action"])?$_GET["action"]:$_POST['action'];
|
||||
$section=isset($_GET["section"])?$_GET["section"]:$_POST['section'];
|
||||
if (! $section) $section='/';
|
||||
$numero_ftp = isset($_GET["numero_ftp"])?$_GET["numero_ftp"]:$_POST['numero_ftp'];
|
||||
$numero_ftp = GETPOST("numero_ftp");
|
||||
if (! $numero_ftp) $numero_ftp=1;
|
||||
$file=isset($_GET["file"])?$_GET["file"]:$_POST['file'];
|
||||
|
||||
@ -447,6 +444,7 @@ else
|
||||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="numero_ftp" value="'.$numero_ftp.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
|
||||
@ -535,7 +533,7 @@ else
|
||||
print '<td>';
|
||||
$newsection=$section.(preg_match('@[\\\/]$@',$section)?'':'/').$file;
|
||||
$newsection=preg_replace('@[\\\/][^\\\/]+[\\\/]\.\.$@','/',$newsection); // Change aaa/xxx/.. to new aaa
|
||||
if ($is_directory) print '<a href="'.$_SERVER["PHP_SELF"].'?section='.urlencode($newsection).'">';
|
||||
if ($is_directory) print '<a href="'.$_SERVER["PHP_SELF"].'?section='.urlencode($newsection).'&numero_ftp='.$numero_ftp.'">';
|
||||
print $file;
|
||||
if ($is_directory) print '</a>';
|
||||
print '</td>';
|
||||
@ -627,7 +625,7 @@ if ($conn_id) ftp_close($conn_id);
|
||||
// End of page
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/18 00:49:19 $ - $Revision: 1.23 $');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -53,8 +53,8 @@
|
||||
}
|
||||
|
||||
.fileupload-content .ui-progressbar {
|
||||
width: 200px;
|
||||
height: 20px;
|
||||
width: 100px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.fileupload-content .ui-progressbar-value {
|
||||
@ -67,13 +67,13 @@
|
||||
}
|
||||
|
||||
.files {
|
||||
margin: 10px 0;
|
||||
margin: 1px 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.files td {
|
||||
padding: 5px;
|
||||
border-spacing: 5px;
|
||||
padding: 1px;
|
||||
border-spacing: 1px;
|
||||
}
|
||||
|
||||
.files img {
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/includes/menus/standard/auguria.lib.php
|
||||
* \brief Library for file auguria menus
|
||||
* \version $Id$
|
||||
* \version $Id: auguria.lib.php,v 1.19 2011/07/18 00:58:35 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ function print_auguria_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry_auguria($idsel);
|
||||
print '<div class="mainmenu '.$idsel.'"><span class="mainmenu_'.$idsel.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print_text_menu_entry_auguria($newTabMenu[$i]['titre']);
|
||||
print '</a>';
|
||||
print_end_menu_entry_auguria();
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/includes/menus/standard/eldy.lib.php
|
||||
* \brief Library for file eldy menus
|
||||
* \version $Id: eldy.lib.php,v 1.57 2011/07/13 11:26:17 eldy Exp $
|
||||
* \version $Id: eldy.lib.php,v 1.58 2011/07/18 00:57:40 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print_text_menu_entry($langs->trans("ThirdParties"));
|
||||
print '</a>';
|
||||
print_end_menu_entry();
|
||||
@ -147,7 +147,7 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print_text_menu_entry($chaine);
|
||||
print '</a>';
|
||||
print_end_menu_entry();
|
||||
@ -194,7 +194,7 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print print_text_menu_entry($langs->trans("Commercial"));
|
||||
print '</a>';
|
||||
print_end_menu_entry();
|
||||
@ -237,7 +237,7 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print_text_menu_entry($langs->trans("MenuFinancial"));
|
||||
print '</a>';
|
||||
print_end_menu_entry();
|
||||
@ -279,7 +279,7 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print_text_menu_entry($langs->trans("MenuBankCash"));
|
||||
print '</a>';
|
||||
print_end_menu_entry();
|
||||
@ -320,7 +320,7 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print_text_menu_entry($langs->trans("Projects"));
|
||||
print '</a>';
|
||||
print_end_menu_entry();
|
||||
@ -361,7 +361,7 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print_text_menu_entry($langs->trans("Tools"));
|
||||
print '</a>';
|
||||
print_end_menu_entry();
|
||||
@ -428,7 +428,7 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print_text_menu_entry($langs->trans("MenuMembers"));
|
||||
print '</a>';
|
||||
print_end_menu_entry();
|
||||
@ -490,7 +490,7 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
{
|
||||
print_start_menu_entry($idsel);
|
||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#">';
|
||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||
print_text_menu_entry($newTabMenu[$i]['titre']);
|
||||
print '</a>';
|
||||
print_end_menu_entry();
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
/**
|
||||
* \file htdocs/includes/modules/DolibarrModules.class.php
|
||||
* \brief Fichier de description et activation des modules Dolibarr
|
||||
* \version $Id: DolibarrModules.class.php,v 1.161 2011/07/13 22:15:19 eldy Exp $
|
||||
* \version $Id: DolibarrModules.class.php,v 1.162 2011/07/17 18:13:44 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -131,19 +131,19 @@ class DolibarrModules
|
||||
$sql=$val;
|
||||
}
|
||||
|
||||
dol_syslog("DolibarrModules::_init ignoreerror=".$ignoreerror." sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::_init ignoreerror=".$ignoreerror." sql=".$sql, LOG_DEBUG);
|
||||
$result=$this->db->query($sql);
|
||||
if (! $result)
|
||||
{
|
||||
if (! $ignoreerror)
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::_init Error ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::_init Error ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("DolibarrModules::_init Warning ".$this->db->lasterror(), LOG_WARNING);
|
||||
dol_syslog(get_class($this)."::_init Warning ".$this->db->lasterror(), LOG_WARNING);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -214,12 +214,12 @@ class DolibarrModules
|
||||
{
|
||||
if (! $err)
|
||||
{
|
||||
dol_syslog("DolibarrModules::_remove sql=".$array_sql[$i], LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::_remove sql=".$array_sql[$i], LOG_DEBUG);
|
||||
$result=$this->db->query($array_sql[$i]);
|
||||
if (! $result)
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
dol_syslog("DolibarrModules::_remove Error ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::_remove Error ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
@ -373,7 +373,7 @@ class DolibarrModules
|
||||
$sql.= " WHERE numero = ".$this->numero;
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::_dbactive sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::_dbactive sql=".$sql, LOG_DEBUG);
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."dolibarr_modules (";
|
||||
@ -391,7 +391,7 @@ class DolibarrModules
|
||||
$sql.= ", '".$this->version."'";
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("DolibarrModules::_dbactive sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::_dbactive sql=".$sql, LOG_DEBUG);
|
||||
$this->db->query($sql);
|
||||
|
||||
return $err;
|
||||
@ -413,7 +413,7 @@ class DolibarrModules
|
||||
$sql.= " WHERE numero = ".$this->numero;
|
||||
$sql.= " AND entity in (0, ".$conf->entity.")";
|
||||
|
||||
dol_syslog("DolibarrModules::_dbunactive sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::_dbunactive sql=".$sql, LOG_DEBUG);
|
||||
$this->db->query($sql);
|
||||
|
||||
return $err;
|
||||
@ -437,7 +437,7 @@ class DolibarrModules
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->const_name."'";
|
||||
$sql.= " AND entity in (0, ".$entity.")";
|
||||
|
||||
dol_syslog("DolibarrModules::_active sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::_active sql=".$sql, LOG_DEBUG);
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible,entity) VALUES";
|
||||
@ -445,7 +445,7 @@ class DolibarrModules
|
||||
$sql.= ",".$this->db->encrypt('1',1);
|
||||
$sql.= ",0,".$entity.")";
|
||||
|
||||
dol_syslog("DolibarrModules::_active sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::_active sql=".$sql, LOG_DEBUG);
|
||||
if (!$this->db->query($sql))
|
||||
{
|
||||
$err++;
|
||||
@ -472,7 +472,7 @@ class DolibarrModules
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->const_name."'";
|
||||
$sql.= " AND entity in (0, ".$entity.")";
|
||||
|
||||
dol_syslog("DolibarrModules::_unactive sql=".$sql);
|
||||
dol_syslog(get_class($this)."::_unactive sql=".$sql);
|
||||
$this->db->query($sql);
|
||||
|
||||
return $err;
|
||||
@ -609,7 +609,7 @@ class DolibarrModules
|
||||
$sql.= $note?"'".$this->db->escape($note)."'":"null";
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("DolibarrModules::insert_boxes sql=".$sql);
|
||||
dol_syslog(get_class($this)."::insert_boxes sql=".$sql);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$err++;
|
||||
@ -619,7 +619,7 @@ class DolibarrModules
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::insert_boxes ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::insert_boxes ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
@ -653,12 +653,12 @@ class DolibarrModules
|
||||
$sql.= " AND ".MAIN_DB_PREFIX."boxes_def.file = '".$this->db->escape($file)."'";
|
||||
$sql.= " AND ".MAIN_DB_PREFIX."boxes_def.entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::delete_boxes sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_boxes sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_boxes ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_boxes ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -666,12 +666,12 @@ class DolibarrModules
|
||||
$sql.= " WHERE file = '".$this->db->escape($file)."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::delete_boxes sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_boxes sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_boxes ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_boxes ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
@ -696,11 +696,11 @@ class DolibarrModules
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->const_name."_CSS'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::delete_style_sheet sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_style_sheet sql=".$sql);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_style_sheet ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_style_sheet ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
@ -722,11 +722,11 @@ class DolibarrModules
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." like '".$this->const_name."_TABS_%'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::delete_tabs sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_tabs sql=".$sql);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_tabs ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_tabs ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -762,7 +762,7 @@ class DolibarrModules
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("DolibarrModules::insert_style_sheet sql=".$sql);
|
||||
dol_syslog(get_class($this)."::insert_style_sheet sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
/* Allow duplicate key
|
||||
if (! $resql)
|
||||
@ -809,7 +809,7 @@ class DolibarrModules
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("DolibarrModules::insert_tabs sql=".$sql);
|
||||
dol_syslog(get_class($this)."::insert_tabs sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
/* Allow duplicate key
|
||||
if (! $resql)
|
||||
@ -870,16 +870,16 @@ class DolibarrModules
|
||||
$sql.= ")";
|
||||
|
||||
|
||||
dol_syslog("DolibarrModules::insert_const sql=".$sql);
|
||||
dol_syslog(get_class($this)."::insert_const sql=".$sql);
|
||||
if (! $this->db->query($sql) )
|
||||
{
|
||||
dol_syslog("DolibarrModules::insert_const ".$this->db->lasterror(), LOG_ERR);
|
||||
dol_syslog(get_class($this)."::insert_const ".$this->db->lasterror(), LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("DolibarrModules::insert_const constant '".$name."' already exists", LOG_WARNING);
|
||||
dol_syslog(get_class($this)."::insert_const constant '".$name."' already exists", LOG_WARNING);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -911,11 +911,11 @@ class DolibarrModules
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$name."'";
|
||||
$sql.= " AND entity in (0, ".$conf->entity.")";
|
||||
dol_syslog("DolibarrModules::delete_const sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_const sql=".$sql);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_const ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_const ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
@ -937,13 +937,13 @@ class DolibarrModules
|
||||
|
||||
//print $this->rights_class." ".sizeof($this->rights)."<br>";
|
||||
|
||||
// Test si module actif
|
||||
// Test if module is activated
|
||||
$sql_del = "SELECT ".$this->db->decrypt('value')." as value";
|
||||
$sql_del.= " FROM ".MAIN_DB_PREFIX."const";
|
||||
$sql_del.= " WHERE ".$this->db->decrypt('name')." = '".$this->const_name."'";
|
||||
$sql_del.= " AND entity IN (0,".$conf->entity.")";
|
||||
|
||||
dol_syslog("DolibarrModules::insert_permissions sql=".$sql_del);
|
||||
dol_syslog(get_class($this)."::insert_permissions sql=".$sql_del);
|
||||
$resql=$this->db->query($sql_del);
|
||||
if ($resql)
|
||||
{
|
||||
@ -988,39 +988,58 @@ class DolibarrModules
|
||||
$sql .= "(".$r_id.",".$conf->entity.",'".$this->db->escape($r_desc)."','".$r_modul."','".$r_type."',".$r_def.")";
|
||||
}
|
||||
|
||||
dol_syslog("DolibarrModules::insert_permissions sql=".$sql, LOG_DEBUG);
|
||||
$resql=$this->db->query($sql,1);
|
||||
|
||||
if (! $resql)
|
||||
dol_syslog(get_class($this)."::insert_permissions sql=".$sql, LOG_DEBUG);
|
||||
$resqlinsert=$this->db->query($sql,1);
|
||||
if (! $resqlinsert)
|
||||
{
|
||||
if ($this->db->errno() != "DB_ERROR_RECORD_ALREADY_EXISTS")
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::insert_permissions error ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::insert_permissions error ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
break;
|
||||
}
|
||||
else dol_syslog("DolibarrModules::insert_permissions record already exists", LOG_INFO);
|
||||
else dol_syslog(get_class($this)."::insert_permissions record already exists", LOG_INFO);
|
||||
}
|
||||
$this->db->free($resqlinsert);
|
||||
|
||||
// If we are into a logged session and we are an admin user, we take permission of new activated module
|
||||
// If we want to init permissions on admin users
|
||||
if ($reinitadminperms)
|
||||
{
|
||||
if (! empty($user->admin)) // FIXME. We must loop on each admin records and make grant on each fuser object. We must removed global $user.
|
||||
include_once(DOL_DOCUMENT_ROOT.'/user/class/user.class.php');
|
||||
$sql="SELECT rowid from ".MAIN_DB_PREFIX."user where admin = 1";
|
||||
dol_syslog(get_class($this)."::insert_permissions Search all admin users sql=".$sql);
|
||||
$resqlseladmin=$this->db->query($sql,1);
|
||||
if ($resqlseladmin)
|
||||
{
|
||||
$user->addrights($r_id);
|
||||
// We reload permissions
|
||||
$user->clearrights();
|
||||
$user->getrights();
|
||||
$num=$this->db->num_rows($resqlseladmin);
|
||||
$i=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj2=$this->db->fetch_object($resqlseladmin);
|
||||
dol_syslog(get_class($this)."::insert_permissions Add permission to user id=".$obj2->rowid);
|
||||
$tmpuser=new User($this->db);
|
||||
$tmpuser->fetch($obj2->rowid);
|
||||
$tmpuser->addrights($r_id);
|
||||
$i++;
|
||||
}
|
||||
if (! empty($user->admin)) // Reload permission for current user if defined
|
||||
{
|
||||
// We reload permissions
|
||||
$user->clearrights();
|
||||
$user->getrights();
|
||||
}
|
||||
}
|
||||
else dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::insert_permissions ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::insert_permissions ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -1041,11 +1060,11 @@ class DolibarrModules
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."rights_def";
|
||||
$sql.= " WHERE module = '".$this->rights_class."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
dol_syslog("DolibarrModules::delete_permissions sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_permissions sql=".$sql);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_permissions ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_permissions ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -1100,7 +1119,7 @@ class DolibarrModules
|
||||
if (! $foundparent)
|
||||
{
|
||||
$this->error="ErrorBadDefinitionOfMenuArrayInModuleDescriptor (bad value for key fk_menu)";
|
||||
dol_syslog("DolibarrModules::insert_menus ".$this->error." ".$this->menu[$key]['fk_menu'], LOG_ERR);
|
||||
dol_syslog(get_class($this)."::insert_menus ".$this->error." ".$this->menu[$key]['fk_menu'], LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
@ -1140,7 +1159,7 @@ class DolibarrModules
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("DolibarrModules::insert_menus ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::insert_menus ".$this->error, LOG_ERR);
|
||||
$this->db->rollback();
|
||||
}
|
||||
|
||||
@ -1162,12 +1181,12 @@ class DolibarrModules
|
||||
$sql.= " WHERE module = '".$this->db->escape($this->rights_class)."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::delete_menus sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_menus sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_menus ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_menus ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -1213,7 +1232,7 @@ class DolibarrModules
|
||||
if (create_exdir($fulldir) < 0)
|
||||
{
|
||||
$this->error = $langs->trans("ErrorCanNotCreateDir",$fulldir);
|
||||
dol_syslog("DolibarrModules::_init ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::_init ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
@ -1246,7 +1265,7 @@ class DolibarrModules
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$name."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::insert_dirs sql=".$sql);
|
||||
dol_syslog(get_class($this)."::insert_dirs sql=".$sql);
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@ -1257,14 +1276,14 @@ class DolibarrModules
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible,entity)";
|
||||
$sql.= " VALUES (".$this->db->encrypt($name,1).",'chaine',".$this->db->encrypt($dir,1).",'Directory for module ".$this->name."','0',".$conf->entity.")";
|
||||
|
||||
dol_syslog("DolibarrModules::insert_dirs sql=".$sql);
|
||||
dol_syslog(get_class($this)."::insert_dirs sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::insert_dirs ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::insert_dirs ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -1286,11 +1305,11 @@ class DolibarrModules
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." like '".$this->const_name."_DIR_%'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::delete_dirs sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_dirs sql=".$sql);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_dirs ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_dirs ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -1326,12 +1345,12 @@ class DolibarrModules
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("DolibarrModules::insert_triggers sql=".$sql);
|
||||
dol_syslog(get_class($this)."::insert_triggers sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::insert_triggers ".$this->error);
|
||||
dol_syslog(get_class($this)."::insert_triggers ".$this->error);
|
||||
}
|
||||
}
|
||||
return $err;
|
||||
@ -1351,11 +1370,11 @@ class DolibarrModules
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." LIKE '".$this->const_name."_TRIGGERS'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::delete_triggers sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_triggers sql=".$sql);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_triggers ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_triggers ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -1391,12 +1410,12 @@ class DolibarrModules
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("DolibarrModules::insert_login_method sql=".$sql);
|
||||
dol_syslog(get_class($this)."::insert_login_method sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::insert_login_method ".$this->error);
|
||||
dol_syslog(get_class($this)."::insert_login_method ".$this->error);
|
||||
}
|
||||
}
|
||||
return $err;
|
||||
@ -1416,11 +1435,11 @@ class DolibarrModules
|
||||
$sql.= " WHERE ".$this->db->decrypt('name')." LIKE '".$this->const_name."_LOGIN_METHOD'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
dol_syslog("DolibarrModules::delete_login_method sql=".$sql);
|
||||
dol_syslog(get_class($this)."::delete_login_method sql=".$sql);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("DolibarrModules::delete_login_method ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::delete_login_method ".$this->error, LOG_ERR);
|
||||
$err++;
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
* - Le nom de la classe doit etre InterfaceMytrigger
|
||||
* - Le nom de la methode constructeur doit etre InterfaceMytrigger
|
||||
* - Le nom de la propriete name doit etre Mytrigger
|
||||
* \version $Id: interface_all_Demo.class.php-NORUN,v 1.28 2011/07/08 15:43:54 eldy Exp $
|
||||
* \version $Id: interface_all_Demo.class.php-NORUN,v 1.29 2011/07/18 01:06:52 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -52,6 +52,7 @@ class InterfaceDemo
|
||||
$this->family = "demo";
|
||||
$this->description = "Triggers of this module are empty functions. They have no effect. They are provided for tutorial purpose only.";
|
||||
$this->version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' or version
|
||||
$this->picto = 'technic';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/includes/triggers/interface_all_Logevents.class.php
|
||||
* \ingroup core
|
||||
* \brief Trigger file for
|
||||
* \version $Id: interface_all_Logevents.class.php,v 1.21 2011/07/08 15:43:54 eldy Exp $
|
||||
* \version $Id: interface_all_Logevents.class.php,v 1.22 2011/07/18 01:06:52 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -51,6 +51,7 @@ class InterfaceLogevents
|
||||
$this->family = "core";
|
||||
$this->description = "Triggers of this module allows to add security event records inside Dolibarr.";
|
||||
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
|
||||
$this->picto = 'technic';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
* \file htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php
|
||||
* \ingroup agenda
|
||||
* \brief Trigger file for agenda module
|
||||
* \version $Id: interface_modAgenda_ActionsAuto.class.php,v 1.34 2011/07/13 18:05:27 eldy Exp $
|
||||
* \version $Id: interface_modAgenda_ActionsAuto.class.php,v 1.35 2011/07/18 01:06:52 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -52,6 +52,7 @@ class InterfaceActionsAuto
|
||||
$this->family = "agenda";
|
||||
$this->description = "Triggers of this module add actions in agenda according to setup made in agenda setup.";
|
||||
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
|
||||
$this->picto = 'action';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
* \file htdocs/includes/triggers/interface_modLdap_Ldapsynchro.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier de gestion des triggers LDAP
|
||||
* \version $Id: interface_modLdap_Ldapsynchro.class.php,v 1.18 2011/07/08 15:43:54 eldy Exp $
|
||||
* \version $Id: interface_modLdap_Ldapsynchro.class.php,v 1.19 2011/07/18 01:06:52 eldy Exp $
|
||||
*/
|
||||
require_once (DOL_DOCUMENT_ROOT."/lib/ldap.class.php");
|
||||
|
||||
@ -47,6 +47,7 @@ class InterfaceLdapsynchro
|
||||
$this->family = "ldap";
|
||||
$this->description = "Triggers of this module allows to synchronize Dolibarr toward a LDAP database.";
|
||||
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
|
||||
$this->picto = 'technic';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/includes/triggers/interface_modNotification_Notification.class.php
|
||||
* \ingroup notification
|
||||
* \brief File of class of triggers for notification module
|
||||
* \version $Id$
|
||||
* \version $Id: interface_modNotification_Notification.class.php,v 1.25 2011/07/18 01:06:52 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -47,6 +47,7 @@ class InterfaceNotification
|
||||
$this->family = "notification";
|
||||
$this->description = "Triggers of this module send email notifications according to Notification module setup.";
|
||||
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
|
||||
$this->picto = 'email';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/includes/triggers/interface_modWorkflow_WorkflowManager.class.php
|
||||
* \ingroup core
|
||||
* \brief Trigger file for workflows
|
||||
* \version $Id: interface_modWorkflow_WorkflowManager.class.php,v 1.6 2011/07/08 15:43:54 eldy Exp $
|
||||
* \version $Id: interface_modWorkflow_WorkflowManager.class.php,v 1.7 2011/07/18 01:06:52 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -46,6 +46,7 @@ class InterfaceWorkflowManager
|
||||
$this->family = "core";
|
||||
$this->description = "Triggers of this module allows to manage workflows";
|
||||
$this->version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' or version
|
||||
$this->picto = 'technic';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \file htdocs/install/etape5.php
|
||||
* \ingroup install
|
||||
* \brief Last page of upgrade or install process
|
||||
* \version $Id: etape5.php,v 1.101 2011/06/26 12:56:31 eldy Exp $
|
||||
* \version $Id: etape5.php,v 1.102 2011/07/17 18:13:44 eldy Exp $
|
||||
*/
|
||||
|
||||
include_once("./inc.php");
|
||||
@ -219,7 +219,6 @@ if ($action == "set" || preg_match('/upgrade/i',$action))
|
||||
}
|
||||
|
||||
// If we ask to force some modules to be enabled
|
||||
// This works only for module stored into root directory. Does not work for alternate modules.
|
||||
if (! empty($force_install_module))
|
||||
{
|
||||
if (! defined('DOL_DOCUMENT_ROOT') && ! empty($dolibarr_main_document_root)) define('DOL_DOCUMENT_ROOT',$dolibarr_main_document_root);
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Id: llx_commande.sql,v 1.12 2011/07/17 21:35:12 hregis Exp $
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_commande
|
||||
@ -61,6 +61,7 @@ create table llx_commande
|
||||
fk_mode_reglement integer, -- mode de reglement
|
||||
date_livraison date default NULL,
|
||||
fk_availability integer NULL,
|
||||
fk_demand_reason integer,
|
||||
fk_adresse_livraison integer, -- delivery address (deprecated)
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Id: llx_propal.sql,v 1.13 2011/07/17 21:35:12 hregis Exp $
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_propal
|
||||
@ -62,5 +62,6 @@ create table llx_propal
|
||||
model_pdf varchar(255),
|
||||
date_livraison date DEFAULT NULL, -- delivery date
|
||||
fk_availability integer NULL,
|
||||
fk_demand_reason integer,
|
||||
fk_adresse_livraison integer -- delivery address (deprecated)
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -5,7 +5,7 @@ Deliveries=Livraisons
|
||||
DeliveryCard=Fiche réception
|
||||
DeliveryOrder=Bon de réception
|
||||
DeliveryOrders=Bons de réception
|
||||
DeliveryDate=Date de réception
|
||||
DeliveryDate=Date de livraison
|
||||
DeliveryDateShort=Date réc.
|
||||
CreateDeliveryOrder=Générer bon de réception
|
||||
QtyDelivered=Qté livrée
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/lib/admin.lib.php
|
||||
* \brief Library of admin functions
|
||||
* \version $Id$
|
||||
* \version $Id: admin.lib.php,v 1.97 2011/07/17 18:13:44 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -468,7 +468,7 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not
|
||||
/**
|
||||
* \brief Define head array for tabs of security setup pages
|
||||
* \return Array of head
|
||||
* \version $Id$
|
||||
* \version $Id: admin.lib.php,v 1.97 2011/07/17 18:13:44 eldy Exp $
|
||||
*/
|
||||
function security_prepare_head()
|
||||
{
|
||||
@ -601,8 +601,8 @@ function purgeSessions($mysessionid)
|
||||
|
||||
/**
|
||||
* Enable a module
|
||||
* @param value Nom du module a activer
|
||||
* @param withdeps Active/desactive aussi les dependances
|
||||
* @param value Name of module to activate
|
||||
* @param withdeps Activate/Disable also all dependencies
|
||||
* @return string Error message or '';
|
||||
*/
|
||||
function Activate($value,$withdeps=1)
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
* \file htdocs/lib/functions.lib.php
|
||||
* \brief A set of functions for Dolibarr
|
||||
* This file contains all frequently used functions.
|
||||
* \version $Id: functions.lib.php,v 1.546 2011/07/09 11:24:32 eldy Exp $
|
||||
* \version $Id: functions.lib.php,v 1.547 2011/07/18 00:48:33 eldy Exp $
|
||||
*/
|
||||
|
||||
// For compatibility during upgrade
|
||||
@ -2213,6 +2213,10 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename=''
|
||||
{
|
||||
if (! $user->rights->ecm->upload) $deleteok=0;
|
||||
}
|
||||
else if ($feature == 'ftp')
|
||||
{
|
||||
if (! $user->rights->ftp->write) $deleteok=0;
|
||||
}
|
||||
else if (! empty($feature2)) // This should be used for future changes
|
||||
{
|
||||
if (empty($user->rights->$feature->$feature2->supprimer)
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
/**
|
||||
* \file htdocs/theme/eldy/style.css.php
|
||||
* \brief Fichier de style CSS du theme Cameleo
|
||||
* \version $Id: style.css.php,v 1.6 2011/07/06 11:40:22 eldy Exp $
|
||||
* \version $Id: style.css.php,v 1.7 2011/07/17 20:16:38 hregis Exp $
|
||||
*/
|
||||
|
||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
|
||||
@ -487,7 +487,7 @@ foreach($mainmenuusedarray as $key => $val)
|
||||
{
|
||||
if (file_exists($dirroot."/".$val."/img/".$val.".png"))
|
||||
{
|
||||
$url=DOL_URL_ROOT.'/'.$val.'/img/'.$val.'.png';
|
||||
$url=dol_buildpath('/'.$val.'/img/'.$val.'.png', 1);
|
||||
$found=1;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
/**
|
||||
* \file htdocs/user/class/user.class.php
|
||||
* \brief Fichier de la classe utilisateur
|
||||
* \version $Id: user.class.php,v 1.45 2011/07/08 18:49:16 eldy Exp $
|
||||
* \version $Id: user.class.php,v 1.46 2011/07/17 18:13:44 eldy Exp $
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||
@ -585,8 +585,8 @@ class User extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Change status of a user
|
||||
* \return int <0 if KO, 0 if nothing is done, >0 if OK
|
||||
* Change status of a user
|
||||
* @return int <0 if KO, 0 if nothing is done, >0 if OK
|
||||
*/
|
||||
function setstatus($statut)
|
||||
{
|
||||
@ -735,6 +735,7 @@ class User extends CommonObject
|
||||
if ($num)
|
||||
{
|
||||
$this->error = 'ErrorLoginAlreadyExists';
|
||||
dol_syslog("User::Create ".$this->error, LOG_WARNING);
|
||||
$this->db->rollback();
|
||||
return -6;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user