Skip to content

Commit

Permalink
chore(lib): remove zend support (#6450)
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret committed Sep 14, 2018
1 parent dd89b23 commit 3702adb
Show file tree
Hide file tree
Showing 117 changed files with 28 additions and 28,091 deletions.
1 change: 0 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ exclude_paths:
- logrotate/**/*
- snmptrapd/**/*
- varinstall/**/*
- lib/Zend/**/*
- www/lib/HTML/**/*
- www/install/**/*
1 change: 0 additions & 1 deletion bin/centreon
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ if ($debug) {
require_once _CENTREON_ETC_ . "/centreon.conf.php";
require_once _CLAPI_CLASS_ . "/centreonAPI.class.php";
require_once _CLAPI_CLASS_ . "/centreonUtils.class.php";
require_once _CLAPI_LIB_ . "/Centreon/Db/Manager/Manager.php";

error_reporting(0);
ini_set("display_errors", "Off");
Expand Down
47 changes: 1 addition & 46 deletions cron/centreon-backup.pl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
use vars qw($mysql_user $mysql_passwd $mysql_host $mysql_port $mysql_database_oreon $mysql_database_ods $centreon_config);
use vars qw($BACKUP_ENABLED $BACKUP_DIR $TEMP_DIR);
use vars qw($BACKUP_DATABASE_CENTREON $BACKUP_DATABASE_CENTREON_STORAGE $BACKUP_DATABASE_TYPE $BACKUP_DATABASE_FULL $BACKUP_DATABASE_PARTIAL $BACKUP_RETENTION);
use vars qw($BACKUP_CONFIGURATION_FILES $MYSQL_CONF $ZEND_CONF);
use vars qw($BACKUP_CONFIGURATION_FILES $MYSQL_CONF);
use vars qw($TEMP_DB_DIR $TEMP_CENTRAL_DIR $TEMP_CENTRAL_ETC_DIR $TEMP_CENTRAL_INIT_DIR $TEMP_CENTRAL_CRON_DIR $TEMP_CENTRAL_LOG_DIR $TEMP_CENTRAL_BIN_DIR $TEMP_CENTRAL_LIC_DIR $CENTREON_MODULES_PATH $TEMP_POLLERS $DISTANT_POLLER_BACKUP_DIR);
use vars qw($BIN_GZIP $BIN_TAR);
use vars qw($scp_enabled $scp_user $scp_host $scp_directory);
Expand Down Expand Up @@ -152,7 +152,6 @@

$BACKUP_CONFIGURATION_FILES = $backupOptions->{'backup_configuration_files'}->{'value'};
$MYSQL_CONF = $backupOptions->{'backup_mysql_conf'}->{'value'};
$ZEND_CONF = $backupOptions->{'backup_zend_conf'}->{'value'};

$BIN_GZIP = "";
$BIN_TAR = "";
Expand Down Expand Up @@ -326,14 +325,6 @@ ()
return @tab_php_ini;
}

sub getZendConfFile() {
if ( -e '/etc/php.d/zendoptimizer.ini' ) {
return '/etc/php.d/zendoptimizer.ini';
} elsif ( -e '/usr/local/Zend/etc/php.ini' ) {
return '/usr/local/Zend/etc/php.ini';
}
}

############################
# Functions to make backup #
############################
Expand Down Expand Up @@ -595,42 +586,6 @@ ()
}
}

##########################################
# Get Zend binary and configuration file #
##########################################
# Zend ini
mkpath($TEMP_CENTRAL_ETC_DIR."/zend", {mode => 0755, error => \my $err_list});
if (@$err_list) {
for my $diag (@$err_list) {
my ($file, $message) = %$diag;
if ($file eq '') {
print STDERR "Unable to create temporary directories because: " . $message . "\n";
} else {
print STDERR "Problem with file " . $file . ": " . $message . "\n";
}
}
}
if (!defined($ZEND_CONF)){
$ZEND_CONF = getZendConfFile();
}
`cp -pr $ZEND_CONF $TEMP_CENTRAL_ETC_DIR/zend/`;
if ($? ne 0) {
print STDERR "Unable to copy Zend configuration file\n";
}

# zend binary
mkpath($TEMP_CENTRAL_ETC_DIR."/zend_bin", {mode => 0755, error => \my $err_list});
if (@$err_list) {
for my $diag (@$err_list) {
my ($file, $message) = %$diag;
if ($file eq '') {
print STDERR "Unable to create temporary directories because: " . $message . "\n";
} else {
print STDERR "Problem with file " . $file . ": " . $message . "\n";
}
}
}

#####################
# Get Centreon logs #
#####################
Expand Down
3 changes: 1 addition & 2 deletions doc/en/administration_guide/backup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Backup format :
Configuration files backup
--------------------------

All configuration files of central server can be saved : MySQL, Zend, Apache, PHP, SNMP, centreon, centreon-broker)
All configuration files of central server can be saved : MySQL, Apache, PHP, SNMP, centreon, centreon-broker)

Backup format :

Expand Down Expand Up @@ -72,7 +72,6 @@ The following window is displayed:
* **Backup retention** Retention for backups (in days)
* **Backup configuration files** Enable backup of configuration files
* **MySQL configuration file path** Path for MySQL configuration file
* **Zend configuration file path** Path for Zend configuration file
* **SCP export enabled** Enable SCP export of backups
* **Remote user** Remote user for SCP export
* **Remote host** Remote host for SCP export
Expand Down
3 changes: 1 addition & 2 deletions doc/fr/administration_guide/backup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Format de la sauvegarde :
Sauvegarde des fichiers de configuration
----------------------------------------

