-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #600 from FreshPorts/599-qemu-port-crashes-freshports
599 qemu port crashes freshports
- Loading branch information
Showing
3 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
$_SERVER['DOCUMENT_ROOT'] = "/usr/local/www/freshports/www"; | ||
|
||
require_once($_SERVER['DOCUMENT_ROOT'] . '/../include/common.php'); | ||
require_once('include/constants.php'); | ||
require_once('include/freshports.php'); | ||
require_once('include/databaselogin.php'); | ||
require_once('classes/port-display.php'); | ||
require_once('classes/ports.php'); | ||
|
||
|
||
$sql = " | ||
select P.id, E.name as port, C.name as category | ||
FROM ports P join element E on P.element_id = E.id | ||
JOIN categories C on P.category_id = C.id | ||
ORDER by category, port | ||
"; | ||
|
||
$result = pg_query_params($db, "set client_encoding = 'ISO-8859-15'", array()) or die('query failed ' . pg_last_error($db)); | ||
|
||
$result = pg_query_params($db, $sql, array()) or die('query failed ' . pg_last_error($db)); | ||
|
||
$numrows = pg_num_rows($result); | ||
|
||
echo "We have $numrows ports for testing\n"; | ||
|
||
$rows = pg_fetch_all($result); | ||
|
||
foreach ($rows as $key => $row) { | ||
echo $key . ' ' . $row['category'] . '/' . $row['port'] . "\n"; | ||
$port = new Port($db); | ||
$port->FetchByID($row['id']); | ||
$port_display = new port_display($db); | ||
$port_display->SetPort($port); | ||
$port_display->SetDetailsPackages(); | ||
|
||
$HTMLPortPackages = $port_display->Display(); | ||
|
||
unset($HTMLPortPackages); | ||
unset($port_display); | ||
unset($port); | ||
} |