Skip to content

Commit

Permalink
refactor(issue): avoid use of constant
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Mar 31, 2020
1 parent 72f73b9 commit 63e2238
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion inc/issue.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ public static function giveItem($itemtype, $option_id, $data, $num) {
default:
$content = '';
}
$link = FORMCREATOR_ROOTDOC . "/front/issue.form.php?id=".$id."&sub_itemtype=".$data['raw']['sub_itemtype'];
$link = self::getFormURLWithID($id) . "&sub_itemtype=".$data['raw']['sub_itemtype'];
$key = 'id';
$tooltip = Html::showToolTip(nl2br(Html::Clean($content)), [
'applyto' => $itemtype.$data['raw'][$key],
Expand Down
9 changes: 5 additions & 4 deletions inc/wizard.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ public static function showTicketSummary() {
echo "<span id='formcreator_servicecatalogue_ticket_summary'>";
$status_count = PluginFormcreatorIssue::getTicketSummary();

$link = PluginFormcreatorIssue::getSearchURL();
echo "<span class='status status_incoming'>
<a href='".FORMCREATOR_ROOTDOC."/front/issue.php?".
<a href='".$link."?".
Toolbox::append_params(PluginFormcreatorIssue::getProcessingCriteria(), '&amp;')."'>
<span class='status_number'>".
$status_count[Ticket::INCOMING]."
Expand All @@ -251,7 +252,7 @@ public static function showTicketSummary() {
</span>";

echo "<span class='status status_waiting'>
<a href='".FORMCREATOR_ROOTDOC."/front/issue.php?".
<a href='".$link."?".
Toolbox::append_params(PluginFormcreatorIssue::getWaitingCriteria(), '&amp;')."'>
<span class='status_number'>".
$status_count[Ticket::WAITING]."
Expand All @@ -261,7 +262,7 @@ public static function showTicketSummary() {
</span>";

echo "<span class='status status_validate'>
<a href='".FORMCREATOR_ROOTDOC."/front/issue.php?".
<a href='".$link."?".
Toolbox::append_params(PluginFormcreatorIssue::getValidateCriteria(), '&amp;')."'>
<span class='status_number'>".
$status_count['to_validate']."
Expand All @@ -271,7 +272,7 @@ public static function showTicketSummary() {
</span>";

echo "<span class='status status_solved'>
<a href='".FORMCREATOR_ROOTDOC."/front/issue.php?".
<a href='".$link."?".
Toolbox::append_params(PluginFormcreatorIssue::getSolvedCriteria(), '&amp;')."'>
<span class='status_number'>".
$status_count[Ticket::SOLVED]."
Expand Down

0 comments on commit 63e2238

Please sign in to comment.