'."\n";
$parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
{
- print '
'."\n";
}
- if (! empty($debuginfo))
+ if (!empty($debuginfo))
{
print info_admin($debuginfo);
}
diff --git a/htdocs/admin/system/xcache.php b/htdocs/admin/system/xcache.php
index 0cca1b94fc4..5061305f2e2 100644
--- a/htdocs/admin/system/xcache.php
+++ b/htdocs/admin/system/xcache.php
@@ -41,7 +41,7 @@ print " \n";
if (!function_exists('xcache_info'))
{
- print 'XCache seems to be not installed. Function xcache_info not found.';
+ print 'XCache seems to be not installed. Function xcache_info not found.';
llxFooter();
exit;
}
diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php
index ddde75ee463..1f6966fcd15 100644
--- a/htdocs/asset/card.php
+++ b/htdocs/asset/card.php
@@ -39,25 +39,25 @@ $cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
// Initialize technical objects
-$object=new Asset($db);
+$object = new Asset($db);
$extrafields = new ExtraFields($db);
-$diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id;
-$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array
+$diroutputmassaction = $conf->asset->dir_output.'/temp/massgeneration/'.$user->id;
+$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
-$search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
+$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
-$search_all=trim(GETPOST("search_all", 'alpha'));
-$search=array();
-foreach($object->fields as $key => $val)
+$search_all = trim(GETPOST("search_all", 'alpha'));
+$search = array();
+foreach ($object->fields as $key => $val)
{
- if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha');
+ if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha');
}
-if (empty($action) && empty($id) && empty($ref)) $action='view';
+if (empty($action) && empty($id) && empty($ref)) $action = 'view';
// Security check - Protection if external user
//if ($user->socid > 0) access_forbidden();
@@ -65,11 +65,11 @@ if (empty($action) && empty($id) && empty($ref)) $action='view';
//$result = restrictedArea($user, 'asset', $id);
// Load object
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
-$permissionnote=$user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
-$permissiondellink=$user->rights->asset->write; // Used by the include of actions_dellink.inc.php
-$permissiontoadd=$user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
+$permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
+$permissiondellink = $user->rights->asset->write; // Used by the include of actions_dellink.inc.php
+$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
/*
@@ -78,13 +78,13 @@ $permissiontoadd=$user->rights->asset->write; // Used by the include of actions
* Put here all code to do according to value of "action" parameter
*/
-$parameters=array();
-$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
+$parameters = array();
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
{
- $error=0;
+ $error = 0;
$permissiontoadd = $user->rights->asset->create;
$permissiontodelete = $user->rights->asset->delete;
@@ -97,9 +97,9 @@ if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
// Actions to send emails
- $trigger_name='ASSET_SENTBYMAIL';
- $autocopy='MAIN_MAIL_AUTOCOPY_ASSET_TO';
- $trackid='asset'.$object->id;
+ $trigger_name = 'ASSET_SENTBYMAIL';
+ $autocopy = 'MAIN_MAIL_AUTOCOPY_ASSET_TO';
+ $trackid = 'asset'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
}
@@ -112,11 +112,11 @@ if (empty($reshook))
* Put here all code to build page
*/
-$form=new Form($db);
-$formfile=new FormFile($db);
+$form = new Form($db);
+$formfile = new FormFile($db);
-$title=$langs->trans("Assets").' - '.$langs->trans("Card");
-$help_url='';
+$title = $langs->trans("Assets").' - '.$langs->trans("Card");
+$help_url = '';
llxHeader('', $title, $help_url);
// Example : Adding jquery code
@@ -150,10 +150,10 @@ if ($action == 'create')
print '
'."\n";
// Common attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
// Other attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
print '
';
print '';
print ' ';
- print ''; // Cancel for create does not post form if we don't know the backtopage
+ print ''; // Cancel for create does not post form if we don't know the backtopage
print '
'."\n";
// Common attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
// Other attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
print '
'."\n";
- $parameters=array();
- $reshook=$hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
{
// Send
- print 'id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . ''."\n";
+ print 'id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').''."\n";
if ($user->rights->asset->write)
{
@@ -335,11 +335,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$MAXEVENT = 10;
$morehtmlright = '';
- $morehtmlright.= $langs->trans("SeeAll");
- $morehtmlright.= '';
+ $morehtmlright .= $langs->trans("SeeAll");
+ $morehtmlright .= '';
// List of actions on element
- include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'asset', $socid, 1, '', $MAXEVENT, '', $morehtmlright);
diff --git a/htdocs/core/modules/modBom.class.php b/htdocs/core/modules/modBom.class.php
index 1df8d8ad48f..714e15f0ee9 100644
--- a/htdocs/core/modules/modBom.class.php
+++ b/htdocs/core/modules/modBom.class.php
@@ -40,9 +40,9 @@ class modBom extends DolibarrModules
*/
public function __construct($db)
{
- global $langs,$conf;
+ global $langs,$conf;
- $this->db = $db;
+ $this->db = $db;
// Id for module (must be unique).
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
@@ -68,8 +68,8 @@ class modBom extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
$this->version = 'dolibarr';
- //Url to the file with your last numberversion of this module
- //$this->url_last_version = 'http://www.example.com/versionmodule.txt';
+ //Url to the file with your last numberversion of this module
+ //$this->url_last_version = 'http://www.example.com/versionmodule.txt';
// Key used in llx_const table to save module status enabled/disabled (where BILLOFMATERIALS is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Name of image file used for this module.
@@ -79,7 +79,7 @@ class modBom extends DolibarrModules
// Define some features supported by module (triggers, login, substitutions, menus, css, etc...)
$this->module_parts = array(
- /*
+ /*
'triggers' => 1, // Set this to 1 if module has its own trigger directory (core/triggers)
'login' => 0, // Set this to 1 if module has its own login method file (core/login)
'substitutions' => 1, // Set this to 1 if module has its own substitution function file (core/substitutions)
@@ -122,8 +122,8 @@ class modBom extends DolibarrModules
// );
$this->const = array(
1=>array('BOM_ADDON_PDF', 'chaine', 'alpha', 'Name of PDF model of BOM', 0),
- 2=>array('BOM_ADDON', 'chaine', 'mod_bom_standard', 'Name of numbering rules of BOM', 0),
- 3=>array('BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/boms', '', 0)
+ 2=>array('BOM_ADDON', 'chaine', 'mod_bom_standard', 'Name of numbering rules of BOM', 0),
+ 3=>array('BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/boms', '', 0)
);
// Some keys to add into the overwriting translation tables
@@ -140,13 +140,13 @@ class modBom extends DolibarrModules
// Array to add new pages in new tabs
- $this->tabs = array();
+ $this->tabs = array();
// Example:
// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@bom:$user->rights->bom->read:/bom/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
- // $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@bom:$user->rights->othermodule->read:/bom/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
- // $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
- //
- // Where objecttype can be
+ // $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@bom:$user->rights->othermodule->read:/bom/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
+ // $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
+ //
+ // Where objecttype can be
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
// 'contact' to add a tab in contact view
// 'contract' to add a tab in contract view
@@ -168,9 +168,9 @@ class modBom extends DolibarrModules
// 'user' to add a tab in user view
- // Dictionaries
+ // Dictionaries
$this->dictionaries=array();
- /* Example:
+ /* Example:
$this->dictionaries=array(
'langs'=>'mylangfile@bom',
'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor
@@ -186,11 +186,11 @@ class modBom extends DolibarrModules
*/
- // Boxes/Widgets
+ // Boxes/Widgets
// Add here list of php file(s) stored in bom/core/boxes that contains class to show a widget.
- $this->boxes = array(
- 0=>array('file' => 'box_boms.php', 'note' => '', 'enabledbydefaulton' => 'Home')
- );
+ $this->boxes = array(
+ 0=>array('file' => 'box_boms.php', 'note' => '', 'enabledbydefaulton' => 'Home')
+ );
// Cronjobs (List of cron jobs entries to add when module is enabled)
@@ -312,12 +312,12 @@ class modBom extends DolibarrModules
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
* It also creates data directories
*
- * @param string $options Options when enabling module ('', 'noboxes')
+ * @param string $options Options when enabling module ('', 'noboxes')
* @return int 1 if OK, 0 if KO
*/
public function init($options = '')
{
- global $conf, $langs;
+ global $conf, $langs;
$result=$this->_load_tables('/bom/sql/');
if ($result < 0) return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default')
@@ -344,20 +344,20 @@ class modBom extends DolibarrModules
if (file_exists($src) && ! file_exists($dest))
{
- require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
- dol_mkdir($dirodt);
- $result=dol_copy($src, $dest, 0, 0);
- if ($result < 0)
- {
- $langs->load("errors");
- $this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest);
- return 0;
- }
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+ dol_mkdir($dirodt);
+ $result=dol_copy($src, $dest, 0, 0);
+ if ($result < 0)
+ {
+ $langs->load("errors");
+ $this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest);
+ return 0;
+ }
}
$sql = array(
- //"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape('standard')."' AND type = 'bom' AND entity = ".$conf->entity,
- //"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape('standard')."', 'bom', ".$conf->entity.")"
+ //"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape('standard')."' AND type = 'bom' AND entity = ".$conf->entity,
+ //"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape('standard')."', 'bom', ".$conf->entity.")"
);
return $this->_init($sql, $options);
diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php
index bbf4340196b..3b2e42b06b6 100644
--- a/htdocs/mrp/mo_card.php
+++ b/htdocs/mrp/mo_card.php
@@ -54,38 +54,38 @@ dol_include_once('/mrp/lib/mrp_mo.lib.php');
$langs->loadLangs(array("mrp", "other"));
// Get parameters
-$id = GETPOST('id', 'int');
+$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
-$action = GETPOST('action', 'aZ09');
+$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
-$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'mocard'; // To manage different context of search
+$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mocard'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha');
//$lineid = GETPOST('lineid', 'int');
// Initialize technical objects
-$object=new Mo($db);
+$object = new Mo($db);
$extrafields = new ExtraFields($db);
-$diroutputmassaction=$conf->mrp->dir_output . '/temp/massgeneration/'.$user->id;
-$hookmanager->initHooks(array('mocard','globalcard')); // Note that conf->hooks_modules contains array
+$diroutputmassaction = $conf->mrp->dir_output.'/temp/massgeneration/'.$user->id;
+$hookmanager->initHooks(array('mocard', 'globalcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
-$search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
+$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
-$search_all=trim(GETPOST("search_all", 'alpha'));
-$search=array();
-foreach($object->fields as $key => $val)
+$search_all = trim(GETPOST("search_all", 'alpha'));
+$search = array();
+foreach ($object->fields as $key => $val)
{
- if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha');
+ if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha');
}
-if (empty($action) && empty($id) && empty($ref)) $action='view';
+if (empty($action) && empty($id) && empty($ref)) $action = 'view';
// Load object
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
// Security check - Protection if external user
//if ($user->socid > 0) access_forbidden();
@@ -93,9 +93,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
//$result = restrictedArea($user, 'mrp', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
-$permissionnote=$user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php
-$permissiondellink=$user->rights->mrp->write; // Used by the include of actions_dellink.inc.php
-$permissiontoadd=$user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
+$permissionnote = $user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php
+$permissiondellink = $user->rights->mrp->write; // Used by the include of actions_dellink.inc.php
+$permissiontoadd = $user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
@@ -105,13 +105,13 @@ $permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && isset($
* Put here all code to do according to value of "action" parameter
*/
-$parameters=array();
-$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
+$parameters = array();
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
{
- $error=0;
+ $error = 0;
$backurlforlist = dol_buildpath('/mrp/mo_list.php', 1);
@@ -120,7 +120,7 @@ if (empty($reshook))
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist;
else $backtopage = DOL_URL_ROOT.'/mrp/mo_card.php?id='.($id > 0 ? $id : '__ID__');
}
- $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record
+ $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record
// Actions cancel, add, update, delete or clone
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
@@ -132,9 +132,9 @@ if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
// Actions to send emails
- $trigger_name='MO_SENTBYMAIL';
- $autocopy='MAIN_MAIL_AUTOCOPY_MO_TO';
- $trackid='mo'.$object->id;
+ $trigger_name = 'MO_SENTBYMAIL';
+ $autocopy = 'MAIN_MAIL_AUTOCOPY_MO_TO';
+ $trackid = 'mo'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
// Action to move up and down lines of object
@@ -157,9 +157,9 @@ if (empty($reshook))
* View
*/
-$form=new Form($db);
-$formfile=new FormFile($db);
-$formproject=new FormProjets($db);
+$form = new Form($db);
+$formfile = new FormFile($db);
+$formproject = new FormProjets($db);
llxHeader('', $langs->trans('Mo'), '');
@@ -194,10 +194,10 @@ if ($action == 'create')
print '
'."\n";
// Common attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
// Other attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
print '
';
print '';
print ' ';
- print ''; // Cancel for create does not post form if we don't know the backtopage
+ print ''; // Cancel for create does not post form if we don't know the backtopage
print '
'."\n";
// Common attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
// Other attributes
- include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
print '
';
@@ -292,7 +292,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Confirmation to delete
if ($action == 'delete')
{
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMo'), $langs->trans('ConfirmDeleteMo'), 'confirm_delete', '', 0, 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteMo'), $langs->trans('ConfirmDeleteMo'), 'confirm_delete', '', 0, 1);
}
// Confirmation to delete line
if ($action == 'deleteline')
@@ -321,14 +321,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$text .= $notify->confirmMessage('BOM_VALIDATE', $object->socid, $object);
}*/
- $formquestion=array();
- if (! empty($conf->bom->enabled))
+ $formquestion = array();
+ if (!empty($conf->bom->enabled))
{
$langs->load("mrp");
- require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
+ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
$formproduct = new FormProduct($db);
- $forcecombo=0;
- if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
+ $forcecombo = 0;
+ if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
$formquestion = array(
// 'text' => $langs->trans("ConfirmClone"),
// array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
@@ -336,21 +336,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
);
}
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
}
// Clone confirmation
if ($action == 'clone') {
// Create an array for form
$formquestion = array();
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMo', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMo', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Call Hook formConfirm
$parameters = array('lineid' => $lineid);
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
- if (empty($reshook)) $formconfirm.=$hookmanager->resPrint;
- elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;
+ if (empty($reshook)) $formconfirm .= $hookmanager->resPrint;
+ elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint;
// Print form confirm
print $formconfirm;
@@ -358,46 +358,46 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Object card
// ------------------------------------------------------------
- $linkback = '' . $langs->trans("BackToList") . '';
+ $linkback = ''.$langs->trans("BackToList").'';
- $morehtmlref='