Merge remote-tracking branch 'origin/develop' into 3072-Problemas_jquery

This commit is contained in:
daniel 2018-11-15 15:20:02 +01:00
commit 1edb7fda03
32 changed files with 140 additions and 32 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.729-181114 Version: 7.0NG.729-181115
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.729-181114" pandora_version="7.0NG.729-181115"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.729'; use constant AGENT_VERSION => '7.0NG.729';
use constant AGENT_BUILD => '181114'; use constant AGENT_BUILD => '181115';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.729 %define version 7.0NG.729
%define release 181114 %define release 181115
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.729 %define version 7.0NG.729
%define release 181114 %define release 181115
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.729" PI_VERSION="7.0NG.729"
PI_BUILD="181114" PI_BUILD="181115"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{181114} {181115}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.729(Build 181114)") #define PANDORA_VERSION ("7.0NG.729(Build 181115)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.729(Build 181114))" VALUE "ProductVersion", "(7.0NG.729(Build 181115))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.729-181114 Version: 7.0NG.729-181115
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.729-181114" pandora_version="7.0NG.729-181115"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -0,0 +1,67 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
/**
* @package General
*/
global $config;
if ($config['language'] == 'es') {
$url_help = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Instalaci%C3%B3n_y_actualizaci%C3%B3n_PHP_7';
}
else{
$url_help = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:_PHP_7';
}
// Prints help dialog information
echo '<div id="login_help_dialog" title="REQUIRED PHP UPDATE" style="display: none;">';
echo '<div style="width:70%; font-size: 10pt; margin: 20px; float:left">';
echo "<p ><b style='font-size: 10pt;'>" . __('For a correct operation of PandoraFMS you will have to update php to version 7.0 or later.') . "</b></p>";
echo "<p style='font-size: 10pt;'><b>" . __(' If you don\'t update, you will lose functionalities:') . "</b></p>";
echo "<ul>";
echo "<li style='padding:5px;'>" . __('Report download in PDF format') . "</li>";
echo "<li style='padding:5px;'>" . __('Sending emails') . "</li>";
echo "<li style='padding:5px;'>" . __('Metaconsole Collections') . "</li>";
echo "<li style='padding:5px;'>" . '...' . "</li>";
echo "</ul>";
echo '<p><a target="blank" href="' . $url_help . '"><b>'.__('Access Help').'</b></a></p>';
echo '</div>';
echo "<div style='margin-top: 80px;'>";
echo html_print_image('images/icono_warning_mr.png', true, array("alt" => __('Warning php version'), "border" => 0));
echo "</div>";
echo '</div>';
?>
<script type="text/javascript" language="javascript">
/* <![CDATA[ */
$(document).ready (function () {
$("#login_help_dialog").dialog({
resizable: true,
draggable: true,
modal: true,
height: 320,
width: 550,
overlay: {
opacity: 0.5,
background: "black"
}
});
});
/* ]]> */
</script>

View File

@ -26,6 +26,12 @@ if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_us
return; return;
} }
$php_version = phpversion();
$php_version_array = explode('.', $php_version);
if($php_version_array[0] < 7){
include_once("general/php7_message.php");
}
$tab = get_parameter('tab', 'online'); $tab = get_parameter('tab', 'online');
$buttons = array( $buttons = array(

View File

@ -22,7 +22,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC181114'; $build_version = 'PC181115';
$pandora_version = 'v7.0NG.729'; $pandora_version = 'v7.0NG.729';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -14,7 +14,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = "utf8") { function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = null) {
global $config; global $config;
if ($host === null) if ($host === null)
@ -42,7 +42,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
} }
db_change_cache_id ($db, $host); db_change_cache_id ($db, $host);
mysqli_set_charset($connect_id, $charset); if (isset($charset)) {
mysqli_set_charset($connect_id, $charset);
}
mysqli_select_db($connect_id, $db); mysqli_select_db($connect_id, $db);
} }
@ -54,7 +56,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
db_change_cache_id ($db, $host); db_change_cache_id ($db, $host);
@mysql_set_charset($connect_id, $charset); if (isset($charset)) {
@mysql_set_charset($connect_id, $charset);
}
mysql_select_db($db, $connect_id); mysql_select_db($db, $connect_id);
} }

View File

