mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Merge remote-tracking branch 'upstream/develop' into psr2squizwhite
This commit is contained in:
@@ -47,7 +47,7 @@ $title = $langs->trans('ModuleSetup').' '.$langs->trans('ProductAttributes');
|
||||
llxHeader('', $title);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($title,$linkback,'title_setup');
|
||||
print load_fiche_titre($title, $linkback, 'title_setup');
|
||||
|
||||
dol_fiche_head(array(), 'general', $tab, 0, 'product');
|
||||
|
||||
@@ -58,7 +58,7 @@ print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||
print '<td align="right" width="60">'.$langs->trans("Value").'</td>'."\n";
|
||||
print '<td width="80"> </td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans('HideProductCombinations').'</td><td>';
|
||||
print $form->selectyesno("PRODUIT_ATTRIBUTES_HIDECHILD",$conf->global->PRODUIT_ATTRIBUTES_HIDECHILD,1).'</td></tr>';
|
||||
print $form->selectyesno("PRODUIT_ATTRIBUTES_HIDECHILD", $conf->global->PRODUIT_ATTRIBUTES_HIDECHILD, 1).'</td></tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans('CombinationsSeparator').'</td>';
|
||||
if(isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) {
|
||||
$separator = $conf->global->PRODUIT_ATTRIBUTES_SEPARATOR;
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1');
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1');
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
@@ -57,4 +57,4 @@ if ($res == -1) {
|
||||
exit();
|
||||
}
|
||||
|
||||
print json_encode($res);
|
||||
print json_encode($res);
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disable token renewal
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disable token renewal
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
|
||||
if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1');
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
@@ -34,7 +34,7 @@ top_httphead();
|
||||
|
||||
// Registering the location of boxes
|
||||
if (isset($_POST['roworder'])) {
|
||||
$roworder=GETPOST('roworder','alpha',2);
|
||||
$roworder=GETPOST('roworder', 'alpha', 2);
|
||||
|
||||
dol_syslog("AjaxOrderAttribute roworder=".$roworder, LOG_DEBUG);
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ require '../main.inc.php';
|
||||
require 'class/ProductAttribute.class.php';
|
||||
require 'class/ProductAttributeValue.class.php';
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$valueid = GETPOST('valueid','alpha');
|
||||
$action = GETPOST('action','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$ref = GETPOST('ref','alpha');
|
||||
$confirm = GETPOST('confirm','alpha');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
$valueid = GETPOST('valueid', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$label = GETPOST('label', 'alpha');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
$object = new ProductAttribute($db);
|
||||
$objectval = new ProductAttributeValue($db);
|
||||
@@ -62,7 +62,7 @@ if ($_POST) {
|
||||
if ($objectval->fetch($valueid) > 0) {
|
||||
|
||||
$objectval->ref = $ref;
|
||||
$objectval->value = GETPOST('value','alpha');
|
||||
$objectval->value = GETPOST('value', 'alpha');
|
||||
|
||||
if (empty($objectval->ref))
|
||||
{
|
||||
|
||||
@@ -346,4 +346,4 @@ class ProductAttribute
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,4 +226,4 @@ class ProductAttributeValue
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,4 +157,4 @@ WHERE c2v.fk_prod_combination = ".(int) $fk_combination;
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,17 +35,17 @@ $price_impact = (float) GETPOST('price_impact');
|
||||
$price_impact_percent = (bool) GETPOST('price_impact_percent');
|
||||
$form = new Form($db);
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
$show_files=GETPOST('show_files','int');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$massaction=GETPOST('massaction', 'alpha');
|
||||
$show_files=GETPOST('show_files', 'int');
|
||||
$confirm=GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
// Security check
|
||||
$fieldvalue = (! empty($id) ? $id : $ref);
|
||||
$fieldtype = (! empty($ref) ? 'ref' : 'rowid');
|
||||
$result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype);
|
||||
$result=restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype);
|
||||
|
||||
$prodstatic = new Product($db);
|
||||
$prodattr = new ProductAttribute($db);
|
||||
@@ -79,7 +79,7 @@ if ($action == 'add')
|
||||
unset($selectedvariant);
|
||||
unset($_SESSION['addvariant_'.$object->id]);
|
||||
}
|
||||
if ($action == 'create' && GETPOST('selectvariant','alpha')) // We click on select combination
|
||||
if ($action == 'create' && GETPOST('selectvariant', 'alpha')) // We click on select combination
|
||||
{
|
||||
$action = 'add';
|
||||
if (GETPOST('attribute') != '-1' && GETPOST('value') != '-1')
|
||||
@@ -358,7 +358,7 @@ if (! empty($id) || ! empty($ref))
|
||||
print '<tr><td>'.$langs->trans("Weight").'</td><td>';
|
||||
if ($object->weight != '')
|
||||
{
|
||||
print $object->weight." ".measuring_units_string($object->weight_units,"weight");
|
||||
print $object->weight." ".measuring_units_string($object->weight_units, "weight");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -20,13 +20,13 @@ require '../main.inc.php';
|
||||
require 'class/ProductAttribute.class.php';
|
||||
require 'class/ProductAttributeValue.class.php';
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$ref = GETPOST('ref','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$value = GETPOST('value', 'alpha');
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$cancel=GETPOST('cancel','alpha');
|
||||
$backtopage=GETPOST('backtopage','alpha');
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$cancel=GETPOST('cancel', 'alpha');
|
||||
$backtopage=GETPOST('backtopage', 'alpha');
|
||||
|
||||
$object = new ProductAttribute($db);
|
||||
$objectval = new ProductAttributeValue($db);
|
||||
|
||||
@@ -33,7 +33,7 @@ $form = new Form($db);
|
||||
// Security check
|
||||
$fieldvalue = (! empty($id) ? $id : $ref);
|
||||
$fieldtype = (! empty($ref) ? 'ref' : 'rowid');
|
||||
$result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype);
|
||||
$result=restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype);
|
||||
|
||||
$prodattr = new ProductAttribute($db);
|
||||
$prodattrval = new ProductAttributeValue($db);
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
require '../main.inc.php';
|
||||
require DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php';
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$action = GETPOST('action','aZ09');
|
||||
$id = GETPOST('id', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$object = new ProductAttribute($db);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user