2
0
forked from Wavyzz/dolibarr

Merge pull request #10058 from frederic34/patch-2

correct link and avoid warning in resource list
This commit is contained in:
Laurent Destailleur
2018-11-24 11:17:56 +01:00
committed by GitHub

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -51,6 +52,9 @@ $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
if (! is_array($search_array_options)) {
$search_array_options = array();
}
$search_ref=GETPOST("search_ref");
$search_type=GETPOST("search_type");
@@ -196,7 +200,7 @@ if($ret == -1) {
$newcardbutton='';
if ($user->rights->resource->write)
{
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create"><span class="valignmiddle">'.$langs->trans('MenuResourceAdd').'</span>';
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/resource/card.php?action=create"><span class="valignmiddle">'.$langs->trans('MenuResourceAdd').'</span>';
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
$newcardbutton.= '</a>';
}