diff --git a/.travis.yml b/.travis.yml index e3348e97b67..b211f58f319 100644 --- a/.travis.yml +++ b/.travis.yml @@ -104,16 +104,15 @@ before_script: script: - cd htdocs/install - date -# - php upgrade.php 3.4.0 3.5.0 > upgrade.log -# - php upgrade2.php 3.4.0 3.5.0 > upgrade2.log - - php upgrade.php 3.5.0 3.6.0 >> upgrade.log - - php upgrade2.php 3.5.0 3.6.0 >> upgrade2.log - - php upgrade.php 3.6.0 3.7.0 >> upgrade.log -# - cat upgrade360370.log - - php upgrade2.php 3.6.0 3.7.0 >> upgrade2.log - - php upgrade.php 3.7.0 3.8.0 >> upgrade.log - - php upgrade2.php 3.7.0 3.8.0 >> upgrade2.log -# - cat upgrade2.log +# - php upgrade.php 3.4.0 3.5.0 ignoredbversion > upgrade340350.log +# - php upgrade2.php 3.4.0 3.5.0 ignoredbversion > upgrade340350-2.log + - php upgrade.php 3.5.0 3.6.0 ignoredbversion > upgrade350360.log + - php upgrade2.php 3.5.0 3.6.0 ignoredbversion > upgrade350360-2.log + - php upgrade.php 3.6.0 3.7.0 ignoredbversion > upgrade360370.log + - php upgrade2.php 3.6.0 3.7.0 ignoredbversion > upgrade360370-2.log + - php upgrade.php 3.7.0 3.8.0 ignoredbversion > upgrade370380.log + - php upgrade2.php 3.7.0 3.8.0 ignoredbversion > upgrade370380-2.log +# - cat upgrade370380-2.log - cd ../.. - date - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php diff --git a/dev/skeletons/build_class_from_table.php b/dev/skeletons/build_class_from_table.php index 0b2e96daaac..ca10cf49ef0 100755 --- a/dev/skeletons/build_class_from_table.php +++ b/dev/skeletons/build_class_from_table.php @@ -174,7 +174,7 @@ $targetcontent=$sourcecontent; // Substitute class name $targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent); $targetcontent=preg_replace('/\$element=\'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent); -$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent); +$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$tablenoprefix.'\'', $targetcontent); $targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent); // Substitute comments @@ -252,7 +252,13 @@ foreach($property as $key => $prop) if ($addfield) { $varprop.="\t\t\$sql.= \" "; - if ($prop['istime']) + if ($prop['field']=='datec') + { + $varprop.='"."\'".$this->db->idate(dol_now())."\'"."'; + if ($i < count($property)) $varprop.=","; + $varprop.='";'; + } + elseif ($prop['istime']) { $varprop.='".(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':"\'".$this->db->idate('; $varprop.="\$this->".$prop['field'].""; @@ -268,6 +274,12 @@ foreach($property as $key => $prop) if ($i < count($property)) $varprop.=","; $varprop.='";'; } + elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_author') + { + $varprop.='".$user->id."'; + if ($i < count($property)) $varprop.=","; + $varprop.='";'; + } else { $varprop.='".(! isset($this->'.$prop['field'].')?\'NULL\':"\'".'; @@ -289,11 +301,17 @@ $i=0; foreach($property as $key => $prop) { $i++; - if ($prop['field'] != 'rowid' && $prop['field'] != 'id') + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && $prop['field'] != 'datec' && $prop['field'] != 'fk_user_author') { $varprop.="\t\t\$sql.= \" "; $varprop.=$prop['field'].'='; - if ($prop['istime']) + if ($prop['field']=='tms') { + $varprop.='".(dol_strlen($this->'.$prop['field'].')!=0 ? "\'".$this->db->idate('; + $varprop.='$this->'.$prop['field']; + $varprop.=')."\'" : "\'".$this->db->idate(dol_now())."\'").'; + $varprop.='"'; + } + elseif ($prop['istime']) { // (dol_strlen($this->datep)!=0 ? "'".$this->db->idate($this->datep)."'" : 'null') $varprop.='".(dol_strlen($this->'.$prop['field'].')!=0 ? "\'".$this->db->idate('; @@ -301,6 +319,9 @@ foreach($property as $key => $prop) $varprop.=')."\'" : \'null\').'; $varprop.='"'; } + elseif ($prop['field']=='fk_user_mod') { + $varprop.='".$user->id."'; + } else { $varprop.="\"."; @@ -325,6 +346,7 @@ $targetcontent=preg_replace('/\$sql\.= " t\.field2";/', '', $targetcontent); // Substitute select set parameters $varprop="\n"; +$varpropline="\n"; $cleanparam=''; $i=0; foreach($property as $key => $prop) @@ -338,11 +360,22 @@ foreach($property as $key => $prop) if ($prop['istime']) $varprop.=')'; $varprop.=";"; $varprop.="\n"; + + $varpropline.="\t\t\t\t\$line->".$prop['field']." = "; + if ($prop['istime']) $varpropline.='$this->db->jdate('; + $varpropline.='$obj->'.$prop['field']; + if ($prop['istime']) $varpropline.=')'; + $varpropline.=";"; + $varpropline.="\n"; } } $targetcontent=preg_replace('/\$this->prop1 = \$obj->field1;/', $varprop, $targetcontent); $targetcontent=preg_replace('/\$this->prop2 = \$obj->field2;/', '', $targetcontent); +//Substirute fetchAll +$targetcontent=preg_replace('/\$line->prop1 = \$obj->field1;/', $varpropline, $targetcontent); +$targetcontent=preg_replace('/\$line->prop2 = \$obj->field2;/', '', $targetcontent); + // Substitute initasspecimen parameters $varprop="\n"; diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index c1710165066..c59b3986a08 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Florian Henry * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify @@ -41,6 +42,8 @@ class Skeleton_Class extends CommonObject var $element='skeleton'; //!< Id that identify managed objects var $table_element='skeleton'; //!< Name of table without prefix where object is stored + var $lines=array(); + var $id; var $prop1; var $prop2; @@ -103,11 +106,11 @@ class Skeleton_Class extends CommonObject if (! $notrigger) { // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. + // want this action to call a trigger. //// Call triggers //$result=$this->call_trigger('MYOBJECT_CREATE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + //if ($result < 0) $error++; //// End call triggers } } @@ -115,11 +118,6 @@ class Skeleton_Class extends CommonObject // Commit or rollback if ($error) { - foreach($this->errors as $errmsg) - { - dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); - $this->error.=($this->error?', '.$errmsg:$errmsg); - } $this->db->rollback(); return -1*$error; } @@ -175,6 +173,69 @@ class Skeleton_Class extends CommonObject } } + /** + * Load object in memory from the database + * + * @param string $sortorder Sort Order + * @param string $sortfield Sort field + * @param int $limit offset limit + * @param int $offset offset limit + * @param array $filter filter array + * @return int <0 if KO, >0 if OK + */ + function fetchAll($sortorder, $sortfield, $limit, $offset, $filter = array()) + { + global $langs; + $sql = "SELECT"; + $sql.= " t.rowid,"; + $sql.= " t.field1,"; + $sql.= " t.field2"; + //... + $sql.= " FROM ".MAIN_DB_PREFIX."mytable as t"; + + // Manage filter + $sqlwhere=array(); + if (count($filter)>0) { + foreach ( $filter as $key => $value ) { + //$sqlwhere []= ' AND '. $key . ' LIKE \'%' . $this->db->escape($value) . '%\''; + } + } + if (count($sqlwhere)>0) { + $sql.= ' WHERE '.implode(' AND ', $sqlwhere); + } + $sql .= " ORDER BY " . $sortfield . " " . $sortorder . " " . $this->db->plimit($limit + 1, $offset); + + $this->lines = array (); + + dol_syslog(get_class($this)."::fetchAll", LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + + while ($obj = $this->db->fetch_object($resql)) + { + $line=new Skeleton_ClassLine(); + + $line->id = $obj->rowid; + $line->prop1 = $obj->field1; + $line->prop2 = $obj->field2; + + $this->line[]=$line; + //... + } + $this->db->free($resql); + + return $num; + } + else + { + $this->error="Error ".$this->db->lasterror(); + dol_syslog(get_class($this)."::fetchAll ".$this->error, LOG_ERR); + return -1; + } + } + /** * Update object into database @@ -368,3 +429,10 @@ class Skeleton_Class extends CommonObject } } + +class Skeleton_ClassLine +{ + var $id; + var $prop1; + var $prop2; +} diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 905296358f0..6d89e8f17a2 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -249,7 +249,11 @@ if ($action == 'export_csv') $purchase_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; header('Content-Type: text/csv'); - header('Content-Disposition: attachment;filename=journal_achats.csv'); + if ($conf->global->EXPORT_PREFIX_SPEC) + $filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_achats.csv"; + else + $filename="journal_achats.csv"; + header('Content-Disposition: attachment;filename='.$filename); if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export { diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index b3ca7ceae98..7605d54825c 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -271,7 +271,11 @@ if ($action == 'export_csv') $sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL; header('Content-Type: text/csv'); - header('Content-Disposition: attachment;filename=journal_ventes.csv'); + if ($conf->global->EXPORT_PREFIX_SPEC) + $filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_ventes.csv"; + else + $filename="journal_ventes.csv"; + header('Content-Disposition: attachment;filename='.$filename); $companystatic = new Client($db); diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index fdd5f725883..aaeabbb0572 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -62,7 +62,7 @@ class box_contacts extends ModeleBoxes if ($user->rights->societe->lire) { - $sql = "SELECT sp.rowid, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc"; + $sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc"; $sql.= ", s.nom as socname"; $sql.= ", s.code_client"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; @@ -87,7 +87,8 @@ class box_contacts extends ModeleBoxes $datec=$db->jdate($objp->datec); $datem=$db->jdate($objp->tms); - $contactstatic->lastname=$objp->lastname; + $contactstatic->id=$objp->id; + $contactstatic->lastname=$objp->lastname; $contactstatic->firstname=$objp->firstname; $contactstatic->civility_id=$objp->civility_id; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c821f6a1f34..0a2c39abbe8 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -567,10 +567,12 @@ class ExtraFields { global $conf; + if ( empty($elementtype) ) return array(); + if ($elementtype == 'thirdparty') $elementtype='societe'; $array_name_label=array(); - + // For avoid conflicts with external modules if (!$forceload && !empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return $array_name_label; @@ -1054,6 +1056,7 @@ class ExtraFields elseif ($type == 'link') { $out=''; + $param_list=array_keys($param['options']); // 0 : ObjectName // 1 : classPath @@ -1292,14 +1295,15 @@ class ExtraFields elseif ($type == 'link') { $out=''; - $param_list=array_keys($params['options']); - // 0 : ObjectName - // 1 : classPath - $InfoFieldList = explode(":", $param_list[0]); - dol_include_once($InfoFieldList[1]); - $object = new $InfoFieldList[0]($this->db); + // only if something to display (perf) if ($value) { + $param_list=array_keys($params['options']); + // 0 : ObjectName + // 1 : classPath + $InfoFieldList = explode(":", $param_list[0]); + dol_include_once($InfoFieldList[1]); + $object = new $InfoFieldList[0]($this->db); $object->fetch($value); $value=$object->getNomUrl(3); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 55bd1f37093..ae7b0e2d1e8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1643,7 +1643,7 @@ class Form if ($result) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; - require_once DOL_DOCUMENT_ROOT.'/product/class/priceparser.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $num = $this->db->num_rows($result); $out.=''; if ($useempty) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index e5b60f4094c..4a8ae857a2d 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -813,11 +813,12 @@ function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $ha * This replace old function monthArrayOrSelected. * * @param Translate $outputlangs Object langs + * @param int $short 1=Return short label * @return array Month string or array if selected < 0 */ -function monthArray($outputlangs) +function monthArray($outputlangs,$short=0) { - $montharray = array ( + $montharray = array ( 1 => $outputlangs->trans("January"), 2 => $outputlangs->trans("February"), 3 => $outputlangs->trans("March"), @@ -832,6 +833,24 @@ function monthArray($outputlangs) 12 => $outputlangs->trans("December") ); - return $montharray; + if (! empty($short)) + { + $montharray = array ( + 1 => $outputlangs->trans("Jan"), + 2 => $outputlangs->trans("Feb"), + 3 => $outputlangs->trans("Mar"), + 4 => $outputlangs->trans("Apr"), + 5 => $outputlangs->trans("May"), + 6 => $outputlangs->trans("Jun"), + 7 => $outputlangs->trans("Jul"), + 8 => $outputlangs->trans("Aug"), + 9 => $outputlangs->trans("Sep"), + 10 => $outputlangs->trans("Oct"), + 11 => $outputlangs->trans("Nov"), + 12 => $outputlangs->trans("Dec") + ); + } + + return $montharray; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6ac8e92b229..cb3752f817c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -592,16 +592,17 @@ function dol_strtoupper($utf8_string) * This function works only if syslog module is enabled. * This must not use any call to other function calling dol_syslog (avoid infinite loop). * - * @param string $message Line to log. Ne doit pas etre traduit si level = LOG_ERR - * @param int $level Log level - * 0=Show nothing - * On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr - * On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7 - * @param int $ident 1=Increase ident of 1, -1=Decrease ident of 1 - * @param string $suffixinfilename When output is a file, append this suffix into default log filename. + * @param string $message Line to log. + * @param int $level Log level + * 0=Show nothing + * On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr + * On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7 + * @param int $ident 1=Increase ident of 1, -1=Decrease ident of 1 + * @param string $suffixinfilename When output is a file, append this suffix into default log filename. + * @param string $restricttologhandler Output log only for this log handler * @return void */ -function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='') +function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='', $restricttologhandler='') { global $conf, $user; @@ -624,7 +625,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename=' $conf->logbuffer[] = dol_print_date(time(),"%Y-%m-%d %H:%M:%S")." ".$message; } - //TODO: Remove this. MAIN_ENABLE_LOG_HTML should be deprecated and use a HTML handler + //TODO: Remove this. MAIN_ENABLE_LOG_HTML should be deprecated and use a log handler dedicated to HTML output // If enable html log tag enabled and url parameter log defined, we show output log on HTML comments if (! empty($conf->global->MAIN_ENABLE_LOG_HTML) && ! empty($_GET["log"])) { @@ -648,10 +649,10 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename=' else if (! empty($_SERVER['COMPUTERNAME'])) $data['ip'] = $_SERVER['COMPUTERNAME'].(empty($_SERVER['USERNAME'])?'':'@'.$_SERVER['USERNAME']); // This is when PHP session is ran outside a web server, like from Linux command line (Not always defined, but usefull if OS defined it). else if (! empty($_SERVER['LOGNAME'])) $data['ip'] = '???@'.$_SERVER['LOGNAME']; - // Loop on each log handler and send output foreach ($conf->loghandlers as $loghandlerinstance) { + if ($restricttologhandler && $loghandlerinstance->code != $restricttologhandler) continue; $loghandlerinstance->export($data,$suffixinfilename); } unset($data); @@ -2279,15 +2280,16 @@ function img_previous($titlealt = 'default') * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. * @param int $selected Selected + * @param string $moreclass Add more CSS classes * @return string Return img tag */ -function img_down($titlealt = 'default', $selected = 0) +function img_down($titlealt = 'default', $selected = 0, $moreclass='') { global $conf, $langs; if ($titlealt == 'default') $titlealt = $langs->trans('Down'); - return img_picto($titlealt, ($selected ? '1downarrow_selected.png' : '1downarrow.png'), 'class="imgdown"'); + return img_picto($titlealt, ($selected ? '1downarrow_selected.png' : '1downarrow.png'), 'class="imgdown'.($moreclass?" ".$moreclass:"").'"'); } /** @@ -2295,15 +2297,16 @@ function img_down($titlealt = 'default', $selected = 0) * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. * @param int $selected Selected + * @param string $moreclass Add more CSS classes * @return string Return img tag */ -function img_up($titlealt = 'default', $selected = 0) +function img_up($titlealt = 'default', $selected = 0, $moreclass='') { global $conf, $langs; if ($titlealt == 'default') $titlealt = $langs->trans('Up'); - return img_picto($titlealt, ($selected ? '1uparrow_selected.png' : '1uparrow.png'), 'class="imgup"'); + return img_picto($titlealt, ($selected ? '1uparrow_selected.png' : '1uparrow.png'), 'class="imgup'.($moreclass?" ".$moreclass:"").'"'); } /** @@ -2621,7 +2624,7 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar * Get title line of an array * * @param string $name Label of field - * @param int $thead 0=To use with standard table forat, 1=To use inside , 2=To use with
+ * @param int $thead 0=To use with standard table format, 1=To use inside , 2=To use with
* @param string $file Url used when we click on sort picto * @param string $field Field to use for new sorting. Empty if this field is not sortable. * @param string $begin ("" by defaut) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index aaff80233b1..f2b105242de 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1885,7 +1885,7 @@ function colorArrayToHex($arraycolor,$colorifnotfound='888888') function colorStringToArray($stringcolor,$colorifnotfound=array(88,88,88)) { if (is_array($stringcolor)) return $stringcolor; // If already into correct output format, we return as is - $tmp=preg_match('/^([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])$/',$stringcolor,$reg); + $tmp=preg_match('/^#?([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])$/',$stringcolor,$reg); if (! $tmp) { $tmp=explode(',',$stringcolor); diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 41b7996cbfd..b70c1e2517a 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -339,8 +339,9 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.' && substr($subdir, 0, 3) <> 'CVS' && ! preg_match('/common|phones/i',$subdir)) { - // Disable not stable themes - //if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/bureau2crea/i',$subdir)) continue; + // Disable not stable themes (dir ends with _exp or _dev) + if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match('/_dev$/i',$subdir)) continue; + if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/_exp$/i',$subdir)) continue; print '
'; $file=$dirtheme."/".$subdir."/thumb.png"; diff --git a/htdocs/core/modules/modDynamicPrices.class.php b/htdocs/core/modules/modDynamicPrices.class.php index 3a47e6a70e9..1b2fb712a8b 100644 --- a/htdocs/core/modules/modDynamicPrices.class.php +++ b/htdocs/core/modules/modDynamicPrices.class.php @@ -58,7 +58,7 @@ class modDynamicPrices extends DolibarrModules // Config pages //------------- - //$this->config_page_url = array(); + $this->config_page_url = array("dynamic_prices.php@product"); // Dependancies //------------- diff --git a/htdocs/core/modules/syslog/mod_syslog_chromephp.php b/htdocs/core/modules/syslog/mod_syslog_chromephp.php index b376595fd2b..3e24901f5af 100644 --- a/htdocs/core/modules/syslog/mod_syslog_chromephp.php +++ b/htdocs/core/modules/syslog/mod_syslog_chromephp.php @@ -7,6 +7,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php'; */ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface { + var $code = 'chromephp'; + /** * Return name of logger * @@ -111,7 +113,7 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface } /** - * Output log content + * Output log content. We also start output buffering at first log write. * * @param array $content Content to log * @return null|false diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index 92d2302bea7..b1060677c6f 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -7,6 +7,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php'; */ class mod_syslog_file extends LogHandler implements LogHandlerInterface { + var $code = 'file'; /** * Return name of logger diff --git a/htdocs/core/modules/syslog/mod_syslog_firephp.php b/htdocs/core/modules/syslog/mod_syslog_firephp.php index a9d4de979e3..08c0b91efc6 100644 --- a/htdocs/core/modules/syslog/mod_syslog_firephp.php +++ b/htdocs/core/modules/syslog/mod_syslog_firephp.php @@ -7,6 +7,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php'; */ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface { + var $code = 'firephp'; + /** * Return name of logger * diff --git a/htdocs/core/modules/syslog/mod_syslog_syslog.php b/htdocs/core/modules/syslog/mod_syslog_syslog.php index 2043225857b..0f0848f3afd 100644 --- a/htdocs/core/modules/syslog/mod_syslog_syslog.php +++ b/htdocs/core/modules/syslog/mod_syslog_syslog.php @@ -7,6 +7,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php'; */ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface { + var $code = 'syslog'; + /** * Return name of logger * diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index 27b14d859f3..4b8d82bce40 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -33,8 +33,8 @@ $tagidfortablednd=(empty($tagidfortablednd)?'tablelines':$tagidfortablednd); if (GETPOST('action') != 'editline' && $nboflines > 1) { ?> diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index be422c218e2..3eb9f907d8a 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -29,7 +29,7 @@ if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1; if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1; $arrayofjs=array('/core/js/dst.js'.(empty($conf->dol_use_jmobile)?'':'?version='.urlencode(DOL_VERSION))); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second -$titleofloginpage=$langs->trans('Login').' '.$title; // title is defined by dol_loginfunction in security2.lib.php +$titleofloginpage=$langs->trans('Login').' @ '.$title; // title is defined by dol_loginfunction in security2.lib.php. We must keep the @, some tools use it to know it is login page. print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs); ?> @@ -49,7 +49,6 @@ $(document).ready(function () {