зеркало из https://github.com/mozilla/gecko-dev.git
A ton of small changes to reporter, nothing drastic. Mainly fixing bugs caused by the last few checkins. No bug.
This commit is contained in:
Родитель
bda0b1c3fe
Коммит
80243b6f8c
|
@ -49,14 +49,18 @@ session_start();
|
||||||
header("Cache-control: private"); //IE 6 Fix
|
header("Cache-control: private"); //IE 6 Fix
|
||||||
printheaders();
|
printheaders();
|
||||||
|
|
||||||
|
$method = 'html';
|
||||||
|
|
||||||
$title = "Searching Results";
|
$title = "Searching Results";
|
||||||
|
|
||||||
$content = initializeTemplate();
|
$content = initializeTemplate();
|
||||||
|
$content->assign('method', $method);
|
||||||
|
|
||||||
// Open DB
|
// Open DB
|
||||||
$db = NewADOConnection($config['db_dsn']);
|
$db = NewADOConnection($config['db_dsn']);
|
||||||
$db->SetFetchMode(ADODB_FETCH_ASSOC);
|
$db->SetFetchMode(ADODB_FETCH_ASSOC);
|
||||||
|
$db->debug = true;
|
||||||
|
|
||||||
// DELETED
|
|
||||||
$query = new query;
|
$query = new query;
|
||||||
$query_input = $query->getQueryInputs();
|
$query_input = $query->getQueryInputs();
|
||||||
|
|
||||||
|
@ -68,24 +72,25 @@ $result = $query->doQuery($query_input['selected'],
|
||||||
$query_input['page'],
|
$query_input['page'],
|
||||||
$query_input['count']
|
$query_input['count']
|
||||||
);
|
);
|
||||||
$output = $query->outputHTML($result, $query_input);
|
|
||||||
|
|
||||||
|
$output = $query->outputHTML($result, $query_input, $continuity_params, $columnHeaders);
|
||||||
if (sizeof($output['data']) == 0){
|
if (sizeof($output['data']) == 0){
|
||||||
$content->assign('error', 'No Results found');
|
$content->assign('error', 'No Results found');
|
||||||
displayPage($content, 'query.tpl');
|
displayPage($content, 'query', 'query.tpl');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content->assign('continuityParams', $query->continuityParams($query_input));
|
$continuity_params = $query->continuityParams($query_input);
|
||||||
|
$content->assign('continuity_params', $continuity_params);
|
||||||
|
$content->assign('column', $query->columnHeaders($query_input, $continuity_params));
|
||||||
|
$content->assign('row', $output['data']);
|
||||||
|
$content->assign('continuityParams', $continuity_params);
|
||||||
$content->assign('count', $result['totalResults']);
|
$content->assign('count', $result['totalResults']);
|
||||||
$content->assign('show', $query_input['show']);
|
$content->assign('show', $query_input['show']);
|
||||||
$content->assign('page', $query_input['page']);
|
$content->assign('page', $query_input['page']);
|
||||||
|
|
||||||
$content->assign('column', $output['columnHeaders']);
|
displayPage($content, 'query', 'query.tpl');
|
||||||
$content->assign('row', $output['data']);
|
|
||||||
displayPage($content, 'query.tpl');
|
|
||||||
|
|
||||||
// disconnect database
|
// disconnect database
|
||||||
$db->Close();
|
$db->Close();
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -90,6 +90,6 @@ $content->assign('report_description', $query->fields['report_description'])
|
||||||
|
|
||||||
$title = 'Mozilla Reporter: '.$query->fields['report_id'];
|
$title = 'Mozilla Reporter: '.$query->fields['report_id'];
|
||||||
|
|
||||||
displayPage($content, 'report.tpl', $title);
|
displayPage($content, 'report', 'report.tpl', $title);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
require_once('../../config.inc.php');
|
require_once('../../config.inc.php');
|
||||||
require_once($config['base_path'].'/includes/iolib.inc.php');
|
require_once($config['base_path'].'/includes/iolib.inc.php');
|
||||||
require_once($config['base_path'].'/includes/contrib/adodb/adodb.inc.php');
|
require_once($config['base_path'].'/includes/db.inc.php');
|
||||||
require_once($config['base_path'].'/includes/contrib/smarty/libs/Smarty.class.php');
|
require_once($config['base_path'].'/includes/contrib/smarty/libs/Smarty.class.php');
|
||||||
require_once($config['base_path'].'/includes/security.inc.php');
|
require_once($config['base_path'].'/includes/security.inc.php');
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ header("Cache-control: private"); //IE 6 Fix
|
||||||
|
|
||||||
// Open DB
|
// Open DB
|
||||||
$db = NewADOConnection($config['db_dsn']);
|
$db = NewADOConnection($config['db_dsn']);
|
||||||
if (!$db) die("Connection failed");
|
|
||||||
$db->SetFetchMode(ADODB_FETCH_ASSOC);
|
$db->SetFetchMode(ADODB_FETCH_ASSOC);
|
||||||
|
|
||||||
$content = initializeTemplate();
|
$content = initializeTemplate();
|
||||||
|
@ -111,6 +110,6 @@ $db->Close();
|
||||||
|
|
||||||
$title = "Statistics";
|
$title = "Statistics";
|
||||||
|
|
||||||
displayPage($content, 'stats.tpl', $title);
|
displayPage($content, 'stats', 'stats.tpl');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,11 @@ require_once($config['base_path'].'/includes/contrib/adodb/adodb.inc.php');
|
||||||
class db extends ADOConnection
|
class db extends ADOConnection
|
||||||
{
|
{
|
||||||
function NewADOConnection(){
|
function NewADOConnection(){
|
||||||
|
global $config;
|
||||||
$db = NewADOConnection($config['db_dsn']);
|
$db = NewADOConnection($config['db_dsn']);
|
||||||
$db->debug = true;
|
if($config['debug']){
|
||||||
|
$db->debug = true;
|
||||||
|
}
|
||||||
if (!$db) die("Connection failed");
|
if (!$db) die("Connection failed");
|
||||||
return $db;
|
return $db;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче