Skip to content

Commit

Permalink
Merge pull request #2890 from GPCsolutions/categories-types
Browse files Browse the repository at this point in the history
Include Categories class whenever Categorie::TYPE is used
  • Loading branch information
Juanjo Menent committed May 24, 2015
2 parents 55b7dab + becc240 commit 5ddcfce
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions htdocs/adherents/class/adherent.class.php
Expand Up @@ -32,6 +32,7 @@

require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';


/**
Expand Down
1 change: 1 addition & 0 deletions htdocs/adherents/list.php
Expand Up @@ -209,6 +209,7 @@
$moreforfilter='';
if (! empty($conf->categorie->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1);
$moreforfilter.='       ';
Expand Down
1 change: 1 addition & 0 deletions htdocs/comm/prospect/list.php
Expand Up @@ -299,6 +299,7 @@
$moreforfilter='';
if (! empty($conf->categorie->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1);
$moreforfilter.='       ';
Expand Down
1 change: 1 addition & 0 deletions htdocs/compta/stats/cabyprodserv.php
Expand Up @@ -27,6 +27,7 @@
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';

$langs->load("products");
$langs->load("categories");
Expand Down
1 change: 1 addition & 0 deletions htdocs/compta/stats/casoc.php
Expand Up @@ -30,6 +30,7 @@
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';

$langs->load("companies");
$langs->load("categories");
Expand Down
1 change: 1 addition & 0 deletions htdocs/contact/list.php
Expand Up @@ -275,6 +275,7 @@

if (! empty($conf->categorie->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
$moreforfilter.='       ';
Expand Down
1 change: 1 addition & 0 deletions htdocs/core/lib/company.lib.php
Expand Up @@ -84,6 +84,7 @@ function societe_prepare_head(Societe $object)
//show categorie tab
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$type = Categorie::TYPE_CUSTOMER;
if ($object->fournisseur) $type = Categorie::TYPE_SUPPLIER;
$head[$h][0] = DOL_URL_ROOT.'/categories/categorie.php?socid='.$object->id."&type=".$type;
Expand Down
1 change: 1 addition & 0 deletions htdocs/core/lib/contact.lib.php
Expand Up @@ -89,6 +89,7 @@ function contact_prepare_head(Contact $object)

if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$type = Categorie::TYPE_CONTACT;
$head[$tab][0] = DOL_URL_ROOT.'/categories/categorie.php?id='.$object->id."&type=".$type;
$head[$tab][1] = $langs->trans('Categories');
Expand Down
1 change: 1 addition & 0 deletions htdocs/core/lib/member.lib.php
Expand Up @@ -71,6 +71,7 @@ function member_prepare_head(Adherent $object)
// Show category tab
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$type = Categorie::TYPE_MEMBER;
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
$head[$h][1] = $langs->trans('Categories');
Expand Down
1 change: 1 addition & 0 deletions htdocs/core/lib/product.lib.php
Expand Up @@ -61,6 +61,7 @@ function product_prepare_head($object)
/* No more required. Replaced with new multiselect component
if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire)
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$type = Categorie::TYPE_PRODUCT;
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
$head[$h][1] = $langs->trans('Categories');
Expand Down
1 change: 1 addition & 0 deletions htdocs/fourn/list.php
Expand Up @@ -168,6 +168,7 @@
$moreforfilter='';
if (! empty($conf->categorie->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1);
$moreforfilter.='       ';
Expand Down
1 change: 1 addition & 0 deletions htdocs/product/composition/card.php
Expand Up @@ -473,6 +473,7 @@
print '</td></tr>';
if (! empty($conf->categorie->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
print '<tr><td>'.$langs->trans("CategoryFilter").' &nbsp; </td>';
print '<td class="maxwidthonsmartphone">'.$form->select_all_categories(Categorie::TYPE_PRODUCT, $parent).'</td></tr>';
}
Expand Down

0 comments on commit 5ddcfce

Please sign in to comment.