Skip to content

Commit

Permalink
Fix CONFLICTS
Browse files Browse the repository at this point in the history
conflicts_install which was displaying conflicts_build instead.
list each tpe of conflicts in a list. not the greatest display.
  • Loading branch information
dlangille committed Sep 21, 2018
1 parent 5e0a672 commit 43f1911
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions classes/port-display.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ class port_display {
var $ShowWatchListCount;
var $ShowWatchListStatus;

function htmlConflicts($conflicts) {
$HTML = '';

$HTML .= "<ul>\n";
$data = preg_split('/\s+/', $conflicts);
foreach($data as $item) {
$HTML .= '<li>' . $item . "</li>\n";
}
$HTML .= "</ul>\n";

return $HTML;
}

function SetPort($port, $branch = BRANCH_HEAD) {
//
// We could derived branch from element_pathname(port->element_id) but let's try passing in branch explicity.
Expand Down Expand Up @@ -632,21 +645,21 @@ function Display($verbosity_level = 1) {
$HTML .= "<b>Conflicts:</b>\n<ul>";

if ($port->conflicts) {
$HTML .= "<li>CONFLICTS: <pre>";
$HTML .= $port->conflicts;
$HTML .= "</pre>\n</li>\n";
$HTML .= "<li>CONFLICTS:";
$HTML .= $this->htmlConflicts($port->conflicts);
$HTML .= "\n</li>\n";
}

if ($port->conflicts_build) {
$HTML .= "<li>CONFLICTS_BUILD: <pre>";
$HTML .= $port->conflicts_build;
$HTML .= "</pre>\n</li>\n";
$HTML .= "<li>CONFLICTS_BUILD:";
$HTML .= $this->htmlConflicts($port->conflicts_build);
$HTML .= "\n</li>\n";
}

if ($port->conflicts_install) {
$HTML .= "<li>CONFLICTS_BUILD: <pre>";
$HTML .= $port->conflicts_build;
$HTML .= "</pre>\n</li>\n";
$HTML .= "<li>CONFLICTS_INSTALL:";
$HTML .= $this->htmlConflicts($port->conflicts_install);
$HTML .= "\n</li>\n";
}

$HTML .= "</ul>\n";
Expand Down

0 comments on commit 43f1911

Please sign in to comment.