diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 4a3eb6b4421..065f2814f05 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -216,7 +216,7 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."mytable as t"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mytable_extrafields as ef on (u.rowid = ef.fk_object)"; +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mytable_extrafields as ef on (t.rowid = ef.fk_object)"; $sql.= " WHERE 1 = 1"; //$sql.= " WHERE u.entity IN (".getEntity('mytable',1).")"; if ($search_field1) $sql.= natural_search("field1",$search_field1); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index bbfc746a443..4ef2a35e8a7 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1034,9 +1034,9 @@ if ($id) if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); } if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; } if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); } - if ($fieldlist[$field]=='width') { $valuetoshow=$langs->trans("Width"); } - if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); } - if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); } + if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); } + if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); } + if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); } if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; } if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); } if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); } @@ -1052,6 +1052,18 @@ if ($id) if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); } if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); } if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); } + if ($fieldlist[$field]=='paper_size') { $valuetoshow=$langs->trans("PaperSize"); } + if ($fieldlist[$field]=='orientation') { $valuetoshow=$langs->trans("Orientation"); } + if ($fieldlist[$field]=='leftmargin') { $valuetoshow=$langs->trans("LeftMargin"); } + if ($fieldlist[$field]=='topmargin') { $valuetoshow=$langs->trans("TopMargin"); } + if ($fieldlist[$field]=='spacex') { $valuetoshow=$langs->trans("SpaceX"); } + if ($fieldlist[$field]=='spacey') { $valuetoshow=$langs->trans("SpaceY"); } + if ($fieldlist[$field]=='font_size') { $valuetoshow=$langs->trans("FontSize"); } + if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); } + if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); } + if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); } + if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); } + if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); } if ($id == 2) // Special cas for state page { @@ -1211,9 +1223,9 @@ if ($id) if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); } if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; } if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); } - if ($fieldlist[$field]=='width') { $valuetoshow=$langs->trans("Width"); } - if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); } - if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); } + if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); } + if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); } + if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); } if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); } if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; } @@ -1229,6 +1241,20 @@ if ($id) if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); } if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); } if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); } + if ($fieldlist[$field]=='paper_size') { $valuetoshow=$langs->trans("PaperSize"); } + if ($fieldlist[$field]=='orientation') { $valuetoshow=$langs->trans("Orientation"); } + if ($fieldlist[$field]=='leftmargin') { $valuetoshow=$langs->trans("LeftMargin"); } + if ($fieldlist[$field]=='topmargin') { $valuetoshow=$langs->trans("TopMargin"); } + if ($fieldlist[$field]=='spacex') { $valuetoshow=$langs->trans("SpaceX"); } + if ($fieldlist[$field]=='spacey') { $valuetoshow=$langs->trans("SpaceY"); } + if ($fieldlist[$field]=='font_size') { $valuetoshow=$langs->trans("FontSize"); } + if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); } + if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); } + if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); } + if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); } + if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); } + if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); } + if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); } // Affiche nom du champ if ($showfield) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 5c1255a1c20..93dd8ea8969 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -325,7 +325,7 @@ if ($mode != 'marketplace') print ''; print ''; print ''; - + $moreforfilter = ''; $moreforfilter.='
'; $moreforfilter.= $langs->trans('Keyword') . ': '; @@ -352,7 +352,7 @@ if ($mode != 'marketplace') $moreforfilter.=' '; $moreforfilter.=''; $moreforfilter.= '
'; - + if (! empty($moreforfilter)) { //print '
'; @@ -361,11 +361,10 @@ if ($mode != 'marketplace') $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; //print '
'; - } - + } + print '



'; - - + // Show list of modules print ''."\n"; @@ -380,7 +379,7 @@ if ($mode != 'marketplace') $modName = $filename[$key]; $objMod = $modules[$key]; $dirofmodule = $dirmod[$key]; - + $special = $objMod->special; //print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."
"; @@ -393,9 +392,9 @@ if ($mode != 'marketplace') dol_syslog("Error for module ".$key." - Property name of module looks empty", LOG_WARNING); continue; } - + $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod))); - + // Check filters $modulename=$objMod->getName(); $moduledesc=$objMod->getDesc(); @@ -506,7 +505,7 @@ if ($mode != 'marketplace') $text=''; if ($objMod->getDescLong()) $text.='
'.$objMod->getDesc().'

'.$objMod->getDescLong().'
'; else $text.='
'.$objMod->getDesc().'

