Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2017-05-29 19:11:41 +02:00
102 changed files with 2219 additions and 1889 deletions

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* 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
@@ -27,7 +27,7 @@
* Prepare array with list of admin tabs
*
* @param AccountingAccount $object Object instance we show card
* @return array Array of tabs to show
* @return array Array of tabs to show
*/
function admin_accounting_prepare_head(AccountingAccount $object=null)
{
@@ -41,11 +41,6 @@ function admin_accounting_prepare_head(AccountingAccount $object=null)
$head[$h][2] = 'general';
$h ++;
$head[$h][0] = DOL_URL_ROOT.'/accountancy/admin/journals.php';
$head[$h][1] = $langs->trans("Journaux");
$head[$h][2] = 'journal';
$h ++;
$head[$h][0] = DOL_URL_ROOT.'/accountancy/admin/export.php';
$head[$h][1] = $langs->trans("ExportOptions");
$head[$h][2] = 'export';
@@ -91,35 +86,6 @@ function accounting_prepare_head(AccountingAccount $object)
return $head;
}
/**
* Prepare array with list of tabs
*
* @param AccountingAccount $object Accounting account
* @return array Array of tabs to show
*/
function accounting_journal_prepare_head(AccountingJournal $object)
{
global $langs, $conf;
$h = 0;
$head = array ();
$head[$h][0] = DOL_URL_ROOT.'/accountancy/admin/journals_card.php?id=' . $object->id;
$head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'card';
$h ++;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname); to remove a tab
complete_head_from_modules($conf, $langs, $object, $head, $h, 'accounting_journal');
complete_head_from_modules($conf, $langs, $object, $head, $h, 'accounting_journal', 'remove');
return $head;
}
/**
* Return accounting account without zero on the right
*
@@ -129,7 +95,7 @@ function accounting_journal_prepare_head(AccountingJournal $object)
function clean_account($account)
{
$account = rtrim($account,"0");
return $account;
}
@@ -144,9 +110,9 @@ function length_accountg($account)
global $conf;
if ($account < 0 || empty($account)) return '';
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) return $account;
$g = $conf->global->ACCOUNTING_LENGTH_GACCOUNT;
if (! empty($g)) {
// Clean parameters
@@ -179,9 +145,9 @@ function length_accounta($accounta)
global $conf, $langs;
if ($accounta < 0 || empty($accounta)) return '';
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) return $accounta;
$a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT;
if (! empty($a)) {
// Clean parameters

View File

@@ -1064,7 +1064,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
if (get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
if (get_class($filterobj) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m";
if (get_class($filterobj) == 'CommandeFournisseur') $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as o";
$sql.= " WHERE u.rowid = a.fk_user_author";
$sql.= " WHERE u.rowid = a.fk_user_action";
$sql.= " AND a.entity IN (".getEntity('agenda', 1).")";
if (get_class($filterobj) == 'Societe' && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id;
if (get_class($filterobj) == 'Project' && $filterobj->id) $sql.= " AND a.fk_project = ".$filterobj->id;

View File

@@ -78,7 +78,40 @@ function expensereport_prepare_head($object)
return $head;
}
/**
* Returns an array with the tabs for the "Expense report payment" section
* It loads tabs from modules looking for the entity payment
*
* @param Paiement $object Current payment object
* @return array Tabs for the payment section
*/
function payment_expensereport_prepare_head(PaymentExpenseReport $object) {
global $langs, $conf;
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT.'/expensereport/payment/card.php?id='.$object->id;
$head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'payment';
$h++;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname); to remove a tab
complete_head_from_modules($conf,$langs,$object,$head,$h,'payment_expensereport');
$head[$h][0] = DOL_URL_ROOT.'/expensereport/payment/info.php?id='.$object->id;
$head[$h][1] = $langs->trans("Info");
$head[$h][2] = 'info';
$h++;
complete_head_from_modules($conf,$langs,$object,$head,$h,'payment_expensereport', 'remove');
return $head;
}
/**
* Return array head with list of tabs to view object informations.

View File

@@ -102,14 +102,14 @@ function getDoliDBInstance($type, $host, $user, $pass, $name, $port)
/**
* Get list of entity id to use
*
* @param string $element Current element
* 'societe', 'socpeople', 'actioncomm', 'agenda', 'resource',
* @param string $element Current element
* 'societe', 'socpeople', 'actioncomm', 'agenda', 'resource',
* 'product', 'productprice', 'stock',
* 'propal', 'supplier_proposal', 'facture', 'facture_fourn',
* 'categorie', 'bank_account', 'bank_account', 'adherent', 'user',
* 'categorie', 'bank_account', 'bank_account', 'adherent', 'user',
* 'commande', 'commande_fournisseur', 'expedition', 'intervention', 'survey',
* 'contract', 'tax', 'expensereport', 'holiday', 'multicurrency', 'project',
* 'email_template', 'event',
* 'email_template', 'event',
* @param int $shared 0=Return id of entity, 1=Return id entity + shared entities
* @return mixed Entity id(s) to use
*/
@@ -121,7 +121,7 @@ function getEntity($element=false, $shared=0)
if ($element == 'actioncomm') $element='agenda';
if ($element == 'fichinter') $element='intervention';
if ($element == 'categorie') $element='category';
if (is_object($mc))
{
return $mc->getEntity($element, $shared);
@@ -240,7 +240,7 @@ function dol_shutdown()
* Return value of a param into GET or POST supervariable.
* Use the property $user->default_values[path]['creatform'] and/or $user->default_values[path]['filters'] and/or $user->default_values[path]['sortorder']
* Note: The property $user->default_values is loaded by the main when loading the user.
*
*
* @param string $paramname Name of parameter to found
* @param string $check Type of check
* ''=no check (deprecated)
@@ -257,29 +257,29 @@ function dol_shutdown()
* @param int $filter Filter to apply when $check is set to 'custom'. (See http://php.net/manual/en/filter.filters.php for détails)
* @param mixed $options Options to pass to filter_var when $check is set to 'custom'.
* @return string|string[] Value found (string or array), or '' if check fails
*
*
* @TODO Set default value for check to alpha. Check all WYSIWYG edition (email and description...) is still ok with rich text.
*/
function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
{
global $mysoc,$user,$conf;
if (empty($paramname)) return 'BadFirstParameterForGETPOST';
if (empty($method)) $out = isset($_GET[$paramname])?$_GET[$paramname]:(isset($_POST[$paramname])?$_POST[$paramname]:'');
elseif ($method==1) $out = isset($_GET[$paramname])?$_GET[$paramname]:'';
elseif ($method==2) $out = isset($_POST[$paramname])?$_POST[$paramname]:'';
elseif ($method==3) $out = isset($_POST[$paramname])?$_POST[$paramname]:(isset($_GET[$paramname])?$_GET[$paramname]:'');
elseif ($method==4) $out = isset($_POST[$paramname])?$_POST[$paramname]:(isset($_GET[$paramname])?$_GET[$paramname]:(isset($_COOKIE[$paramname])?$_COOKIE[$paramname]:''));
else return 'BadThirdParameterForGETPOST';
if (empty($method) || $method == 3 || $method == 4)
{
$relativepathstring = $_SERVER["PHP_SELF"];
if (constant('DOL_URL_ROOT')) $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'),'/').'/', '', $relativepathstring);
$relativepathstring = preg_replace('/^custom\//', '', $relativepathstring);
$relativepathstring = preg_replace('/^\//', '', $relativepathstring);
// Code for search criteria persistence.
// Retrieve values if restore_lastsearch_values is set and there is saved values
if (! empty($_GET['restore_lastsearch_values']) && ! empty($_SESSION['lastsearch_values_'.$relativepathstring])) // Keep $_GET here
@@ -347,16 +347,16 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
}
}
}
}
}
if (empty($check) && ! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2)
{
dol_syslog("Deprecated use of GETPOST, called with 1st param = ".$paramname." and 2nd param not defined, when calling page ".$_SERVER["PHP_SELF"], LOG_WARNING);
dol_syslog("Deprecated use of GETPOST, called with 1st param = ".$paramname." and 2nd param not defined, when calling page ".$_SERVER["PHP_SELF"], LOG_WARNING);
// Enable this line to know who call the GETPOST with empty $check parameter.
//var_dump(debug_backtrace()[0]);
}
if (! empty($check))
{
// Replace vars like __DAY__, __MONTH__, __YEAR__, __MYCOUNTRYID__, __USERID__, __ENTITYID__, ...
@@ -406,6 +406,9 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
case 'int':
if (! is_numeric($out)) { $out=''; }
break;
case 'intcomma':
if (preg_match('/[^0-9,]+/i',$out)) $out='';
break;
case 'alpha':
$out=trim($out);
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
@@ -457,7 +460,7 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
// We save search key only if:
// - not empty, or
// - if value is empty and a default value exists that is not empty (it means we did a filter to an empty value when default was not).
//if (! empty($out) || ! empty($user->default_values[$relativepathstring]['filters'][$paramname]))
if (! empty($out))
{
@@ -465,7 +468,7 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
}
}
}
return $out;
}
@@ -475,13 +478,13 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
* This prefix is unique for instance and avoid conflict between multi-instances,
* even when having two instances with one root dir or two instances in virtual servers.
*
* @param string $mode '' (prefix for session name) or 'email' (prefix for email id)
* @param string $mode '' (prefix for session name) or 'email' (prefix for email id)
* @return string A calculated prefix
*/
function dol_getprefix($mode='')
{
global $conf;
// If MAIL_PREFIX_FOR_EMAIL_ID is set and prefix is for email
if ($mode == 'email' && ! empty($conf->global->MAIL_PREFIX_FOR_EMAIL_ID))
{
@@ -629,7 +632,7 @@ function dol_clone($object)
//$myclone = clone $object; // PHP clone is a shallow copy only, not a real clone, so properties of references will keep references (refer to the same target/variable
$myclone=unserialize(serialize($object));
return $myclone;
}
@@ -1134,7 +1137,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
global $conf, $form, $user, $langs;
$error = 0;
$maxvisiblephotos=1;
$showimage=1;
$showbarcode=empty($conf->barcode->enabled)?0:($object->barcode?1:0);
@@ -1206,7 +1209,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$fileimage = $file.'_preview.png'; // If PDF has 1 page
$fileimagebis = $file.'_preview-0.png'; // If PDF has more than one page
$relativepathimage = $relativepath.'_preview.png';
// Si fichier PDF existe
if (file_exists($file))
{
@@ -1249,7 +1252,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlleft.='</div>';
}
}
if (! $phototoshow && $conf->browser->layout != 'phone') // Show No photo link (picto of pbject)
{
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
@@ -1271,12 +1274,12 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
}
}
}
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
if ($object->element == 'societe')
{
if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE))
if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE))
{
$morehtmlstatus.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
}
@@ -1303,7 +1306,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
$morehtmlstatus.=$tmptxt;
}
elseif ($object->element == 'contrat' || $object->element == 'contract')
elseif ($object->element == 'contrat' || $object->element == 'contract')
{
if ($object->statut==0) $morehtmlstatus.=$object->getLibStatut(2);
else $morehtmlstatus.=$object->getLibStatut(4);
@@ -1314,14 +1317,14 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlstatus.=$tmptxt;
}
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty
// Add label
if ($object->element == 'product' || $object->element == 'bank_account' || $object->element == 'project_task')
{
if (! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>';
}
if ($object->element != 'product' && $object->element != 'bookmark')
if ($object->element != 'product' && $object->element != 'bookmark')
{
$morehtmlref.='<div class="refidno">';
$morehtmlref.=$object->getBannerAddress('refaddress',$object);
@@ -1333,7 +1336,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlref.=$langs->trans("TechnicalID").': '.$object->id;
$morehtmlref.='</div>';
}
print '<div class="'.($onlybanner?'arearefnobottom ':'arearef ').'heightref valignmiddle" width="100%">';
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright);
print '</div>';
@@ -3095,7 +3098,7 @@ function info_admin($text, $infoonimgalt = 0, $nodiv=0, $admin='1')
{
return img_picto($text, 'info', 'class="hideonsmartphone"');
}
return ($nodiv?'':'<div class="'.(empty($admin)?'':($admin=='1'?'info':$admin)).' hideonsmartphone">').'<span class="fa fa-info-circle" title="'.dol_escape_htmltag($admin?$langs->trans('InfoAdmin'):$langs->trans('Note')).'"></span> '.$text.($nodiv?'':'</div>');
}
@@ -3293,7 +3296,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
$field1=trim($tmpfield[0]); // If $field is 'd.datep,d.id', it becomes 'd.datep'
//var_dump('field='.$field.' field1='.$field1.' sortfield='.$sortfield.' sortfield1='.$sortfield1);
// If field is used as sort criteria we use a specific css class liste_titre_sel
// Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom")
if ($field1 && ($sortfield1 == $field1 || $sortfield1 == preg_replace("/^[^\.]+\./","",$field1))) $out.= '<'.$tag.' class="'.$prefix.'liste_titre_sel" '. $moreattrib.'>';
@@ -3441,7 +3444,7 @@ function load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png',
* @param string $options More parameters for links ('' by default, does not include sortfield neither sortorder)
* @param string $sortfield Field to sort on ('' by default)
* @param string $sortorder Order to sort ('' by default)
* @param string $center String in the middle ('' by default). We often find here string $massaction comming from $form->selectMassAction()
* @param string $center String in the middle ('' by default). We often find here string $massaction comming from $form->selectMassAction()
* @param int $num Number of records found by select with limit+1
* @param int|string $totalnboflines Total number of records/lines for all pages (if known). Use a negative value of number to not show number. Use '' if unknown.
* @param string $picto Icon to use before title (should be a 32x32 transparent png file)
@@ -3965,7 +3968,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
{
$conf->global->MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY = 1;
}
// Search local taxes
if (! empty($conf->global->MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY))
{
@@ -4210,7 +4213,7 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisi
/**
* Return vat rate of a product in a particular selling country or default country vat if product is unknown
* Function called by get_default_tva
*
*
* @param int $idprod Id of product or 0 if not a predefined product
* @param Societe $thirdparty_seller Thirdparty with a ->country_code defined (FR, US, IT, ...)
* @param int $idprodfournprice Id product_fournisseur_price (for "supplier" order/invoice)
@@ -4248,7 +4251,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
}
else
{
// TODO Read default product vat according to countrycode and product. Vat for couple countrycode/product is a feature not implemeted yet.
// TODO Read default product vat according to countrycode and product. Vat for couple countrycode/product is a feature not implemeted yet.
// May be usefull/required if hidden option SERVICE_ARE_ECOMMERCE_200238EC is on
}
}
@@ -5020,9 +5023,9 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null)
global $conf, $langs;
if (! is_array($substitutionarray)) return 'ErrorBadParameterSubstitutionArrayWhenCalling_make_substitutions';
if (empty($outputlangs)) $outputlangs=$langs;
// Make substitution for language keys
if (is_object($outputlangs))
{
@@ -5030,10 +5033,10 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null)
{
$msgishtml = 0;
if (dol_textishtml($text,1)) $msgishtml = 1;
$text = preg_replace('/__\('.preg_quote($reg[1]).'\)__/', $msgishtml?dol_htmlentitiesbr($outputlangs->transnoentitiesnoconv($reg[1])):$outputlangs->transnoentitiesnoconv($reg[1]), $text);
$text = preg_replace('/__\('.preg_quote($reg[1]).'\)__/', $msgishtml?dol_htmlentitiesbr($outputlangs->transnoentitiesnoconv($reg[1])):$outputlangs->transnoentitiesnoconv($reg[1]), $text);
}
}
// Make substitition for array $substitutionarray
foreach ($substitutionarray as $key => $value)
{
@@ -5046,7 +5049,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null)
/**
* Complete the $substitutionarray with more entries.
* Can also add substitution keys coming from external module that had set the "substitutions=1" into module_part array. In this case, method completesubstitutionarray provided by module is called.
* Can also add substitution keys coming from external module that had set the "substitutions=1" into module_part array. In this case, method completesubstitutionarray provided by module is called.
*
* @param array $substitutionarray Array substitution old value => new value value
* @param Translate $outputlangs Output language
@@ -5067,7 +5070,7 @@ function complete_substitutions_array(&$substitutionarray, $outputlangs, $object
{
// TODO
}
// Add a substitution key for each extrafields, using key __EXTRA_XXX__
if (is_object($object) && is_array($object->array_options))
{
@@ -5079,7 +5082,7 @@ function complete_substitutions_array(&$substitutionarray, $outputlangs, $object
$substitutionarray['%EXTRA_'.$keyshort.'%']=$val;
}
}
// Check if there is external substitution to do, requested by plugins
$dirsubstitutions=array_merge(array(),(array) $conf->modules_parts['substitutions']);
@@ -5615,8 +5618,8 @@ function dol_eval($s, $returnvalue=0, $hideerrors=1)
global $rights;
global $object;
global $mysoc;
global $obj; // To get $obj used into list when dol_eval is used for computed fields and $obj is not yet $object
global $obj; // To get $obj used into list when dol_eval is used for computed fields and $obj is not yet $object
global $soc; // For backward compatibility
//print $s."<br>\n";
@@ -5827,7 +5830,7 @@ function printCommonFooter($zone='private')
this.href=this.href+\'&page_y=\'+page_y;
});'."\n";
print '});'."\n";
if (empty($conf->dol_use_jmobile))
{
print '<!-- Set handler to switch left menu page (menuhider) -->'."\n";
@@ -5837,7 +5840,7 @@ function printCommonFooter($zone='private')
print " $('.login_block').toggle();";
print '});'."\n";
}
print '</script>'."\n";
}
@@ -6000,9 +6003,9 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0)
{
$value=preg_replace('/([<>=]+)\s+([0-9'.preg_quote($langs->trans("DecimalSeparator"),'/').'\-])/','\1\2',$value); // Clean string '< 10' into '<10' so we can the explode on space to get all tests to do
}
$value = preg_replace('/\s*\|\s*/','|', $value);
$crits = explode(' ', $value);
$res = '';
if (! is_array($fields)) $fields = array($fields);
@@ -6125,7 +6128,7 @@ function getImageFileNameForSize($file, $extName, $extImgTarget='')
*
* @param string $modulepart propal, facture, facture_fourn, ...
* @param string $relativepath Relative path of docs.
* @param int $alldata Return array with all components (1 is recommended, then use a simple a href link with the class, target and mime attribute added. 'documentpreview' css class is handled by jquery code into main.inc.php)
* @param int $alldata Return array with all components (1 is recommended, then use a simple a href link with the class, target and mime attribute added. 'documentpreview' css class is handled by jquery code into main.inc.php)
* @param string $param More param on http links
* @return string|array Output string with href link or array with all components of link
*/
@@ -6139,8 +6142,8 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0, $param=''
//$mime_preview[]='vnd.oasis.opendocument.presentation';
//$mime_preview[]='archive';
$num_mime = array_search(dol_mimetype($relativepath, '', 1), $mime_preview);
if ($alldata == 1)
if ($alldata == 1)
{
if ($num_mime !== false) return array('target'=>'_blank', 'css'=>'documentpreview', 'url'=>DOL_URL_ROOT.'/document.php?modulepart='.$modulepart.'&attachment=0&file='.urlencode($relativepath), 'mime'=>dol_mimetype($relativepath), );
else return array();

View File

@@ -156,7 +156,6 @@ function dol_loginfunction($langs,$conf,$mysoc)
// Note: $conf->css looks like '/theme/eldy/style.css.php'
$conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
//$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
$themepath=dol_buildpath($conf->css,1);
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
{

View File

@@ -326,7 +326,6 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
$formother = new FormOther($db);
//$dirthemes=array(empty($conf->global->MAIN_FORCETHEMEDIR)?'/theme':$conf->global->MAIN_FORCETHEMEDIR.'/theme');
$dirthemes=array('/theme');
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
{