function freshports_DescriptionPrint($description, $encoding_losses, $maxnumlines = 0, $URL = '', $Process_PRs = false) { require_once $_SERVER['DOCUMENT_ROOT'] . '/../include/htmlify.php'; $shortened = freshports_Head($description, $maxnumlines); $HTML = '<PRE CLASS="code">'; $HTML .= _forDisplay(freshports_wrap($shortened), $Process_PRs); $HTML .= '</PRE>'; if (strlen($shortened) < strlen($description)) { $HTML .= $URL; } return $HTML; }
function Display() { $port = $this->port; $HTML = ''; # $HTML = $this->JavascriptInclude(); $MarkedAsNew = "N"; $HTML .= "<DL>\n"; $HTML .= "<DT>"; $HTML .= port_display_WATCH_LIST_ADD_REMOVE; $HTML .= '<BIG><B>'; if ($this->LinkToPort) { $HTML .= $this->LinkToPort(); } else { $HTML .= $port->port; } $HTML .= "</B></BIG>"; // description if ($port->short_description && ($this->ShowShortDescription || $this->ShowEverything)) { $HTML .= ' <span class="fp_description_short">' . htmlify(_forDisplay($port->short_description)) . '</span>'; $HTML .= "<br>\n"; } $HTML .= "<b>"; $PackageVersion = freshports_PackageVersion($port->{'version'}, $port->{'revision'}, $port->{'epoch'}); if (strlen($PackageVersion) > 0) { $HTML .= ' ' . $PackageVersion; } if (isset($port->category_looking_at)) { if ($port->category_looking_at != $port->category) { $HTML .= '<sup>*</sup>'; } } $HTML .= "</b>"; if ($this->ShowEverything || $this->ShowCategory) { $HTML .= ' <A HREF="/' . $port->category . '/" TITLE="The category for this port">' . $port->category . '</A>'; } // indicate if this port has been removed from cvs if ($port->IsDeleted()) { $HTML .= " " . freshports_Deleted_Icon_Link() . "\n"; } // indicate if this port needs refreshing from CVS if ($port->{'needs_refresh'}) { $HTML .= " " . freshports_Refresh_Icon_Link() . "\n"; } if ($port->{'date_added'} > Time() - 3600 * 24 * $this->DaysMarkedAsNew) { $MarkedAsNew = "Y"; $HTML .= freshports_New_Icon() . "\n"; } if ($this->ShowEverything || $this->ShowWatchListCount) { $HTML .= ' ' . freshPorts_WatchListCount_Icon_Link() . '=' . $port->WatchListCount(); } $HTML .= ' ' . freshports_Search_Depends_All($port->category . '/' . $port->port); # if this port is, or every has been, vulnerable, display the right skull # and a link to the list of all such vulnerabilities if ($port->IsVulnerable() || $port->WasVulnerable()) { $HTML .= ' ' . freshports_VuXML_Link($port->package_name, $port->IsVulnerable()); } # search for bugs related to this port $HTML .= ' ' . freshports_Search_For_Bugs($port->category . '/' . $port->port); # report a bug related to this port $HTML .= ' ' . freshports_Report_A_Bug($port->category . '/' . $port->port); $HTML .= "</DT>\n<DD>"; # show forbidden and broken if ($port->forbidden) { $HTML .= freshports_Forbidden_Icon_Link($port->forbidden) . ' FORBIDDEN: ' . htmlify(_forDisplay($port->forbidden)) . "<br>"; } if ($port->broken) { $HTML .= freshports_Broken_Icon_Link($port->broken) . ' BROKEN: ' . htmlify(_forDisplay($port->broken)) . "<br>"; } if ($port->deprecated) { $HTML .= freshports_Deprecated_Icon_Link($port->deprecated) . ' DEPRECATED: ' . htmlify(_forDisplay($port->deprecated)) . "<br>"; } if ($port->expiration_date) { if (date('Y-m-d') >= $port->expiration_date) { $HTML .= freshports_Expired_Icon_Link($port->expiration_date) . ' This port expired on: ' . $port->expiration_date . '<br>'; } else { $HTML .= freshports_Expiration_Icon_Link($port->expiration_date) . ' EXPIRATION DATE: ' . $port->expiration_date . '<br>'; } } if ($port->ignore) { $HTML .= freshports_Ignore_Icon_Link($port->ignore) . ' IGNORE: ' . htmlify(_forDisplay($port->ignore)) . "<br>"; } if ($port->restricted) { $HTML .= freshports_Restricted_Icon_Link($port->restricted) . ' RESTRICTED: ' . htmlify(_forDisplay($port->restricted)) . '<br>'; } if ($port->no_cdrom) { $HTML .= freshports_No_CDROM_Icon_Link($port->no_cdrom) . ' NO CDROM: ' . htmlify(_forDisplay($port->no_cdrom)) . '<br>'; } if ($port->is_interactive) { $HTML .= freshports_Is_Interactive_Icon_Link($port->is_interactive) . ' IS INTERACTIVE: ' . htmlify(_forDisplay($port->is_interactive)) . '<br>'; } // maintainer if ($port->maintainer && ($this->ShowMaintainedBy || $this->ShowEverything)) { if (strtolower($port->maintainer) == UNMAINTAINTED_ADDRESS) { $HTML .= '<br>There is no maintainer for this port.<br>'; $HTML .= 'Any concerns regarding this port should be directed to the FreeBSD ' . 'Ports mailing list via '; $HTML .= '<A HREF="' . MAILTO . ':' . freshportsObscureHTML($port->maintainer); $HTML .= '?subject=FreeBSD%20Port:%20' . $port->category . '/' . $port->port . '" TITLE="email the FreeBSD Ports mailing list">'; $HTML .= freshportsObscureHTML($port->maintainer) . '</A>'; } else { $HTML .= '<b>'; $HTML .= 'Maintainer:</b> <A HREF="' . MAILTO . ':' . freshportsObscureHTML($port->maintainer); $HTML .= '?subject=FreeBSD%20Port:%20' . $port->category . '/' . $port->port . '" TITLE="email the maintainer">'; $HTML .= freshportsObscureHTML($port->maintainer) . '</A>'; } $HTML .= ' ' . freshports_Search_Maintainer($port->maintainer) . '<br>'; } // last commit date if (($this->ShowLastCommitDate || $this->ShowEverything) && $port->last_commit_date) { $HTML .= '<b>Last commit date:</b> ' . FormatTime($port->last_commit_date, 0, "Y-m-d H:i:s") . '<br>'; } // there are only a few places we want to show the last change. // therefore, we do not check ShowEverything here if ($this->ShowLastChange) { if ($port->updated != 0) { $HTML .= 'last change committed by ' . freshports_CommitterEmailLink($port->committer); // separate lines in case committer is null $HTML .= ' ' . freshports_Search_Committer($port->committer); $HTML .= ' on <font size="-1">' . $port->updated . '</font>' . "\n"; $HTML .= freshports_Email_Link($port->message_id); if ($port->EncodingLosses()) { $HTML .= ' ' . freshports_Encoding_Errors_Link(); } $HTML .= ' ' . freshports_Commit_Link($port->message_id); $HTML .= ' ' . freshports_Commit_Link_Port($port->message_id, $port->category, $port->port); global $freshports_CommitMsgMaxNumOfLinesToShow; $HTML .= freshports_PortDescriptionPrint($port->update_description, $port->encoding_losses, $freshports_CommitMsgMaxNumOfLinesToShow, freshports_MoreCommitMsgToShow($port->message_id, $freshports_CommitMsgMaxNumOfLinesToShow)); } else { $HTML .= "no changes recorded in FreshPorts<br>\n"; } } # show the date added, if asked if ($this->ShowDateAdded || $this->ShowEverything) { $HTML .= '<b>Port Added:</b> <font size="-1">'; if ($port->date_added) { $HTML .= $port->date_added; } else { $HTML .= "unknown"; } $HTML .= '</font><BR>' . "\n"; } $HTML .= PeopleWatchingThisPortAlsoWatch($this->db, $port->element_id); if ($port->categories) { // remove the primary category and remove any double spaces or trailing/leading spaces // this ensures that explode gives us the right stuff if (isset($port->category_looking_at)) { $CategoryToRemove = $port->category_looking_at; } else { $CategoryToRemove = $port->category; } $Categories = str_replace($CategoryToRemove, '', $port->categories); $Categories = str_replace(' ', ' ', $Categories); $Categories = trim($Categories); if ($Categories) { $HTML .= "<b>Also Listed In:</b> "; $CategoriesArray = explode(" ", $Categories); $Count = count($CategoriesArray); for ($i = 0; $i < $Count; $i++) { $Category = $CategoriesArray[$i]; # $CategoryID = freshports_CategoryIDFromCategory($Category, $this->db); # if ($CategoryID) { # // this is a real category $HTML .= '<a href="/' . $Category . '/">' . $Category . '</a>'; # } else { # $HTML .= $Category; # } if ($i < $Count - 1) { $HTML .= " "; } } $HTML .= "<br>\n"; } } $HTML .= '<b>License:</b> '; if ($port->license) { $HTML .= htmlentities($port->license); } else { $HTML .= 'not specified in port'; } $HTML .= "<br>\n"; # The ad goes here if ($this->ShowAd || $this->ShowEverything) { $HTML .= port_display_AD; } if ($this->ShowDescriptionLong || $this->ShowEverything) { $HTML .= '<PRE CLASS="code">' . htmlify(_forDisplay($port->long_description)) . '</PRE>'; } if ($this->ShowChangesLink || $this->ShowEverything) { # we want something like # http://svn.freebsd.org/ports/head/x11-wm/awesome/ $HTML .= '<a href="http://' . $port->svn_hostname . $port->element_pathname . '/">SVNWeb</a>'; } if ($port->PackageExists() && ($this->ShowPackageLink || $this->ShowEverything)) { // package $HTML .= ' <b>:</b> '; $HTML .= '<A HREF="' . FRESHPORTS_FREEBSD_FTP_URL . '/' . freshports_PackageVersion($port->version, $port->revision, $port->epoch); $HTML .= '.tgz">Package</A>'; } if ($port->homepage && ($this->ShowHomepageLink || $this->ShowEverything)) { $HTML .= ' <b>:</b> '; $HTML .= '<a HREF="' . _forDisplay($port->homepage) . '" TITLE="Homepage for this port">Homepage</a>'; } if (defined('DISTFILESSURVEYSHOW') && ($this->ShowDistfilesSurveyLink || $this->ShowEverything)) { $HTML .= ' <b>:</b> ' . freshports_DistFilesSurveyURL($port->category, $port->port); } if (defined('PORTSMONSHOW') && ($this->ShowPortsMonLink || $this->ShowEverything)) { $HTML .= ' <b>:</b> ' . freshports_PortsMonitorURL($port->category, $port->port); } if ($this->ShowEverything || $this->ShowMasterSlave) { # # Display our master port # $MasterSlave = new MasterSlave($port->dbh); $NumRows = $MasterSlave->FetchByMaster($port->category . '/' . $port->port); if ($port->IsSlavePort() || $NumRows > 0) { $HTML .= "\n<hr>\n"; } if ($port->IsSlavePort()) { $HTML .= '<dl><dt><b>Master port:</b> '; list($MyCategory, $MyPort) = explode('/', $port->master_port); $HTML .= freshports_link_to_port($MyCategory, $MyPort); $HTML .= "</dt>\n"; $HTML .= "</dl>\n"; } # # Display our slave ports # if ($NumRows > 0) { $HTML .= '<span class="slaveports">Slave ports</span>' . "\n" . '<ol class="slaveports" id="slaveports">'; for ($i = 0; $i < $NumRows; $i++) { $MasterSlave->FetchNth($i); $HTML .= '<li>' . freshports_link_to_port($MasterSlave->slave_category_name, $MasterSlave->slave_port_name) . '</li>'; } $HTML .= "</ol>\n"; } } if ($this->ShowDepends || $this->ShowEverything) { if ($port->depends_build || $port->depends_run || $port->depends_lib) { $HTML .= '<hr><p><big>NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.</big></p>'; } if ($port->depends_build) { $HTML .= '<span class="required">Build dependencies:</span>' . "\n" . '<ol class="required" id="requiredtobuild">'; $HTML .= freshports_depends_links($this->db, $port->depends_build); $HTML .= "\n</ol>\n"; } if ($port->depends_run) { $HTML .= '<span class="required">Runtime dependencies:</span>' . "\n" . '<ol class="required" id="requiredtorun">'; $HTML .= freshports_depends_links($this->db, $port->depends_run); $HTML .= "\n</ol>\n"; } if ($port->depends_lib) { $HTML .= '<span class="required">Library dependencies:</span>' . "\n" . '<ol class="required" id="requiredlibraries">'; $HTML .= freshports_depends_links($this->db, $port->depends_lib); $HTML .= "\n</ol>\n"; } if ($port->fetch_depends) { $HTML .= '<span class="required">Fetch dependencies:</span>' . "\n" . '<ol class="required" id="requiredfetches">'; $HTML .= freshports_depends_links($this->db, $port->fetch_depends); $HTML .= "\n</ol>\n"; } if ($port->patch_depends) { $HTML .= '<span class="required">Patch dependencies:</span>' . "\n" . '<ol class="required" id="requiredpatches">'; $HTML .= freshports_depends_links($this->db, $port->patch_depends); $HTML .= "\n</ol>\n"; } if ($port->extract_depends) { $HTML .= '<span class="required">Extract dependencies:</span>' . "\n" . '<ol class="required" id="requiredextracts">'; $HTML .= freshports_depends_links($this->db, $port->extract_depends); $HTML .= "\n</ol>\n"; } # XXX when adding new depends above, be sure to update the array in ShowDependencies() $HTML .= $this->ShowDependencies($port); } # only show if we're meant to show, and if the port has not been deleted. if ($this->ShowPackageLink || $this->ShowEverything) { $HTML .= "\n<hr>\n"; if ($port->IsDeleted()) { $HTML .= '<p>No installation instructions: this port has been deleted.</p>'; $HTML .= '<p>The package name of this deleted port was: <code class="code">' . $port->latest_link . '</code></p>'; } else { $HTML .= '<p><b>To install <a href="/faq.php#port" TITLE="what is a port?">the port</a>:</b> <code class="code">cd /usr/ports/' . $port->category . '/' . $port->port . '/ && make install clean</code><br>'; if (isset($port->no_package) && $port->no_package != '') { $HTML .= '<p><b>No <a href="/faq.php#package" TITLE="what is a package?">package</a> is available:</b> ' . $port->no_package . '</p>'; } else { if ($port->forbidden || $port->broken || $port->ignore || $port->restricted) { $HTML .= '<p><b>A <a href="/faq.php#package" TITLE="what is a package?">package</a> is not available for ports marked as: Forbidden / Broken / Ignore / Restricted</b></p>'; } else { $HTML .= '<b>To add the <a href="/faq.php#package" TITLE="what is a package?">package</a>:</b> <code class="code">pkg install ' . $port->category . '/' . $port->port . '</code></p>'; } } } $HTML .= "\n<hr>\n"; } if ($this->ShowDescriptionShort && ($this->ShowDescriptionLink || $this->ShowEverything)) { // Long description $HTML .= '<A HREF="/' . $port->category . '/' . $port->port . '/">Description</a>'; $HTML .= ' <b>:</b> '; } if ($this->ShowEverything) { $HTML .= "<b>Configuration Options</b>\n<pre>"; if ($port->showconfig) { $HTML .= $port->showconfig; } else { $HTML .= ' No options to configure'; } $HTML .= "</pre>\n<hr>\n"; } if ($this->ShowEverything && $port->uses) { $HTML .= "<b>USES:</b>\n<pre>"; $HTML .= $port->uses; $HTML .= "</pre>\n<hr>\n"; } if ($this->ShowEverything || $this->ShowMasterSites) { $HTML .= '<b>Master Sites:</b>' . "\n" . '<ol class="mastersites" id="mastersites">' . "\n"; $MasterSites = explode(' ', $port->master_sites); asort($MasterSites); foreach ($MasterSites as $Site) { $HTML .= '<li>' . htmlify(_forDisplay($Site)) . "</li>\n"; } $HTML .= "</ol>\n"; # $HTML .= '<br>'; } # $HTML .= "\n<hr>\n"; $HTML .= "\n</DD>\n"; $HTML .= "</DL>\n"; return $HTML; }
function CreateHTML() { global $freshports_CommitMsgMaxNumOfLinesToShow; $Debug = 0; if (!$this->result) { syslog(LOG_ERR, __FILE__ . '::' . __LINE__ . ': no result set supplied'); die("read from database failed"); exit; } $NumRows = pg_numrows($this->result); if ($this->Debug) { echo __FILE__ . ':' . __LINE__ . " Number of rows = {$NumRows}<br>\n"; } if (!$NumRows) { $this->HTML = "<TR><TD>\n<P>Sorry, nothing found in the database....</P>\n</td></tr>\n"; return $this->HTML; } # if we have a UserID, but no flagged commits, grab them # if ($this->UserID && !isset($this->FlaggedCommits)) { require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/commit_flag.php'; $FlaggedCommits = new CommitFlag($this->dbh); $NumFlaggedCommits = $FlaggedCommits->Fetch($this->UserID); for ($i = 0; $i < $NumFlaggedCommits; $i++) { $FlaggedCommits->FetchNth($i); $this->FlaggedCommits[$FlaggedCommits->commit_log_id] = $FlaggedCommits->commit_log_id; if ($this->Debug) { echo "fetching record # {$i} -> {$FlaggedCommits->commit_log_id}<br>"; } } } $GlobalHideLastChange = "N"; $this->HTML = ""; # leave it all empty as a comparison point $PreviousCommit = new CommitRecord(); $NumberOfPortsInThisCommit = 0; $MaxNumberPortsToShow = 10; $TooManyPorts = false; # we might not show all of a commit, just for the really big ones. for ($i = 0; $i < $NumRows; $i++) { $myrow = pg_fetch_array($this->result, $i); if ($Debug) { echo 'processing row ' . $i . ' ' . $myrow['commit_log_id'] . ' ' . $myrow['message_id'] . "<br>\n"; } unset($mycommit); $mycommit = new CommitRecord(); $mycommit->PopulateValues($myrow); // OK, while we have the log change log, let's put the port details here. if ($mycommit->commit_log_id != $PreviousCommit->commit_log_id) { if ($NumberOfPortsInThisCommit > $MaxNumberPortsToShow && !$this->ShowAllPorts) { $this->HTML .= '<BR>' . freshports_MorePortsToShow($PreviousCommit->message_id, $NumberOfPortsInThisCommit, $MaxNumberPortsToShow); } $TooManyPorts = false; if ($i > 0) { $this->HTML .= "\n<BLOCKQUOTE>"; $this->HTML .= freshports_CommitDescriptionPrint($PreviousCommit->commit_description, $PreviousCommit->encoding_losses, $Lines, freshports_MoreCommitMsgToShow($PreviousCommit->message_id, $Lines)); # close off the previous commit first $this->HTML .= "\n</BLOCKQUOTE>\n</TD></TR>\n\n\n"; } # count the number of ports in this commit. # first time into the loop, this will be executed. $NumberOfPortsInThisCommit = 0; $MaxNumberPortsToShow = 10; if ($mycommit->commit_date != $PreviousCommit->commit_date) { $this->HTML .= '<TR><TD COLSPAN="3" BGCOLOR="' . BACKGROUND_COLOUR . '" HEIGHT="0">' . "\n"; $this->HTML .= ' <FONT COLOR="#FFFFFF"><BIG>' . FormatTime($mycommit->commit_date, 0, "D, j M Y") . '</BIG></FONT>' . "\n"; $this->HTML .= '</TD></TR>' . "\n\n"; } global $freshports_mail_archive; $this->HTML .= "<TR><TD>\n"; $this->HTML .= '<SMALL>'; $this->HTML .= '[ ' . $mycommit->commit_time . ' ' . freshports_CommitterEmailLink($mycommit->committer) . ' ]'; $this->HTML .= '</SMALL>'; $this->HTML .= ' '; $this->HTML .= freshports_Email_Link($mycommit->message_id); $this->HTML .= ' '; if ($this->UserID) { if (isset($this->FlaggedCommits[$mycommit->commit_log_id])) { $this->HTML .= freshports_Commit_Flagged_Link($mycommit->message_id); } else { $this->HTML .= freshports_Commit_Flagged_Not_Link($mycommit->message_id); } } if ($mycommit->EncodingLosses()) { $this->HTML .= ' ' . freshports_Encoding_Errors(); } if ($mycommit->stf_message != '') { $this->HTML .= ' ' . freshports_SanityTestFailure_Link($mycommit->message_id); } # echo '<pre>' . print_r($mycommit, true) . '</pre>'; if ($mycommit->svn_revision != '') { $this->HTML .= ' ' . freshports_svnweb_ChangeSet_Link($mycommit->svn_revision, $mycommit->svn_hostname, $mycommit->path_to_repo); } $this->HTML .= "<br>\n"; } $NumberOfPortsInThisCommit++; if ($NumberOfPortsInThisCommit > $MaxNumberPortsToShow && !$this->ShowAllPorts) { $TooManyPorts = true; } if (!$TooManyPorts) { if (isset($mycommit->category) && $mycommit->category != '') { if ($this->UserID) { if ($mycommit->watch) { $this->HTML .= ' ' . freshports_Watch_Link_Remove($this->WatchListAsk, $mycommit->watch, $mycommit->element_id) . ' '; } else { $this->HTML .= ' ' . freshports_Watch_Link_Add($this->WatchListAsk, $mycommit->watch, $mycommit->element_id) . ' '; } } $this->HTML .= '<BIG><B>'; $this->HTML .= '<A HREF="/' . $mycommit->category . '/' . $mycommit->port . '/">'; $this->HTML .= $mycommit->port; $this->HTML .= '</A>'; $PackageVersion = freshports_PackageVersion($mycommit->version, $mycommit->revision, $mycommit->epoch); if (strlen($PackageVersion) > 0) { $this->HTML .= ' ' . $PackageVersion; } $this->HTML .= "</B></BIG>\n"; $this->HTML .= '<A HREF="/' . $mycommit->category . '/">'; $this->HTML .= $mycommit->category . "</A>"; $this->HTML .= ' '; // indicate if this port has been removed from cvs if ($mycommit->status == "D") { $this->HTML .= " " . freshports_Deleted_Icon_Link() . "\n"; } // indicate if this port needs refreshing from CVS if ($mycommit->needs_refresh) { $this->HTML .= " " . freshports_Refresh_Icon_Link() . "\n"; } if ($mycommit->date_added > Time() - 3600 * 24 * $this->DaysMarkedAsNew) { $MarkedAsNew = "Y"; $this->HTML .= freshports_New_Icon() . "\n"; } if ($mycommit->forbidden) { $this->HTML .= ' ' . freshports_Forbidden_Icon_Link() . "\n"; } if ($mycommit->broken) { $this->HTML .= ' ' . freshports_Broken_Icon_Link() . "\n"; } if ($mycommit->deprecated) { $this->HTML .= ' ' . freshports_Deprecated_Icon_Link() . "\n"; } if ($mycommit->expiration_date) { if (date('Y-m-d') >= $mycommit->expiration_date) { $this->HTML .= freshports_Expired_Icon_Link($mycommit->expiration_date) . "\n"; } else { $this->HTML .= freshports_Expiration_Icon_Link($mycommit->expiration_date) . "\n"; } } if ($mycommit->ignore) { $this->HTML .= ' ' . freshports_Ignore_Icon_Link() . "\n"; } $this->HTML .= freshports_Commit_Link_Port($mycommit->message_id, $mycommit->category, $mycommit->port); $this->HTML .= " "; if ($mycommit->vulnerable_current) { $this->HTML .= ' ' . freshports_VuXML_Icon() . ' '; } else { if ($mycommit->vulnerable_past) { $this->HTML .= ' ' . freshports_VuXML_Icon_Faded() . ' '; } } if ($mycommit->restricted) { $this->HTML .= freshports_Restricted_Icon_Link($mycommit->restricted) . ' '; } if ($mycommit->no_cdrom) { $this->HTML .= freshports_No_CDROM_Icon_Link($mycommit->no_cdrom) . ' '; } if ($mycommit->is_interactive) { $this->HTML .= freshports_Is_Interactive_Icon_Link($mycommit->is_interactive) . ' '; } } else { # This is a non-port element... $this->HTML .= $mycommit->revision . ' '; $this->HTML .= '<big><B>'; $PathName = preg_replace('|^/?ports/|', '', $mycommit->element_pathname); # echo "'$PathName' " . "'" . $mycommit->repo_name . "'"; switch ($mycommit->repo_name) { case 'ports': $PathName = preg_replace('|^head/|', '', $PathName); break; } if ($PathName != $mycommit->element_pathname) { $this->HTML .= '<a href="/' . str_replace('%2F', '/', urlencode($PathName)) . '">' . $PathName . '</a>'; $this->HTML .= "</B></BIG>\n"; } else { $this->HTML .= '<a href="' . FRESHPORTS_FREEBSD_CVS_URL . $PathName . '#rev' . $mycommit->revision . '">' . $PathName . '</a>'; $this->HTML .= "</B></BIG>\n"; } } $this->HTML .= htmlify(_forDisplay($mycommit->short_description)) . "\n"; $this->HTML .= "<BR>\n"; global $freshports_CommitMsgMaxNumOfLinesToShow; if ($this->ShowEntireCommit) { $Lines = 0; } else { $Lines = $freshports_CommitMsgMaxNumOfLinesToShow; } } # !$TooManyPorts $PreviousCommit = $mycommit; } if ($NumberOfPortsInThisCommit > $MaxNumberPortsToShow && !$this->ShowAllPorts) { $this->HTML .= '<BR>' . freshports_MorePortsToShow($PreviousCommit->message_id, $NumberOfPortsInThisCommit, $MaxNumberPortsToShow); } $this->HTML .= "\n<BLOCKQUOTE>"; $this->HTML .= freshports_CommitDescriptionPrint($PreviousCommit->commit_description, $PreviousCommit->encoding_losses, $Lines, freshports_MoreCommitMsgToShow($PreviousCommit->message_id, $Lines)); # close off the last commit $this->HTML .= "\n</BLOCKQUOTE>\n</TD></TR>\n\n\n"; unset($mycommit); return $this->HTML; }