Qual: Clean deprecated code.
This commit is contained in:
parent
ec69fe1210
commit
4cb671f4db
@ -1055,63 +1055,6 @@ class Categorie extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Affiche le chemin le plus court pour se rendre a un produit
|
|
||||||
*
|
|
||||||
* @param int $id Id of category
|
|
||||||
* @param string $type Type of category
|
|
||||||
* @return void
|
|
||||||
* @deprecated function not used ?
|
|
||||||
*/
|
|
||||||
function get_primary_way($id, $type="")
|
|
||||||
{
|
|
||||||
$primary_way = array("taille" => -1, "chemin" => array());
|
|
||||||
$meres = $this->containing($id,$type);
|
|
||||||
foreach ($meres as $mere)
|
|
||||||
{
|
|
||||||
foreach ($mere->get_all_ways() as $way)
|
|
||||||
{
|
|
||||||
if(count($way) < $primary_way["taille"] || $primary_way["taille"] < 0)
|
|
||||||
{
|
|
||||||
$primary_way["taille"] = count($way);
|
|
||||||
$primary_way["chemin"] = $way;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $primary_way["chemin"];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Affiche le chemin le plus court pour se rendre a un produit
|
|
||||||
*
|
|
||||||
* @param int $id Id of category
|
|
||||||
* @param string $sep Separator
|
|
||||||
* @param string $url Url
|
|
||||||
* @param string $type Type
|
|
||||||
* @return void
|
|
||||||
* @deprecated function not used ?
|
|
||||||
*/
|
|
||||||
function print_primary_way($id, $sep= " >> ", $url="", $type="")
|
|
||||||
{
|
|
||||||
$primary_way = array();
|
|
||||||
$way = $this->get_primary_way($id,$type);
|
|
||||||
$w = array();
|
|
||||||
foreach ($way as $cat)
|
|
||||||
{
|
|
||||||
if ($url == '')
|
|
||||||
{
|
|
||||||
$w[] = "<a href='".DOL_URL_ROOT."/categories/viewcat.php?id=".$cat->id."'>".$cat->label."</a>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$w[] = "<a href='".DOL_URL_ROOT."/".$url."?catid=".$cat->id."'>".$cat->label."</a>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return implode($sep, $w);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne un tableau contenant la liste des categories meres
|
* Retourne un tableau contenant la liste des categories meres
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1803,10 +1803,13 @@ if ($action == 'create') {
|
|||||||
if ($action != 'editline') {
|
if ($action != 'editline') {
|
||||||
$var = true;
|
$var = true;
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1) {
|
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||||
|
{
|
||||||
// Add free or predefined products/services
|
// Add free or predefined products/services
|
||||||
$object->formAddObjectLine(1, $mysoc, $soc);
|
$object->formAddObjectLine(1, $mysoc, $soc);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Add free products/services
|
// Add free products/services
|
||||||
$object->formAddFreeProduct(1, $mysoc, $soc);
|
$object->formAddFreeProduct(1, $mysoc, $soc);
|
||||||
|
|
||||||
|
|||||||
@ -2102,10 +2102,13 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
|||||||
if ($action != 'editline') {
|
if ($action != 'editline') {
|
||||||
$var = true;
|
$var = true;
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1) {
|
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||||
|
{
|
||||||
// Add free or predefined products/services
|
// Add free or predefined products/services
|
||||||
$object->formAddObjectLine(1, $mysoc, $soc);
|
$object->formAddObjectLine(1, $mysoc, $soc);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Add free products/services
|
// Add free products/services
|
||||||
$object->formAddFreeProduct(1, $mysoc, $soc);
|
$object->formAddFreeProduct(1, $mysoc, $soc);
|
||||||
|
|
||||||
|
|||||||
@ -3307,10 +3307,13 @@ if ($action == 'create')
|
|||||||
if ($object->statut == 0 && $user->rights->facture->creer && $action != 'valid' && $action != 'editline') {
|
if ($object->statut == 0 && $user->rights->facture->creer && $action != 'valid' && $action != 'editline') {
|
||||||
$var = true;
|
$var = true;
|
||||||
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1) {
|
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||||
|
{
|
||||||
// Add free or predefined products/services
|
// Add free or predefined products/services
|
||||||
$object->formAddObjectLine(1, $mysoc, $soc);
|
$object->formAddObjectLine(1, $mysoc, $soc);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Add free products/services
|
// Add free products/services
|
||||||
$object->formAddFreeProduct(1, $mysoc, $soc);
|
$object->formAddFreeProduct(1, $mysoc, $soc);
|
||||||
|
|
||||||
|
|||||||
@ -2693,13 +2693,12 @@ abstract class CommonObject
|
|||||||
/**
|
/**
|
||||||
* Show add free products/services form
|
* Show add free products/services form
|
||||||
* TODO Edit templates to use global variables and include them directly in controller call
|
* TODO Edit templates to use global variables and include them directly in controller call
|
||||||
* But for the moment we don't know if it'st possible as we keep a method available on overloaded objects.
|
* But for the moment we don't know if it's possible as we keep a method available on overloaded objects.
|
||||||
*
|
*
|
||||||
* @param int $dateSelector 1=Show also date range input fields
|
* @param int $dateSelector 1=Show also date range input fields (start and end date)
|
||||||
* @param Societe $seller Object thirdparty who sell
|
* @param Societe $seller Object thirdparty who sell
|
||||||
* @param Societe $buyer Object thirdparty who buy
|
* @param Societe $buyer Object thirdparty who buy
|
||||||
* @return void
|
* @return void
|
||||||
* @deprecated
|
|
||||||
*/
|
*/
|
||||||
function formAddFreeProduct($dateSelector,$seller,$buyer)
|
function formAddFreeProduct($dateSelector,$seller,$buyer)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user