Tous les fichiers de configuration du serveur central sont sauvegardés : MySQL, Zend, Apache, PHP, SNMP, centreon, centreon-broker
Tous les fichiers de configuration du serveur central sont sauvegardés : MySQL, Apache, PHP, SNMP, centreon, centreon-broker

Format de la sauvegarde :

Expand Down Expand Up @@ -72,7 +72,6 @@ La fenêtre suivante est affichée:
* **Backup retention** Durée de rétention des sauvegardes (en jours)
* **Backup configuration files** Activer la sauvegarde des fichiers de configuration
* **MySQL configuration file path** Chemin d'accès au fichier de configuration MySQL
* **Zend configuration file path** Chemin d'accès au fichier de configuration Zend
* **SCP export enabled** Activer l'export des sauvegardes par SCP
* **Remote user** Utilisateur distant pour l'export SCP
* **Remote host** Hôte distant pour l'export SCP
Expand Down
9 changes: 2 additions & 7 deletions lang/fr/LC_MESSAGES/help.po
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,10 @@ msgstr "Activer le processus de sauvegarde"

#: centreon-web/www/include/Administration/parameters/backup/help.php:13
msgid ""
"Backup configuration files (MySQL, Zend, Apache, PHP, SNMP, centreon, centreon-"
"Backup configuration files (MySQL, Apache, PHP, SNMP, centreon, centreon-"
"engine, centreon-broker)"
msgstr ""
"Activer la sauvegarde des fichiers de configuration (MySQL, Zend, Apache, PHP, "
"Activer la sauvegarde des fichiers de configuration (MySQL, Apache, PHP, "
"SNMP, centreon, centreon-engine, centreon-broker)"

#: centreon-web/www/include/Administration/parameters/backup/help.php:17
Expand Down Expand Up @@ -764,11 +764,6 @@ msgstr ""
"Chemin d'accès au fichier de configuration MySQL (i.e. /etc/my.cnf.d/centreon."
"cnf)"

#: centreon-web/www/include/Administration/parameters/backup/help.php:53
msgid "Zend configuration file path (i.e. /etc/php.d/zendguard.ini)"
msgstr ""
"Chemin d'accès au fichier de configuration Zend (i.e. /etc/php.d/zendguard.ini)"

#: centreon-web/www/include/Administration/parameters/backup/help.php:57
msgid "Use SCP to copy backup on remote host"
msgstr "Utilise le protocole SCP pour externaliser les sauvegardes"
Expand Down
46 changes: 0 additions & 46 deletions lang/fr/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -5050,10 +5050,6 @@ msgstr "Sauvegarder les fichiers de configuration"
msgid "MySQL configuration file path"
msgstr "Chemin d'accès au fichier de configuration MySQL"

#: centreon-web/www/include/Administration/parameters/backup/formBackup.php:117
msgid "Zend configuration file path"
msgstr "Chemin d'accès au fichier de configuration Zend"

#: centreon-web/www/include/Administration/parameters/backup/formBackup.php:125
msgid "SCP export enabled"
msgstr "Activer l'export SCP"
Expand Down Expand Up @@ -6727,48 +6723,6 @@ msgstr "Fichier PHP inclus"
msgid "Unable to install module"
msgstr "Impossible d'installer le module"

#: centreon-web/www/include/options/oreon/modules/licenseUpload.php:118
msgid "The license has been successfully installed"
msgstr "La licence a été installée avec succès"

#: centreon-web/www/include/options/oreon/modules/licenseUpload.php:120
msgid "An error occurred"
msgstr "Une erreur est survenue"

#: centreon-web/www/include/options/oreon/modules/licenseUpload.php:123
msgid "Sorry your license is not valid\n"
msgstr "Désolé, votre licence n'est pas valide \n"

#: centreon-web/www/include/options/oreon/modules/licenseUpload.php:125
msgid "Your license is not valid for this product"
msgstr "Votre licence n'est pas valide pour ce produit"

#: centreon-web/www/include/options/oreon/modules/licenseUpload.php:129
msgid "Your license doesn't match any Zend ID of your machine"
msgstr "Votre licence ne correspond à aucun Zend ID de ce serveur"

#: centreon-web/www/include/options/oreon/modules/licenseUpload.php:133
msgid "Your license doesn't include any Administrator"
msgstr "Votre licence n'inclue aucun \"Administrateur\""

#: centreon-web/www/include/options/oreon/modules/licenseUpload.php:137
msgid "Your license has expired"
msgstr "Votre licence a expiré"

#: centreon-web/www/include/options/oreon/modules/licenseUpload.php:142
msgid ""
"License upload has failed.\n"
"Destination directory doesn't exist or your webserver's user don't have the "
"right to access it"
msgstr ""
"Échec de la mise à jour de la licence.\n"
"Le répertoire de destination n'existe pas ou les droits d'accès sont "
"incorrects"

#: centreon-web/www/include/options/oreon/modules/licenseUpload.php:145
msgid "The given license file is not valid"
msgstr "Le fichier de licence n'est pas valide"

#: centreon-web/www/include/options/oreon/modules/listModules.php:221
#: centreon-web/www/include/options/oreon/modules/listModules.php:222
#: centreon-web/www/include/options/oreon/modules/listModules.php:223
Expand Down
77 changes: 0 additions & 77 deletions lib/Centreon/Cache/Manager/Manager.php

This file was deleted.

69 changes: 0 additions & 69 deletions lib/Centreon/Db/Manager/Manager.php

This file was deleted.

Loading

0 comments on commit 3702adb

Please sign in to comment.