@ -2231,6 +2231,29 @@ function config_check () {
__("phantomjs is not installed")); __("phantomjs is not installed"));
} }
} }
$php_version = phpversion();
$php_version_array = explode('.', $php_version);
if($php_version_array[0] < 7){
if ($config['language'] == 'es') {
$url_help = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Instalaci%C3%B3n_y_actualizaci%C3%B3n_PHP_7';
}
else{
$url_help = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:_PHP_7';
}
set_pandora_error_for_header(
__('For a correct operation of PandoraFMS you will have to update php to version 7.0 or later.') . "<br>" .
__(' If you don\'t update, you will lose functionalities:') . "<br>" .
"<ol><li style='color: #676767'>" . __('Report download in PDF format') . "</li>" .
"<li style='color: #676767'>" . __('Sending emails') . "</li>" .
"<li style='color: #676767'>" . __('Metaconsole Collections') . "</li>" .
"<li style='color: #676767'>" . '...' . "</li>" .
"</ol>" .
'<a target="blank" href="' . $url_help . '">'.__('Access Help').'</a>',
__("REQUIRED PHP UPDATE"));
}
} }
function config_return_in_bytes($val) { function config_return_in_bytes($val) {

View File

@ -43,7 +43,7 @@ function db_select_engine() {
} }
} }
function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = "utf8") { function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = null) {
global $config; global $config;
static $error = 0; static $error = 0;

View File

@ -25,6 +25,7 @@
* @param string Snmp especific OID. * @param string Snmp especific OID.
*/ */
function snmp_generate_trap($snmp_host_address, $snmp_community, $snmp_oid, $snmp_agent, $snmp_data, $snmp_type) { function snmp_generate_trap($snmp_host_address, $snmp_community, $snmp_oid, $snmp_agent, $snmp_data, $snmp_type) {
global $config;
// Call snmptrap // Call snmptrap
if (empty($config['snmptrap'])) { if (empty($config['snmptrap'])) {
switch (PHP_OS) { switch (PHP_OS) {
@ -35,7 +36,9 @@ function snmp_generate_trap($snmp_host_address, $snmp_community, $snmp_oid, $snm
$snmptrap_bin = '/usr/pkg/bin/snmptrap'; $snmptrap_bin = '/usr/pkg/bin/snmptrap';
break; break;
default: default:
$snmptrap_bin = 'snmptrap'; $snmptrap_bin = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'
? 'C:\Windows\snmptrap.exe'
: 'snmptrap';
break; break;
} }
} }

View File

@ -940,7 +940,12 @@ if (get_parameter ('login', 0) !== 0) {
include_once("general/login_help_dialog.php"); include_once("general/login_help_dialog.php");
} }
$php_version = phpversion();
$php_version_array = explode('.', $php_version);
if($php_version_array[0] < 7){
include_once("general/php7_message.php");
}
} }
// Header // Header

View File

@ -71,7 +71,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.729'; $version = '7.0NG.729';
$build = '181114'; $build = '181115';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -53,7 +53,7 @@ if (empty($ehorus_agent_id)) {
$hostname = $config['ehorus_hostname']; $hostname = $config['ehorus_hostname'];
$port = $config['ehorus_port']; $port = $config['ehorus_port'];
$user = $config['ehorus_user']; $user = $config['ehorus_user'];
$password = io_output_password($config['ehorus_pass']); $password = io_safe_output(io_output_password($config['ehorus_pass']));
$curl_timeout = $config['ehorus_req_timeout']; $curl_timeout = $config['ehorus_req_timeout'];
$base_url = 'https://' . $hostname . ':' . $port; $base_url = 'https://' . $hostname . ':' . $port;
@ -315,4 +315,4 @@ $client_url = $config['homeurl'] . 'operation/agentes/ehorus_client.php?' . $que
$('input#run-ehorus-client').click(handleButtonClick); $('input#run-ehorus-client').click(handleButtonClick);
}); });
</script> </script>

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.729 %define version 7.0NG.729
%define release 181114 %define release 181115
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.729 %define version 7.0NG.729
%define release 181114 %define release 181115
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.729-181114 Version: 7.0NG.729-181115
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.729-181114" pandora_version="7.0NG.729-181115"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.729"; my $pandora_version = "7.0NG.729";
my $pandora_build = "181114"; my $pandora_build = "181115";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.729"; my $pandora_version = "7.0NG.729";
my $pandora_build = "181114"; my $pandora_build = "181115";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.729 %define version 7.0NG.729
%define release 181114 %define release 181115
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.729 %define version 7.0NG.729
%define release 181114 %define release 181115
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.729" PI_VERSION="7.0NG.729"
PI_BUILD="181114" PI_BUILD="181115"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.729 PS181114"; my $version = "7.0NG.729 PS181115";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv; Encode::Locale::decode_argv;
# version: define current version # version: define current version
my $version = "7.0NG.729 PS181114"; my $version = "7.0NG.729 PS181115";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);