Skip to content

Commit

Permalink
Merge branch '3.3' of git@github.com:Dolibarr/dolibarr.git into 3.3
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/install/mysql/migration/3.2.0-3.3.0.sql
  • Loading branch information
hregis committed Apr 10, 2013
2 parents 057365b + eb78de1 commit b80d487
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
24 changes: 17 additions & 7 deletions htdocs/admin/commande.php
Expand Up @@ -66,7 +66,7 @@
}
}

if ($action == 'specimen')
else if ($action == 'specimen')
{
$modele=GETPOST('module','alpha');

Expand Down Expand Up @@ -111,7 +111,8 @@
}
}

if ($action == 'set')
// Activate a model
else if ($action == 'set')
{
$label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha');
Expand All @@ -128,7 +129,7 @@
}
}

if ($action == 'del')
else if ($action == 'del')
{
$type='order';
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
Expand All @@ -142,7 +143,8 @@
}
}

if ($action == 'setdoc')
// Set default model
else if ($action == 'setdoc')
{
$label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha');
Expand Down Expand Up @@ -182,15 +184,15 @@
}
}

if ($action == 'setmod')
else if ($action == 'setmod')
{
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated

dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity);
}

if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
else if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
{
$draft = GETPOST("COMMANDE_DRAFT_WATERMARK");
$res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
Expand All @@ -207,7 +209,7 @@
}
}

if ($action == 'set_COMMANDE_FREE_TEXT')
else if ($action == 'set_COMMANDE_FREE_TEXT')
{
$freetext = GETPOST("COMMANDE_FREE_TEXT"); // No alpha here, we want exact string

Expand All @@ -224,6 +226,14 @@
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
}
else if ($action='setModuleOptions') {
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity))
{
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
$conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1');
}
}


/*
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/syslog.php
Expand Up @@ -98,14 +98,14 @@
if ($_POST[$option['constant']])
{
dolibarr_del_const($db, $option['constant'], 0);
dolibarr_set_const($db, $option['constant'], $_POST[$option['constant']], 'chaine');
dolibarr_set_const($db, $option['constant'], $_POST[$option['constant']], 'chaine',0, '', 0);
}
}
}
}
}

dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine');
dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine',0,'',0);

if (! $error)
{
Expand Down
7 changes: 4 additions & 3 deletions htdocs/core/modules/mailings/contacts2.modules.php
@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2011 François Cerbelle <francois@cerbelle.net>
/* Copyright (C) 2011 François Cerbelle <francois@cerbelle.net>
* Copyright (C) 2013 Regis Houssin <regis.houssin@capnetworks.com>
*
* 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
Expand Down Expand Up @@ -87,7 +88,7 @@ function add_to_target($mailing_id,$filtersarray=array())
$sql.= " AND sp.no_email = 0";
//$sql.= " AND sp.poste != ''";
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$filtersarray[0]."'";
if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$this->db->escape($filtersarray[0])."'";
$sql.= " ORDER BY sp.name, sp.firstname";
$resql = $this->db->query($sql);
if ($resql)
Expand Down Expand Up @@ -219,4 +220,4 @@ function formFilter()

}

?>
?>
3 changes: 3 additions & 0 deletions htdocs/install/mysql/migration/3.2.0-3.3.0.sql
Expand Up @@ -927,3 +927,6 @@ UPDATE llx_c_departements SET ncc='ALAVA', nom='Álava' WHERE code_departement='
ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur;

UPDATE llx_const SET name = __ENCRYPT('PRODUIT_MULTI_PRICES')__ WHERE __DECRYPT('name')__ = 'PRODUIT_MUTLI_PRICES';

DELETE FROM llx_const WHERE entity <> 0 AND __DECRYPT('name')__ IN ('SYSLOG_HANDLERS','SYSLOG_LEVEL');
UPDATE llx_const SET entity = 0 WHERE __DECRYPT('name')__ = 'SYSLOG_FILE';

0 comments on commit b80d487

Please sign in to comment.