Skip to content

Commit 75f9276

Browse files
authored
Merge pull request #16 from Carlimeunier/legacy
Compatibility with Cacti 1.x - Develop branch
2 parents ab64c7c + f78ce9a commit 75f9276

39 files changed

+7843
-1198
lines changed

cc_graphs.php renamed to graphs.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
include('../../include/global.php');
2929

3030
/* load standard libraries */
31-
include_once(REPORTIT_BASE_PATH . '/lib_int/funct_validate.php');
32-
include_once(REPORTIT_BASE_PATH . '/lib_int/funct_shared.php');
33-
include_once(REPORTIT_BASE_PATH . '/lib_int/funct_online.php');
31+
include_once(REPORTIT_BASE_PATH . '/lib/funct_validate.php');
32+
include_once(REPORTIT_BASE_PATH . '/lib/funct_shared.php');
33+
include_once(REPORTIT_BASE_PATH . '/lib/funct_online.php');
3434
require_once(REPORTIT_BASE_PATH . '/lib_ext/graidle/graidle.php');
3535

3636
ob_end_clean();
@@ -42,10 +42,11 @@ function create_chart(){
4242
global $config, $types, $prefixes;
4343

4444
/* load presets */
45-
include_once(REPORTIT_BASE_PATH . '/lib_int/const_graphs.php');
45+
include_once(REPORTIT_BASE_PATH . '/lib/const_graphs.php');
4646

4747
/* ================= Input validation ================= */
48-
get_filter_request_var('id');
48+
#get_filter_request_var('id');
49+
input_validate_input_number(get_request_var("id"));
4950

5051
if (!isset_request_var('source')) exit;
5152

@@ -80,15 +81,15 @@ function create_chart(){
8081
$affix .= 'ORDER BY a.' . get_request_var('source') . ' ' . $order . ' LIMIT 0, ' . $limit;
8182

8283
if (get_request_var('archive') == -1) {
83-
$sql = "SELECT a.{get_request_var('source')}
84-
FROM reportit_results_{get_request_var('id')} AS a
84+
$sql = "SELECT a.". get_request_var('source') . "
85+
FROM plugin_reportit_resultss_" . get_request_var('id') ." AS a
8586
INNER JOIN data_template_data AS c
8687
ON c.local_data_id = a.id
8788
WHERE c.name_cache " . $affix;
8889

8990
$data = get_prepared_report_data(get_request_var('id'), 'graidle', $sql);
9091
} else {
91-
$sql = "SELECT a.{get_request_var('source')}
92+
$sql = "SELECT a." . get_request_var('source') ."
9293
FROM reportit_tmp_$cache_id AS a
9394
WHERE a.name_cache " . $affix;
9495

0 commit comments

Comments
 (0)