'; - + $textexternal=''; if ($objMod->isCoreOrExternalModule() == 'external') { @@ -524,7 +523,7 @@ if ($mode != 'marketplace') if (! empty($conf->global->$const_name)) $text.=dol_print_date($objMod->getLastActivationDate(), 'dayhour'); else $text.=$langs->trans("Disabled"); $text.='
'; - + $text.='
'.$langs->trans("AddRemoveTabs").': '; if (isset($objMod->tabs) && is_array($objMod->tabs) && count($objMod->tabs)) { @@ -537,7 +536,7 @@ if ($mode != 'marketplace') } } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddDictionaries").': '; if (isset($objMod->dictionaries) && isset($objMod->dictionaries['tablib']) && is_array($objMod->dictionaries['tablib']) && count($objMod->dictionaries['tablib'])) { @@ -549,7 +548,7 @@ if ($mode != 'marketplace') } } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddBoxes").': '; if (isset($objMod->boxes) && is_array($objMod->boxes) && count($objMod->boxes)) { @@ -568,14 +567,14 @@ if ($mode != 'marketplace') $text.=$langs->trans("Yes"); } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddSubstitutions").': '; if (isset($objMod->module_parts) && isset($objMod->module_parts['substitutions']) && $objMod->module_parts['substitutions']) { $text.=$langs->trans("Yes"); } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddSheduledJobs").': '; if (isset($objMod->cronjobs) && is_array($objMod->cronjobs) && count($objMod->cronjobs)) { @@ -587,14 +586,14 @@ if ($mode != 'marketplace') } } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddTriggers").': '; if (isset($objMod->module_parts) && isset($objMod->module_parts['triggers']) && $objMod->module_parts['triggers']) { $text.=$langs->trans("Yes"); } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddHooks").': '; if (isset($objMod->module_parts) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks'])) { @@ -618,14 +617,14 @@ if ($mode != 'marketplace') } } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddMenus").': '; if (isset($objMod->menu) && ! empty($objMod->menu)) // objMod can be an array or just an int 1 { $text.=$langs->trans("Yes"); } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddExportProfiles").': '; if (isset($objMod->export_label) && is_array($objMod->export_label) && count($objMod->export_label)) { @@ -637,7 +636,7 @@ if ($mode != 'marketplace') } } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddImportProfiles").': '; if (isset($objMod->import_label) && is_array($objMod->import_label) && count($objMod->import_label)) { @@ -649,29 +648,29 @@ if ($mode != 'marketplace') } } else $text.=$langs->trans("No"); - + $text.='
'.$langs->trans("AddOtherPagesOrServices").': '; $text.=$langs->trans("DetectionNotPossible"); - + print $form->textwithpicto('', $text, 1, 'help', 'minheight20'); print ''; - + // Version print '\n"; // Activate/Disable and Setup (2 columns) diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index 3394c2abf53..e6743546b2f 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -344,7 +344,7 @@ class Categories extends DolibarrApi /** * Clean sensible object datas * - * @param object $object Object to clean + * @param Categorie $object Object to clean * @return array Array of cleaned object properties * * @todo use an array for properties to clean diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 550d5241431..75100aae9e6 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -141,6 +141,12 @@ class Contrat extends CommonObject */ var $lines=array(); + /** + * Maps ContratLigne IDs to $this->lines indexes + * @var int[] + */ + protected $lines_id_index_mapper=array(); + /** * Constructor @@ -221,38 +227,7 @@ class Contrat extends CommonObject */ function active_line($user, $line_id, $date, $date_end='', $comment='') { - global $langs,$conf; - - $error=0; - - $this->db->begin(); - - $sql = "UPDATE ".MAIN_DB_PREFIX."contratdet SET statut = 4,"; - $sql.= " date_ouverture = ".(dol_strlen($date)!=0?"'".$this->db->idate($date)."'":"null").","; - $sql.= " date_fin_validite = ".(dol_strlen($date_end)!=0?"'".$this->db->idate($date_end)."'":"null").","; - $sql.= " fk_user_ouverture = ".$user->id.","; - $sql.= " date_cloture = null,"; - $sql.= " commentaire = '".$this->db->escape($comment)."'"; - $sql.= " WHERE rowid = ".$line_id . " AND (statut = 0 OR statut = 3 OR statut = 5)"; - - dol_syslog(get_class($this)."::active_line", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - // Call trigger - $result=$this->call_trigger('CONTRACT_SERVICE_ACTIVATE',$user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } - // End call triggers - - $this->db->commit(); - return 1; - } - else - { - $this->error=$this->db->lasterror(); - $this->db->rollback(); - return -1; - } + $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment); } @@ -267,37 +242,7 @@ class Contrat extends CommonObject */ function close_line($user, $line_id, $date_end, $comment='') { - global $langs,$conf; - - $error=0; - - // statut actif : 4 - - $this->db->begin(); - - $sql = "UPDATE ".MAIN_DB_PREFIX."contratdet SET statut = 5,"; - $sql.= " date_cloture = '".$this->db->idate($date_end)."',"; - $sql.= " fk_user_cloture = ".$user->id.","; - $sql.= " commentaire = '".$this->db->escape($comment)."'"; - $sql.= " WHERE rowid = ".$line_id . " AND statut = 4"; - - $resql = $this->db->query($sql); - if ($resql) - { - // Call trigger - $result=$this->call_trigger('CONTRACT_SERVICE_CLOSE',$user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } - // End call triggers - - $this->db->commit(); - return 1; - } - else - { - $this->error=$this->db->lasterror(); - $this->db->rollback(); - return -1; - } + $this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); } @@ -748,6 +693,7 @@ class Contrat extends CommonObject $line->fetch_optionals($line->id,$extralabelsline); $this->lines[] = $line; + $this->lines_id_index_mapper[$line->id] = key($this->lines); //dol_syslog("1 ".$line->desc); //dol_syslog("2 ".$line->product_desc); @@ -852,6 +798,7 @@ class Contrat extends CommonObject $this->lines[] = $line; + $this->lines_id_index_mapper[$line->id] = key($this->lines); $total_ttc+=$objp->total_ttc; $total_vat+=$objp->total_tva; @@ -2947,4 +2894,106 @@ class ContratLigne extends CommonObjectLine return -1; } } + + /** + * Activate a contract line + * + * @param User $user Objet User who activate contract + * @param int $date Date d'ouverture + * @param int|string $date_end Date fin prevue + * @param string $comment A comment typed by user + * @return int <0 if KO, >0 if OK + */ + function active_line($user, $date, $date_end = '', $comment = '') + { + global $langs, $conf; + + // Update object + $this->date_ouverture = $date; + $this->date_fin_validite = $date_end; + $this->fk_user_ouverture = $user->id; + $this->date_cloture = null; + $this->commentaire = $comment; + + $error = 0; + + $this->db->begin(); + + $sql = "UPDATE " . MAIN_DB_PREFIX . "contratdet SET statut = 4,"; + $sql .= " date_ouverture = " . (dol_strlen($date) != 0 ? "'" . $this->db->idate($date) . "'" : "null") . ","; + $sql .= " date_fin_validite = " . (dol_strlen($date_end) != 0 ? "'" . $this->db->idate($date_end) . "'" : "null") . ","; + $sql .= " fk_user_ouverture = " . $user->id . ","; + $sql .= " date_cloture = null,"; + $sql .= " commentaire = '" . $this->db->escape($comment) . "'"; + $sql .= " WHERE rowid = " . $this->id . " AND (statut = 0 OR statut = 3 OR statut = 5)"; + + dol_syslog(get_class($this) . "::active_line", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) { + // Call trigger + $result = $this->call_trigger('CONTRACT_SERVICE_ACTIVATE', $user); + if ($result < 0) { + $error++; + $this->db->rollback(); + return -1; + } + // End call triggers + + $this->db->commit(); + return 1; + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } + + /** + * Close a contract line + * + * @param User $user Objet User who close contract + * @param int $date_end Date end + * @param string $comment A comment typed by user + * @return int <0 if KO, >0 if OK + */ + function close_line($user, $date_end, $comment = '') + { + global $langs, $conf; + + // Update object + $this->date_cloture = $date_end; + $this->fk_user_cloture = $user->id; + $this->commentaire = $comment; + + $error = 0; + + // statut actif : 4 + + $this->db->begin(); + + $sql = "UPDATE " . MAIN_DB_PREFIX . "contratdet SET statut = 5,"; + $sql .= " date_cloture = '" . $this->db->idate($date_end) . "',"; + $sql .= " fk_user_cloture = " . $user->id . ","; + $sql .= " commentaire = '" . $this->db->escape($comment) . "'"; + $sql .= " WHERE rowid = " . $this->id . " AND statut = 4"; + + $resql = $this->db->query($sql); + if ($resql) { + // Call trigger + $result = $this->call_trigger('CONTRACT_SERVICE_CLOSE', $user); + if ($result < 0) { + $error++; + $this->db->rollback(); + return -1; + } + // End call triggers + + $this->db->commit(); + return 1; + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1684090c483..c11f6d6c5ee 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -223,6 +223,16 @@ HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr HelpCenterDesc2=Some part of this service are available in english only. CurrentMenuHandler=Current menu handler MeasuringUnit=Measuring unit +LeftMargin=Left margin +TopMargin=Top margin +PaperSize=Paper type +Orientation=Orientation +SpaceX=Space X +SpaceY=Space Y +FontSize=Font size +Content=Content +NoticePeriod=Notice +NewByMonth=New by month Emails=E-mails EMailsSetup=E-mails setup EMailsDesc=This page allows you to overwrite your PHP parameters for e-mails sending. In most cases on Unix/Linux OS, your PHP setup is correct and these parameters are useless. @@ -815,6 +825,7 @@ DictionaryPaymentModes=Payment modes DictionaryTypeContact=Contact/Address types DictionaryEcotaxe=Ecotax (WEEE) DictionaryPaperFormat=Paper formats +DictionaryFormatCards=Cards formats DictionaryFees=Types of fees DictionarySendingMethods=Shipping methods DictionaryStaff=Staff diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index ab679589e04..357cda28610 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -613,6 +613,9 @@ NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager +Browser=Browser +Layout=Layout +Screen=Screen DisabledModules=Disabled modules For=For ForCustomer=For customer diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index a88e9e7b738..bb122dc70e8 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -924,7 +924,23 @@ class Product extends CommonObject if ($result < 0) { $error++; } // End call triggers } - + + // Delete from product_batch on product delete + if (! $error) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX.'product_batch'; + $sql.= " WHERE fk_product_stock IN ("; + $sql.= "SELECT rowid FROM ".MAIN_DB_PREFIX.'product_stock'; + $sql.= " WHERE fk_product = ".$id.")"; + dol_syslog(get_class($this).'::delete', LOG_DEBUG); + $result = $this->db->query($sql); + if (! $result) + { + $error++; + $this->errors[] = $this->db->lasterror(); + } + } + // Delete all child tables if (! $error) { diff --git a/htdocs/product/stock/class/api_stockmovements.class.php b/htdocs/product/stock/class/api_stockmovements.class.php index b453c2b7d30..a246e7fc135 100644 --- a/htdocs/product/stock/class/api_stockmovements.class.php +++ b/htdocs/product/stock/class/api_stockmovements.class.php @@ -275,7 +275,7 @@ class StockMovements extends DolibarrApi /** * Clean sensible object datas * - * @param object $object Object to clean + * @param MouvementStock $object Object to clean * @return array Array of cleaned object properties * * @todo use an array for properties to clean diff --git a/htdocs/product/stock/class/api_warehouses.class.php b/htdocs/product/stock/class/api_warehouses.class.php index f280111a385..79eefc821c3 100644 --- a/htdocs/product/stock/class/api_warehouses.class.php +++ b/htdocs/product/stock/class/api_warehouses.class.php @@ -244,7 +244,7 @@ class Warehouses extends DolibarrApi /** * Clean sensible object datas * - * @param object $object Object to clean + * @param Entrepot $object Object to clean * @return array Array of cleaned object properties * * @todo use an array for properties to clean diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 31dcb04d032..27099ef4d91 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -780,7 +780,7 @@ class Task extends CommonObject * @param User $usert Return roles on task for this internal user. If set userp must NOT be defined. -1 means no filter. * @param int $projectid Project id list separated with , to filter on project * @param int $taskid Task id to filter on a task - * @param string $filteronprojstatus Filter on project status if userp is set. Not used if userp not defined. + * @param integer $filteronprojstatus Filter on project status if userp is set. Not used if userp not defined. * @return array Array (projectid => 'list of roles for project' or taskid => 'list of roles for task') */ function getUserRolesForProjectsOrTasks($userp, $usert, $projectid='', $taskid=0, $filteronprojstatus=-1)
'; - + // Picto warning $version=$objMod->getVersion(0); $versiontrans=$objMod->getVersion(1); if (preg_match('/development/i', $version)) print img_warning($langs->trans("Development"), 'style="float: left"'); if (preg_match('/experimental/i', $version)) print img_warning($langs->trans("Experimental"), 'style="float: left"'); if (preg_match('/deprecated/i', $version)) print img_warning($langs->trans("Deprecated"), 'style="float: left"'); - + // Picto external if ($textexternal) print img_picto($langs->trans("ExternalModule",$dirofmodule), 'external', 'style="float: left"'); - + print $versiontrans; - + print "