Author: coar
Date: Fri Mar 12 16:38:58 2010
New Revision: 922324
URL: http://svn.apache.org/viewvc?rev=922324&view=rev
Log:
Trying to recover a checksum error
Modified:
labs/pulse/web-reports/mlists.php
Modified: labs/pulse/web-reports/mlists.php
URL:
http://svn.apache.org/viewvc/labs/pulse/web-reports/mlists.php?rev=922324&r1=922323&r2=922324&view=diff
==============================================================================
--- labs/pulse/web-reports/mlists.php (original)
+++ labs/pulse/web-reports/mlists.php Fri Mar 12 16:38:58 2010
@@ -3,9 +3,11 @@
Header('text/html; charset=UTF-8');
Include_Once('Console/Getopt.php');
-Include_Once('liststats-classes.php');
+Include_Once('Smarty/Smarty.class.php');
+Include_Once('pulse-classes.php');
$stderr = fopen('php://stderr', 'a');
+
ob_start();
function safelise($list) {
@@ -174,11 +176,12 @@ function chartit($o_db, $list, $width, $
* -D yy-mm As-of date. Default is most recent in database.
* -g do graphs (default).
* -h Display octothorpes for lists processed.
- * -G *don't* do graphs
- * -n do-nothing
+ * -G *don't* do graphs.
+ * -n do-nothing.
* -o directory Output directory for files. Default is '.'.
* -O filename Name of master file for output (default 'index.html').
- *
+ * -s Separate into one page per domain.
+ * -S One big HTML file.
*/
$tDirectory = '.';
$tDoc = 'index.html';
@@ -187,10 +190,11 @@ $graphs = true;
$nDays = -1;
$asof = null;
$hash = false;
+$onepage = true;
$cg = new Console_Getopt();
$a_argv = $cg->readPHPArgv();
-$cgstat = $cg->getopt($a_argv, '1D:d:gGhHO:no:');
+$cgstat = $cg->getopt($a_argv, '1D:d:gGhHO:no:sS');
if (PEAR::isError($cgstat)) {
die('Error in command line: ' . $cgstat->getMessage() . "\n");
}
@@ -243,11 +247,17 @@ foreach ($cgstat[0] as $a_opt) {
*/
$tDirectory = $a_opt[1];
}
- else if ($a_opt[0] == 'O') {
+ else if ($a_opt[0] == 's') {
+ /*
+ * Separate the information into different pages by domain.
+ */
+ $onepage = false;
+ }
+ else if ($a_opt[0] == 'S') {
/*
- * Main document for pulling the bits together.
+ * Put everything on a single Web page.
*/
- $tDoc = $a_opt[1];
+ $onepage = true;
}
else {
/*
@@ -264,12 +274,19 @@ if ($nDays == 1) {
}
-$o_db = new lsDB($_SERVER['PULSE_DB_HOST'], $_SERVER['PULSE_DB_USER'],
$_SERVER['PULSE_DB_PASSWORD']);
+$o_db = new lsDB($_SERVER['PULSE_DB_HOST'],
+ $_SERVER['PULSE_DB_USER'],
+ $_SERVER['PULSE_DB_PASSWORD']);
if (! isset($asof)) {
$asof = $o_db->latest();
}
+$o_smt = new Smarty();
+$o_smt->template_dir = '/usr/local/labs/pulse/smarty/templates';
+$o_smt->compile_dir = '/usr/local/labs/pulse/smarty/templates_c';
+$o_smt->config_dir = '/usr/local/labs/pulse/smarty/configs';
+
$o_sel_current = $o_db->select(array('asof' => $asof,
'status' => 'public'));
$a_mlists = $o_sel_current->mlists();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]