diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 00000000..5fd203df --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,20 @@ +in(__DIR__) + ->name('*.php'); + +$config = new Config(); + +$rules = [ + '@PER-CS2.0' => true, + 'trailing_comma_in_multiline' => ['elements' => ['arguments', 'array_destructuring', 'arrays']], // For PHP 7.4 compatibility +]; + +return $config + ->setRules($rules) + ->setFinder($finder) + ->setUsingCache(false); diff --git a/ajax/common.tabs.php b/ajax/common.tabs.php index 73d1f30d..4483523e 100644 --- a/ajax/common.tabs.php +++ b/ajax/common.tabs.php @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -include("../../../inc/includes.php"); -header("Content-Type: text/html; charset=UTF-8"); +include('../../../inc/includes.php'); +header('Content-Type: text/html; charset=UTF-8'); Html::header_nocache(); Session::checkLoginUser(); diff --git a/ajax/dashboard.php b/ajax/dashboard.php index 1cd12e33..ad2d2085 100644 --- a/ajax/dashboard.php +++ b/ajax/dashboard.php @@ -49,14 +49,14 @@ case 'centralDashboard': Html::includeHeader(); - echo ""; + echo ''; $dashboard = new PluginMreportingDashboard(); $dashboard->showDashboard(false); - //load protovis lib for dashboard render + //load protovis lib for dashboard render $version = Plugin::getInfo('mreporting', 'version'); $php_dir = Plugin::getPhpDir('mreporting', false); - echo Html::script($php_dir . "/lib/protovis/protovis.js", ['version' => $version]); + echo Html::script($php_dir . '/lib/protovis/protovis.js', ['version' => $version]); Html::popFooter(); break; diff --git a/ajax/dropdownExport.php b/ajax/dropdownExport.php index e14f4f8a..9dbc2fdf 100644 --- a/ajax/dropdownExport.php +++ b/ajax/dropdownExport.php @@ -28,8 +28,8 @@ * ------------------------------------------------------------------------- */ -include("../../../inc/includes.php"); -header("Content-Type: text/html; charset=UTF-8"); +include('../../../inc/includes.php'); +header('Content-Type: text/html; charset=UTF-8'); Html::header_nocache(); Session::checkLoginUser(); @@ -38,16 +38,16 @@ isset($_POST['ext']) && !empty($_POST['ext']) ) { - if ($_POST['ext'] == "odt") { - echo " "; - $option = []; - $option[1] = __("With data", 'mreporting'); - $option[0] = __("Without data", 'mreporting'); - Dropdown::showFromArray("withdata", $option, []); + if ($_POST['ext'] == 'odt') { + echo ' '; + $option = []; + $option[1] = __('With data', 'mreporting'); + $option[0] = __('Without data', 'mreporting'); + Dropdown::showFromArray('withdata', $option, []); } - if ($_POST['ext'] == "svg") { - //close previous form + if ($_POST['ext'] == 'svg') { + //close previous form Html::Closeform(); $randname = $_POST['randname']; diff --git a/ajax/dropdownGraphs.php b/ajax/dropdownGraphs.php index b07be6b9..aee6349f 100644 --- a/ajax/dropdownGraphs.php +++ b/ajax/dropdownGraphs.php @@ -28,21 +28,21 @@ * ------------------------------------------------------------------------- */ -if (strpos($_SERVER['PHP_SELF'], "dropdownGraphs.php")) { - include("../../../inc/includes.php"); - header("Content-Type: text/html; charset=UTF-8"); +if (strpos($_SERVER['PHP_SELF'], 'dropdownGraphs.php')) { + include('../../../inc/includes.php'); + header('Content-Type: text/html; charset=UTF-8'); Html::header_nocache(); } Session::checkLoginUser(); if ($_POST['graphname'] != -1) { - $test = explode(";", $_POST['graphname']); + $test = explode(';', $_POST['graphname']); if (isset($test[0])) { - $_POST['classname'] = $test[0]; - $_POST['name'] = $test[1]; + $_POST['classname'] = $test[0]; + $_POST['name'] = $test[1]; $config = new PluginMreportingConfig(); - echo " " . __('Send') . ""; + echo " " . __('Send') . ''; } } diff --git a/ajax/get_new_crsf_token.php b/ajax/get_new_crsf_token.php index b5644a6a..b2011229 100644 --- a/ajax/get_new_crsf_token.php +++ b/ajax/get_new_crsf_token.php @@ -29,9 +29,9 @@ */ $AJAX_INCLUDE = 1; -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); -header("Content-Type: text/html; charset=UTF-8"); +header('Content-Type: text/html; charset=UTF-8'); Html::header_nocache(); Session::checkLoginUser(); diff --git a/ajax/homepage_link.php b/ajax/homepage_link.php index ab857f9f..c70e1d1f 100644 --- a/ajax/homepage_link.php +++ b/ajax/homepage_link.php @@ -34,4 +34,4 @@ echo ''; + __('Dashboard', 'mreporting') . '  '; diff --git a/composer.json b/composer.json index a85ce58b..76786f3d 100644 --- a/composer.json +++ b/composer.json @@ -7,8 +7,7 @@ "glpi-project/tools": "^0.7", "php-parallel-lint/php-parallel-lint": "^1.4", "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^1.11", - "squizlabs/php_codesniffer": "^3.10" + "phpstan/phpstan": "^1.11" }, "config": { "optimize-autoloader": true, diff --git a/composer.lock b/composer.lock index 54f82519..32701522 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1714840a9f9df28f4fae68c91f3e3c22", + "content-hash": "7fb5e40b9cb3206bd154dfed8bb9d772", "packages": [ { "name": "masnathan/odtphp", @@ -337,86 +337,6 @@ }, "time": "2021-11-05T16:50:12+00:00" }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.10.2", - "source": { - "type": "git", - "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" - }, - "bin": [ - "bin/phpcbf", - "bin/phpcs" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "Former lead" - }, - { - "name": "Juliette Reinders Folmer", - "role": "Current lead" - }, - { - "name": "Contributors", - "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards", - "static analysis" - ], - "support": { - "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", - "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", - "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", - "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" - }, - "funding": [ - { - "url": "https://github.com/PHPCSStandards", - "type": "github" - }, - { - "url": "https://github.com/jrfnl", - "type": "github" - }, - { - "url": "https://opencollective.com/php_codesniffer", - "type": "open_collective" - } - ], - "time": "2024-07-21T23:26:44+00:00" - }, { "name": "symfony/console", "version": "v5.4.41", diff --git a/front/central.php b/front/central.php index 3e89827e..1ad8dece 100644 --- a/front/central.php +++ b/front/central.php @@ -28,39 +28,39 @@ * ------------------------------------------------------------------------- */ -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); Session::checkLoginUser(); -Html::header(__("More Reporting", 'mreporting'), '', 'tools', 'PluginMreportingCommon', 'dashboard_list'); +Html::header(__('More Reporting', 'mreporting'), '', 'tools', 'PluginMreportingCommon', 'dashboard_list'); $common = new PluginMreportingCommon(); /*** Regular Tab ***/ $reports = $common->getAllReports(); -$tabs = []; +$tabs = []; foreach ($reports as $classname => $report) { $tabs[$classname] = ['title' => $report['title'], - 'url' => Plugin::getWebDir('mreporting') . "/ajax/common.tabs.php", - 'params' => "target=" . $_SERVER['PHP_SELF'] . "&classname=$classname" + 'url' => Plugin::getWebDir('mreporting') . '/ajax/common.tabs.php', + 'params' => 'target=' . $_SERVER['PHP_SELF'] . "&classname=$classname", ]; } if (count($tabs) > 0) { - //foreach tabs + //foreach tabs foreach ($tabs as $tab) { global $DB; $params = (isset($tab['params']) ? $tab['params'] : ''); - //we get the classname - $classname = str_replace("target=" . $_SERVER['PHP_SELF'] . "&classname=", '', $params); + //we get the classname + $classname = str_replace('target=' . $_SERVER['PHP_SELF'] . '&classname=', '', $params); - //we found all reports for classname where current profil have right + //we found all reports for classname where current profil have right $query = "SELECT * FROM `glpi_plugin_mreporting_configs`,`glpi_plugin_mreporting_profiles` WHERE `glpi_plugin_mreporting_configs`.`id` = `glpi_plugin_mreporting_profiles`.`reports` AND `glpi_plugin_mreporting_configs`.`classname` = '$classname' - AND `glpi_plugin_mreporting_profiles`.`right` = " . READ . " - AND `glpi_plugin_mreporting_profiles`.`profiles_id` = " . $_SESSION['glpiactiveprofile']['id']; + AND `glpi_plugin_mreporting_profiles`.`right` = " . READ . ' + AND `glpi_plugin_mreporting_profiles`.`profiles_id` = ' . $_SESSION['glpiactiveprofile']['id']; - //for this classname if current user have no right on any reports + //for this classname if current user have no right on any reports if ($result = $DB->query($query)) { if ($DB->numrows($result) == 0) { //we unset the index @@ -69,15 +69,15 @@ } } - //finally if tabs is empty + //finally if tabs is empty if (empty($tabs)) { - echo "

" . __("No report is available !", 'mreporting') . "
"; + echo "

" . __('No report is available !', 'mreporting') . '
'; } else { echo "
"; Ajax::createTabs('tabspanel', 'tabcontent', $tabs, 'PluginMreportingCommon'); } } else { - echo "

" . __("No report is available !", 'mreporting') . "
"; + echo "

" . __('No report is available !', 'mreporting') . '
'; } Html::footer(); diff --git a/front/config.form.php b/front/config.form.php index fe903589..7f7d267e 100644 --- a/front/config.form.php +++ b/front/config.form.php @@ -28,35 +28,35 @@ * ------------------------------------------------------------------------- */ -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); -Session::checkRight("config", UPDATE); +Session::checkRight('config', UPDATE); -if (!isset($_GET["id"])) { - $_GET["id"] = 0; +if (!isset($_GET['id'])) { + $_GET['id'] = 0; } -if (!isset($_GET["preconfig"])) { - $_GET["preconfig"] = -1; +if (!isset($_GET['preconfig'])) { + $_GET['preconfig'] = -1; } $config = new PluginMreportingConfig(); -if (isset($_POST["add"])) { +if (isset($_POST['add'])) { $newID = $config->add($_POST); Html::back(); -} else if (isset($_POST["update"])) { +} elseif (isset($_POST['update'])) { $config->update($_POST); Html::back(); -} else if (isset($_POST["delete"])) { +} elseif (isset($_POST['delete'])) { $config->delete($_POST, 1); - Html::redirect("./config.form.php"); + Html::redirect('./config.form.php'); } else { - Html::header(__("More Reporting", 'mreporting'), '', 'tools', 'PluginMreportingCommon', 'config'); + Html::header(__('More Reporting', 'mreporting'), '', 'tools', 'PluginMreportingCommon', 'config'); - //Link from graph - if (isset($_GET["name"]) && isset($_GET["classname"])) { - if ($config->getFromDBByFunctionAndClassname($_GET["name"], $_GET["classname"])) { - $_GET["id"] = $config->fields['id']; + //Link from graph + if (isset($_GET['name']) && isset($_GET['classname'])) { + if ($config->getFromDBByFunctionAndClassname($_GET['name'], $_GET['classname'])) { + $_GET['id'] = $config->fields['id']; } } $config->display($_GET); diff --git a/front/config.php b/front/config.php index f9a0dc43..38285486 100644 --- a/front/config.php +++ b/front/config.php @@ -28,30 +28,30 @@ * ------------------------------------------------------------------------- */ -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); -Session::checkRight("config", UPDATE); +Session::checkRight('config', UPDATE); $plugin = new Plugin(); -if ($plugin->isActivated("mreporting")) { - //Create first config for graphs - if (isset($_GET["new"])) { +if ($plugin->isActivated('mreporting')) { + //Create first config for graphs + if (isset($_GET['new'])) { $config = new PluginMreportingConfig(); $config->createFirstConfig(); Html::back(); } else { - Html::header(__("More Reporting", 'mreporting'), '', 'tools', 'PluginMreportingCommon', 'config'); + Html::header(__('More Reporting', 'mreporting'), '', 'tools', 'PluginMreportingCommon', 'config'); PluginMreportingConfig::addFirstconfigLink(); - Search::show("PluginMreportingConfig"); + Search::show('PluginMreportingConfig'); } } else { - Html::header(__("Setup"), '', "config", "plugins"); + Html::header(__('Setup'), '', 'config', 'plugins'); echo "
"; - echo "

"; - echo "\"warning\""; - echo "

"; - echo "Please activate the plugin
"; + echo '

'; + echo 'warning'; + echo '

'; + echo 'Please activate the plugin'; } Html::footer(); diff --git a/front/dashboard.form.php b/front/dashboard.form.php index 17c3d3c9..eed79ab6 100644 --- a/front/dashboard.form.php +++ b/front/dashboard.form.php @@ -29,41 +29,41 @@ */ if (!isset($_POST['saveConfig']) && !isset($_POST['addReports'])) { - $USEDBREPLICATE = 1; + $USEDBREPLICATE = 1; } -$DBCONNECTION_REQUIRED = 0; // Not really a big SQL request +$DBCONNECTION_REQUIRED = 0; // Not really a big SQL request -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); Session::checkLoginUser(); if (isset($_POST['saveConfig'])) { PluginMreportingCommon::saveSelectors($_POST['f_name']); - $_REQUEST['f_name'] = $_POST['f_name']; + $_REQUEST['f_name'] = $_POST['f_name']; $_REQUEST['short_classname'] = $_POST['short_classname']; PluginMreportingCommon::getSelectorValuesByUser(); Html::back(); -} else if (isset($_POST['addReports'])) { +} elseif (isset($_POST['addReports'])) { $dashboard = new PluginMreportingDashboard(); - $post = ['users_id' => $_SESSION['glpiID'], 'reports_id' => $_POST['report']]; + $post = ['users_id' => $_SESSION['glpiID'], 'reports_id' => $_POST['report']]; $dashboard->add($post); Html::back(); } else { if ($_SESSION['glpiactiveprofile']['interface'] == 'helpdesk') { Html::helpHeader( - __("More Reporting", 'mreporting'), - $_SERVER['PHP_SELF'] + __('More Reporting', 'mreporting'), + $_SERVER['PHP_SELF'], ); } else { Html::header( - __("More Reporting", 'mreporting'), + __('More Reporting', 'mreporting'), $_SERVER['PHP_SELF'], 'tools', 'PluginMreportingCommon', - 'dashboard' + 'dashboard', ); } diff --git a/front/dashboard.php b/front/dashboard.php index 1542b3d1..398d49ce 100644 --- a/front/dashboard.php +++ b/front/dashboard.php @@ -28,4 +28,4 @@ * ------------------------------------------------------------------------- */ -require_once "dashboard.form.php"; +require_once 'dashboard.form.php'; diff --git a/front/export.php b/front/export.php index 75862c5f..bc82d7d2 100644 --- a/front/export.php +++ b/front/export.php @@ -28,21 +28,21 @@ * ------------------------------------------------------------------------- */ -$USEDBREPLICATE = 1; -$DBCONNECTION_REQUIRED = 0; // Not really a big SQL request +$USEDBREPLICATE = 1; +$DBCONNECTION_REQUIRED = 0; // Not really a big SQL request -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); Session::checkLoginUser(); -header("Content-Type: text/html; charset=UTF-8"); +header('Content-Type: text/html; charset=UTF-8'); Html::header_nocache(); //if (PluginMreportingPreference::atLeastOneTemplateExists()) { // $template = PluginMreportingPreference::checkPreferenceTemplateValue(Session::getLoginUserID()); // if ($template) { - $common = new PluginMreportingCommon(); - $common->export($_REQUEST); +$common = new PluginMreportingCommon(); +$common->export($_REQUEST); // } else { // Session::addMessageAfterRedirect(__("Please, select a model in your preferences", 'mreporting'), false, ERROR); // Html::redirect("../../../front/preference.php"); diff --git a/front/export_svg.php b/front/export_svg.php index 37b3cdf3..9379da0a 100644 --- a/front/export_svg.php +++ b/front/export_svg.php @@ -28,14 +28,14 @@ * ------------------------------------------------------------------------- */ -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); -header("Expires: Mon, 26 Nov 1962 00:00:00 GMT"); +header('Expires: Mon, 26 Nov 1962 00:00:00 GMT'); header('Pragma: private'); /// IE BUG + SSL header('Cache-control: private, must-revalidate'); /// IE BUG + SSL -header("Content-disposition: attachment; filename=export.svg"); -header("Content-type: image/svg+xml"); +header('Content-disposition: attachment; filename=export.svg'); +header('Content-type: image/svg+xml'); $svg_content = str_replace('&', '&', Toolbox::stripslashes_deep(html_entity_decode($_REQUEST['svg_content']))); -echo str_replace("showGraph($_REQUEST); diff --git a/front/popup.php b/front/popup.php index f530348f..f50d63c6 100644 --- a/front/popup.php +++ b/front/popup.php @@ -28,21 +28,21 @@ * ------------------------------------------------------------------------- */ -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); Session::checkLoginUser(); -if (isset($_GET["classname"])) { - $_POST["classname"] = $_GET["classname"]; +if (isset($_GET['classname'])) { + $_POST['classname'] = $_GET['classname']; } -Html::popHeader(__("General Report - ODT", 'mreporting'), $_SERVER['PHP_SELF']); +Html::popHeader(__('General Report - ODT', 'mreporting'), $_SERVER['PHP_SELF']); $common = new PluginMreportingCommon(); $common->showExportForm($_POST); echo "
"; -echo "
"; -echo "" . __("Back") . ""; -echo "
"; +echo '
'; +echo "" . __('Back') . ''; +echo ''; Html::popFooter(); diff --git a/front/preference.form.php b/front/preference.form.php index b15f8885..d5f8fabb 100644 --- a/front/preference.form.php +++ b/front/preference.form.php @@ -28,23 +28,23 @@ * ------------------------------------------------------------------------- */ -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); Session::checkLoginUser(); -if (!isset($_GET["id"])) { - $_GET["id"] = ""; +if (!isset($_GET['id'])) { + $_GET['id'] = ''; } $pref = new PluginMreportingPreference(); -if (isset($_POST["update"])) { +if (isset($_POST['update'])) { $pref->update($_POST); Html::back(); } else { - Html::header(__("More Reporting", 'mreporting'), '', 'tools', 'PluginMreportingCommon', 'viewreports'); + Html::header(__('More Reporting', 'mreporting'), '', 'tools', 'PluginMreportingCommon', 'viewreports'); - $pref->showForm($_GET["id"]); + $pref->showForm($_GET['id']); Html::footer(); } diff --git a/front/profile.form.php b/front/profile.form.php index 18f433bb..65232f4e 100644 --- a/front/profile.form.php +++ b/front/profile.form.php @@ -28,12 +28,12 @@ * ------------------------------------------------------------------------- */ -include("../../../inc/includes.php"); +include('../../../inc/includes.php'); -Session::checkRight("profile", READ); +Session::checkRight('profile', READ); $config = new PluginMreportingConfig(); -$res = $config->find(); +$res = $config->find(); $profil = new PluginMreportingProfile(); //Save profile @@ -46,13 +46,13 @@ [ 'profiles_id' => $_REQUEST['profile_id'], 'reports' => $report['id'], - ] + ], ); $profil->fields['right'] = $access; $profil->update($profil->fields); } } -} else if (isset($_REQUEST['add'])) { +} elseif (isset($_REQUEST['add'])) { $query = "SELECT `id`, `name` FROM `glpi_profiles` WHERE `interface` = 'central' ORDER BY `name`"; @@ -64,59 +64,59 @@ [ 'profiles_id' => $profile['id'], 'reports' => $_REQUEST['report_id'], - ] + ], ); $profil->fields['right'] = $access; $profil->update($profil->fields); } -} else if (isset($_REQUEST['giveReadAccessForAllReport'])) { +} elseif (isset($_REQUEST['giveReadAccessForAllReport'])) { foreach ($res as $report) { $profil->getFromDBByCrit( [ 'profiles_id' => $_REQUEST['profile_id'], 'reports' => $report['id'], - ] + ], ); $profil->fields['right'] = READ; $profil->update($profil->fields); } -} else if (isset($_REQUEST['giveNoneAccessForAllReport'])) { +} elseif (isset($_REQUEST['giveNoneAccessForAllReport'])) { foreach ($res as $report) { $profil->getFromDBByCrit( [ 'profiles_id' => $_REQUEST['profile_id'], 'reports' => $report['id'], - ] + ], ); $profil->fields['right'] = 'NULL'; $profil->update($profil->fields); } -} else if (isset($_REQUEST['giveNoneAccessForAllProfile'])) { - $query = "SELECT `id`, `name` +} elseif (isset($_REQUEST['giveNoneAccessForAllProfile'])) { + $query = 'SELECT `id`, `name` FROM `glpi_profiles` - ORDER BY `name`"; + ORDER BY `name`'; foreach ($DB->request($query) as $profile) { $profil->getFromDBByCrit( [ 'profiles_id' => $profile['id'], 'reports' => $_REQUEST['report_id'], - ] + ], ); $profil->fields['right'] = 'NULL'; $profil->update($profil->fields); } -} else if (isset($_REQUEST['giveReadAccessForAllProfile'])) { - $query = "SELECT `id`, `name` +} elseif (isset($_REQUEST['giveReadAccessForAllProfile'])) { + $query = 'SELECT `id`, `name` FROM `glpi_profiles` - ORDER BY `name`"; + ORDER BY `name`'; foreach ($DB->request($query) as $profile) { $profil->getFromDBByCrit( [ 'profiles_id' => $profile['id'], 'reports' => $_REQUEST['report_id'], - ] + ], ); $profil->fields['right'] = READ; $profil->update($profil->fields); diff --git a/hook.php b/hook.php index 9b43c789..244d101f 100644 --- a/hook.php +++ b/hook.php @@ -40,14 +40,14 @@ function plugin_mreporting_install() $version = plugin_version_mreporting(); $migration = new Migration($version['version']); - include_once(Plugin::getPhpDir('mreporting') . "/inc/profile.class.php"); + include_once(Plugin::getPhpDir('mreporting') . '/inc/profile.class.php'); - $default_charset = DBConnection::getDefaultCharset(); + $default_charset = DBConnection::getDefaultCharset(); $default_collation = DBConnection::getDefaultCollation(); - $default_key_sign = DBConnection::getDefaultPrimaryKeySignOption(); + $default_key_sign = DBConnection::getDefaultPrimaryKeySignOption(); - //create profiles table - $queries = []; + //create profiles table + $queries = []; $queries[] = "CREATE TABLE IF NOT EXISTS `glpi_plugin_mreporting_profiles` ( `id` INT {$default_key_sign} NOT NULL AUTO_INCREMENT, `profiles_id` VARCHAR(45) NOT NULL, @@ -94,7 +94,7 @@ function plugin_mreporting_install() KEY `users_id` (`users_id`) ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; - // add display preferences + // add display preferences $query_display_pref = "SELECT id FROM glpi_displaypreferences WHERE itemtype = 'PluginMreportingConfig'"; @@ -133,25 +133,25 @@ function plugin_mreporting_install() $DB->query($query); } - // == Update to 2.1 == + // == Update to 2.1 == $migration->addField( 'glpi_plugin_mreporting_configs', 'is_notified', 'tinyint NOT NULL default "1"', - ['after' => 'is_active'] + ['after' => 'is_active'], ); $migration->migrationOneTable('glpi_plugin_mreporting_configs'); - // == Update to 2.3 == + // == Update to 2.3 == if ( !$DB->fieldExists('glpi_plugin_mreporting_profiles', 'right') && $DB->fieldExists('glpi_plugin_mreporting_profiles', 'reports') ) { - //save all profile with right READ + //save all profile with right READ $right = PluginMreportingProfile::getRight(); - //truncate profile table - $query = "TRUNCATE TABLE `glpi_plugin_mreporting_profiles`"; + //truncate profile table + $query = 'TRUNCATE TABLE `glpi_plugin_mreporting_profiles`'; $DB->query($query); //migration of field @@ -160,54 +160,54 @@ function plugin_mreporting_install() 'glpi_plugin_mreporting_profiles', 'reports', 'reports', - 'integer' + 'integer', ); $migration->changeField( 'glpi_plugin_mreporting_profiles', 'profiles_id', 'profiles_id', - "int {$default_key_sign} NOT NULL default 0" + "int {$default_key_sign} NOT NULL default 0", ); $migration->dropField('glpi_plugin_mreporting_profiles', 'config'); $migration->migrationOneTable('glpi_plugin_mreporting_profiles'); } - // == UPDATE to 0.84+1.0 == - $query = "UPDATE `glpi_plugin_mreporting_profiles` pr SET pr.right = " . READ . " WHERE pr.right = 'r'"; + // == UPDATE to 0.84+1.0 == + $query = 'UPDATE `glpi_plugin_mreporting_profiles` pr SET pr.right = ' . READ . " WHERE pr.right = 'r'"; $DB->query($query); if (!isIndex('glpi_plugin_mreporting_profiles', 'profiles_id_reports')) { - $query = "ALTER TABLE glpi_plugin_mreporting_profiles - ADD UNIQUE INDEX `profiles_id_reports` (`profiles_id`, `reports`)"; + $query = 'ALTER TABLE glpi_plugin_mreporting_profiles + ADD UNIQUE INDEX `profiles_id_reports` (`profiles_id`, `reports`)'; $DB->query($query); } - // Remove GLPI graphtype to fix compatibility with GLPI 9.2.2+ + // Remove GLPI graphtype to fix compatibility with GLPI 9.2.2+ $query = "UPDATE `glpi_plugin_mreporting_configs` SET `graphtype` = 'SVG' WHERE `graphtype` = 'GLPI'"; $DB->query($query); - //== Create directories - $rep_files_mreporting = GLPI_PLUGIN_DOC_DIR . "/mreporting"; + //== Create directories + $rep_files_mreporting = GLPI_PLUGIN_DOC_DIR . '/mreporting'; if (!is_dir($rep_files_mreporting)) { mkdir($rep_files_mreporting); } - $notifications_folder = GLPI_PLUGIN_DOC_DIR . "/mreporting/notifications"; + $notifications_folder = GLPI_PLUGIN_DOC_DIR . '/mreporting/notifications'; if (!is_dir($notifications_folder)) { mkdir($notifications_folder); } - // == Install notifications - require_once "inc/notification.class.php"; + // == Install notifications + require_once 'inc/notification.class.php'; PluginMreportingNotification::install($migration); CronTask::Register('PluginMreportingNotification', 'SendNotifications', MONTH_TIMESTAMP); - $migration->addField("glpi_plugin_mreporting_preferences", "selectors", "text"); + $migration->addField('glpi_plugin_mreporting_preferences', 'selectors', 'text'); $migration->migrationOneTable('glpi_plugin_mreporting_preferences'); - // == Init available reports - require_once "inc/baseclass.class.php"; - require_once "inc/common.class.php"; - require_once "inc/config.class.php"; + // == Init available reports + require_once 'inc/baseclass.class.php'; + require_once 'inc/common.class.php'; + require_once 'inc/config.class.php'; $config = new PluginMreportingConfig(); $config->createFirstConfig(); @@ -226,29 +226,29 @@ function plugin_mreporting_uninstall() { global $DB; - $migration = new Migration("2.3.0"); - $tables = ["glpi_plugin_mreporting_profiles", - "glpi_plugin_mreporting_configs", - "glpi_plugin_mreporting_preferences", - "glpi_plugin_mreporting_notifications", - "glpi_plugin_mreporting_dashboards" + $migration = new Migration('2.3.0'); + $tables = ['glpi_plugin_mreporting_profiles', + 'glpi_plugin_mreporting_configs', + 'glpi_plugin_mreporting_preferences', + 'glpi_plugin_mreporting_notifications', + 'glpi_plugin_mreporting_dashboards', ]; foreach ($tables as $table) { $migration->dropTable($table); } - Toolbox::deleteDir(GLPI_PLUGIN_DOC_DIR . "/mreporting/notifications"); - Toolbox::deleteDir(GLPI_PLUGIN_DOC_DIR . "/mreporting"); + Toolbox::deleteDir(GLPI_PLUGIN_DOC_DIR . '/mreporting/notifications'); + Toolbox::deleteDir(GLPI_PLUGIN_DOC_DIR . '/mreporting'); - $objects = ["DisplayPreference", "SavedSearch"]; + $objects = ['DisplayPreference', 'SavedSearch']; foreach ($objects as $object) { $obj = new $object(); $obj->deleteByCriteria(['itemtype' => 'PluginMreportingConfig']); } - require_once "inc/notification.class.php"; + require_once 'inc/notification.class.php'; PluginMreportingNotification::uninstall(); return true; @@ -257,10 +257,9 @@ function plugin_mreporting_uninstall() // Define dropdown relations function plugin_mreporting_getDatabaseRelations() { - $plugin = new Plugin(); - if ($plugin->isActivated("mreporting")) { - return ["glpi_profiles" => ["glpi_plugin_mreporting_profiles" => "profiles_id"]]; + if ($plugin->isActivated('mreporting')) { + return ['glpi_profiles' => ['glpi_plugin_mreporting_profiles' => 'profiles_id']]; } else { return []; } @@ -270,9 +269,9 @@ function plugin_mreporting_giveItem($type, $ID, $data, $num) { global $LANG; - $searchopt=&Search::getOptions($type); - $table = $searchopt[$ID]["table"]; - $field = $searchopt[$ID]["field"]; + $searchopt = &Search::getOptions($type); + $table = $searchopt[$ID]['table']; + $field = $searchopt[$ID]['field']; $output_type = Search::HTML_OUTPUT; if (isset($_GET['display_type'])) { @@ -282,34 +281,35 @@ function plugin_mreporting_giveItem($type, $ID, $data, $num) switch ($type) { case 'PluginMreportingConfig': switch ($table . '.' . $field) { - case "glpi_plugin_mreporting_configs.show_label": + case 'glpi_plugin_mreporting_configs.show_label': $out = ' '; if (!empty($data['raw']["ITEM_$num"])) { $out = PluginMreportingConfig::getLabelTypeName($data['raw']["ITEM_$num"]); } + return $out; - break; - case "glpi_plugin_mreporting_configs.name": + break; + case 'glpi_plugin_mreporting_configs.name': $out = ' '; if (!empty($data['raw']["ITEM_$num"])) { - $title_func = ''; + $title_func = ''; $short_classname = ''; - $f_name = ''; + $f_name = ''; - $inc_dir = Plugin::getPhpDir('mreporting') . "/inc"; - //parse inc dir to search report classes + $inc_dir = Plugin::getPhpDir('mreporting') . '/inc'; + //parse inc dir to search report classes $classes = PluginMreportingCommon::parseAllClasses($inc_dir); foreach ($classes as $classname) { if (!class_exists($classname)) { continue; } - $functions = get_class_methods($classname); + $functions = get_class_methods($classname); foreach ($functions as $funct_name) { $ex_func = preg_split('/(?<=\\w)(?=[A-Z])/', $funct_name); if ($ex_func[0] != 'report') { - continue; + continue; } $gtype = strtolower($ex_func[1]); @@ -324,59 +324,65 @@ function plugin_mreporting_giveItem($type, $ID, $data, $num) } } } - $out = "" . - $data['raw']["ITEM_$num"] . " (" . $title_func . ")"; + $out = "" . + $data['raw']["ITEM_$num"] . ' (' . $title_func . ')'; } + return $out; - break; + break; } - return ""; - break; + + return ''; + break; } - return ""; + + return ''; } function plugin_mreporting_MassiveActionsFieldsDisplay($options = []) { - - $table = $options['options']['table']; - $field = $options['options']['field']; + $table = $options['options']['table']; + $field = $options['options']['field']; $linkfield = $options['options']['linkfield']; if ($table == getTableForItemType($options['itemtype'])) { - // Table fields - switch ($table . "." . $field) { - case "glpi_plugin_mreporting_configs.show_label": + // Table fields + switch ($table . '.' . $field) { + case 'glpi_plugin_mreporting_configs.show_label': PluginMreportingConfig::dropdownLabel('show_label'); + return true; - break; + break; - case "glpi_plugin_mreporting_configs.graphtype": + case 'glpi_plugin_mreporting_configs.graphtype': Dropdown::showFromArray( - "graphtype", - ['PNG' => 'PNG', 'SVG' => 'SVG'] + 'graphtype', + ['PNG' => 'PNG', 'SVG' => 'SVG'], ); + return true; - break; + break; } } - // Need to return false on non display item + + // Need to return false on non display item return false; } function plugin_mreporting_searchOptionsValues($options = []) { - $table = $options['searchoption']['table']; $field = $options['searchoption']['field']; - switch ($table . "." . $field) { - case "glpi_plugin_mreporting_configs.graphtype": + switch ($table . '.' . $field) { + case 'glpi_plugin_mreporting_configs.graphtype': Dropdown::showFromArray( - "graphtype", - ['PNG' => 'PNG', 'SVG' => 'SVG'] + 'graphtype', + ['PNG' => 'PNG', 'SVG' => 'SVG'], ); + return true; } + return false; } diff --git a/inc/baseclass.class.php b/inc/baseclass.class.php index 1f892a53..a464743e 100644 --- a/inc/baseclass.class.php +++ b/inc/baseclass.class.php @@ -43,7 +43,7 @@ public function __construct($config = []) { global $DB, $LANG; - //force MySQL DATE_FORMAT in user locale + //force MySQL DATE_FORMAT in user locale $query = "SET lc_time_names = '" . $_SESSION['glpilanguage'] . "'"; $DB->query($query); @@ -53,45 +53,45 @@ public function __construct($config = []) $this->filters = [ 'open' => [ - 'label' => $LANG['plugin_mreporting']['Helpdeskplus']['opened'], + 'label' => $LANG['plugin_mreporting']['Helpdeskplus']['opened'], 'status' => [ CommonITILObject::INCOMING => _x('status', 'New'), CommonITILObject::ASSIGNED => _x('status', 'Processing (assigned)'), CommonITILObject::PLANNED => _x('status', 'Processing (planned)'), - CommonITILObject::WAITING => __('Pending') - ] + CommonITILObject::WAITING => __('Pending'), + ], ], 'close' => [ - 'label' => _x('status', 'Closed'), + 'label' => _x('status', 'Closed'), 'status' => [ CommonITILObject::SOLVED => _x('status', 'Solved'), - CommonITILObject::CLOSED => _x('status', 'Closed') - ] - ] + CommonITILObject::CLOSED => _x('status', 'Closed'), + ], + ], ]; $this->status = [CommonITILObject::INCOMING, CommonITILObject::ASSIGNED, CommonITILObject::PLANNED, CommonITILObject::WAITING, CommonITILObject::SOLVED, - CommonITILObject::CLOSED + CommonITILObject::CLOSED, ]; if (isset($_SESSION['glpiactiveentities'])) { - $this->where_entities = "'" . implode("', '", $_SESSION['glpiactiveentities']) . "'"; + $this->where_entities = "'" . implode("', '", $_SESSION['glpiactiveentities']) . "'"; $this->where_entities_array = $_SESSION['glpiactiveentities']; } else { // maybe cron mode - $entities = []; - $entity = new Entity(); + $entities = []; + $entity = new Entity(); $found_entities = $entity->find(); foreach ($found_entities as $entities_id => $current_entity) { $entities[] = $entities_id; } - $this->where_entities = "'" . implode("', '", $entities) . "'"; + $this->where_entities = "'" . implode("', '", $entities) . "'"; $this->where_entities_array = $entities; } - // init default value for status selector + // init default value for status selector if (!isset($_SESSION['mreporting_values']['status_1'])) { $_SESSION['mreporting_values']['status_1'] = $_SESSION['mreporting_values']['status_2'] @@ -110,61 +110,61 @@ public function __construct($config = []) ) { switch ($_SESSION['mreporting_values']['period']) { case 'day': - $this->period_sort = '%y%m%d'; + $this->period_sort = '%y%m%d'; $this->period_sort_php = 'ymd'; $this->period_datetime = '%Y-%m-%d 23:59:59'; - $this->period_label = '%d %b'; + $this->period_label = '%d %b'; $this->period_interval = 'DAY'; - $this->sql_list_date = "DISTINCT DATE_FORMAT(`date` , '{$this->period_datetime}') as period_l"; + $this->sql_list_date = "DISTINCT DATE_FORMAT(`date` , '{$this->period_datetime}') as period_l"; break; case 'week': - $this->period_sort = '%x%v'; + $this->period_sort = '%x%v'; $this->period_sort_php = 'oW'; - $this->period_datetime = "%Y-%m-%d 23:59:59"; - $this->period_label = 'S%v %x'; + $this->period_datetime = '%Y-%m-%d 23:59:59'; + $this->period_label = 'S%v %x'; $this->period_interval = 'WEEK'; - $this->sql_list_date = "DISTINCT DATE_FORMAT(`date` - INTERVAL (WEEKDAY(`date`)) DAY, '{$this->period_datetime}') as period_l"; + $this->sql_list_date = "DISTINCT DATE_FORMAT(`date` - INTERVAL (WEEKDAY(`date`)) DAY, '{$this->period_datetime}') as period_l"; break; case 'month': - $this->period_sort = '%y%m'; + $this->period_sort = '%y%m'; $this->period_sort_php = 'ym'; $this->period_datetime = '%Y-%m-01 23:59:59'; - $this->period_label = '%b %Y'; + $this->period_label = '%b %Y'; $this->period_interval = 'MONTH'; - $this->sql_list_date = "DISTINCT CONCAT(LAST_DAY(DATE_FORMAT(`date` , '{$this->period_datetime}')), ' 23:59:59') as period_l"; + $this->sql_list_date = "DISTINCT CONCAT(LAST_DAY(DATE_FORMAT(`date` , '{$this->period_datetime}')), ' 23:59:59') as period_l"; break; case 'year': - $this->period_sort = '%Y'; + $this->period_sort = '%Y'; $this->period_sort_php = 'Y'; $this->period_datetime = '%Y-12-31 23:59:59'; - $this->period_label = '%Y'; + $this->period_label = '%Y'; $this->period_interval = 'YEAR'; - $this->sql_list_date = "DISTINCT DATE_FORMAT(`date` , '{$this->period_datetime}') as period_l"; + $this->sql_list_date = "DISTINCT DATE_FORMAT(`date` , '{$this->period_datetime}') as period_l"; break; default: - $this->period_sort = '%y%u'; + $this->period_sort = '%y%u'; $this->period_label = 'S-%u %y'; break; } } else { - $this->period_sort = '%y%m'; + $this->period_sort = '%y%m'; $this->period_label = '%b %Y'; } $this->sql_date_create = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); - $this->sql_date_solve = PluginMreportingCommon::getSQLDate( - "glpi_tickets.solvedate", + $this->sql_date_solve = PluginMreportingCommon::getSQLDate( + 'glpi_tickets.solvedate', $config['delay'], - $config['randname'] + $config['randname'], ); $this->sql_date_closed = PluginMreportingCommon::getSQLDate( - "glpi_tickets.closedate", + 'glpi_tickets.closedate', $config['delay'], - $config['randname'] + $config['randname'], ); } } diff --git a/inc/common.class.php b/inc/common.class.php index c8bccc45..0342ffeb 100644 --- a/inc/common.class.php +++ b/inc/common.class.php @@ -34,22 +34,22 @@ class PluginMreportingCommon extends CommonDBTM { public static $rightname = 'statistic'; - const MNBSP = "        + public const MNBSP = '                                        -        "; - - /** - * Returns the type name with consideration of plural - * - * @param number $nb Number of item(s) - * @return string Itemtype name - */ +        '; + + /** + * Returns the type name with consideration of plural + * + * @param number $nb Number of item(s) + * @return string Itemtype name + */ public static function getTypeName($nb = 0) { - return __("More Reporting", 'mreporting'); + return __('More Reporting', 'mreporting'); } public static function canCreate() @@ -62,12 +62,12 @@ public static function getMenuContent() global $CFG_GLPI; $web_full_dir = Plugin::getWebDir('mreporting'); - $img_db = "" . __("Dashboard", "; - $img_ct = "" . __("Reports list", "; + $img_db = "" . __("; + $img_ct = "" . __("; $web_rel_dir = Plugin::getWebDir('mreporting', false); $url_central = "/$web_rel_dir/front/central.php"; @@ -75,52 +75,51 @@ public static function getMenuContent() $menu = parent::getMenuContent(); - $menu['page'] = PluginMreportingDashboard::currentUserHaveDashboard() ? $url_dashboard : $url_central; - $menu['icon'] = self::getIcon(); + $menu['page'] = PluginMreportingDashboard::currentUserHaveDashboard() ? $url_dashboard : $url_central; + $menu['icon'] = self::getIcon(); $menu['title'] = self::getTypeName(Session::getPluralNumber()); - $menu['options']['dashboard']['page'] = $url_dashboard; - $menu['options']['dashboard']['title'] = __("Dashboard", 'mreporting'); - $menu['options']['dashboard']['links'][$img_db] = $url_dashboard; - $menu['options']['dashboard']['links'][$img_ct] = $url_central; + $menu['options']['dashboard']['page'] = $url_dashboard; + $menu['options']['dashboard']['title'] = __('Dashboard', 'mreporting'); + $menu['options']['dashboard']['links'][$img_db] = $url_dashboard; + $menu['options']['dashboard']['links'][$img_ct] = $url_central; if (PluginMreportingConfig::canCreate()) { $menu['options']['dashboard']['links']['config'] = PluginMreportingConfig::getSearchURL(false); } - $menu['options']['dashboard_list'] = $menu['options']['dashboard']; - $menu['options']['dashboard_list']['page'] = $url_central; - $menu['options']['dashboard_list']['title'] = __("Reports list", 'mreporting'); + $menu['options']['dashboard_list'] = $menu['options']['dashboard']; + $menu['options']['dashboard_list']['page'] = $url_central; + $menu['options']['dashboard_list']['title'] = __('Reports list', 'mreporting'); - $menu['options']['config']['title'] = PluginMreportingConfig::getTypeName(2); - $menu['options']['config']['page'] = PluginMreportingConfig::getSearchURL(false); - $menu['options']['config']['links'] = $menu['options']['dashboard']['links']; - $menu['options']['config']['links']['search'] = PluginMreportingConfig::getSearchURL(false); + $menu['options']['config']['title'] = PluginMreportingConfig::getTypeName(2); + $menu['options']['config']['page'] = PluginMreportingConfig::getSearchURL(false); + $menu['options']['config']['links'] = $menu['options']['dashboard']['links']; + $menu['options']['config']['links']['search'] = PluginMreportingConfig::getSearchURL(false); if (PluginMreportingConfig::canCreate()) { - $menu['options']['config']['links']['add'] = PluginMreportingConfig::getFormURL(false); + $menu['options']['config']['links']['add'] = PluginMreportingConfig::getFormURL(false); } return $menu; } - /** - * Parsing all classes - * Search all class into inc folder - */ + /** + * Parsing all classes + * Search all class into inc folder + */ public static function parseAllClasses($inc_dir) { - $classes = []; $matches = []; if ($handle = opendir($inc_dir)) { while (false !== ($entry = readdir($handle))) { - if ($entry != "." && $entry != "..") { - $fcontent = file_get_contents($inc_dir . "/" . $entry); + if ($entry != '.' && $entry != '..') { + $fcontent = file_get_contents($inc_dir . '/' . $entry); if ( preg_match( "/class\s(.+)Extends PluginMreporting.*Baseclass/i", $fcontent, - $matches + $matches, ) ) { $classes[] = trim($matches[1]); @@ -132,42 +131,41 @@ public static function parseAllClasses($inc_dir) return $classes; } - /** - * Get all reports from parsing class - * - * @params - */ - + /** + * Get all reports from parsing class + * + * @params + */ public function getAllReports($with_url = true, $params = []) { global $LANG; $reports = []; - $inc_dir = Plugin::getPhpDir('mreporting') . "/inc"; - $pics_dir = "../pics"; + $inc_dir = Plugin::getPhpDir('mreporting') . '/inc'; + $pics_dir = '../pics'; if ( isset($params['classname']) && !empty($params['classname']) ) { - $classes = []; + $classes = []; $classes[] = $params['classname']; } else { - //parse inc dir to search report classes + //parse inc dir to search report classes $classes = self::parseAllClasses($inc_dir); sort($classes); } - //construct array to list classes and functions + //construct array to list classes and functions foreach ($classes as $classname) { $i = 0; if (!class_exists($classname)) { continue; } - //scn = short class name + //scn = short class name $scn = str_replace('PluginMreporting', '', $classname); if (isset($LANG['plugin_mreporting'][$scn]['title'])) { $title = $LANG['plugin_mreporting'][$scn]['title']; @@ -181,8 +179,8 @@ public function getAllReports($with_url = true, $params = []) } if (isset($LANG['plugin_mreporting'][$scn][$f_name])) { - $gtype = strtolower($ex_func[1]); - $title_func = $LANG['plugin_mreporting'][$scn][$f_name]['title']; + $gtype = strtolower($ex_func[1]); + $title_func = $LANG['plugin_mreporting'][$scn][$f_name]['title']; $category_func = ''; if (isset($LANG['plugin_mreporting'][$scn][$f_name]['category'])) { $category_func = $LANG['plugin_mreporting'][$scn][$f_name]['category']; @@ -191,38 +189,37 @@ public function getAllReports($with_url = true, $params = []) if (isset($LANG['plugin_mreporting'][$scn][$f_name]['desc'])) { $des_func = $LANG['plugin_mreporting'][$scn][$f_name]['desc']; } else { - $des_func = ""; + $des_func = ''; } - $url_graph = "graph.php?short_classname=$scn" . + $url_graph = "graph.php?short_classname=$scn" . "&f_name=$f_name&gtype=$gtype"; - $min_url_graph = "front/graph.php?short_classname=$scn" . + $min_url_graph = "front/graph.php?short_classname=$scn" . "&f_name=$f_name&gtype=$gtype"; - $reports[$classname]['title'] = $title; - $reports[$classname]['functions'][$i]['function'] = $f_name; - $reports[$classname]['functions'][$i]['title'] = $title_func; - $reports[$classname]['functions'][$i]['desc'] = $des_func; - $reports[$classname]['functions'][$i]['category_func'] = $category_func; - $reports[$classname]['functions'][$i]['pic'] = $pics_dir . "/chart-$gtype.png"; - $reports[$classname]['functions'][$i]['gtype'] = $gtype; + $reports[$classname]['title'] = $title; + $reports[$classname]['functions'][$i]['function'] = $f_name; + $reports[$classname]['functions'][$i]['title'] = $title_func; + $reports[$classname]['functions'][$i]['desc'] = $des_func; + $reports[$classname]['functions'][$i]['category_func'] = $category_func; + $reports[$classname]['functions'][$i]['pic'] = $pics_dir . "/chart-$gtype.png"; + $reports[$classname]['functions'][$i]['gtype'] = $gtype; $reports[$classname]['functions'][$i]['short_classname'] = $scn; - $reports[$classname]['functions'][$i]['is_active'] = false; + $reports[$classname]['functions'][$i]['is_active'] = false; $config = new PluginMreportingConfig(); if ($config->getFromDBByFunctionAndClassname($f_name, $classname)) { if ($config->fields['is_active'] == 1) { $reports[$classname]['functions'][$i]['is_active'] = true; - $reports[$classname]['functions'][$i]['id'] = $config->fields['id']; + $reports[$classname]['functions'][$i]['id'] = $config->fields['id']; } $reports[$classname]['functions'][$i]['right'] = READ; if (isset($_SESSION['glpiactiveprofile'])) { - $reports[$classname]['functions'][$i]['right'] = - PluginMreportingProfile::canViewReports($_SESSION['glpiactiveprofile']['id'], $config->fields['id']); + $reports[$classname]['functions'][$i]['right'] = PluginMreportingProfile::canViewReports($_SESSION['glpiactiveprofile']['id'], $config->fields['id']); } } if ($with_url) { - $reports[$classname]['functions'][$i]['url_graph'] = $url_graph; + $reports[$classname]['functions'][$i]['url_graph'] = $url_graph; $reports[$classname]['functions'][$i]['min_url_graph'] = $min_url_graph; } @@ -235,36 +232,35 @@ public function getAllReports($with_url = true, $params = []) return $reports; } - /** - * Show list of activated reports - * - * @param array $opt : short_classname,f_name,gtype,rand - */ + /** + * Show list of activated reports + * + * @param array $opt : short_classname,f_name,gtype,rand + */ public static function title($opt) { echo ""; - echo ""; + echo ''; echo ""; - echo ""; - echo "
" . __("Select statistics to be displayed") . " :
' . __('Select statistics to be displayed') . ' :
"; echo self::getSelectAllReports(true); - echo "
"; + echo ''; + echo ''; + echo ''; } public static function getSelectAllReports($onchange = false, $setIdInOptionsValues = false) { - - $common = new self(); + $common = new self(); $reports = $common->getAllReports(true); if (empty($reports)) { - return ""; + return ''; } - $js_onchange = $onchange ? " onchange='window.location.href=this.options[this.selectedIndex].value'" : ""; + $js_onchange = $onchange ? " onchange='window.location.href=this.options[this.selectedIndex].value'" : ''; - $select = ""; + $select .= "'; foreach ($reports as $classname => $report) { $graphs = []; @@ -287,7 +283,7 @@ public static function getSelectAllReports($onchange = false, $setIdInOptionsVal } if (count($graphs) > 0) { - $select .= ""; + $select .= ''; foreach ($graphs as $cat => $graph) { if (count($graph) > 0) { $select .= ""; @@ -297,62 +293,62 @@ public static function getSelectAllReports($onchange = false, $setIdInOptionsVal function ($a, $b) { $a_title = $a['title']; $b_title = $b['title']; + return strcmp($a_title, $b_title); - } + }, ); foreach ($graph as $key => $value) { if ($value['right']) { if ($value['is_active']) { - $comment = ""; - if (isset($value["desc"])) { - $comment = $value["desc"]; + $comment = ''; + if (isset($value['desc'])) { + $comment = $value['desc']; } - $option_value = $value["url_graph"]; + $option_value = $value['url_graph']; if ($setIdInOptionsValues) { $option_value = $value['id']; } - $icon = self::getReportIcon($value['function']); - $select .= ""; + '">   ' . $icon . ' ' . + $value['title'] . ''; } } } - $select .= ""; + $select .= ''; } } - $select .= ""; + $select .= ''; } } - $select .= ""; + $select .= ''; return $select; } - /** - * parse All class for list active reports - * and display list - */ - + /** + * parse All class for list active reports + * and display list + */ public function showCentral($params) { - $reports = $this->getAllReports(true, $params); if ($reports === false) { - echo "
" . __("No report is available !", 'mreporting') . "
"; + echo "
" . __('No report is available !', 'mreporting') . '
'; + return false; } echo ""; foreach ($reports as $classname => $report) { - $i = 0; + $i = 0; $nb_per_line = 2; - $graphs = []; + $graphs = []; foreach ($report['functions'] as $function) { if ($function['is_active']) { $graphs[$classname][$function['category_func']][] = $function; @@ -363,22 +359,22 @@ public function showCentral($params) if (isset($graphs[$classname])) { foreach ($graphs[$classname] as $cat => $graph) { if (self::haveSomeThingToShow($graph)) { - echo ""; + echo "'; foreach ($graph as $k => $v) { if ($v['right'] && $v['is_active']) { if ($i % $nb_per_line == 0) { if ($i != 0) { - echo ""; + echo ''; } echo ""; } - echo ""; + echo ''; + echo''; $i++; } @@ -389,13 +385,13 @@ public function showCentral($params) } while ($i % $nb_per_line != 0) { - echo ""; + echo ''; $i++; } } } } - echo ""; + echo ''; echo ""; echo ""; - echo ""; + echo ''; + echo ''; } - echo "
" . $cat . "
" . $cat . '
"; + echo ''; echo ""; echo " "; echo $v['title']; - echo ""; - echo"  
"; @@ -404,19 +400,19 @@ public function showCentral($params) $height = 200 + 30 * $count; echo "
"; - echo __("Export") . " : "; + echo __('Export') . ' : '; echo ""; - echo "ODT"; - echo "
"; + echo 'ODT'; + echo ''; } else { - echo __("No report is available !", 'mreporting'); + echo __('No report is available !', 'mreporting'); } - echo "
"; + echo ''; } public static function haveSomeThingToShow($graph) @@ -426,17 +422,17 @@ public static function haveSomeThingToShow($graph) return true; } } + return false; } - /** - * show Export Form from popup.php - * for odt export - */ - + /** + * show Export Form from popup.php + * for odt export + */ public function showExportForm($opt) { - $classname = $opt["classname"]; + $classname = $opt['classname']; if ($classname) { echo "
"; @@ -448,11 +444,11 @@ public function showExportForm($opt) $reports = $this->getAllReports(false, $opt); foreach ($reports as $class => $report) { - $i = 0; + $i = 0; $nb_per_line = 2; - $graphs = []; + $graphs = []; foreach ($report['functions'] as $function) { - if ($function['gtype'] === "sunburst") { + if ($function['gtype'] === 'sunburst') { continue; } if ($function['is_active']) { @@ -461,88 +457,88 @@ public function showExportForm($opt) } foreach ($graphs[$classname] as $cat => $graph) { - echo "" . $cat . ""; + echo "" . $cat . ''; foreach ($graph as $k => $v) { if ($v['is_active']) { if ($i % $nb_per_line == 0) { if ($i != 0) { - echo ""; + echo ''; } echo ""; } - echo ""; - echo "'; + echo ""; - echo ""; - echo ""; + echo '>'; + echo ''; + echo ''; echo " "; echo $v['title']; - echo ""; + echo ''; $i++; } } while ($i % $nb_per_line != 0) { echo " "; - echo " "; + echo ' '; $i++; } } - echo ""; + echo ''; } echo ""; echo ""; echo "
"; - echo ""; + echo '
'; echo ""; - echo ""; - echo "'; + echo '"; - echo ""; - echo "'; + echo ''; + echo '"; - echo ""; - echo "
" . __("Begin date") . ""; - $date1 = date("Y-m-d", time() - (30 * 24 * 60 * 60)); - Html::showDateField("date1", ['value' => $date1, - 'maybeempty' => true + echo '' . __('Begin date') . ''; + $date1 = date('Y-m-d', time() - (30 * 24 * 60 * 60)); + Html::showDateField('date1', ['value' => $date1, + 'maybeempty' => true, ]); - echo "" . __("End date") . ""; - $date2 = date("Y-m-d"); - Html::showDateField("date2", ['value' => $date2, - 'maybeempty' => true + echo '' . __('End date') . ''; + $date2 = date('Y-m-d'); + Html::showDateField('date2', ['value' => $date2, + 'maybeempty' => true, ]); - echo "
"; - echo "
"; + echo ''; + echo ''; + echo ''; + echo '
'; - echo ""; - echo ""; + echo ''; + echo ''; - echo ""; + echo ''; $formname = 'exportform'; echo ""; - $arrow = "fas fa-level-up-alt"; + $arrow = 'fas fa-level-up-alt'; - echo ""; + echo ''; echo ""; echo ""; - echo ""; + echo "" . __('Check all') . ''; + echo ''; echo ""; - - $option[0] = __("Without data", 'mreporting'); - $option[1] = __("With data", 'mreporting'); - Dropdown::showFromArray("withdata", $option, []); - echo " "; - echo ""; - echo ""; - echo "
"; - echo "" . __('Check all') . "//"; - echo "" . __('Uncheck all') . "
"; + echo "" . __('Uncheck all') . ''; + + $option[0] = __('Without data', 'mreporting'); + $option[1] = __('With data', 'mreporting'); + Dropdown::showFromArray('withdata', $option, []); + echo ' '; + echo ""; + echo ''; + echo ''; Html::closeForm(); - echo ""; + echo ''; echo ""; } - echo ""; + echo ''; } } if (!$dashboard) { $request_string = self::getRequestString($_REQUEST); - if ($export != "odtall") { + if ($export != 'odtall') { if ($randname !== false && !$export) { $show_graph = PluginMreportingConfig::showGraphConfigValue($opt['f_name'], $opt['class']); self::showGraphDatas($datas, $unit, $labels2, $flip_data, $show_graph); } if (!$export) { - if (isset($_REQUEST['f_name']) && $_REQUEST['f_name'] != "test") { + if (isset($_REQUEST['f_name']) && $_REQUEST['f_name'] != 'test') { echo "
"; echo ""; - echo "

"; + echo '

'; self::showNavigation(); - echo "
"; + echo ''; echo ""; if (Session::haveRight('config', UPDATE)) { - echo "" . PluginMreportingConfig::getTypeName() . " : "; + echo '' . PluginMreportingConfig::getTypeName() . ' : '; echo " "; + '&classname=' . $opt['class'] . "' target='_blank'>"; echo ""; } if ($randname !== false) { - echo "

"; + echo '

'; echo "
"; - echo "" . __("Export") . " : "; - $params = ['myname' => 'ext', - 'ajax_page' => Plugin::getWebDir('mreporting') . "/ajax/dropdownExport.php", - 'class' => __CLASS__, - 'span' => 'show_ext', - 'gtype' => $_REQUEST['gtype'], - 'show_graph' => $show_graph, - 'display_svg' => ($config['graphtype'] != 'PNG'), - 'randname' => $randname + echo '' . __('Export') . ' : '; + $params = ['myname' => 'ext', + 'ajax_page' => Plugin::getWebDir('mreporting') . '/ajax/dropdownExport.php', + 'class' => __CLASS__, + 'span' => 'show_ext', + 'gtype' => $_REQUEST['gtype'], + 'show_graph' => $show_graph, + 'display_svg' => ($config['graphtype'] != 'PNG'), + 'randname' => $randname, ]; self::dropdownExt($params); @@ -825,42 +817,40 @@ public static function endGraph($options, $dashboard = false) echo ""; Html::closeForm(); } - echo ""; + echo ''; } echo "
"; - echo "
"; + echo ''; - if (isset($_REQUEST['f_name']) && $_REQUEST['f_name'] != "test") { - echo ""; + if (isset($_REQUEST['f_name']) && $_REQUEST['f_name'] != 'test') { + echo ''; } } if ($randname == false) { - echo ""; + echo ''; } } } - //destroy specific palette + //destroy specific palette unset($_SESSION['mreporting']['colors']); unset($_SESSION['mreporting_values']); } - /** - * Compile datas for unit display - * - * @param $datas, ex : array( 'test1' => 15, 'test2' => 25) - * @param $unit, ex : '%', 'Kg' (optionnal) - * @if percent, return new datas - */ - + /** + * Compile datas for unit display + * + * @param $datas, ex : array( 'test1' => 15, 'test2' => 25) + * @param $unit, ex : '%', 'Kg' (optionnal) + * @if percent, return new datas + */ public static function compileDatasForUnit($values, $unit = '') { - $datas = $values; if ($unit == '%') { - //complie news datas with percent values + //complie news datas with percent values $calcul = []; $simpledatas = true; @@ -884,10 +874,10 @@ public static function compileDatasForUnit($values, $unit = '') } foreach ($datas as $k => $v) { - //multiple array + //multiple array if (!$simpledatas) { foreach ($v as $key => $val) { - $total = array_sum($v); + $total = array_sum($v); if ($total == 0) { $calcul[$k][$key] = Html::formatNumber(0); } else { @@ -895,7 +885,7 @@ public static function compileDatasForUnit($values, $unit = '') } } } else {//simple array - $total = array_sum($values); + $total = array_sum($values); $calcul[$k] = Html::formatNumber(($v * 100) / $total); } } @@ -917,15 +907,14 @@ public static function compileDatasForUnit($values, $unit = '') return $datas; } - /** - * show Graph datas - * - * @param $datas, ex : array( 'test1' => 15, 'test2' => 25) - * @param $unit, ex : '%', 'Kg' (optionnal) - * @param $labels2, ex : dates - * @param $flip_data, flip array if necessary - */ - + /** + * show Graph datas + * + * @param $datas, ex : array( 'test1' => 15, 'test2' => 25) + * @param $unit, ex : '%', 'Kg' (optionnal) + * @param $labels2, ex : dates + * @param $flip_data, flip array if necessary + */ public static function showGraphDatas( $datas = [], $unit = '', @@ -936,16 +925,16 @@ public static function showGraphDatas( global $CFG_GLPI; $simpledatas = false; - $treedatas = false; + $treedatas = false; - //simple and tree array + //simple and tree array $depth = self::getArrayDepth($datas); if (!$labels2 && $depth < 2) { $simpledatas = true; } - if (strtolower($_REQUEST['gtype']) == "sunburst") { + if (strtolower($_REQUEST['gtype']) == 'sunburst') { $treedatas = true; } @@ -966,79 +955,79 @@ public static function showGraphDatas( } if ($flip_data != true) { - $tmp = $datas; + $tmp = $datas; $datas = $types; $types = $tmp; } - //simple array + //simple array if ($simpledatas) { - $datas = [__("Number", 'mreporting') => 0]; + $datas = [__('Number', 'mreporting') => 0]; } $rand = mt_rand(); - echo "
"; + echo '
'; echo ""; echo ""; - echo ""; - echo ""; - echo "
"; + echo ''; echo ""; + $CFG_GLPI['root_doc'] . "/pics/deplier_down.png','" . + $CFG_GLPI['root_doc'] . "/pics/deplier_up.png');\">"; if ($show_graph) { - $img = "deplier_down.png"; + $img = 'deplier_down.png'; } else { - $img = "deplier_up.png"; + $img = 'deplier_up.png'; } echo " "; + $CFG_GLPI['root_doc'] . "/pics/$img\"> "; - echo __("data", 'mreporting') . ""; - echo "
"; + echo __('data', 'mreporting') . ''; + echo ''; + echo ''; + echo ''; - $visibility = $show_graph ? "display:none;" : "display:inline;"; + $visibility = $show_graph ? 'display:none;' : 'display:inline;'; echo "
"; echo ""; echo ""; if (!($treedatas)) { - echo ""; + echo ''; } foreach ($datas as $label => $cols) { if (!empty($labels2)) { - echo ""; + echo ''; } else { - echo ""; + echo ''; } } - echo ""; + echo ''; if ($treedatas) { echo ""; self::showGraphTreeDatas($types, $flip_data); - echo ""; + echo ''; } else { foreach ($types as $label2 => $cols) { echo ""; - echo ""; + echo ''; if ($simpledatas) { //simple array - echo ""; - } else if ($treedatas) { //multiple array + echo "'; + } elseif ($treedatas) { //multiple array self::showGraphTreeDatas($cols, $flip_data); } else { //multiple array foreach ($cols as $date => $nb) { if (!is_array($nb)) { - echo ""; + echo "'; } } } - echo ""; + echo ''; } } - echo "
" . $labels2[$label] . "' . $labels2[$label] . '" . $label . "' . $label . '
" . $label2 . "' . $label2 . '" . $cols . " " . $unit . "" . $cols . ' ' . $unit . '" . $nb . " " . $unit . "" . $nb . ' ' . $unit . '
"; - echo "

"; + echo ''; + echo '
'; } public static function showGraphTreeDatas($cols, $flip_data = false) @@ -1052,11 +1041,11 @@ public static function showGraphTreeDatas($cols, $flip_data = false) if (is_array($value)) { echo ""; self::showGraphTreeDatas($value); - echo "
"; + echo ''; } else { echo $value; } - echo ""; + echo ''; } } else { foreach ($cols as $label => $value) { @@ -1066,20 +1055,20 @@ public static function showGraphTreeDatas($cols, $flip_data = false) if (is_array($value)) { echo ""; self::showGraphTreeDatas($value, true); - echo "
"; + echo ''; } else { echo $value; } - echo ""; + echo ''; } } } - /** - * Launch export of datas - * - * @param $opt - */ + /** + * Launch export of datas + * + * @param $opt + */ public function export($opt) { global $LANG; @@ -1089,28 +1078,28 @@ public function export($opt) case 'png': $graph = new PluginMreportingGraphpng(); //check the format display charts configured in glpi - $opt = $this->initParams($opt, true); - $opt['export'] = 'png'; - $opt['withdata'] = 1; + $opt = $this->initParams($opt, true); + $opt['export'] = 'png'; + $opt['withdata'] = 1; break; case 'csv': - $graph = new PluginMreportingGraphcsv(); - $opt['export'] = 'csv'; - $opt['withdata'] = 1; + $graph = new PluginMreportingGraphcsv(); + $opt['export'] = 'csv'; + $opt['withdata'] = 1; break; case 'odt': - $graph = new PluginMreportingGraphpng(); - $opt = $this->initParams($opt, true); + $graph = new PluginMreportingGraphpng(); + $opt = $this->initParams($opt, true); $opt['export'] = 'odt'; break; case 'odtall': - $graph = new PluginMreportingGraphpng(); - $opt = $this->initParams($opt, true); + $graph = new PluginMreportingGraphpng(); + $opt = $this->initParams($opt, true); $opt['export'] = 'odtall'; break; } - //export all with odt + //export all with odt if (isset($opt['classname'])) { if (isset($opt['check'])) { unset($_SESSION['glpi_plugin_mreporting_odtarray']); @@ -1121,15 +1110,15 @@ public function export($opt) foreach ($report['functions'] as $func) { foreach ($opt['check'] as $do => $to) { if ($do == $func['function'] . $classname) { - //dynamic instanciation of class passed by 'short_classname' GET parameter - $config = PluginMreportingConfig::initConfigParams($func['function'], $classname); - $class = 'PluginMreporting' . $func['short_classname']; - $obj = new $class($config); + //dynamic instanciation of class passed by 'short_classname' GET parameter + $config = PluginMreportingConfig::initConfigParams($func['function'], $classname); + $class = 'PluginMreporting' . $func['short_classname']; + $obj = new $class($config); $randname = $classname . $func['function']; if (isset($opt['date1']) && isset($opt['date2'])) { - $s = strtotime($opt['date2']) - strtotime($opt['date1']); + $s = strtotime($opt['date2']) - strtotime($opt['date1']); - // If customExportDates exists in class : we configure the dates + // If customExportDates exists in class : we configure the dates if (method_exists($obj, 'customExportDates')) { $opt = $obj->customExportDates($opt, $func['function']); } @@ -1138,16 +1127,16 @@ public function export($opt) $_REQUEST['date2' . $randname] = $opt['date2']; } - //dynamic call of method passed by 'f_name' - //GET parameter with previously instancied class + //dynamic call of method passed by 'f_name' + //GET parameter with previously instancied class $method = $func['function']; - $datas = $obj->$method($config); + $datas = $obj->$method($config); - //show graph (pgrah type determined by - //first entry of explode of camelcase of function name + //show graph (pgrah type determined by + //first entry of explode of camelcase of function name $title_func = $LANG['plugin_mreporting'][$func['short_classname']][$func['function']]['title']; - $des_func = ""; + $des_func = ''; if (isset($LANG['plugin_mreporting'][$func['short_classname']][$func['function']]['desc'])) { $des_func = $LANG['plugin_mreporting'][$func['short_classname']][$func['function']]['desc']; } @@ -1156,31 +1145,31 @@ public function export($opt) && isset($opt['date1']) && isset($opt['date2']) ) { - $des_func .= " - "; + $des_func .= ' - '; } if ( isset($opt['date1']) && isset($opt['date2']) ) { - $des_func .= Html::convdate($opt['date1']) . " / " . - Html::convdate($opt['date2']); + $des_func .= Html::convdate($opt['date1']) . ' / ' . + Html::convdate($opt['date2']); } - $options = ["short_classname" => $func['short_classname'], - "f_name" => $func['function'], - "class" => $opt['classname'], - "gtype" => $func['gtype'], - "randname" => $randname, - "withdata" => $opt['withdata'] + $options = ['short_classname' => $func['short_classname'], + 'f_name' => $func['function'], + 'class' => $opt['classname'], + 'gtype' => $func['gtype'], + 'randname' => $randname, + 'withdata' => $opt['withdata'], ]; $show_label = 'always'; - $params = ["raw_datas" => $datas, - "title" => $title_func, - "desc" => $des_func, - "export" => $opt['export'], - "opt" => $options + $params = ['raw_datas' => $datas, + 'title' => $title_func, + 'desc' => $des_func, + 'export' => $opt['export'], + 'opt' => $options, ]; $graph->{'show' . $func['gtype']}($params); @@ -1189,54 +1178,53 @@ public function export($opt) } } if ( - isset($_SESSION['glpi_plugin_mreporting_odtarray']) && - !empty($_SESSION['glpi_plugin_mreporting_odtarray']) + isset($_SESSION['glpi_plugin_mreporting_odtarray']) && !empty($_SESSION['glpi_plugin_mreporting_odtarray']) ) { if (PluginMreportingPreference::atLeastOneTemplateExists()) { $template = PluginMreportingPreference::checkPreferenceTemplateValue(Session::getLoginUserID()); if ($template) { - self::generateOdt($_SESSION['glpi_plugin_mreporting_odtarray']); + self::generateOdt($_SESSION['glpi_plugin_mreporting_odtarray']); } else { - Html::popHeader(__("General Report - ODT", 'mreporting'), $_SERVER['PHP_SELF']); - echo "

" . __("Please, select a model in your preferences", 'mreporting') . "

"; + Html::popHeader(__('General Report - ODT', 'mreporting'), $_SERVER['PHP_SELF']); + echo "

" . __('Please, select a model in your preferences', 'mreporting') . '

'; Html::displayBackLink(); - echo "
"; + echo '
'; Html::popFooter(); } } else { - Html::popHeader(__("General Report - ODT", 'mreporting'), $_SERVER['PHP_SELF']); - echo "

" . __("No model available", 'mreporting') . "

"; + Html::popHeader(__('General Report - ODT', 'mreporting'), $_SERVER['PHP_SELF']); + echo "

" . __('No model available', 'mreporting') . '

'; Html::displayBackLink(); - echo "
"; + echo '
'; Html::popFooter(); } } } else { //no selected data - Html::popHeader(__("General Report - ODT", 'mreporting'), $_SERVER['PHP_SELF']); - echo "

" . __("No graphic selected", 'mreporting') . "

"; + Html::popHeader(__('General Report - ODT', 'mreporting'), $_SERVER['PHP_SELF']); + echo "

" . __('No graphic selected', 'mreporting') . '

'; Html::displayBackLink(); - echo "
"; + echo '
'; Html::popFooter(); } } else { $config = PluginMreportingConfig::initConfigParams( $opt['f_name'], - "PluginMreporting" . $opt['short_classname'] + 'PluginMreporting' . $opt['short_classname'], ); - // get periods selected + // get periods selected self::getSelectorValuesByUser(); - //dynamic instanciation of class passed by 'short_classname' GET parameter + //dynamic instanciation of class passed by 'short_classname' GET parameter $classname = 'PluginMreporting' . $opt['short_classname']; - $obj = new $classname($config); + $obj = new $classname($config); - //dynamic call of method passed by 'f_name' GET parameter with previously instancied class + //dynamic call of method passed by 'f_name' GET parameter with previously instancied class $datas = $obj->{$opt['f_name']}($config); - //show graph (pgrah type determined by first entry of explode of camelcase of function name + //show graph (pgrah type determined by first entry of explode of camelcase of function name $title_func = $LANG['plugin_mreporting'][$opt['short_classname']][$opt['f_name']]['title']; - $des_func = ""; + $des_func = ''; if (isset($LANG['plugin_mreporting'][$opt['short_classname']][$opt['f_name']]['desc'])) { $des_func = $LANG['plugin_mreporting'][$opt['short_classname']][$opt['f_name']]['desc']; } @@ -1245,24 +1233,24 @@ public function export($opt) && isset($_REQUEST['date1' . $opt['randname']]) && isset($_REQUEST['date2' . $opt['randname']]) ) { - $des_func .= " - "; + $des_func .= ' - '; } if ( isset($_REQUEST['date1' . $opt['randname']]) && isset($_REQUEST['date2' . $opt['randname']]) ) { $des_func .= Html::convdate($_REQUEST['date1' . $opt['randname']]) . - " / " . Html::convdate($_REQUEST['date2' . $opt['randname']]); + ' / ' . Html::convdate($_REQUEST['date2' . $opt['randname']]); } $show_label = 'always'; $opt['class'] = $classname; - $params = ["raw_datas" => $datas, - "title" => $title_func, - "desc" => $des_func, - "export" => $opt['export'], - "opt" => $opt + $params = ['raw_datas' => $datas, + 'title' => $title_func, + 'desc' => $des_func, + 'export' => $opt['export'], + 'opt' => $opt, ]; $graph->{'show' . $opt['gtype']}($params); @@ -1275,28 +1263,28 @@ public static function generateOdt($params) $config = ['PATH_TO_TMP' => GLPI_DOC_DIR . '/_tmp']; - $category = ''; - $description = ''; + $category = ''; + $description = ''; $short_classname = str_replace('PluginMreporting', '', $params[0]['class']); if (isset($LANG['plugin_mreporting'][$short_classname]['title'])) { $category = $LANG['plugin_mreporting'][$short_classname]['title']; $description = $LANG['plugin_mreporting'][$short_classname][$params[0]['f_name']]['desc']; } - $odf = new Odf("../templates/template.odt", $config); - $odf->setVars('category', $category, ENT_NOQUOTES, "utf-8"); - $odf->setVars('title', $params[0]['title'], ENT_NOQUOTES, "utf-8"); - $odf->setVars('description', $description, ENT_NOQUOTES, "utf-8"); + $odf = new Odf('../templates/template.odt', $config); + $odf->setVars('category', $category, ENT_NOQUOTES, 'utf-8'); + $odf->setVars('title', $params[0]['title'], ENT_NOQUOTES, 'utf-8'); + $odf->setVars('description', $description, ENT_NOQUOTES, 'utf-8'); - $path = GLPI_PLUGIN_DOC_DIR . "/mreporting/" . $params[0]['f_name'] . ".png"; + $path = GLPI_PLUGIN_DOC_DIR . '/mreporting/' . $params[0]['f_name'] . '.png'; if (is_file($path)) { list($image_width, $image_height) = @getimagesize($path); - $image_width *= Odf::PIXEL_TO_CM; + $image_width *= Odf::PIXEL_TO_CM; $image_height *= Odf::PIXEL_TO_CM * 17 / $image_width; $odf->setImage('image', $path, -1, 17, $image_height); } else { - $odf->setVars('image', "", true, 'UTF-8'); + $odf->setVars('image', '', true, 'UTF-8'); } $singledatas = $odf->setSegment('singledatas'); @@ -1308,28 +1296,28 @@ public static function generateOdt($params) $first = array_shift($first); $is_multiple = is_array($first); - // Multidatas graph + // Multidatas graph if ($is_multiple) { - $multipledatas->setVars('datas_title', mb_strtoupper(__('data', 'mreporting')), ENT_NOQUOTES, "utf-8"); + $multipledatas->setVars('datas_title', mb_strtoupper(__('data', 'mreporting')), ENT_NOQUOTES, 'utf-8'); foreach ($datas as $key => $value) { - $multipledatas->subtitle->datas_subtitle(mb_strtoupper($key), ENT_NOQUOTES, "utf-8"); + $multipledatas->subtitle->datas_subtitle(mb_strtoupper($key), ENT_NOQUOTES, 'utf-8'); $multipledatas->subtitle->merge(); foreach ($value as $col => $val) { - $multipledatas->datas->row($col, ENT_NOQUOTES, "utf-8"); - $multipledatas->datas->value($val, ENT_NOQUOTES, "utf-8"); + $multipledatas->datas->row($col, ENT_NOQUOTES, 'utf-8'); + $multipledatas->datas->value($val, ENT_NOQUOTES, 'utf-8'); $multipledatas->datas->merge(); } $multipledatas->merge(); } - // Simples graph + // Simples graph } else { - $singledatas->setVars('datas_title', mb_strtoupper(__('data', 'mreporting')), ENT_NOQUOTES, "utf-8"); + $singledatas->setVars('datas_title', mb_strtoupper(__('data', 'mreporting')), ENT_NOQUOTES, 'utf-8'); foreach ($datas as $key => $value) { - $singledatas->datas->row($key, ENT_NOQUOTES, "utf-8"); - $singledatas->datas->value($value, ENT_NOQUOTES, "utf-8"); + $singledatas->datas->row($key, ENT_NOQUOTES, 'utf-8'); + $singledatas->datas->value($value, ENT_NOQUOTES, 'utf-8'); $singledatas->datas->merge(); } $singledatas->merge(); @@ -1340,13 +1328,13 @@ public static function generateOdt($params) $odf->exportAsAttachedFile(); } - // === SELECTOR FUNCTIONS ==== + // === SELECTOR FUNCTIONS ==== public static function selectorForMultipleGroups($field, $condition = [], $label = '') { global $DB; - echo "
" . $label . " :
"; + echo '
' . $label . ' :
'; $values = []; if (isset($_SESSION['mreporting_values'][$field])) { @@ -1357,16 +1345,16 @@ public static function selectorForMultipleGroups($field, $condition = [], $label } } - $datas = []; + $datas = []; $condition['ORDER'] = 'name'; foreach (getAllDataFromTable('glpi_groups', $condition, false) as $data) { $datas[$data['id']] = $data['completename']; } $param = ['multiple' => true, - 'display' => true, - 'size' => count($values), - 'values' => $values + 'display' => true, + 'size' => count($values), + 'values' => $values, ]; Dropdown::showFromArray($field, $datas, $param); @@ -1374,24 +1362,23 @@ public static function selectorForMultipleGroups($field, $condition = [], $label public static function selectorForSingleGroup($field, $condition = [], $label = '') { - echo "
" . $label . " :
"; + echo '
' . $label . ' :
'; $value = isset($_SESSION['mreporting_values'][$field]) ? $_SESSION['mreporting_values'][$field] : 0; - Dropdown::show("Group", ['comments' => false, - 'name' => $field, - 'value' => $value, - 'condition' => $condition + Dropdown::show('Group', ['comments' => false, + 'name' => $field, + 'value' => $value, + 'condition' => $condition, ]); } - public static function selectorGrouprequest() { self::selectorForSingleGroup( 'groups_request_id', ['is_requester' => 1], - __("Requester group") + __('Requester group'), ); } @@ -1400,7 +1387,7 @@ public static function selectorGroupassign() self::selectorForSingleGroup( 'groups_assign_id', ['is_assign' => 1], - __("Group in charge of the ticket") + __('Group in charge of the ticket'), ); } @@ -1409,7 +1396,7 @@ public static function selectorMultipleGrouprequest() self::selectorForMultipleGroups( 'groups_request_id', ['is_requester' => '1'], - __("Requester group") + __('Requester group'), ); } @@ -1418,38 +1405,39 @@ public static function selectorMultipleGroupassign() self::selectorForMultipleGroups( 'groups_assign_id', ['is_assign' => '1'], - __("Group in charge of the ticket") + __('Group in charge of the ticket'), ); } public static function selectorUserassign() { - echo "
" . __("Technician in charge of the ticket") . " :
"; - $options = ['name' => 'users_assign_id', - 'entity' => isset($_SESSION['glpiactive_entity']) ? $_SESSION['glpiactive_entity'] : 0, - 'right' => 'own_ticket', - 'value' => isset($_SESSION['mreporting_values']['users_assign_id']) ? $_SESSION['mreporting_values']['users_assign_id'] : 0, - 'ldap_import' => false, - 'comments' => false + echo '
' . __('Technician in charge of the ticket') . ' :
'; + $options = ['name' => 'users_assign_id', + 'entity' => isset($_SESSION['glpiactive_entity']) ? $_SESSION['glpiactive_entity'] : 0, + 'right' => 'own_ticket', + 'value' => isset($_SESSION['mreporting_values']['users_assign_id']) ? $_SESSION['mreporting_values']['users_assign_id'] : 0, + 'ldap_import' => false, + 'comments' => false, ]; User::dropdown($options); } - /** - * Show the selector for tickets status (new, open, solved, closed...) - */ + + /** + * Show the selector for tickets status (new, open, solved, closed...) + */ public static function selectorAllSlasWithTicket() { global $LANG, $DB; - echo "" . $LANG['plugin_mreporting']['Helpdeskplus']['selector']["slas"] . " :
"; + echo '' . $LANG['plugin_mreporting']['Helpdeskplus']['selector']['slas'] . ' :
'; - $query = "SELECT DISTINCT s.id, + $query = 'SELECT DISTINCT s.id, s.name FROM glpi_slas s INNER JOIN glpi_tickets t ON s.id = t.slas_id_ttr - WHERE t.status IN (" . implode( + WHERE t.status IN (' . implode( ',', - array_merge(Ticket::getSolvedStatusArray(), Ticket::getClosedStatusArray()) + array_merge(Ticket::getSolvedStatusArray(), Ticket::getClosedStatusArray()), ) . ") AND t.is_deleted = '0' ORDER BY s.name ASC"; @@ -1463,41 +1451,41 @@ public static function selectorAllSlasWithTicket() $selected_values = isset($_SESSION['mreporting_values']['slas']) ? $_SESSION['mreporting_values']['slas'] : []; Dropdown::showFromArray('slas', $values, ['values' => $selected_values, - 'multiple' => true, - 'readonly' => false + 'multiple' => true, + 'readonly' => false, ]); } - public static function selectorPeriod($period = "day") + public static function selectorPeriod($period = 'day') { global $LANG; echo '' . $LANG['plugin_mreporting']['Helpdeskplus']['period'] . ' :
'; $elements = [ - 'day' => _n("Day", "Days", 1), - 'week' => __("Week", 'mreporting'), - 'month' => __("Month", 'mreporting'), - 'year' => __("By year") + 'day' => _n('Day', 'Days', 1), + 'week' => __('Week', 'mreporting'), + 'month' => __('Month', 'mreporting'), + 'year' => __('By year'), ]; Dropdown::showFromArray( - "period", + 'period', $elements, ['value' => isset($_SESSION['mreporting_values']['period']) - ? $_SESSION['mreporting_values']['period'] : 'month' - ] + ? $_SESSION['mreporting_values']['period'] : 'month', + ], ); } public static function selectorType() { - echo "
" . _n("Type", "Types", 1) . " :
"; + echo '
' . _n('Type', 'Types', 1) . ' :
'; Ticket::dropdownType( 'type', ['value' => isset($_SESSION['mreporting_values']['type']) - ? $_SESSION['mreporting_values']['type'] : Ticket::INCIDENT_TYPE - ] + ? $_SESSION['mreporting_values']['type'] : Ticket::INCIDENT_TYPE, + ], ); } @@ -1505,23 +1493,23 @@ public static function selectorCategory($type = true) { global $CFG_GLPI; - echo "
" . _n('Ticket category', 'Ticket categories', 2) . " :
"; + echo '
' . _n('Ticket category', 'Ticket categories', 2) . ' :
'; if ($type) { $rand = Ticket::dropdownType( 'type', ['value' => isset($_SESSION['mreporting_values']['type']) ? $_SESSION['mreporting_values']['type'] : Ticket::INCIDENT_TYPE, - 'toadd' => [-1 => __('All')] - ] + 'toadd' => [-1 => __('All')], + ], ); - $params = ['type' => '__VALUE__', + $params = ['type' => '__VALUE__', 'currenttype' => Ticket::INCIDENT_TYPE, 'entity_restrict' => -1, 'condition' => ['is_incident' => 1], 'value' => isset($_SESSION['mreporting_values']['itilcategories_id']) ? $_SESSION['mreporting_values']['itilcategories_id'] - : 0 + : 0, ]; echo ""; } @@ -1530,32 +1518,31 @@ public static function selectorCategory($type = true) ITILCategory::dropdown($params); if ($type) { - echo ""; + echo ''; Ajax::updateItemOnSelectEvent( "dropdown_type$rand", - "show_category_by_type", - $CFG_GLPI["root_doc"] . "/ajax/dropdownTicketCategories.php", - $params + 'show_category_by_type', + $CFG_GLPI['root_doc'] . '/ajax/dropdownTicketCategories.php', + $params, ); } } public static function selectorLimit() { - echo "" . __("Maximal count") . " :
"; + echo '' . __('Maximal count') . ' :
'; Dropdown::showListLimit(); // glpilist_limit } - public static function selectorAllstates() { - echo "
" . _n('Status', 'Statuses', 2) . " :
"; + echo '
' . _n('Status', 'Statuses', 2) . ' :
'; $default = [CommonITILObject::INCOMING, CommonITILObject::ASSIGNED, CommonITILObject::PLANNED, - CommonITILObject::WAITING + CommonITILObject::WAITING, ]; $i = 1; @@ -1575,7 +1562,7 @@ public static function selectorAllstates() echo $name; echo ''; if ($i % 3 == 0) { - echo "
"; + echo '
'; } $i++; } @@ -1586,36 +1573,36 @@ public static function selectorDateinterval() $randname = 'PluginMreporting' . $_REQUEST['short_classname'] . $_REQUEST['f_name']; if (!isset($_SESSION['mreporting_values']['date1' . $randname])) { - $_SESSION['mreporting_values']['date1' . $randname] = date("Y-m-d", time() - (365 * 24 * 60 * 60)); + $_SESSION['mreporting_values']['date1' . $randname] = date('Y-m-d', time() - (365 * 24 * 60 * 60)); } if (!isset($_SESSION['mreporting_values']['date2' . $randname])) { - $_SESSION['mreporting_values']['date2' . $randname] = date("Y-m-d"); + $_SESSION['mreporting_values']['date2' . $randname] = date('Y-m-d'); } - $date1 = $_SESSION['mreporting_values']["date1" . $randname]; - echo "" . __("Start date") . "
"; - Html::showDateField("date1$randname", ['value' => $date1, - 'maybeempty' => false + $date1 = $_SESSION['mreporting_values']['date1' . $randname]; + echo '' . __('Start date') . '
'; + Html::showDateField("date1$randname", ['value' => $date1, + 'maybeempty' => false, ]); - echo ""; + echo ''; - $date2 = $_SESSION['mreporting_values']["date2" . $randname]; - echo ""; - echo "" . __("End date") . "
"; - Html::showDateField("date2$randname", ['value' => $date2, - 'maybeempty' => false + $date2 = $_SESSION['mreporting_values']['date2' . $randname]; + echo ''; + echo '' . __('End date') . '
'; + Html::showDateField("date2$randname", ['value' => $date2, + 'maybeempty' => false, ]); } - /** - * Show entity level selector. - * @return display selector - */ + /** + * Show entity level selector. + * @return display selector + */ public static function selectorEntityLevel() { global $DB; - echo "" . __('Max depth entity level', 'mreporting') . " :
"; + echo '' . __('Max depth entity level', 'mreporting') . ' :
'; $default_level = self::getActiveEntityLevel(); if (isset($_SESSION['mreporting_values']['entitylevel'])) { @@ -1624,23 +1611,22 @@ public static function selectorEntityLevel() $selected = $default_level; } - $values = [$default_level]; + $values = [$default_level]; $maxlevel = self::getMaxEntityLevel(); for ($i = ($default_level + 1); $i <= $maxlevel; $i++) { $values[$i] = $i; } - return Dropdown::showFromArray('entitylevel', $values, ['value' => $selected]); + return Dropdown::showFromArray('entitylevel', $values, ['value' => $selected]); } - /** - * Get SQL condition to filter entity depth by level. - * @param string $field the sql table field to compare - * @return string sql condition - */ - public static function getSQLEntityLevel($field = "`glpi_entities`.`level`") + /** + * Get SQL condition to filter entity depth by level. + * @param string $field the sql table field to compare + * @return string sql condition + */ + public static function getSQLEntityLevel($field = '`glpi_entities`.`level`') { - if (isset($_SESSION['mreporting_values']['entitylevel'])) { $maxlevel = $_SESSION['mreporting_values']['entitylevel']; } else { @@ -1653,31 +1639,31 @@ public static function getSQLEntityLevel($field = "`glpi_entities`.`level`") for ($i = ($default_level + 1); $i <= $maxlevel; $i++) { $where_entities_level .= " OR {$field} = {$i}"; } - $where_entities_level .= ")"; + $where_entities_level .= ')'; return $where_entities_level; } - /** - * Get active entity level according to GLPi SESSION - * @return integer default entity level - */ + /** + * Get active entity level according to GLPi SESSION + * @return integer default entity level + */ public static function getActiveEntityLevel() { - if (isset($_SESSION['glpiactive_entity'])) { $Entity = new Entity(); $Entity->getFromDB($_SESSION['glpiactive_entity']); + return $Entity->fields['level']; } else { return 0; } } - /** - * Get max entity level according to GLPi SESSION current active entity - * @return integer max entity level - */ + /** + * Get max entity level according to GLPi SESSION current active entity + * @return integer max entity level + */ public static function getMaxEntityLevel() { global $DB; @@ -1694,7 +1680,7 @@ public static function getMaxEntityLevel() $result = $DB->query($query); if ($DB->numrows($result) > 0) { - return $DB->result($result, 0, "maxlevel"); + return $DB->result($result, 0, 'maxlevel'); } else { return 0; } @@ -1703,28 +1689,28 @@ public static function getMaxEntityLevel() public static function canAccessAtLeastOneReport($profiles_id) { return countElementsInTable( - "glpi_plugin_mreporting_profiles", - ['profiles_id' => $profiles_id, 'right' => READ] + 'glpi_plugin_mreporting_profiles', + ['profiles_id' => $profiles_id, 'right' => READ], ); } public static function showNavigation() { echo "
"; - echo "" . __("Back") . ""; - echo "
"; + echo "" . __('Back') . ''; + echo ''; } - /** - * Transform a request var into a get string - * @param array $var the request string ($_REQUEST, $_POST, $_GET) - * @return string the imploded array. Format : $key=$value&$key2=$value2... - */ + /** + * Transform a request var into a get string + * @param array $var the request string ($_REQUEST, $_POST, $_GET) + * @return string the imploded array. Format : $key=$value&$key2=$value2... + */ public static function getRequestString($var) { unset($var['submit']); - // For have clean URL (best practice) + // For have clean URL (best practice) if (isset($var['reset'])) { unset($var['reset']); } @@ -1732,14 +1718,13 @@ public static function getRequestString($var) return http_build_query($var); } - - /** - * Show a date selector - * @param datetime $date1 date of start - * @param datetime $date2 date of ending - * @param string $randname random string (to prevent conflict in js selection) - * @return void - */ + /** + * Show a date selector + * @param datetime $date1 date of start + * @param datetime $date2 date of ending + * @param string $randname random string (to prevent conflict in js selection) + * @return void + */ public static function showSelector($date1, $date2, $randname) { global $CFG_GLPI; @@ -1763,33 +1748,33 @@ public static function showSelector($date1, $date2, $randname) echo ""; if ($has_selector) { - echo ""; + echo "'; } - $_SERVER['REQUEST_URI'] .= "&date1" . $randname . "=" . $date1 . "&date2" . $randname . "=" . $date2; + $_SERVER['REQUEST_URI'] .= '&date1' . $randname . '=' . $date1 . '&date2' . $randname . '=' . $date2; SavedSearch::showSaveButton(SavedSearch::URI, __CLASS__); - //If there's no selector for the report, there's no need for a reset button ! + //If there's no selector for the report, there's no need for a reset button ! if ($has_selector) { echo "  "; - echo "\"""; - echo ""; + echo '' . __s('Blank') . "; + echo ''; } - echo ""; - echo ""; + echo ''; + echo ''; - echo ""; + echo ''; Html::closeForm(); - echo ""; + echo ''; unset($_SESSION['mreporting_selector']); } - /** - * Parse and include selectors functions - */ + /** + * Parse and include selectors functions + */ public static function getReportSelectors($export = false) { ob_start(); @@ -1816,7 +1801,7 @@ public static function getReportSelectors($export = false) $selector = 'selector' . ucfirst($selector); if (method_exists('PluginMreportingCommon', $selector)) { $classselector = 'PluginMreportingCommon'; - } else if (method_exists($classname, $selector)) { + } elseif (method_exists($classname, $selector)) { $classselector = $classname; } else { continue; @@ -1846,7 +1831,7 @@ public static function saveSelectors($graphname, $config = []) $values = []; foreach ($_REQUEST as $key => $value) { - if (!preg_match("/^_/", $key) && !in_array($key, $remove)) { + if (!preg_match('/^_/', $key) && !in_array($key, $remove)) { $values[$key] = $value; } if (empty($value)) { @@ -1854,7 +1839,7 @@ public static function saveSelectors($graphname, $config = []) } } - //clean unmodified date + //clean unmodified date if (isset($config['randname'])) { if ( isset($_REQUEST['date1' . $config['randname']]) @@ -1873,15 +1858,15 @@ public static function saveSelectors($graphname, $config = []) } if (!empty($values)) { - $pref = new PluginMreportingPreference(); - $id = $pref->addDefaultPreference(Session::getLoginUserID()); + $pref = new PluginMreportingPreference(); + $id = $pref->addDefaultPreference(Session::getLoginUserID()); $tmp['id'] = $id; $pref->getFromDB($id); if (!is_null($pref->fields['selectors'])) { - $selectors = $pref->fields['selectors']; - $sel = json_decode(stripslashes($selectors), true); + $selectors = $pref->fields['selectors']; + $sel = json_decode(stripslashes($selectors), true); $sel[$graphname] = $values; } else { $sel = $values; @@ -1922,7 +1907,7 @@ public static function resetSelectorsForReport($report_name) { global $DB; - $users_id = Session::getLoginUserID(); + $users_id = Session::getLoginUserID(); $selectors = PluginMreportingPreference::checkPreferenceValue('selectors', $users_id); if ($selectors) { @@ -1939,52 +1924,50 @@ public static function resetSelectorsForReport($report_name) } } - /** - * Generate a SQL date test with $_REQUEST date fields - * @param string $field the sql table field to compare - * @param integer $delay if $_REQUET date fields not provided, - * generate them from $delay (in days) - * @param string $randname random string (to prevent conflict in js selection) - * @return string The sql test to insert in your query - */ - public static function getSQLDate($field = "`glpi_tickets`.`date`", $delay = 365, $randname = '') + /** + * Generate a SQL date test with $_REQUEST date fields + * @param string $field the sql table field to compare + * @param integer $delay if $_REQUET date fields not provided, + * generate them from $delay (in days) + * @param string $randname random string (to prevent conflict in js selection) + * @return string The sql test to insert in your query + */ + public static function getSQLDate($field = '`glpi_tickets`.`date`', $delay = 365, $randname = '') { - if (empty($_SESSION['mreporting_values']['date1' . $randname])) { - $_SESSION['mreporting_values']['date1' . $randname] = date("Y-m-d", time() - ($delay * 24 * 60 * 60)); + $_SESSION['mreporting_values']['date1' . $randname] = date('Y-m-d', time() - ($delay * 24 * 60 * 60)); } if (empty($_SESSION['mreporting_values']['date2' . $randname])) { - $_SESSION['mreporting_values']['date2' . $randname] = date("Y-m-d"); + $_SESSION['mreporting_values']['date2' . $randname] = date('Y-m-d'); } - $date_array1 = explode("-", $_SESSION['mreporting_values']['date1' . $randname]); - $time1 = mktime(0, 0, 0, $date_array1[1], $date_array1[2], $date_array1[0]); + $date_array1 = explode('-', $_SESSION['mreporting_values']['date1' . $randname]); + $time1 = mktime(0, 0, 0, $date_array1[1], $date_array1[2], $date_array1[0]); - $date_array2 = explode("-", $_SESSION['mreporting_values']['date2' . $randname]); - $time2 = mktime(0, 0, 0, $date_array2[1], $date_array2[2], $date_array2[0]); + $date_array2 = explode('-', $_SESSION['mreporting_values']['date2' . $randname]); + $time2 = mktime(0, 0, 0, $date_array2[1], $date_array2[2], $date_array2[0]); - //if data inverted, reverse it + //if data inverted, reverse it if ($time1 > $time2) { list($time1, $time2) = [$time2, $time1]; list($_SESSION['mreporting_values']['date1' . $randname], - $_SESSION['mreporting_values']['date2' . $randname]) = [ - $_SESSION['mreporting_values']['date2' . $randname], - $_SESSION['mreporting_values']['date1' . $randname] - ]; + $_SESSION['mreporting_values']['date2' . $randname]) = [ + $_SESSION['mreporting_values']['date2' . $randname], + $_SESSION['mreporting_values']['date1' . $randname], + ]; } - $begin = date("Y-m-d H:i:s", $time1); - $end = date("Y-m-d H:i:s", $time2); + $begin = date('Y-m-d H:i:s', $time1); + $end = date('Y-m-d H:i:s', $time2); return "($field >= '$begin' AND $field <= ADDDATE('$end', INTERVAL 1 DAY) )"; } - - /** - * Get the max value of a multidimensionnal array - * @param array() $array the array to compute - * @return number the sum - */ + /** + * Get the max value of a multidimensionnal array + * @param array() $array the array to compute + * @return number the sum + */ public static function getArrayMaxValue($array) { $max = 0; @@ -2009,12 +1992,11 @@ public static function getArrayMaxValue($array) return $max; } - - /** - * Computes the sum of a multidimensionnal array - * @param array() $array the array where to seek - * @return number the sum - */ + /** + * Computes the sum of a multidimensionnal array + * @param array() $array the array where to seek + * @return number the sum + */ public static function getArraySum($array) { $sum = 0; @@ -2034,12 +2016,11 @@ public static function getArraySum($array) return $sum; } - - /** - * Get the depth of a multidimensionnal array - * @param array() $array the array where to seek - * @return number the sum - */ + /** + * Get the depth of a multidimensionnal array + * @param array() $array the array where to seek + * @return number the sum + */ public static function getArrayDepth($array) { $max_depth = 1; @@ -2057,25 +2038,24 @@ public static function getArrayDepth($array) return $max_depth; } - - /** - * Transform a flat array to a tree array - * @param array $flat_array the flat array. Format : array('id', 'parent', 'name', 'count') - * @return array the tree array. Format : array(name => array(name2 => array(count), ...) - */ + /** + * Transform a flat array to a tree array + * @param array $flat_array the flat array. Format : array('id', 'parent', 'name', 'count') + * @return array the tree array. Format : array(name => array(name2 => array(count), ...) + */ public static function buildTree($flat_array) { $raw_tree = self::mapTree($flat_array); - $tree = self::cleanTree($raw_tree); + $tree = self::cleanTree($raw_tree); + return $tree; } - - /** - * Transform a flat array to a tree array (without keys changes) - * @param array $flat_array the flat array. Format : array('id', 'parent', 'name', 'count') - * @return array the tree array. Format : array(orginal_keys, children => array(...) - */ + /** + * Transform a flat array to a tree array (without keys changes) + * @param array $flat_array the flat array. Format : array('id', 'parent', 'name', 'count') + * @return array the tree array. Format : array(orginal_keys, children => array(...) + */ public static function mapTree(array &$elements, $parentId = 0) { $branch = []; @@ -2089,17 +2069,17 @@ public static function mapTree(array &$elements, $parentId = 0) $branch[$element['id']] = $element; } } + return $branch; } - - /** - * Transform a tree array to a tree array (with clean keyss) - * @param array $flat_array the tree array. - * Format : array('id', 'parent', 'name', 'count', children => array(...) - * @return array the tree array. - * Format : array(name => array(name2 => array(count), ...) - */ + /** + * Transform a tree array to a tree array (with clean keyss) + * @param array $flat_array the tree array. + * Format : array('id', 'parent', 'name', 'count', children => array(...) + * @return array the tree array. + * Format : array(name => array(name2 => array(count), ...) + */ public static function cleanTree($raw_tree) { $tree = []; @@ -2109,7 +2089,7 @@ public static function cleanTree($raw_tree) $sub = self::cleanTree($node['children']); if ($node['count'] > 0) { - $current = [$node['name'] => intval($node['count'])]; + $current = [$node['name'] => intval($node['count'])]; $tree[$node['name']] = array_merge($current, $sub); } else { $tree[$node['name']] = $sub; @@ -2124,17 +2104,17 @@ public static function cleanTree($raw_tree) public static function getReportIcon($report_name) { - //see font-awesome : http://fortawesome.github.io/Font-Awesome/cheatsheet/ + //see font-awesome : http://fortawesome.github.io/Font-Awesome/cheatsheet/ $icons = [ - 'pie' => "", - 'hbar' => "", - 'hgbar' => "", - 'line' => "", - 'gline' => "", - 'area' => "", - 'garea' => "", - 'vstackbar' => "", - 'sunburst' => "", + 'pie' => '', + 'hbar' => '', + 'hgbar' => '', + 'line' => '', + 'gline' => '', + 'area' => '', + 'garea' => '', + 'vstackbar' => '', + 'sunburst' => '', ]; $extract = preg_split('/(?<=\\w)(?=[A-Z])/', $report_name); diff --git a/inc/config.class.php b/inc/config.class.php index 9580b343..b5537176 100644 --- a/inc/config.class.php +++ b/inc/config.class.php @@ -38,142 +38,141 @@ class PluginMreportingConfig extends CommonDBTM public static function getTypeName($nb = 0) { - return __("Configuration", 'mreporting'); + return __('Configuration', 'mreporting'); } - /** - * Définition des onglets - **/ + /** + * Définition des onglets + **/ public function defineTabs($options = []) { $ong = []; $this->addDefaultFormTab($ong); $this->addStandardTab('PluginMreportingProfile', $ong, $options); + return $ong; } - public function rawSearchOptions() { - $tab = []; $tab[] = [ - 'id' => 'common', - 'name' => self::getTypeName(), + 'id' => 'common', + 'name' => self::getTypeName(), ]; $tab[] = [ - 'id' => '1', - 'table' => $this->getTable(), - 'field' => 'name', - 'name' => __('Name'), - 'datatype' => 'itemlink', - 'itemlink_type' => $this->getType(), + 'id' => '1', + 'table' => $this->getTable(), + 'field' => 'name', + 'name' => __('Name'), + 'datatype' => 'itemlink', + 'itemlink_type' => $this->getType(), ]; $tab[] = [ - 'id' => '2', - 'table' => $this->getTable(), - 'field' => 'is_active', - 'name' => __('Active'), - 'datatype' => 'bool', + 'id' => '2', + 'table' => $this->getTable(), + 'field' => 'is_active', + 'name' => __('Active'), + 'datatype' => 'bool', ]; $tab[] = [ - 'id' => '3', - 'table' => $this->getTable(), - 'field' => 'show_area', - 'name' => __('See area', 'mreporting'), - 'datatype' => 'bool', - 'massiveaction' => false, + 'id' => '3', + 'table' => $this->getTable(), + 'field' => 'show_area', + 'name' => __('See area', 'mreporting'), + 'datatype' => 'bool', + 'massiveaction' => false, ]; $tab[] = [ - 'id' => '4', - 'table' => $this->getTable(), - 'field' => 'spline', - 'name' => __('Curve lines (SVG)', 'mreporting'), - 'datatype' => 'bool', - 'massiveaction' => false, + 'id' => '4', + 'table' => $this->getTable(), + 'field' => 'spline', + 'name' => __('Curve lines (SVG)', 'mreporting'), + 'datatype' => 'bool', + 'massiveaction' => false, ]; $tab[] = [ - 'id' => '5', - 'table' => $this->getTable(), - 'field' => 'show_label', - 'name' => __('See values', 'mreporting'), - 'datatype' => 'specific', - 'searchtype' => 'equals', - 'massiveaction' => false, + 'id' => '5', + 'table' => $this->getTable(), + 'field' => 'show_label', + 'name' => __('See values', 'mreporting'), + 'datatype' => 'specific', + 'searchtype' => 'equals', + 'massiveaction' => false, ]; $tab[] = [ - 'id' => '6', - 'table' => $this->getTable(), - 'field' => 'flip_data', - 'name' => __('Reverse data array', 'mreporting'), - 'datatype' => 'bool', - 'massiveaction' => false, + 'id' => '6', + 'table' => $this->getTable(), + 'field' => 'flip_data', + 'name' => __('Reverse data array', 'mreporting'), + 'datatype' => 'bool', + 'massiveaction' => false, ]; $tab[] = [ - 'id' => '7', - 'table' => $this->getTable(), - 'field' => 'unit', - 'name' => __('Unit', 'mreporting'), - 'autocomplete' => true, + 'id' => '7', + 'table' => $this->getTable(), + 'field' => 'unit', + 'name' => __('Unit', 'mreporting'), + 'autocomplete' => true, ]; $tab[] = [ - 'id' => '8', - 'table' => $this->getTable(), - 'field' => 'default_delay', - 'name' => __('Default delay', 'mreporting'), - 'autocomplete' => true, + 'id' => '8', + 'table' => $this->getTable(), + 'field' => 'default_delay', + 'name' => __('Default delay', 'mreporting'), + 'autocomplete' => true, ]; $tab[] = [ - 'id' => '9', - 'table' => $this->getTable(), - 'field' => 'condition', - 'name' => __('Additional condition for MySQL', 'mreporting'), - 'autocomplete' => true, + 'id' => '9', + 'table' => $this->getTable(), + 'field' => 'condition', + 'name' => __('Additional condition for MySQL', 'mreporting'), + 'autocomplete' => true, ]; $tab[] = [ - 'id' => '10', - 'table' => $this->getTable(), - 'field' => 'show_graph', - 'name' => __('See graphic', 'mreporting'), - 'datatype' => 'bool', - 'massiveaction' => false, + 'id' => '10', + 'table' => $this->getTable(), + 'field' => 'show_graph', + 'name' => __('See graphic', 'mreporting'), + 'datatype' => 'bool', + 'massiveaction' => false, ]; $tab[] = [ - 'id' => '11', - 'table' => $this->getTable(), - 'field' => 'classname', - 'name' => __('Class', 'mreporting'), - 'massiveaction' => false, + 'id' => '11', + 'table' => $this->getTable(), + 'field' => 'classname', + 'name' => __('Class', 'mreporting'), + 'massiveaction' => false, ]; $tab[] = [ - 'id' => '12', - 'table' => $this->getTable(), - 'field' => 'graphtype', - 'name' => __('Default chart format', 'mreporting'), - 'searchtype' => 'equals', - 'massiveaction' => true, + 'id' => '12', + 'table' => $this->getTable(), + 'field' => 'graphtype', + 'name' => __('Default chart format', 'mreporting'), + 'searchtype' => 'equals', + 'massiveaction' => true, ]; $tab[] = [ - 'id' => '13', - 'table' => $this->getTable(), - 'field' => 'is_notified', - 'name' => __('Send this report with the notification', 'mreporting'), - 'datatype' => 'bool', - 'massiveaction' => true, + 'id' => '13', + 'table' => $this->getTable(), + 'field' => 'is_notified', + 'name' => __('Send this report with the notification', 'mreporting'), + 'datatype' => 'bool', + 'massiveaction' => true, ]; return $tab; @@ -181,34 +180,33 @@ public function rawSearchOptions() public static function getSpecificValueToDisplay($field, $values, array $options = []) { - if (!is_array($values)) { $values = [$field => $values]; } switch ($field) { case 'graphtype': return $values[$field]; - break; + break; case 'show_label': $labels = self::getLabelTypes(); + return $labels[$values[$field]]; - break; + break; } + return parent::getSpecificValueToDisplay($field, $values, $options); } - - /** - * @since version 0.84 - * - * @param $field - * @param $name (default '') - * @param $values (default '') - * @param $options array - **/ + /** + * @since version 0.84 + * + * @param $field + * @param $name (default '') + * @param $values (default '') + * @param $options array + **/ public static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = []) { - if (!is_array($values)) { $values = [$field => $values]; } @@ -219,23 +217,23 @@ public static function getSpecificValueToSelect($field, $name = '', $values = '' return Dropdown::showFromArray( $name, ['PNG' => 'PNG', 'SVG' => 'SVG'], - $options + $options, ); - break; + break; case 'show_label': return self::dropdownLabel($name, $options); - break; + break; } + return parent::getSpecificValueToSelect($field, $name, $values, $options); } - public function getFromDBByFunctionAndClassname($function, $classname) { global $DB; - $query = "SELECT * - FROM `" . $this->getTable() . "` + $query = 'SELECT * + FROM `' . $this->getTable() . "` WHERE `name` = '" . addslashes($function) . "' AND `classname` = '" . addslashes($classname) . "'"; @@ -248,48 +246,49 @@ public function getFromDBByFunctionAndClassname($function, $classname) return true; } } + return false; } - /** - * add First config Link - *@return void - **/ + /** + * add First config Link + *@return void + **/ public static function addFirstconfigLink() { global $CFG_GLPI; $buttons = []; - $title = ""; + $title = ''; if (Session::haveRight('config', READ)) { - $buttons["config.php?new=1"] = __("Initialize graphics configuration", 'mreporting'); + $buttons['config.php?new=1'] = __('Initialize graphics configuration', 'mreporting'); } Html::displayTitle( - Plugin::getWebDir('mreporting') . "/pics/config2.png", + Plugin::getWebDir('mreporting') . '/pics/config2.png', $title, $title, - $buttons + $buttons, ); } - /** - * create First Config for all graphs - *@return void - **/ + /** + * create First Config for all graphs + *@return void + **/ public function createFirstConfig() { - //$reports = array(); + //$reports = array(); $classConfig = false; - $inc_dir = Plugin::getPhpDir('mreporting') . "/inc"; - //parse inc dir to search report classes + $inc_dir = Plugin::getPhpDir('mreporting') . '/inc'; + //parse inc dir to search report classes $classes = PluginMreportingCommon::parseAllClasses($inc_dir); foreach ($classes as $classname) { if (!class_exists($classname)) { $class_filedir = $inc_dir . - strtolower(str_replace('PluginMreporting', '', $classname)) . ".class.php"; + strtolower(str_replace('PluginMreporting', '', $classname)) . '.class.php'; if (file_exists($class_filedir)) { require_once $class_filedir; } else { @@ -299,7 +298,7 @@ public function createFirstConfig() $functions = get_class_methods($classname); - // We check if a config function exists in class + // We check if a config function exists in class foreach ($functions as $funct_name) { if ($funct_name == 'preconfig') { // If a preconfig exists we construct the class $classConfig = true; @@ -321,21 +320,20 @@ public function createFirstConfig() $input = $this->preconfig($funct_name, $classname); } - $input["firstconfig"] = 1; - unset($input["id"]); + $input['firstconfig'] = 1; + unset($input['id']); $newid = $this->add($input); } } } - /** - * Preconfig datas for standard system - * @graphname internal name of graph - *@return void - **/ + /** + * Preconfig datas for standard system + * @graphname internal name of graph + *@return void + **/ public function preconfig($funct_name, $classname) { - if ($funct_name != -1 && $classname) { $ex_func = preg_split('/(?<=\\w)(?=[A-Z])/', $funct_name); if ($ex_func[0] != 'report') { @@ -346,81 +344,82 @@ public function preconfig($funct_name, $classname) switch ($gtype) { case 'area': case 'garea': - $this->fields["name"] = $funct_name; - $this->fields["classname"] = $classname; - $this->fields["is_active"] = "1"; - $this->fields["show_area"] = "1"; - $this->fields["show_graph"] = "1"; - $this->fields["spline"] = "1"; - $this->fields["default_delay"] = "365"; - $this->fields["graphtype"] = "SVG"; + $this->fields['name'] = $funct_name; + $this->fields['classname'] = $classname; + $this->fields['is_active'] = '1'; + $this->fields['show_area'] = '1'; + $this->fields['show_graph'] = '1'; + $this->fields['spline'] = '1'; + $this->fields['default_delay'] = '365'; + $this->fields['graphtype'] = 'SVG'; break; case 'line': case 'gline': - $this->fields["name"] = $funct_name; - $this->fields["classname"] = $classname; - $this->fields["is_active"] = "1"; - $this->fields["spline"] = "1"; - $this->fields["show_area"] = "0"; - $this->fields["show_graph"] = "1"; - $this->fields["default_delay"] = "365"; - $this->fields["graphtype"] = "SVG"; + $this->fields['name'] = $funct_name; + $this->fields['classname'] = $classname; + $this->fields['is_active'] = '1'; + $this->fields['spline'] = '1'; + $this->fields['show_area'] = '0'; + $this->fields['show_graph'] = '1'; + $this->fields['default_delay'] = '365'; + $this->fields['graphtype'] = 'SVG'; break; case 'vstackbar': - $this->fields["name"] = $funct_name; - $this->fields["classname"] = $classname; - $this->fields["is_active"] = "1"; - $this->fields["show_graph"] = "1"; - $this->fields["default_delay"] = "365"; - $this->fields["graphtype"] = "SVG"; + $this->fields['name'] = $funct_name; + $this->fields['classname'] = $classname; + $this->fields['is_active'] = '1'; + $this->fields['show_graph'] = '1'; + $this->fields['default_delay'] = '365'; + $this->fields['graphtype'] = 'SVG'; break; case 'hgbar': - $this->fields["name"] = $funct_name; - $this->fields["classname"] = $classname; - $this->fields["is_active"] = "1"; - $this->fields["show_graph"] = "1"; - $this->fields["show_label"] = "hover"; - $this->fields["spline"] = "0"; - $this->fields["show_area"] = "0"; - $this->fields["default_delay"] = "365"; - $this->fields["graphtype"] = "SVG"; + $this->fields['name'] = $funct_name; + $this->fields['classname'] = $classname; + $this->fields['is_active'] = '1'; + $this->fields['show_graph'] = '1'; + $this->fields['show_label'] = 'hover'; + $this->fields['spline'] = '0'; + $this->fields['show_area'] = '0'; + $this->fields['default_delay'] = '365'; + $this->fields['graphtype'] = 'SVG'; break; default: - $this->fields["name"] = $funct_name; - $this->fields["classname"] = $classname; - $this->fields["is_active"] = "1"; - $this->fields["show_label"] = "hover"; - $this->fields["spline"] = "0"; - $this->fields["show_area"] = "0"; - $this->fields["show_graph"] = "1"; - $this->fields["default_delay"] = "30"; - $this->fields["graphtype"] = "SVG"; + $this->fields['name'] = $funct_name; + $this->fields['classname'] = $classname; + $this->fields['is_active'] = '1'; + $this->fields['show_label'] = 'hover'; + $this->fields['spline'] = '0'; + $this->fields['show_area'] = '0'; + $this->fields['show_graph'] = '1'; + $this->fields['default_delay'] = '30'; + $this->fields['graphtype'] = 'SVG'; break; } } + return $this->fields; } - /** - * show not used Graphs dropdown - * @name name of dropdown - * @options array example $value - *@return void - **/ + /** + * show not used Graphs dropdown + * @name name of dropdown + * @options array example $value + *@return void + **/ public static function dropdownGraph($name, $options = []) { - $self = new self(); + $self = new self(); $common = new PluginMreportingCommon(); - $rand = mt_rand(); + $rand = mt_rand(); - $select = ""; + $select .= "'; - $i = 0; + $i = 0; $reports = $common->getAllReports(); foreach ($reports as $classname => $report) { foreach ($report['functions'] as $function) { - if (!$self->getFromDBByFunctionAndClassname($function["function"], $classname)) { + if (!$self->getFromDBByFunctionAndClassname($function['function'], $classname)) { $graphs[$classname][$function['category_func']][] = $function; } } @@ -428,55 +427,56 @@ public static function dropdownGraph($name, $options = []) if (isset($graphs[$classname])) { $count = count($graphs[$classname]); if ($count > 0) { - $select .= ""; + $select .= ''; $count = count($graphs[$classname]); if ($count > 0) { foreach ($graphs[$classname] as $cat => $graph) { - $select .= ""; + $select .= ''; foreach ($graph as $k => $v) { - $comment = ""; - if (isset($v["desc"])) { - $comment = $v["desc"]; - $desc = " (" . $comment . ")"; + $comment = ''; + if (isset($v['desc'])) { + $comment = $v['desc']; + $desc = ' (' . $comment . ')'; } - $select .= ""; + value='" . $classname . ';' . $v['function'] . + "'" . ($options['value'] == $classname . ';' . + $v['function'] ? ' selected ' : '') . '>'; + $select .= $v['title'] . $desc; + $select .= ''; $i++; } - $select .= ""; + $select .= ''; } } - $select .= ""; + $select .= ''; } } } - $select .= ""; + $select .= ''; echo $select; + return $rand; } - /** - * show Label dropdown - * @name name of dropdown - * @options array example $value - *@return void - **/ + /** + * show Label dropdown + * @name name of dropdown + * @options array example $value + *@return void + **/ public static function dropdownLabel($name, $options = [], $notall = false) { - $params['value'] = 0; - $params['toadd'] = []; - $params['on_change'] = ''; + $params['value'] = 0; + $params['toadd'] = []; + $params['on_change'] = ''; if (is_array($options) && count($options)) { foreach ($options as $key => $val) { @@ -490,59 +490,60 @@ public static function dropdownLabel($name, $options = [], $notall = false) return Dropdown::showFromArray($name, $items, $params); } - /** - * Get label types - * - * @return array of types - **/ + /** + * Get label types + * + * @return array of types + **/ public static function getLabelTypes($notall = false) { - $options['never'] = __("Never"); - $options['hover'] = __("On mouse over", 'mreporting'); + $options['never'] = __('Never'); + $options['hover'] = __('On mouse over', 'mreporting'); if (!$notall) { - $options['always'] = __("Always"); + $options['always'] = __('Always'); } + return $options; } - /** - * Get label Name - * - * @param $value type ID - **/ + /** + * Get label Name + * + * @param $value type ID + **/ public static function getLabelTypeName($value) { switch ($value) { case 'hover': - return __("On mouse over", 'mreporting'); + return __('On mouse over', 'mreporting'); case 'never': - return __("Never"); + return __('Never'); case 'always': - return __("Always"); + return __('Always'); } } - /** - * checkVisibility - * - * @param $show_label show_label value (hover - always - never) - * @param $always - * @param $hover - **/ + /** + * checkVisibility + * + * @param $show_label show_label value (hover - always - never) + * @param $always + * @param $hover + **/ public static function checkVisibility($show_label, &$always, &$hover) { switch ($show_label) { case 'hover': - $always = "false"; - $hover = "true"; + $always = 'false'; + $hover = 'true'; break; case 'always': - $always = "true"; - $hover = "true"; + $always = 'true'; + $hover = 'true'; break; default: - $always = "false"; - $hover = "false"; + $always = 'false'; + $hover = 'false'; break; } } @@ -552,23 +553,23 @@ public static function getColors($index = 20) if (isset($_SESSION['mreporting']['colors'])) { $colors = $_SESSION['mreporting']['colors']; } else { - /* if ($index <= 10) { - $colors = array( - "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", - "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf" - ); - } else {*/ + /* if ($index <= 10) { + $colors = array( + "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", + "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf" + ); + } else {*/ $colors = [ - "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", - "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", - "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", - "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5" + '#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c', + '#98df8a', '#d62728', '#ff9896', '#9467bd', '#c5b0d5', + '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f', + '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5', ]; // } } - //fill colors on size index - $nb = count($colors); + //fill colors on size index + $nb = count($colors); $tmp = $colors; while (count($colors) < $index) { $colors = array_merge($tmp, $colors); @@ -577,18 +578,18 @@ public static function getColors($index = 20) return $colors; } - public function prepareInputForAdd($input) { - if (isset($input["name"])) { - if ($this->getFromDBByFunctionAndClassname($input["name"], $input["classname"])) { - if (!isset($input["firstconfig"])) { + if (isset($input['name'])) { + if ($this->getFromDBByFunctionAndClassname($input['name'], $input['classname'])) { + if (!isset($input['firstconfig'])) { Session::addMessageAfterRedirect( - __("Object already exists", 'mreporting'), + __('Object already exists', 'mreporting'), false, - ERROR + ERROR, ); } + return []; } } @@ -598,9 +599,8 @@ public function prepareInputForAdd($input) public function prepareInputForUpdate($input) { - - if (isset($input["classname"]) && method_exists(new $input["classname"]([]), 'checkConfig')) { - $object = new $input["classname"]([]); + if (isset($input['classname']) && method_exists(new $input['classname']([]), 'checkConfig')) { + $object = new $input['classname']([]); $checkConfig = $object->checkConfig($input); if (!$checkConfig['result']) { Session::addMessageAfterRedirect($checkConfig['message'], ERROR, true); @@ -623,255 +623,253 @@ public function showForm($ID, $options = []) $this->preconfig($_GET['name'], $_GET['classname']); $_GET['preconfig'] = 1; } else { - $_GET['name'] = -1; + $_GET['name'] = -1; $_GET['classname'] = -1; $_GET['preconfig'] = -1; } } echo ""; - echo ""; + echo ''; echo ""; - echo ""; - echo "
"; - echo __("Preconfiguration") . " "; - $opt = ['value' => $_GET['preconfig']]; - $rand = self::dropdownGraph('graphname', $opt); + echo __('Preconfiguration') . ' '; + $opt = ['value' => $_GET['preconfig']]; + $rand = self::dropdownGraph('graphname', $opt); $params = ['graphname' => '__VALUE__']; Ajax::updateItemOnSelectEvent( "dropdown_graphname$rand", - "show_preconfig", - "../ajax/dropdownGraphs.php", - $params + 'show_preconfig', + '../ajax/dropdownGraphs.php', + $params, ); echo ""; - echo "
"; + echo ''; + echo ''; + echo ''; - $style = ($_GET['preconfig'] == -1 && $ID <= 0) ? "display:none;" : "'display:block;'"; + $style = ($_GET['preconfig'] == -1 && $ID <= 0) ? 'display:none;' : "'display:block;'"; echo "
"; $this->showFormHeader($options); echo ""; - echo "" . __("Name") . ""; - echo ""; - echo $this->fields["name"]; - echo "fields["name"] . "\">"; - echo ""; + echo '' . __('Name') . ''; + echo ''; + echo $this->fields['name']; + echo "fields['name'] . '">'; + echo ''; echo ""; $gtype = ''; - $f_name = $this->fields["name"]; + $f_name = $this->fields['name']; $ex_func = preg_split('/(?<=\\w)(?=[A-Z])/', $f_name); if (isset($ex_func[1])) { $gtype = strtolower($ex_func[1]); } - $short_classname = str_replace('PluginMreporting', '', $this->fields["classname"]); + $short_classname = str_replace('PluginMreporting', '', $this->fields['classname']); if ( !empty($short_classname) && !empty($f_name) && isset($LANG['plugin_mreporting'][$short_classname][$f_name]['title']) ) { - echo " "; - echo ""; + echo ' '; + echo ""; echo $LANG['plugin_mreporting'][$short_classname][$f_name]['title']; - echo ""; + echo ''; } else { - echo __("No report is available !", 'mreporting'); + echo __('No report is available !', 'mreporting'); } - echo "fields["classname"] . "\">"; - echo ""; - echo ""; + echo "fields['classname'] . '">'; + echo ''; + echo ''; echo ""; - echo "" . __("See graphic", 'mreporting') . ""; - echo ""; - Dropdown::showYesNo("show_graph", $this->fields["show_graph"]); - echo ""; + echo '' . __('See graphic', 'mreporting') . ''; + echo ''; + Dropdown::showYesNo('show_graph', $this->fields['show_graph']); + echo ''; - echo "" . __("Default chart format", 'mreporting') . ""; - echo ""; + echo '' . __('Default chart format', 'mreporting') . ''; + echo ''; Dropdown::showFromArray( - "graphtype", - ['PNG' => 'PNG', 'SVG' => 'SVG'], - ['value' => $this->fields["graphtype"]] + 'graphtype', + ['PNG' => 'PNG', 'SVG' => 'SVG'], + ['value' => $this->fields['graphtype']], ); - echo ""; - echo ""; + echo ''; + echo ''; echo ""; - echo "" . __("Active") . ""; - echo ""; - Dropdown::showYesNo("is_active", $this->fields["is_active"]); - echo ""; - - echo ""; - echo __("See area", 'mreporting'); - echo ""; - echo ""; + echo '' . __('Active') . ''; + echo ''; + Dropdown::showYesNo('is_active', $this->fields['is_active']); + echo ''; + + echo ''; + echo __('See area', 'mreporting'); + echo ''; + echo ''; if ($gtype == 'area' || $gtype == 'garea') { - Dropdown::showYesNo("show_area", $this->fields["show_area"]); + Dropdown::showYesNo('show_area', $this->fields['show_area']); } else { - echo Dropdown::getYesNo($this->fields["show_area"]); + echo Dropdown::getYesNo($this->fields['show_area']); echo ""; } - echo ""; - echo ""; + echo ''; + echo ''; echo ""; - echo ""; - echo __("Curve lines (SVG)", 'mreporting'); - echo ""; - echo ""; + echo ''; + echo __('Curve lines (SVG)', 'mreporting'); + echo ''; + echo ''; if ($gtype == 'area' || $gtype == 'garea' || $gtype == 'line' || $gtype == 'gline') { - Dropdown::showYesNo("spline", $this->fields["spline"]); + Dropdown::showYesNo('spline', $this->fields['spline']); } else { - echo Dropdown::getYesNo($this->fields["spline"]); + echo Dropdown::getYesNo($this->fields['spline']); echo ""; } - echo ""; + echo ''; - echo ""; - echo __("See values", 'mreporting'); - echo ""; + echo ''; + echo __('See values', 'mreporting'); + echo ''; - echo ""; - $opt = ['value' => $this->fields["show_label"]]; + echo ''; + $opt = ['value' => $this->fields['show_label']]; if ($gtype != 'area' && $gtype != 'garea' && $gtype != 'line' && $gtype != 'gline') { self::dropdownLabel('show_label', $opt); } else { self::dropdownLabel('show_label', $opt, true); } - echo ""; - echo ""; + echo ''; + echo ''; echo ""; - echo ""; - echo __("Reverse data array", 'mreporting'); - echo ""; - echo ""; + echo ''; + echo __('Reverse data array', 'mreporting'); + echo ''; + echo ''; if ($gtype != 'hbar' && $gtype != 'pie' && $gtype != 'area' && $gtype != 'line') { - Dropdown::showYesNo("flip_data", $this->fields["flip_data"]); + Dropdown::showYesNo('flip_data', $this->fields['flip_data']); } else { - echo Dropdown::getYesNo($this->fields["flip_data"]); + echo Dropdown::getYesNo($this->fields['flip_data']); echo ""; } - echo ""; + echo ''; - echo ""; - echo __("Unit", 'mreporting'); - echo ""; - echo ""; + echo ''; + echo __('Unit', 'mreporting'); + echo ''; + echo ''; echo Html::input( 'unit', [ 'value' => $this->fields['unit'], - 'size' => 10 - ] + 'size' => 10, + ], ); - echo ""; - echo ""; + echo ''; + echo ''; echo ""; - echo ""; - echo __("Default delay", 'mreporting'); - echo ""; - echo ""; + echo ''; + echo __('Default delay', 'mreporting'); + echo ''; + echo ''; echo Html::input( 'default_delay', [ 'value' => $this->fields['default_delay'], - 'size' => 10 - ] + 'size' => 10, + ], ); - echo ""; + echo ''; - echo ""; - echo __("Additional condition for MySQL", 'mreporting'); - echo ""; - echo ""; + echo ''; + echo __('Additional condition for MySQL', 'mreporting'); + echo ''; + echo ''; echo Html::input( 'condition', [ 'value' => $this->fields['condition'], - ] + ], ); - echo ""; - echo ""; + echo ''; + echo ''; echo ""; - echo ""; - echo __("Send this report with the notification", 'mreporting'); - echo ""; - echo ""; - Dropdown::showYesNo("is_notified", $this->fields["is_notified"]); - echo ""; - echo " "; - echo " "; - echo ""; + echo ''; + echo __('Send this report with the notification', 'mreporting'); + echo ''; + echo ''; + Dropdown::showYesNo('is_notified', $this->fields['is_notified']); + echo ''; + echo ' '; + echo ' '; + echo ''; $this->showFormButtons($options); - echo "
"; + echo ''; return true; } - /** - * initialize config for graph display options - * - * @param $name of graph - * @param $classname of graph - **/ + /** + * initialize config for graph display options + * + * @param $name of graph + * @param $classname of graph + **/ public static function initConfigParams($name, $classname) { - - $crit = ['area' => false, - 'spline' => false, - 'flip_data' => false, - 'unit' => '', - 'show_label' => 'never', - 'delay' => '30', - 'condition' => '', - 'show_graph' => false, - 'randname' => mt_rand(), - 'graphtype' => 'SVG' + $crit = ['area' => false, + 'spline' => false, + 'flip_data' => false, + 'unit' => '', + 'show_label' => 'never', + 'delay' => '30', + 'condition' => '', + 'show_graph' => false, + 'randname' => mt_rand(), + 'graphtype' => 'SVG', ]; $self = new self(); if ($self->getFromDBByFunctionAndClassname($name, $classname)) { - $crit['area'] = $self->fields['show_area']; - $crit['spline'] = $self->fields['spline']; - $crit['show_label'] = $self->fields['show_label']; - $crit['flip_data'] = $self->fields['flip_data']; - $crit['unit'] = $self->fields['unit']; - $crit['delay'] = $self->fields['default_delay']; - $crit['condition'] = $self->fields['condition']; - $crit['show_graph'] = $self->fields['show_graph']; - $crit['graphtype'] = $self->fields['graphtype']; - $crit['randname'] = $classname . $name; + $crit['area'] = $self->fields['show_area']; + $crit['spline'] = $self->fields['spline']; + $crit['show_label'] = $self->fields['show_label']; + $crit['flip_data'] = $self->fields['flip_data']; + $crit['unit'] = $self->fields['unit']; + $crit['delay'] = $self->fields['default_delay']; + $crit['condition'] = $self->fields['condition']; + $crit['show_graph'] = $self->fields['show_graph']; + $crit['graphtype'] = $self->fields['graphtype']; + $crit['randname'] = $classname . $name; } if (DEBUG_MREPORTING) { - $crit['show_graph'] = 1; + $crit['show_graph'] = 1; } return $crit; } - /** - * test for value of show_graph field - * - * @param $name of graph - * @param $classname of graph - **/ - + /** + * test for value of show_graph field + * + * @param $name of graph + * @param $classname of graph + **/ public static function showGraphConfigValue($name, $classname) { if (DEBUG_MREPORTING) { @@ -882,6 +880,7 @@ public static function showGraphConfigValue($name, $classname) if ($self->getFromDBByFunctionAndClassname($name, $classname)) { return $self->fields['show_graph']; } + return false; } } diff --git a/inc/dashboard.class.php b/inc/dashboard.class.php index be94469a..de554370 100644 --- a/inc/dashboard.class.php +++ b/inc/dashboard.class.php @@ -36,12 +36,12 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) get_class($item) == 'Central' && PluginMreportingCommon::canAccessAtLeastOneReport($_SESSION['glpiactiveprofile']['id']) ) { - return [1 => __("Dashboard", 'mreporting')]; + return [1 => __('Dashboard', 'mreporting')]; } + return ''; } - public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { global $CFG_GLPI; @@ -61,8 +61,9 @@ function resizeIframe(obj) { echo ""; - echo ""; + echo ''; } + return true; } @@ -70,7 +71,7 @@ public function showDashBoard($show_reports_dropdown = true) { global $LANG; - $root_ajax = Plugin::getWebDir('mreporting') . "/ajax/dashboard.php"; + $root_ajax = Plugin::getWebDir('mreporting') . '/ajax/dashboard.php'; if (isset($options['target'])) { $target = $options['target']; @@ -81,37 +82,37 @@ public function showDashBoard($show_reports_dropdown = true) $_REQUEST['f_name'] = 'option'; PluginMreportingCommon::getSelectorValuesByUser(); - //retrieve dashboard widgets; + //retrieve dashboard widgets; $dashboard = new PluginMreportingDashboard(); - $widgets = $dashboard->find(['users_id' => $_SESSION['glpiID']], 'id'); + $widgets = $dashboard->find(['users_id' => $_SESSION['glpiID']], 'id'); - //show dashboard + //show dashboard echo "
"; if ($show_reports_dropdown) { echo "
"; - echo "" . __("Select a report to display", 'mreporting') . " : "; + echo '' . __('Select a report to display', 'mreporting') . ' : '; echo PluginMreportingCommon::getSelectAllReports(true); - echo "
"; - echo "
"; - echo "
"; - echo "
"; + echo '
'; + echo '
'; + echo '
'; + echo '
'; } if (empty($widgets)) { echo "
"; echo "
"; - echo __("Dashboard is empty. Please add reports by clicking on the icon", 'mreporting'); - echo "
"; - echo "
"; + echo __('Dashboard is empty. Please add reports by clicking on the icon', 'mreporting'); + echo ''; + echo ''; } echo "
"; echo ""; - echo "
"; + echo ''; $modal_html = json_encode($this->getFormForColumn()); echo " "; if (empty($widgets)) { - echo ""; - echo ""; + echo ''; + echo ''; } echo "
"; @@ -155,9 +156,9 @@ public function showDashBoard($show_reports_dropdown = true) $report = new PluginMreportingConfig(); $report->getFromDB($data['reports_id']); - //Class may not exists: this case should only happen during development phase + //Class may not exists: this case should only happen during development phase if ( - !class_exists($report->fields["classname"]) + !class_exists($report->fields['classname']) || !PluginMreportingProfile::canViewReports($_SESSION['glpiactiveprofile']['id'], $report->getID()) ) { continue; @@ -165,36 +166,36 @@ public function showDashBoard($show_reports_dropdown = true) $index = str_replace('PluginMreporting', '', $report->fields['classname']); $title = $LANG['plugin_mreporting'][$index][$report->fields['name']]['title']; - $report_script = "Nothing to show"; - //$config = "No configuration"; + $report_script = 'Nothing to show'; + //$config = "No configuration"; - $f_name = $report->fields["name"]; + $f_name = $report->fields['name']; - $gtype = ''; + $gtype = ''; $ex_func = preg_split('/(?<=\\w)(?=[A-Z])/', $f_name); if (isset($ex_func[1])) { $gtype = strtolower($ex_func[1]); } - $short_classname = str_replace('PluginMreporting', '', $report->fields["classname"]); + $short_classname = str_replace('PluginMreporting', '', $report->fields['classname']); - $_REQUEST['f_name'] = $f_name; + $_REQUEST['f_name'] = $f_name; $_REQUEST['short_classname'] = $short_classname; PluginMreportingCommon::getSelectorValuesByUser(); if (!empty($short_classname) && !empty($f_name)) { if (isset($LANG['plugin_mreporting'][$short_classname][$f_name]['title'])) { $opt = ['short_classname' => $short_classname, - 'f_name' => $f_name, - 'gtype' => $gtype, - 'width' => 410, - 'hide_title' => true + 'f_name' => $f_name, + 'gtype' => $gtype, + 'width' => 410, + 'hide_title' => true, ]; $common = new PluginMreportingCommon(); ob_start(); $report_script = $common->showGraph($opt); if ($report_script === false) { - $report_script = "
"; + $report_script = ''; } $report_script = ob_get_clean() . $report_script; } @@ -208,7 +209,7 @@ public function showDashBoard($show_reports_dropdown = true) $('#configWidget_button$rand_widget').on('click', function( event ) { glpi_ajax_dialog({ - title: '" . __("Configure report", 'mreporting') . "', + title: '" . __('Configure report', 'mreporting') . "', dialogclass: 'modal-lg', url: '$root_ajax', params: { @@ -236,8 +237,8 @@ public function showDashBoard($show_reports_dropdown = true) - +  $title @@ -249,22 +250,23 @@ public function showDashBoard($show_reports_dropdown = true) } echo "
"; - echo ""; + echo ''; } public static function currentUserHaveDashboard() { $dashboard = new PluginMreportingDashboard(); + return (count($dashboard->find(['users_id' => $_SESSION['glpiID']])) > 0); } public function getFormForColumn() { - $out = ""; + $out = ""; $out .= PluginMreportingCommon::getSelectAllReports(false, true); $out .= ""; $out .= Html::closeForm(false); - $out .= ""; + $out .= ''; return $out; } @@ -272,7 +274,8 @@ public function getFormForColumn() public static function removeReportFromDashboard($id) { $report = new PluginMreportingDashboard(); - return $report->delete(["id" => $id]); + + return $report->delete(['id' => $id]); } public static function updateWidget($idreport) @@ -288,23 +291,23 @@ public static function updateWidget($idreport) $index = str_replace('PluginMreporting', '', $report->fields['classname']); $title = $LANG['plugin_mreporting'][$index][$report->fields['name']]['title']; - $out = "Nothing to show"; + $out = 'Nothing to show'; - $f_name = $report->fields["name"]; + $f_name = $report->fields['name']; - $gtype = ''; + $gtype = ''; $ex_func = preg_split('/(?<=\\w)(?=[A-Z])/', $f_name); if (isset($ex_func[1])) { $gtype = strtolower($ex_func[1]); } - $short_classname = str_replace('PluginMreporting', '', $report->fields["classname"]); + $short_classname = str_replace('PluginMreporting', '', $report->fields['classname']); if (!empty($short_classname) && !empty($f_name)) { if (isset($LANG['plugin_mreporting'][$short_classname][$f_name]['title'])) { - $opt = ['short_classname' => $short_classname , 'f_name' => $f_name , 'gtype' => $gtype ]; + $opt = ['short_classname' => $short_classname , 'f_name' => $f_name , 'gtype' => $gtype]; $dash = new PluginMreportingDashboard(); - $out = $dash->showGraphOnDashboard($opt); + $out = $dash->showGraphOnDashboard($opt); } } @@ -317,8 +320,9 @@ public static function getConfig() $reportSelectors = PluginMreportingCommon::getReportSelectors(true); - if ($reportSelectors == "") { - echo "No configuration for this report"; + if ($reportSelectors == '') { + echo 'No configuration for this report'; + return; } @@ -327,12 +331,12 @@ public static function getConfig() echo ""; echo ""; echo $reportSelectors; - echo "
"; + echo ''; echo ""; echo ""; echo ""; - echo ""; + echo "'; Html::closeForm(); } diff --git a/inc/graph.class.php b/inc/graph.class.php index d5757a09..92eefe4e 100644 --- a/inc/graph.class.php +++ b/inc/graph.class.php @@ -30,36 +30,36 @@ class PluginMreportingGraph { - const DEBUG_GRAPH = false; - protected $width = 850; + public const DEBUG_GRAPH = false; + protected $width = 850; - /** - * init Graph : Show Titles / Date selector - * - * @params $options ($rand, short_classname, title, desc, delay) - */ + /** + * init Graph : Show Titles / Date selector + * + * @params $options ($rand, short_classname, title, desc, delay) + */ public function initGraph($options) { global $LANG, $CFG_GLPI; - $width = $this->width + 100; - $randname = $options['randname']; + $width = $this->width + 100; + $randname = $options['randname']; if (!$options['showHeader']) { echo "
"; - //Show global title + //Show global title if (isset($LANG['plugin_mreporting'][$options['short_classname']]['title'])) { echo "
"; echo $LANG['plugin_mreporting'][$options['short_classname']]['title']; - echo "
"; + echo '
'; } - //Show graph title + //Show graph title echo "
"; $gtype = $_REQUEST['gtype']; echo ""; echo $options['title']; - echo "
"; + echo '
'; $desc = ''; if (!empty($options['desc'])) { @@ -68,7 +68,7 @@ public function initGraph($options) isset($_SESSION['mreporting_values']['date1' . $randname]) && isset($_SESSION['mreporting_values']['date1' . $randname]) ) { - $desc .= " - "; + $desc .= ' - '; } } @@ -76,28 +76,28 @@ public function initGraph($options) isset($_SESSION['mreporting_values']['date1' . $randname]) && isset($_SESSION['mreporting_values']['date1' . $randname]) ) { - $desc .= Html::convdate($_SESSION['mreporting_values']['date1' . $randname]) . " / " . + $desc .= Html::convdate($_SESSION['mreporting_values']['date1' . $randname]) . ' / ' . Html::convdate($_SESSION['mreporting_values']['date2' . $randname]); } - echo "
" . $desc . "
"; + echo "
" . $desc . '
'; - //Show date selector + //Show date selector echo "
"; PluginMreportingCommon::showSelector( $_SESSION['mreporting_values']['date1' . $randname], $_SESSION['mreporting_values']['date2' . $randname], - $randname + $randname, ); - echo "
"; + echo ''; $ex_func = explode($options['short_classname'], $options['randname']); if (!is_numeric($ex_func[0])) { - $classname = $ex_func[0] . $options['short_classname']; - $functionname = $ex_func[1]; + $classname = $ex_func[0] . $options['short_classname']; + $functionname = $ex_func[1]; - $config = PluginMreportingConfig::initConfigParams($functionname, $classname); + $config = PluginMreportingConfig::initConfigParams($functionname, $classname); - // We check if a configuration is needed for the graph + // We check if a configuration is needed for the graph if (method_exists(new $classname($config), 'needConfig')) { $object = new $classname(); $object->needConfig($config); @@ -105,7 +105,7 @@ public function initGraph($options) } } - //Script for graph display + //Script for graph display if ($randname !== false) { echo "
"; @@ -116,22 +116,21 @@ public function initGraph($options) } } - /** - * Show an horizontal bar chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show an horizontal bar chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showHbar($params, $dashboard = false, $width = false) { - ob_start(); if ($width !== false) { $this->width = $width; @@ -147,25 +146,26 @@ public function showHbar($params, $dashboard = false, $width = false) $$k = $v; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "delay" => $delay, - "export" => $export, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'delay' => $delay, + 'export' => $export, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (!isset($raw_datas['datas'])) { - echo "}"; - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + echo '}'; + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end, $dashboard); + return false; } @@ -184,7 +184,7 @@ public function showHbar($params, $dashboard = false, $width = false) $height = 25 * $nb_bar + 50; $always = ''; - $hover = ''; + $hover = ''; $left = 240; if ($dashboard) { @@ -195,7 +195,7 @@ public function showHbar($params, $dashboard = false, $width = false) } $always = ''; - $hover = ''; + $hover = ''; PluginMreportingConfig::checkVisibility($show_label, $always, $hover); $JS = << $opt, - "export" => $export, - "datas" => $datas, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); @@ -315,21 +315,20 @@ public function showHbar($params, $dashboard = false, $width = false) } } - - /** - * Show a pie chart - * - * @params : - * $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a pie chart + * + * @params : + * $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showPie($params, $dashboard = false, $width = false) { ob_start(); @@ -349,25 +348,26 @@ public function showPie($params, $dashboard = false, $width = false) $$k = $v; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (!isset($raw_datas['datas'])) { - echo "}"; - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + echo '}'; + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end, $dashboard); + return false; } @@ -383,10 +383,10 @@ public function showPie($params, $dashboard = false, $width = false) if ($height < 300) { $height = 300; } - $always = ''; - $hover = ''; - $radius = 150; - $left = 10; + $always = ''; + $hover = ''; + $radius = 150; + $left = 10; $right_legend = 5; if ($dashboard) { @@ -489,10 +489,10 @@ public function showPie($params, $dashboard = false, $width = false) } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); @@ -506,25 +506,25 @@ public function showPie($params, $dashboard = false, $width = false) } } - /** - * Show a sunburst chart (see : http://mbostock.github.com/protovis/ex/sunburst.html) - * - * @params : - * @param $raw_datas : an array with : - * - key 'datas', ex : - * array( - * 'key1' => array('key1.1' => val, 'key1.2' => val, 'key1.3' => val), - * 'key2' => array('key2.1' => val, 'key2.2' => val, 'key2.3' => val) - * ) - * - key 'root', root label in graph center - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a sunburst chart (see : http://mbostock.github.com/protovis/ex/sunburst.html) + * + * @params : + * @param $raw_datas : an array with : + * - key 'datas', ex : + * array( + * 'key1' => array('key1.1' => val, 'key1.2' => val, 'key1.3' => val), + * 'key2' => array('key2.1' => val, 'key2.2' => val, 'key2.3' => val) + * ) + * - key 'root', root label in graph center + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showSunburst($params, $dashboard = false, $width = false) { ob_start(); @@ -543,31 +543,32 @@ public function showSunburst($params, $dashboard = false, $width = false) $$k = $v; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (isset($_REQUEST['export'])) { - $export_txt = "true"; + $export_txt = 'true'; } else { - $export_txt = "false"; + $export_txt = 'false'; } if (!isset($raw_datas['datas'])) { - echo "}"; - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + echo '}'; + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end, $dashboard); + return false; } @@ -585,16 +586,16 @@ public function showSunburst($params, $dashboard = false, $width = false) $datas = $this->initDatasTree($datas, $unit); $always = ''; - $hover = ''; + $hover = ''; PluginMreportingConfig::checkVisibility($show_label, $always, $hover); $height = 450; - $width = $this->width; - $top = 10; - $left = 10; + $width = $this->width; + $top = 10; + $left = 10; if ($dashboard) { - $top = 25; + $top = 25; $height = 380; - $left = 50; + $left = 50; } $JS = << $opt, - "export" => $export, - "datas" => $datas, - "flip_data" => $flip_data, - "labels2" => $labels2, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'flip_data' => $flip_data, + 'labels2' => $labels2, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); @@ -781,20 +782,20 @@ function getLevelNbNode(node) { } } - /** - * Show a horizontal grouped bar chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => array(15,20,50), 'test2' => array(36,15,22)) - * - key 'labels2', ex : array('label 1', 'label 2', 'label 3') - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a horizontal grouped bar chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => array(15,20,50), 'test2' => array(36,15,22)) + * - key 'labels2', ex : array('label 1', 'label 2', 'label 3') + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showHgbar($params, $dashboard = false, $width = false) { $criterias = PluginMreportingCommon::initGraphParams($params); @@ -812,25 +813,26 @@ public function showHgbar($params, $dashboard = false, $width = false) $$k = $v; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (!isset($raw_datas['datas'])) { - echo "}"; - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + echo '}'; + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end, $dashboard); + return false; } @@ -838,18 +840,18 @@ public function showHgbar($params, $dashboard = false, $width = false) $unit = $raw_datas['unit']; } - $datas = $raw_datas['datas']; + $datas = $raw_datas['datas']; $labels2 = $raw_datas['labels2']; - $datas = $this->initDatasMultiple($datas, $labels2, $unit); + $datas = $this->initDatasMultiple($datas, $labels2, $unit); - $nb_bar = count($datas); + $nb_bar = count($datas); $nb_bar2 = count($labels2); - $height = 28 * $nb_bar * $nb_bar2 + 50; + $height = 28 * $nb_bar * $nb_bar2 + 50; $always = ''; - $hover = ''; + $hover = ''; PluginMreportingConfig::checkVisibility($show_label, $always, $hover); - $left = 240; + $left = 240; $bottomAxis = 5; if ($dashboard) { $left = 100; @@ -984,12 +986,12 @@ public function showHgbar($params, $dashboard = false, $width = false) } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "labels2" => $labels2, - "flip_data" => $flip_data, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'labels2' => $labels2, + 'flip_data' => $flip_data, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); @@ -1002,21 +1004,20 @@ public function showHgbar($params, $dashboard = false, $width = false) } } - - /** - * Show a horizontal grouped bar chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => array(15,20,50), 'test2' => array(36,15,22)) - * - key 'labels2', ex : array('label 1', 'label 2', 'label 3') - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a horizontal grouped bar chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => array(15,20,50), 'test2' => array(36,15,22)) + * - key 'labels2', ex : array('label 1', 'label 2', 'label 3') + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showVstackbar($params, $dashboard = false, $width = false) { ob_start(); @@ -1035,25 +1036,26 @@ public function showVstackbar($params, $dashboard = false, $width = false) $$k = $v; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (!isset($raw_datas['datas'])) { - echo "}"; - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + echo '}'; + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end, $dashboard); + return false; } @@ -1061,15 +1063,15 @@ public function showVstackbar($params, $dashboard = false, $width = false) $unit = $raw_datas['unit']; } - $datas = $raw_datas['datas']; + $datas = $raw_datas['datas']; $labels2 = $raw_datas['labels2']; - $datas = $this->initDatasMultiple($datas, $labels2, $unit, true); + $datas = $this->initDatasMultiple($datas, $labels2, $unit, true); - $nb_bar = count($datas); + $nb_bar = count($datas); $nb_bar2 = count($labels2); $always = ''; - $hover = ''; + $hover = ''; PluginMreportingConfig::checkVisibility($show_label, $always, $hover); $height = 20 * $nb_bar + 50; @@ -1211,12 +1213,12 @@ public function showVstackbar($params, $dashboard = false, $width = false) } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "labels2" => $labels2, - "flip_data" => $flip_data, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'labels2' => $labels2, + 'flip_data' => $flip_data, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); @@ -1229,21 +1231,21 @@ public function showVstackbar($params, $dashboard = false, $width = false) } } - /** - * Show a Area chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) - * - key 'unit', ex : '%', 'Kg' (optionnal) - * - key 'spline', curves line (boolean - optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @param $area : show plain chart instead only a line (optionnal) - * @return void - */ + /** + * Show a Area chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) + * - key 'unit', ex : '%', 'Kg' (optionnal) + * - key 'spline', curves line (boolean - optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @param $area : show plain chart instead only a line (optionnal) + * @return void + */ public function showArea($params, $dashboard = false, $width = false) { ob_start(); @@ -1268,25 +1270,26 @@ public function showArea($params, $dashboard = false, $width = false) $area = $params['area']; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (!isset($raw_datas['datas'])) { - echo "}"; - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + echo '}'; + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end, $dashboard); + return false; } @@ -1298,17 +1301,17 @@ public function showArea($params, $dashboard = false, $width = false) $datas = $this->initDatasSimple($datas, $unit); $always = ''; - $hover = ''; + $hover = ''; PluginMreportingConfig::checkVisibility($show_label, $always, $hover); $height = 350; - $width = $this->width; + $width = $this->width; $bottom = 80; - $left = 20; - $right = 50; + $left = 20; + $right = 50; if ($dashboard) { $height = 340; - $width = 395; - $left = 30; + $width = 395; + $left = 30; } $JS = << $opt, - "export" => $export, - "datas" => $datas, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); @@ -1458,20 +1461,20 @@ public function showArea($params, $dashboard = false, $width = false) } } - /** - * Show a Line chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) - * - key 'unit', ex : '%', 'Kg' (optionnal) - * - key 'spline', curves line (boolean - optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a Line chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) + * - key 'unit', ex : '%', 'Kg' (optionnal) + * - key 'spline', curves line (boolean - optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showLine($params, $dashboard = false, $width = false) { $params['area'] = false; @@ -1513,25 +1516,26 @@ public function showGarea($params, $dashboard = false, $width = false) $$k = $v; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (!isset($raw_datas['datas'])) { - echo "}"; - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + echo '}'; + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end, $dashboard); + return false; } @@ -1544,12 +1548,12 @@ public function showGarea($params, $dashboard = false, $width = false) $unit = $raw_datas['unit']; } - $datas = $raw_datas['datas']; + $datas = $raw_datas['datas']; $labels2 = $raw_datas['labels2']; - $datas = $this->initDatasMultiple($datas, $labels2, $unit); + $datas = $this->initDatasMultiple($datas, $labels2, $unit); $always = ''; - $hover = ''; + $hover = ''; PluginMreportingConfig::checkVisibility($show_label, $always, $hover); $nb_bar = count($datas); @@ -1708,12 +1712,12 @@ public function showGarea($params, $dashboard = false, $width = false) } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "labels2" => $labels2, - "flip_data" => $flip_data, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'labels2' => $labels2, + 'flip_data' => $flip_data, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); @@ -1726,19 +1730,19 @@ public function showGarea($params, $dashboard = false, $width = false) } } - /** - * Show a multi-line charts - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a multi-line charts + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showGline($params, $dashboard = false, $width = false) { $params['area'] = false; @@ -1749,16 +1753,15 @@ public function showGline($params, $dashboard = false, $width = false) } } - /** - * Compile simple datas - * - * @param $datas, ex : array( 'test1' => 15, 'test2' => 25) - * @param $unit, ex : '%', 'Kg' (optionnal) - * @return void - */ + /** + * Compile simple datas + * + * @param $datas, ex : array( 'test1' => 15, 'test2' => 25) + * @param $unit, ex : '%', 'Kg' (optionnal) + * @return void + */ public function initDatasSimple($datas, $unit = '', $links = []) { - $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); $labels = array_keys($datas); @@ -1795,28 +1798,27 @@ public function initDatasSimple($datas, $unit = '', $links = []) } echo "var max = $max;"; - echo "var n = " . count($values) . ";"; + echo 'var n = ' . count($values) . ';'; return $datas; } - /** - * Compile multiple datas - * - * @param $datas, ex : array( 'test1' => 15, 'test2' => 25) - * @param $labels2 - * @param $unit, ex : '%', 'Kg' (optionnal) - * @param $stacked : if stacked graph, option to compile the max value - * @return void - */ + /** + * Compile multiple datas + * + * @param $datas, ex : array( 'test1' => 15, 'test2' => 25) + * @param $labels2 + * @param $unit, ex : '%', 'Kg' (optionnal) + * @param $stacked : if stacked graph, option to compile the max value + * @return void + */ public function initDatasMultiple($datas, $labels2, $unit = '', $stacked = false) { - $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); $labels = array_keys($datas); $values = array_values($datas); - $max = 0; + $max = 0; if ($stacked) { $tmp = []; @@ -1835,7 +1837,7 @@ public function initDatasMultiple($datas, $labels2, $unit = '', $stacked = false } } - //merge missing keys + //merge missing keys $empty_values = array_fill_keys(array_keys($labels2), 0); foreach ($values as $k => $v) { $values[$k] = array_replace($empty_values, $v); @@ -1845,12 +1847,12 @@ public function initDatasMultiple($datas, $labels2, $unit = '', $stacked = false foreach ($values as $line) { $out .= "\t["; foreach ($line as $label2 => $value) { - $out .= addslashes($value) . ","; + $out .= addslashes($value) . ','; if ($value > $max && !$stacked) { $max = $value; } } - $out = substr($out, 0, -1) . ""; + $out = substr($out, 0, -1) . ''; $out .= "],\n"; } $out = substr($out, 0, -2) . "\n"; @@ -1878,39 +1880,33 @@ public function initDatasMultiple($datas, $labels2, $unit = '', $stacked = false $max = 110; } - echo "var n = " . count($labels) . ";"; - echo "var m = " . count($labels2) . ";"; + echo 'var n = ' . count($labels) . ';'; + echo 'var m = ' . count($labels2) . ';'; echo "var max = $max;"; return $datas; } - - /** - * Compile Tree datas - * - * @param $datas, ex : - * array( - * 'key1' => array('key1.1' => val, 'key1.2' => val, 'key1.3' => val), - * 'key2' => array('key2.1' => val, 'key2.2' => val, 'key2.3' => val) - * ) - * @param $unit, ex : '%', 'Kg' (optionnal) - * @return void - */ + /** + * Compile Tree datas + * + * @param $datas, ex : + * array( + * 'key1' => array('key1.1' => val, 'key1.2' => val, 'key1.3' => val), + * 'key2' => array('key2.1' => val, 'key2.2' => val, 'key2.3' => val) + * ) + * @param $unit, ex : '%', 'Kg' (optionnal) + * @return void + */ public function initDatasTree($datas, $unit = '') { - $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); - echo "var datas = " . json_encode($datas) . ";"; - echo "var sum = " . PluginMreportingCommon::getArraySum($datas) . ";"; + echo 'var datas = ' . json_encode($datas) . ';'; + echo 'var sum = ' . PluginMreportingCommon::getArraySum($datas) . ';'; return $datas; } - - - public function legend($datas) - { - } + public function legend($datas) {} } diff --git a/inc/graphcsv.class.php b/inc/graphcsv.class.php index 56c2c7b0..9c4ea04b 100644 --- a/inc/graphcsv.class.php +++ b/inc/graphcsv.class.php @@ -30,13 +30,13 @@ class PluginMreportingGraphcsv extends PluginMreportingGraph { - const DEBUG_CSV = false; + public const DEBUG_CSV = false; public function initGraph($options) { if (!self::DEBUG_CSV) { - header("Content-type: application/csv"); - header("Content-Disposition: inline; filename=export.csv"); + header('Content-type: application/csv'); + header('Content-Disposition: inline; filename=export.csv'); } } @@ -49,7 +49,7 @@ public function showHbar($params, $dashboard = false, $width = false) $$key = $val; } - // Write in Log + // Write in Log if (self::DEBUG_CSV && isset($raw_datas)) { Toolbox::logdebug($raw_datas); } @@ -73,24 +73,24 @@ public function showHbar($params, $dashboard = false, $width = false) $values = array_values($datas); $labels = array_keys($datas); - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, ]; $this->initGraph($options); - //titles - $out = $title . " - " . $desc . "\r\n"; + //titles + $out = $title . ' - ' . $desc . "\r\n"; foreach ($labels as $label) { $out .= $label . $CFG_GLPI['csv_delimiter']; } $out = substr($out, 0, -1) . "\r\n"; - //values + //values foreach ($values as $value) { - $out .= $value . " " . $unit . $CFG_GLPI['csv_delimiter']; + $out .= $value . ' ' . $unit . $CFG_GLPI['csv_delimiter']; } $out = substr($out, 0, -1) . "\r\n"; @@ -112,7 +112,7 @@ public function showHgbar($params, $dashboard = false, $width = false) $$key = $val; } - // Write in log + // Write in log if (self::DEBUG_CSV && isset($raw_datas)) { Toolbox::logdebug($raw_datas); } @@ -135,35 +135,35 @@ public function showHgbar($params, $dashboard = false, $width = false) $labels2 = array_values($raw_datas['labels2']); - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, ]; $this->initGraph($options); - $out = $title . " - " . $desc . "\r\n"; + $out = $title . ' - ' . $desc . "\r\n"; foreach ($datas as $label2 => $cols) { - //title + //title $out .= $label2 . "\r\n"; - //subtitle + //subtitle $i = 0; foreach ($cols as $value) { - $label = ""; + $label = ''; if (isset($labels2[$i])) { - $label = str_replace(",", "-", $labels2[$i]); + $label = str_replace(',', '-', $labels2[$i]); } $out .= $label . $CFG_GLPI['csv_delimiter']; $i++; } $out = substr($out, 0, -1) . "\r\n"; - //values + //values foreach ($cols as $value) { - $out .= $value . " " . $unit . ";"; + $out .= $value . ' ' . $unit . ';'; } $out = substr($out, 0, -1) . "\r\n\r\n"; } @@ -219,15 +219,15 @@ public function showSunburst($params, $dashboard = false, $width = false) $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, ]; $this->initGraph($options); - $out = $title . " - " . $desc . "\r\n"; + $out = $title . ' - ' . $desc . "\r\n"; $out .= $this->sunburstLevel($datas); echo $out; @@ -235,7 +235,7 @@ public function showSunburst($params, $dashboard = false, $width = false) public function sunburstLevel($datas, $level = 0) { - $out = ""; + $out = ''; $i = 0; foreach ($datas as $label => $value) { diff --git a/inc/graphpng.class.php b/inc/graphpng.class.php index 01159ef7..9de584de 100644 --- a/inc/graphpng.class.php +++ b/inc/graphpng.class.php @@ -33,16 +33,16 @@ class PluginMreportingGraphpng extends PluginMreportingGraph { - const DEBUG_GRAPH = false; + public const DEBUG_GRAPH = false; //define common colors - private $black = "0x00000000"; - private $white = "0x00FFFFFF"; - private $grey = "0x00F2F2F2"; - private $darkgrey = "0x00B4B4B4"; + private $black = '0x00000000'; + private $white = '0x00FFFFFF'; + private $grey = '0x00F2F2F2'; + private $darkgrey = '0x00B4B4B4'; //define font - private $font = ''; + private $font = ''; private $fontsize = 8; private $fontangle = 0; @@ -51,12 +51,11 @@ public function __construct() $this->font = PLUGIN_MREPORTING_DIR . '/fonts/FreeSans.ttf'; } - - /** - * init Graph : Show Titles / Date selector - * - * @params $options ($rand, short_classname, title, desc, delay) - */ + /** + * init Graph : Show Titles / Date selector + * + * @params $options ($rand, short_classname, title, desc, delay) + */ public function initGraph($options) { global $LANG, $CFG_GLPI; @@ -67,26 +66,26 @@ public function initGraph($options) $width = $this->width + 100; if (!isset($_REQUEST['date1' . $randname])) { - $_REQUEST['date1' . $randname] = strftime("%Y-%m-%d", time() + $_REQUEST['date1' . $randname] = strftime('%Y-%m-%d', time() - ($options['delay'] * 24 * 60 * 60)); } if (!isset($_REQUEST['date2' . $randname])) { - $_REQUEST['date2' . $randname] = strftime("%Y-%m-%d"); + $_REQUEST['date2' . $randname] = strftime('%Y-%m-%d'); } - $backtrace = debug_backtrace(); + $backtrace = debug_backtrace(); $prev_function = strtolower(str_replace('show', '', $backtrace[1]['function'])); echo "
"; if (isset($LANG['plugin_mreporting'][$options['short_classname']]['title'])) { echo "
"; echo $LANG['plugin_mreporting'][$options['short_classname']]['title']; - echo "
"; + echo '
'; } echo "
"; echo ""; echo $options['title']; - echo "
"; + echo '
'; $desc = ''; if (!empty($options['desc'])) { @@ -94,54 +93,54 @@ public function initGraph($options) } if ( !empty($options['desc']) - && isset($_REQUEST['date1' . $randname]) + && isset($_REQUEST['date1' . $randname]) && isset($_REQUEST['date1' . $randname]) ) { - $desc .= " - "; + $desc .= ' - '; } if ( isset($_REQUEST['date1' . $randname]) && isset($_REQUEST['date1' . $randname]) ) { - $desc .= Html::convdate($_REQUEST['date1' . $randname]) . " / " . + $desc .= Html::convdate($_REQUEST['date1' . $randname]) . ' / ' . Html::convdate($_REQUEST['date2' . $randname]); } - echo "
" . $desc . "
"; + echo "
" . $desc . '
'; echo "
"; PluginMreportingCommon::showSelector( $_REQUEST['date1' . $randname], $_REQUEST['date2' . $randname], - $randname + $randname, ); - echo "
"; + echo '
'; } - if ($options['export'] != "odt" && $options['export'] != "odtall") { + if ($options['export'] != 'odt' && $options['export'] != 'odtall') { echo "
"; } } - - public function showImage($contents, $export = "png") + public function showImage($contents, $export = 'png') { global $CFG_GLPI; - if ($export != "odt" && $export != "odtall") { - //test browser (if IE < 9, show img from temp dir instead base64 inline) - if (isset($_SERVER["HTTP_USER_AGENT"])) { - $ua = trim(strtolower($_SERVER["HTTP_USER_AGENT"])); + if ($export != 'odt' && $export != 'odtall') { + //test browser (if IE < 9, show img from temp dir instead base64 inline) + if (isset($_SERVER['HTTP_USER_AGENT'])) { + $ua = trim(strtolower($_SERVER['HTTP_USER_AGENT'])); $pattern = "/msie\s(\d+)\.0/"; if (preg_match($pattern, $ua, $arr)) { $ie_version = $arr[1]; if (version_compare($ie_version, '9') < 0) { - $rand = mt_rand(); + $rand = mt_rand(); $filename = "mreporting_img_$rand.png"; - $filedir = GLPI_ROOT . "/files/_plugins/mreporting/$filename"; + $filedir = GLPI_ROOT . "/files/_plugins/mreporting/$filename"; file_put_contents($filedir, $contents); echo "graph"; + return; } } @@ -152,19 +151,17 @@ public function showImage($contents, $export = "png") } } - public function generateImage($params) { - - // Default values of parameters - $image = ""; - $export = "png"; - $f_name = ""; - $class = ""; - $title = ""; - $unit = ''; - $raw_datas = []; - $withdata = 0; + // Default values of parameters + $image = ''; + $export = 'png'; + $f_name = ''; + $class = ''; + $title = ''; + $unit = ''; + $raw_datas = []; + $withdata = 0; foreach ($params as $key => $val) { $$key = $val; @@ -172,61 +169,62 @@ public function generateImage($params) ob_start(); - if ($export == "odt") { + if ($export == 'odt') { $show_graph = PluginMreportingConfig::showGraphConfigValue($f_name, $class); if ($show_graph) { - $path = GLPI_PLUGIN_DOC_DIR . "/mreporting/" . $f_name . ".png"; + $path = GLPI_PLUGIN_DOC_DIR . '/mreporting/' . $f_name . '.png'; imagepng($image, $path); } - $common = new PluginMreportingCommon(); - $options[] = ["title" => $title, - "f_name" => $f_name, - "class" => $class, - "randname" => $randname, - "raw_datas" => $raw_datas, - "withdata" => $withdata + $common = new PluginMreportingCommon(); + $options[] = ['title' => $title, + 'f_name' => $f_name, + 'class' => $class, + 'randname' => $randname, + 'raw_datas' => $raw_datas, + 'withdata' => $withdata, ]; $common->generateOdt($options); + return true; - } else if ($export == "odtall") { + } elseif ($export == 'odtall') { $show_graph = PluginMreportingConfig::showGraphConfigValue($f_name, $class); if ($show_graph) { - $path = GLPI_PLUGIN_DOC_DIR . "/mreporting/" . $f_name . ".png"; + $path = GLPI_PLUGIN_DOC_DIR . '/mreporting/' . $f_name . '.png'; imagepng($image, $path); } if (isset($raw_datas['datas'])) { - $_SESSION['glpi_plugin_mreporting_odtarray'][] = ["title" => $title, - "f_name" => $f_name, - "class" => $class, - "randname" => $randname, - "raw_datas" => $raw_datas, - "withdata" => $withdata + $_SESSION['glpi_plugin_mreporting_odtarray'][] = ['title' => $title, + 'f_name' => $f_name, + 'class' => $class, + 'randname' => $randname, + 'raw_datas' => $raw_datas, + 'withdata' => $withdata, ]; } return true; } else { imagepng($image); - $contents = ob_get_contents(); + $contents = ob_get_contents(); ob_end_clean(); + return $contents; } } - public static function getColors($index = 20) { $colors = PluginMreportingConfig::getColors($index); foreach ($colors as &$color) { $color = str_replace('#', '', $color); } + return $colors; } - - /** - * returns an array with the rgb values - **/ + /** + * returns an array with the rgb values + **/ public static function colorHexToRGB($color) { $hex = substr($color, 4); @@ -242,12 +240,11 @@ public static function colorHexToRGB($color) } $alpha = substr($color, 0, 4); + return [hexdec($r), hexdec($g), hexdec($b), hexdec($alpha)]; } - - - public static function getPalette($nb_index = 20, $alpha = "00") + public static function getPalette($nb_index = 20, $alpha = '00') { $palette = []; foreach (self::getColors($nb_index) as $color) { @@ -255,47 +252,47 @@ public static function getPalette($nb_index = 20, $alpha = "00") } if ($nb_index > 20) { - $nb = ceil($nb_index / 20); + $nb = ceil($nb_index / 20); $tmp = $palette; for ($i = 0; $i <= $nb; $i++) { $palette = array_merge($palette, $tmp); } } + return $palette; } - - - public static function getDarkerPalette($nb_index = 20, $alpha = "00") + public static function getDarkerPalette($nb_index = 20, $alpha = '00') { $palette = []; foreach (self::getColors($nb_index) as $color) { $palette[] = "0x$alpha" . substr(self::darker($color), 0, 6); } if ($nb_index > 20) { - $nb = ceil($nb_index / 20); + $nb = ceil($nb_index / 20); $tmp = $palette; for ($i = 0; $i <= $nb; $i++) { $palette = array_merge($palette, $tmp); } } + return $palette; } - - public static function getLighterPalette($nb_index = 20, $alpha = "00") + public static function getLighterPalette($nb_index = 20, $alpha = '00') { $palette = []; foreach (self::getColors($nb_index) as $color) { $palette[] = "0x$alpha" . substr(self::lighter($color), 0, 6); } if ($nb_index > 20) { - $nb = ceil($nb_index / 20); + $nb = ceil($nb_index / 20); $tmp = $palette; for ($i = 0; $i <= $nb; $i++) { $palette = array_merge($palette, $tmp); } } + return $palette; } @@ -312,13 +309,13 @@ public static function darker($color, $factor = 50) $base['B'] = hexdec($color[4] . $color[5]); foreach ($base as $k => $v) { - $amount = $v / 100; - $amount = round($amount * $factor); + $amount = $v / 100; + $amount = round($amount * $factor); $new_decimal = $v - $amount; $new_hex_component = dechex($new_decimal); if (strlen($new_hex_component) < 2) { - $new_hex_component = "0" . $new_hex_component; + $new_hex_component = '0' . $new_hex_component; } $new_hex .= $new_hex_component; } @@ -326,7 +323,6 @@ public static function darker($color, $factor = 50) return $new_hex; } - public static function lighter($color, $factor = 50) { if (strlen($color) == 10) { @@ -340,14 +336,14 @@ public static function lighter($color, $factor = 50) $base['B'] = hexdec($color[4] . $color[5]); foreach ($base as $k => $v) { - $amount = 255 - $v; - $amount = $amount / 100; - $amount = round($amount * $factor); + $amount = 255 - $v; + $amount = $amount / 100; + $amount = round($amount * $factor); $new_decimal = $v + $amount; $new_hex_component = dechex($new_decimal); if (strlen($new_hex_component) < 2) { - $new_hex_component = "0" . $new_hex_component; + $new_hex_component = '0' . $new_hex_component; } $new_hex .= $new_hex_component; } @@ -355,33 +351,31 @@ public static function lighter($color, $factor = 50) return $new_hex; } - - /** - * function imageSmoothAlphaLine() - version 1.0 - * Draws a smooth line with alpha-functionality - * - * @param image the image to draw on - * @param integer x1 - * @param integer y1 - * @param integer x2 - * @param integer y2 - * @param color color created by imagecolorallocatealpha - * - * @access public - * - * @author DASPRiD - */ + /** + * function imageSmoothAlphaLine() - version 1.0 + * Draws a smooth line with alpha-functionality + * + * @param image the image to draw on + * @param integer x1 + * @param integer y1 + * @param integer x2 + * @param integer y2 + * @param color color created by imagecolorallocatealpha + * + * @access public + * + * @author DASPRiD + */ public function imageSmoothAlphaLine($image, $x1, $y1, $x2, $y2, $dcol) { + $height = imagesy($image) - 1; + $width = imagesx($image) - 1; - $height = imagesy($image) - 1; - $width = imagesx($image) - 1; - - $rgba = self::colorHexToRGB($dcol); - $r = $rgba[0]; - $g = $rgba[1]; - $b = $rgba[2]; - $alpha = $rgba[3]; + $rgba = self::colorHexToRGB($dcol); + $r = $rgba[0]; + $g = $rgba[1]; + $b = $rgba[2]; + $alpha = $rgba[3]; $icr = $r; $icg = $g; @@ -391,11 +385,11 @@ public function imageSmoothAlphaLine($image, $x1, $y1, $x2, $y2, $dcol) $b = $y1 - $m * $x1; if (abs($m) < 2) { - $x = min($x1, $x2); + $x = min($x1, $x2); $endx = max($x1, $x2) + 1; while ($x < $endx) { - $y = $m * $x + $b; + $y = $m * $x + $b; $ya = ($y == floor($y) ? 1 : $y - floor($y)); $yb = ceil($y) - $y; @@ -409,9 +403,9 @@ public function imageSmoothAlphaLine($image, $x1, $y1, $x2, $y2, $dcol) } $trgb = ImageColorAt($image, $x, floor($y)); - $tcr = ($trgb >> 16) & 0xFF; - $tcg = ($trgb >> 8) & 0xFF; - $tcb = $trgb & 0xFF; + $tcr = ($trgb >> 16) & 0xFF; + $tcg = ($trgb >> 8) & 0xFF; + $tcb = $trgb & 0xFF; imagesetpixel( $image, $x, @@ -421,14 +415,14 @@ public function imageSmoothAlphaLine($image, $x1, $y1, $x2, $y2, $dcol) round($tcr * $ya + $icr * $yb), ($tcg * $ya + $icg * $yb), ($tcb * $ya + $icb * $yb), - hexdec($alpha) - ) + hexdec($alpha), + ), ); $trgb = ImageColorAt($image, $x, ceil($y)); - $tcr = ($trgb >> 16) & 0xFF; - $tcg = ($trgb >> 8) & 0xFF; - $tcb = $trgb & 0xFF; + $tcr = ($trgb >> 16) & 0xFF; + $tcg = ($trgb >> 8) & 0xFF; + $tcb = $trgb & 0xFF; imagesetpixel( $image, $x, @@ -438,18 +432,18 @@ public function imageSmoothAlphaLine($image, $x1, $y1, $x2, $y2, $dcol) round($tcr * $yb + $icr * $ya), round($tcg * $yb + $icg * $ya), round($tcb * $yb + $icb * $ya), - hexdec($alpha) - ) + hexdec($alpha), + ), ); $x++; } } else { - $y = min($y1, $y2); + $y = min($y1, $y2); $endy = max($y1, $y2) + 1; while ($y < $endy) { - $x = ($y - $b) / $m; + $x = ($y - $b) / $m; $xa = ($x == floor($x) ? 1 : $x - floor($x)); $xb = ceil($x) - $x; @@ -459,9 +453,9 @@ public function imageSmoothAlphaLine($image, $x1, $y1, $x2, $y2, $dcol) } $trgb = ImageColorAt($image, floor($x), $y); - $tcr = ($trgb >> 16) & 0xFF; - $tcg = ($trgb >> 8) & 0xFF; - $tcb = $trgb & 0xFF; + $tcr = ($trgb >> 16) & 0xFF; + $tcg = ($trgb >> 8) & 0xFF; + $tcb = $trgb & 0xFF; imagesetpixel( $image, floor($x), @@ -471,14 +465,14 @@ public function imageSmoothAlphaLine($image, $x1, $y1, $x2, $y2, $dcol) round($tcr * $xa + $icr * $xb), round($tcg * $xa + $icg * $xb), round($tcb * $xa + $icb * $xb), - hexdec($alpha) - ) + hexdec($alpha), + ), ); $trgb = ImageColorAt($image, ceil($x), $y); - $tcr = ($trgb >> 16) & 0xFF; - $tcg = ($trgb >> 8) & 0xFF; - $tcb = $trgb & 0xFF; + $tcr = ($trgb >> 16) & 0xFF; + $tcg = ($trgb >> 8) & 0xFF; + $tcb = $trgb & 0xFF; imagesetpixel( $image, ceil($x), @@ -488,8 +482,8 @@ public function imageSmoothAlphaLine($image, $x1, $y1, $x2, $y2, $dcol) round($tcr * $xb + $icr * $xa), round($tcg * $xb + $icg * $xa), round($tcb * $xb + $icb * $xa), - hexdec($alpha) - ) + hexdec($alpha), + ), ); $y++; @@ -497,7 +491,6 @@ public function imageSmoothAlphaLine($image, $x1, $y1, $x2, $y2, $dcol) } } - public function imageSmoothAlphaLineLarge($image, $x1, $y1, $x2, $y2, $color) { imageline($image, $x1, $y1, $x2, $y2, hexdec($color)); @@ -509,19 +502,17 @@ public function imageSmoothAlphaLineLarge($image, $x1, $y1, $x2, $y2, $color) $this->imageSmoothAlphaLine($image, $x1 + 1, $y1, $x2 + 1, $y2, $color); } - - /** - * function imageCubicSmoothLine() - - * Draws a smooth line - * - * @param image the image to draw on - * @param color color created by imagecolorallocatealpha - * @param coords array with points coordinates (x1 => y1, x2 => y2, etc) - * - */ + /** + * function imageCubicSmoothLine() - + * Draws a smooth line + * + * @param image the image to draw on + * @param color color created by imagecolorallocatealpha + * @param coords array with points coordinates (x1 => y1, x2 => y2, etc) + * + */ public function imageCubicSmoothLine($image, $color, $coords) { - $oCurve = new CubicSplines(); if ($oCurve->setInitCoords($coords, 6) !== false) { if (!$r = $oCurve->processCoords()) { @@ -544,7 +535,7 @@ public function imageCubicSmoothLine($image, $color, $coords) round($iPrevY), round($x), round($y), - $color + $color, ); $iPrevX = $x; @@ -552,20 +543,19 @@ public function imageCubicSmoothLine($image, $color, $coords) } } - - /** - * Show an horizontal bar chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show an horizontal bar chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showHbar($params, $dashboard = false, $width = false) { if ($width !== false) { @@ -578,7 +568,7 @@ public function showHbar($params, $dashboard = false, $width = false) $$key = $val; } - //$rand = $opt['rand']; + //$rand = $opt['rand']; $configs = PluginMreportingConfig::initConfigParams($opt['f_name'], $opt['class']); @@ -596,26 +586,27 @@ public function showHbar($params, $dashboard = false, $width = false) $datas = []; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (count($datas) <= 0) { - if ($export != "odtall") { - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + if ($export != 'odtall') { + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end); } + return false; } @@ -623,12 +614,12 @@ public function showHbar($params, $dashboard = false, $width = false) $unit = $raw_datas['unit']; } - $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); + $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); $raw_datas['datas'] = $datas; $values = array_values($datas); $labels = array_keys($datas); - $max = max($values); + $max = max($values); if ($max <= 1) { $max = 1; } @@ -646,25 +637,25 @@ public function showHbar($params, $dashboard = false, $width = false) } $height_bar = .7 * $height / ($nb_bar + 1); - //create image + //create image $image = imagecreatetruecolor($width, $height); if ($show_graph) { - //colors + //colors $palette = self::getPalette($nb_bar); $darkerpalette = self::getDarkerPalette($nb_bar); - //background + //background $bg_color = hexdec($this->white); imagefilledrectangle($image, 0, 0, $width - 1, $height - 1, $bg_color); - //create border on export + //create border on export if ($export) { $bg_color = hexdec($this->black); imagerectangle($image, 0, 0, $width - 1, $height - 1, $bg_color); } - //add title on export + //add title on export if ($export) { imagettftext( $image, @@ -674,25 +665,25 @@ public function showHbar($params, $dashboard = false, $width = false) 20, hexdec($this->black), $this->font, - $title + $title, ); } - //bars + //bars $index = 0; foreach ($datas as $label => $data) { $bx1 = 250; $by1 = ($index + 1) * 1.25 * $height_bar + .05 * $height + 2; - $bx2 = $bx1 + round(($data * ($width - 300)) / $max); - $by2 = $by1 + $height_bar; + $bx2 = $bx1 + round(($data * ($width - 300)) / $max); + $by2 = $by1 + $height_bar; - //createbar + //createbar ImageFilledRectangle($image, $bx1, $by1, $bx2, $by2, hexdec($palette[$index])); imagerectangle($image, $bx1, $by1 - 1, $bx2 + 1, $by2 + 1, hexdec($darkerpalette[$index])); imagerectangle($image, $bx1, $by1 - 2, $bx2 + 2, $by2 + 2, hexdec($darkerpalette[$index])); - //create data label - if ($show_label == "always" || $show_label == "hover") { + //create data label + if ($show_label == 'always' || $show_label == 'hover') { imagettftext( $image, $this->fontsize, @@ -701,12 +692,12 @@ public function showHbar($params, $dashboard = false, $width = false) $by1 + 14, hexdec($darkerpalette[$index]), $this->font, - Toolbox::stripTags($data . $unit) + Toolbox::stripTags($data . $unit), ); } - //create axis label (align right) - $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $labels[$index]); - $textwidth = abs($box[4] - $box[0]); + //create axis label (align right) + $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $labels[$index]); + $textwidth = abs($box[4] - $box[0]); $textheight = abs($box[5] - $box[1]); imagettftext( $image, @@ -716,24 +707,24 @@ public function showHbar($params, $dashboard = false, $width = false) $by1 + 14, hexdec($this->black), $this->font, - Toolbox::stripTags($labels[$index]) + Toolbox::stripTags($labels[$index]), ); $index++; } - //y axis + //y axis imageline($image, 250, 40, 250, $height - 20, hexdec($this->black)); imageline($image, 251, 40, 251, $height - 20, hexdec($this->black)); } - $params = ["image" => $image, - "export" => $export, - "f_name" => $opt['f_name'], - "class" => $opt['class'], - "title" => $title, - "randname" => $randname, - "raw_datas" => $raw_datas, - "withdata" => $opt['withdata'] + $params = ['image' => $image, + 'export' => $export, + 'f_name' => $opt['f_name'], + 'class' => $opt['class'], + 'title' => $title, + 'randname' => $randname, + 'raw_datas' => $raw_datas, + 'withdata' => $opt['withdata'], ]; $contents = $this->generateImage($params); @@ -741,32 +732,30 @@ public function showHbar($params, $dashboard = false, $width = false) $this->showImage($contents, $export); } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); } - - /** - * Show a pie chart - * - * @params : - * $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a pie chart + * + * @params : + * $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showPie($params, $dashboard = false, $width = false) { - $criterias = PluginMreportingCommon::initGraphParams($params); foreach ($criterias as $key => $val) { @@ -793,26 +782,27 @@ public function showPie($params, $dashboard = false, $width = false) $datas = []; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (count($datas) <= 0) { - if ($export != "odtall") { - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + if ($export != 'odtall') { + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end); } + return false; } @@ -820,13 +810,13 @@ public function showPie($params, $dashboard = false, $width = false) $unit = $raw_datas['unit']; } - $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); + $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); $raw_datas['datas'] = $datas; $values = array_values($datas); $labels = array_keys($datas); - $max = 0; + $max = 0; foreach ($values as $value) { $max += $value; } @@ -838,30 +828,30 @@ public function showPie($params, $dashboard = false, $width = false) } $nb_bar = count($datas); - $width = $this->width; + $width = $this->width; $height = 15 * $nb_bar + 50; if ($height < 300) { $height = 370; } - //create image + //create image $image = imagecreatetruecolor($width, $height); if ($show_graph) { - //colors - $palette = self::getPalette($nb_bar); + //colors + $palette = self::getPalette($nb_bar); $darkerpalette = self::getDarkerPalette($nb_bar); - //background + //background $bg_color = hexdec($this->white); imagefilledrectangle($image, 0, 0, $width - 1, $height - 1, $bg_color); - //create border on export + //create border on export if ($export) { imagerectangle($image, 0, 0, $width - 1, $height - 1, hexdec($this->black)); } - //add title on export + //add title on export if ($export) { imagettftext( $image, @@ -871,7 +861,7 @@ public function showPie($params, $dashboard = false, $width = false) 20, hexdec($this->black), $this->font, - $title + $title, ); } @@ -884,22 +874,22 @@ public function showPie($params, $dashboard = false, $width = false) 35, hexdec($this->black), $this->font, - $desc + $desc, ); } - //pie - $index = 0; - $x = $width / 4 + .43 * $width; - $y = $height / 2; - $radius = $height / 1.5; + //pie + $index = 0; + $x = $width / 4 + .43 * $width; + $y = $height / 2; + $radius = $height / 1.5; $start_angle = 0; foreach ($datas as $label => $data) { $angle = $start_angle + (360 * $data) / $max; - //full circle need fix + //full circle need fix if ($angle - $start_angle == 360) { - $angle = 359.999; + $angle = 359.999; $start_angle = 0; } @@ -913,23 +903,23 @@ public function showPie($params, $dashboard = false, $width = false) $radius + 8, $color_rbg, deg2rad($start_angle), - deg2rad($angle) + deg2rad($angle), ); - //text associated with pie arc (only for angle > 2°) - if ($angle > 2 && ($show_label == "always" || $show_label == "hover")) { - $xtext = $x - 1 + cos(deg2rad(($start_angle + $angle) / 2)) * ($radius / 1.7); - $ytext = $y + 5 - sin(deg2rad(($start_angle + $angle) / 2)) * ($radius / 1.7); - imagettftext( - $image, - $this->fontsize, - $this->fontangle, - $xtext, - $ytext, - hexdec($darkerpalette[$index]), - $this->font, - Toolbox::stripTags($data . $unit) - ); + //text associated with pie arc (only for angle > 2°) + if ($angle > 2 && ($show_label == 'always' || $show_label == 'hover')) { + $xtext = $x - 1 + cos(deg2rad(($start_angle + $angle) / 2)) * ($radius / 1.7); + $ytext = $y + 5 - sin(deg2rad(($start_angle + $angle) / 2)) * ($radius / 1.7); + imagettftext( + $image, + $this->fontsize, + $this->fontangle, + $xtext, + $ytext, + hexdec($darkerpalette[$index]), + $this->font, + Toolbox::stripTags($data . $unit), + ); } $start_angle = $angle; @@ -937,12 +927,12 @@ public function showPie($params, $dashboard = false, $width = false) $index++; } - //legend (align left) + //legend (align left) $index = 0; foreach ($labels as $label) { - //legend label - $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $label); - $textwidth = abs($box[4] - $box[0]); + //legend label + $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $label); + $textwidth = abs($box[4] - $box[0]); $textheight = abs($box[5] - $box[1]); imagettftext( $image, @@ -952,10 +942,10 @@ public function showPie($params, $dashboard = false, $width = false) 55 + $index * 14, hexdec($this->black), $this->font, - $label + $label, ); - //legend circle + //legend circle $color_rbg = self::colorHexToRGB($palette[$index]); imageSmoothArc($image, 10, 50 + $index * 14, 7, 7, $color_rbg, 0, 2 * M_PI); @@ -963,14 +953,14 @@ public function showPie($params, $dashboard = false, $width = false) } } - $params = ["image" => $image, - "export" => $export, - "f_name" => $opt['f_name'], - "class" => $opt['class'], - "title" => $title, - "randname" => $randname, - "raw_datas" => $raw_datas, - "withdata" => $opt['withdata'] + $params = ['image' => $image, + 'export' => $export, + 'f_name' => $opt['f_name'], + 'class' => $opt['class'], + 'title' => $title, + 'randname' => $randname, + 'raw_datas' => $raw_datas, + 'withdata' => $opt['withdata'], ]; $contents = $this->generateImage($params); @@ -978,35 +968,34 @@ public function showPie($params, $dashboard = false, $width = false) $this->showImage($contents, $export); } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); } - - /** - * Show a sunburst chart (see : http://mbostock.github.com/protovis/ex/sunburst.html) - * - * @params : - * @param $raw_datas : an array with : - * - key 'datas', ex : - * array( - * 'key1' => array('key1.1' => val, 'key1.2' => val, 'key1.3' => val), - * 'key2' => array('key2.1' => val, 'key2.2' => val, 'key2.3' => val) - * ) - * - key 'root', root label in graph center - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a sunburst chart (see : http://mbostock.github.com/protovis/ex/sunburst.html) + * + * @params : + * @param $raw_datas : an array with : + * - key 'datas', ex : + * array( + * 'key1' => array('key1.1' => val, 'key1.2' => val, 'key1.3' => val), + * 'key2' => array('key2.1' => val, 'key2.2' => val, 'key2.3' => val) + * ) + * - key 'root', root label in graph center + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showSunburst($params, $dashboard = false, $width = false) { $criterias = PluginMreportingCommon::initGraphParams($params); @@ -1028,26 +1017,27 @@ public function showSunburst($params, $dashboard = false, $width = false) $datas = []; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (count($datas) <= 0) { - if ($export != "odtall") { - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + if ($export != 'odtall') { + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end); } + return false; } @@ -1064,23 +1054,23 @@ public function showSunburst($params, $dashboard = false, $width = false) $values = array_values($datas); $labels = array_keys($datas); - $width = $this->width - 200; + $width = $this->width - 200; $height = 500; - //create image + //create image $image = imagecreatetruecolor($width, $height); if ($show_graph) { - //background + //background $bg_color = hexdec($this->white); imagefilledrectangle($image, 1, 1, $width - 2, $height - 2, $bg_color); - //create border on export + //create border on export if ($export) { imagerectangle($image, 0, 0, $width - 1, $height, hexdec($this->black)); } - //add title on export + //add title on export if ($export) { imagettftext( $image, @@ -1090,7 +1080,7 @@ public function showSunburst($params, $dashboard = false, $width = false) 20, hexdec($this->black), $this->font, - $title + $title, ); } @@ -1103,60 +1093,60 @@ public function showSunburst($params, $dashboard = false, $width = false) 35, hexdec($this->black), $this->font, - $desc + $desc, ); } } - //recursive level draw + //recursive level draw $image = $this->drawSunburstLevel($image, $datas, [ 'width' => $width, - 'height' => $height + 'height' => $height, ]); - //generate image - $params = ["image" => $image, - "export" => $export, - "f_name" => $opt['f_name'], - "class" => $opt['class'], - "title" => $title, - "randname" => $randname, - "raw_datas" => $raw_datas, - "withdata" => $opt['withdata'] + //generate image + $params = ['image' => $image, + 'export' => $export, + 'f_name' => $opt['f_name'], + 'class' => $opt['class'], + 'title' => $title, + 'randname' => $randname, + 'raw_datas' => $raw_datas, + 'withdata' => $opt['withdata'], ]; $contents = $this->generateImage($params); $this->showImage($contents, $export); $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "labels2" => $labels2, - "flip_data" => $flip_data, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'labels2' => $labels2, + 'flip_data' => $flip_data, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); } public function drawSunburstLevel($image, $datas, $params = []) { - $width = $params['width'] - 70; + $width = $params['width'] - 70; $height = $params['height'] - 120; $gsum = PluginMreportingCommon::getArraySum($datas); - $index = 0; - $x = $width / 2; - $y = $height / 2 + 60; + $index = 0; + $x = $width / 2; + $y = $height / 2 + 60; $params['depth'] = isset($params['depth']) ? $params['depth'] : PluginMreportingCommon::getArrayDepth($datas); - $params['start_angle'] = isset($params['start_angle']) ? $params['start_angle'] : 0; - $params['max_angle'] = isset($params['max_angle']) ? $params['max_angle'] : 360; - $params['level'] = isset($params['level']) ? $params['level'] : 0; + $params['start_angle'] = isset($params['start_angle']) ? $params['start_angle'] : 0; + $params['max_angle'] = isset($params['max_angle']) ? $params['max_angle'] : 360; + $params['level'] = isset($params['level']) ? $params['level'] : 0; $params['current_index'] = isset($params['current_index']) ? $params['current_index'] : false; - $step = $height / $params['depth']; - $radius = $step * ($params['level'] + 1); + $step = $height / $params['depth']; + $radius = $step * ($params['level'] + 1); $darkerpalette = self::getDarkerPalette(50); @@ -1167,12 +1157,12 @@ public function drawSunburstLevel($image, $datas, $params = []) $params2 = []; $params2 = $params; - $sum = PluginMreportingCommon::getArraySum($data); + $sum = PluginMreportingCommon::getArraySum($data); $angle = ($params['max_angle'] * $sum) / $gsum; - $params2['max_angle'] = $angle; - $params2['start_angle'] = $params['start_angle']; - $params2['level'] = $params['level'] + 1; + $params2['max_angle'] = $angle; + $params2['start_angle'] = $params['start_angle']; + $params2['level'] = $params['level'] + 1; $params2['current_index'] = ($params['current_index'] === false) ? $index : $params['current_index']; @@ -1182,21 +1172,21 @@ public function drawSunburstLevel($image, $datas, $params = []) $angle = ($params['max_angle'] * $data) / $gsum; } - //get colors + //get colors $palette = $this->getPalette(50); if ($params['current_index'] === false) { $color = $palette[$index]; } else { $color = $palette[$params['current_index']]; - //get lighter color - $color = "0x00" . substr(self::lighter($color, 15 * $params['level'] * $index), 0, 6); + //get lighter color + $color = '0x00' . substr(self::lighter($color, 15 * $params['level'] * $index), 0, 6); } - $darkercolor = "0x00" . substr(self::darker($color), 0, 6); - $color_rbg = self::colorHexToRGB($color); + $darkercolor = '0x00' . substr(self::darker($color), 0, 6); + $color_rbg = self::colorHexToRGB($color); $darkercolor_rbg = self::colorHexToRGB($darkercolor); - //show data arc (tow arcs : 1st border color, 2nd content color) - //(Never use deg2rad() in loops, use $rad = ($deg * M_PI / 180) instead which is faster!) + //show data arc (tow arcs : 1st border color, 2nd content color) + //(Never use deg2rad() in loops, use $rad = ($deg * M_PI / 180) instead which is faster!) imageSmoothArc( $image, $x, @@ -1204,8 +1194,8 @@ public function drawSunburstLevel($image, $datas, $params = []) $radius + 1, $radius + 1, $darkercolor_rbg, - $params['start_angle'] * M_PI / 180, - ($params['start_angle'] + $angle) * M_PI / 180 + $params['start_angle'] * M_PI / 180, + ($params['start_angle'] + $angle) * M_PI / 180, ); imageSmoothArc( $image, @@ -1214,18 +1204,18 @@ public function drawSunburstLevel($image, $datas, $params = []) $radius - 1, $radius - 1, $color_rbg, - ($params['start_angle'] + 0.8 / ($params['level'] + 1)) * M_PI / 180, - ($params['start_angle'] + $angle - 0.8 / ($params['level'] + 1)) * M_PI / 180 + ($params['start_angle'] + 0.8 / ($params['level'] + 1)) * M_PI / 180, + ($params['start_angle'] + $angle - 0.8 / ($params['level'] + 1)) * M_PI / 180, ); - //text associated with pie arc (only for angle > 2°) - $am = $params['start_angle'] + $angle / 2; //mediant angle - $amr = $am * M_PI / 180; //mediant angle in radiant + //text associated with pie arc (only for angle > 2°) + $am = $params['start_angle'] + $angle / 2; //mediant angle + $amr = $am * M_PI / 180; //mediant angle in radiant - //adjust label position (in fonction of angle position) + //adjust label position (in fonction of angle position) $dx = $dy = 0; if ($amr >= 7 * M_PI / 4 || $amr <= M_PI / 4) { - $dx = 0; + $dx = 0; } if ($amr >= M_PI / 4 && $amr <= 3 * M_PI / 4) { $dx = ($amr - M_PI / 4) * 2 / M_PI; @@ -1253,23 +1243,23 @@ public function drawSunburstLevel($image, $datas, $params = []) $dy = 0; } - //get label size + //get label size $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $key); - $tw = abs($box[4] - $box[0]); - $th = abs($box[5] - $box[1]); + $tw = abs($box[4] - $box[0]); + $th = abs($box[5] - $box[1]); - //define label position + //define label position if (is_array($data)) { - //show label inside its arc - $xtext = $x - $dx * $tw + cos($amr) * (0.5 * $radius - $step / 3); - $ytext = $y + $dy * $th - sin($amr) * (0.5 * $radius - $step / 4); + //show label inside its arc + $xtext = $x - $dx * $tw + cos($amr) * (0.5 * $radius - $step / 3); + $ytext = $y + $dy * $th - sin($amr) * (0.5 * $radius - $step / 4); } else { - //show label outside of its arc - $xtext = $x + 3 - $dx * $tw + cos($amr) * (0.5 * $radius + $step / 16); - $ytext = $y + $dy * $th - sin($amr) * (0.5 * $radius + $step / 8); + //show label outside of its arc + $xtext = $x + 3 - $dx * $tw + cos($amr) * (0.5 * $radius + $step / 16); + $ytext = $y + $dy * $th - sin($amr) * (0.5 * $radius + $step / 8); } - //draw label + //draw label imagettftext( $image, $this->fontsize, @@ -1278,39 +1268,39 @@ public function drawSunburstLevel($image, $datas, $params = []) $ytext, hexdec($darkercolor), $this->font, - $key + $key, ); - //values labels + //values labels if ($angle > 5) { - //mediant start angle in radiant (adjusted for left align label to its arc) - $samr = ($params['start_angle'] + 10 / ($params['level'] + 1)) * M_PI / 180; - - //get label size - $box = @imageTTFBbox( - $this->fontsize, - $this->fontangle, - $this->font, - (is_array($data)) ? $gsum : $data - ); - $tw = abs($box[4] - $box[0]); - $th = abs($box[5] - $box[1]); - - //define label position - $xtext = $x - $dx * $tw + cos($samr) * (0.5 * $radius - $step / 8); - $ytext = $y + $dy * $th - sin($samr) * (0.5 * $radius - $step / 16); - - //draw label - imagettftext( - $image, - $this->fontsize, - $this->fontangle, - $xtext, - $ytext, - hexdec($this->black), - $this->font, - (is_array($data)) ? $sum : $data - ); + //mediant start angle in radiant (adjusted for left align label to its arc) + $samr = ($params['start_angle'] + 10 / ($params['level'] + 1)) * M_PI / 180; + + //get label size + $box = @imageTTFBbox( + $this->fontsize, + $this->fontangle, + $this->font, + (is_array($data)) ? $gsum : $data, + ); + $tw = abs($box[4] - $box[0]); + $th = abs($box[5] - $box[1]); + + //define label position + $xtext = $x - $dx * $tw + cos($samr) * (0.5 * $radius - $step / 8); + $ytext = $y + $dy * $th - sin($samr) * (0.5 * $radius - $step / 16); + + //draw label + imagettftext( + $image, + $this->fontsize, + $this->fontangle, + $xtext, + $ytext, + hexdec($this->black), + $this->font, + (is_array($data)) ? $sum : $data, + ); } $params['start_angle'] += $angle; @@ -1320,21 +1310,20 @@ public function drawSunburstLevel($image, $datas, $params = []) return $image; } - - /** - * Show a horizontal grouped bar chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => array(15,20,50), 'test2' => array(36,15,22)) - * - key 'labels2', ex : array('label 1', 'label 2', 'label 3') - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a horizontal grouped bar chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => array(15,20,50), 'test2' => array(36,15,22)) + * - key 'labels2', ex : array('label 1', 'label 2', 'label 3') + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showHgbar($params, $dashboard = false, $width = false) { if ($width !== false) { @@ -1347,7 +1336,7 @@ public function showHgbar($params, $dashboard = false, $width = false) $$key = $val; } - //$rand = $opt['rand']; + //$rand = $opt['rand']; $configs = PluginMreportingConfig::initConfigParams($opt['f_name'], $opt['class']); @@ -1365,26 +1354,27 @@ public function showHgbar($params, $dashboard = false, $width = false) $datas = []; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (count($datas) <= 0) { - if ($export != "odtall") { - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + if ($export != 'odtall') { + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end); } + return false; } @@ -1394,7 +1384,7 @@ public function showHgbar($params, $dashboard = false, $width = false) $unit = $raw_datas['unit']; } - $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); + $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); $raw_datas['datas'] = $datas; $values = array_values($datas); @@ -1413,27 +1403,27 @@ public function showHgbar($params, $dashboard = false, $width = false) } $nb_bar = count($datas) * count($labels2); - $width = $this->width; + $width = $this->width; $height = 28 * $nb_bar + count($labels2) * 24; - //create image + //create image $image = imagecreatetruecolor($width, $height); if ($show_graph) { - //colors - $palette = self::getPalette($nb_bar); + //colors + $palette = self::getPalette($nb_bar); $darkerpalette = self::getDarkerPalette($nb_bar); - //background + //background $bg_color = hexdec($this->white); imagefilledrectangle($image, 0, 0, $width - 1, $height - 1, $bg_color); - //create border on export + //create border on export if ($export) { imagerectangle($image, 0, 0, $width - 1, $height - 1, hexdec($this->black)); } - //add title on export + //add title on export if ($export) { imagettftext( $image, @@ -1443,7 +1433,7 @@ public function showHgbar($params, $dashboard = false, $width = false) 20, hexdec($this->black), $this->font, - $title + $title, ); } @@ -1456,20 +1446,20 @@ public function showHgbar($params, $dashboard = false, $width = false) 35, hexdec($this->black), $this->font, - $desc + $desc, ); } - //bars + //bars $index1 = 0; $index2 = 0; foreach ($datas as $label => $data) { - $ly = $index1 * count($labels2) * 28 + count($labels2) * 24 / 2 + count($labels2) * 14; + $ly = $index1 * count($labels2) * 28 + count($labels2) * 24 / 2 + count($labels2) * 14; $step = $index1 * count($labels2) * 28; - //create axis label (align right) - $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $labels[$index1]); - $textwidth = abs($box[4] - $box[0]); + //create axis label (align right) + $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $labels[$index1]); + $textwidth = abs($box[4] - $box[0]); $textheight = abs($box[5] - $box[1]); imagettftext( $image, @@ -1479,22 +1469,22 @@ public function showHgbar($params, $dashboard = false, $width = false) $ly + 14, hexdec($this->black), $this->font, - Toolbox::stripTags($labels[$index1]) + Toolbox::stripTags($labels[$index1]), ); foreach ($data as $subdata) { - $bx1 = 250; - $by1 = ($index2 + 1) * 22 + $step + count($labels2) * 14; - $bx2 = $bx1 + round(($subdata * ($width - 300)) / $max); - $by2 = $by1 + 16; - - //createbar - ImageFilledRectangle($image, $bx1, $by1, $bx2, $by2, hexdec($palette[$index2])); - imagerectangle($image, $bx1, $by1 - 1, $bx2 + 1, $by2 + 1, hexdec($darkerpalette[$index2])); - imagerectangle($image, $bx1, $by1 - 2, $bx2 + 2, $by2 + 2, hexdec($darkerpalette[$index2])); - - //create data label - if ($show_label == "always" || $show_label == "hover") { + $bx1 = 250; + $by1 = ($index2 + 1) * 22 + $step + count($labels2) * 14; + $bx2 = $bx1 + round(($subdata * ($width - 300)) / $max); + $by2 = $by1 + 16; + + //createbar + ImageFilledRectangle($image, $bx1, $by1, $bx2, $by2, hexdec($palette[$index2])); + imagerectangle($image, $bx1, $by1 - 1, $bx2 + 1, $by2 + 1, hexdec($darkerpalette[$index2])); + imagerectangle($image, $bx1, $by1 - 2, $bx2 + 2, $by2 + 2, hexdec($darkerpalette[$index2])); + + //create data label + if ($show_label == 'always' || $show_label == 'hover') { imagettftext( $image, $this->fontsize, @@ -1503,27 +1493,27 @@ public function showHgbar($params, $dashboard = false, $width = false) $by1 + 14, hexdec($darkerpalette[$index2]), $this->font, - $subdata . $unit + $subdata . $unit, ); } - $index2++; + $index2++; } $index1++; $index2 = 0; } - //y axis + //y axis imageline($image, 250, 40, 250, $height - 6, hexdec($this->black)); imageline($image, 251, 40, 251, $height - 6, hexdec($this->black)); - //legend (align right) + //legend (align right) $index = 0; foreach ($labels2 as $label) { - $box = @imageTTFBbox($this->fontsize + 1, $this->fontangle, $this->font, $label); - $textwidth = abs($box[4] - $box[0]); + $box = @imageTTFBbox($this->fontsize + 1, $this->fontangle, $this->font, $label); + $textwidth = abs($box[4] - $box[0]); $textheight = abs($box[5] - $box[1]); - //legend label + //legend label imagettftext( $image, $this->fontsize, @@ -1532,25 +1522,25 @@ public function showHgbar($params, $dashboard = false, $width = false) 10 + $index * 15, hexdec($this->black), $this->font, - Toolbox::stripTags($label) + Toolbox::stripTags($label), ); - //legend circle + //legend circle $color_rbg = self::colorHexToRGB($palette[$index]); imageSmoothArc($image, $width - 10, 5 + $index * 15, 8, 8, $color_rbg, 0, 2 * M_PI); $index++; } } - //generate image - $params = ["image" => $image, - "export" => $export, - "f_name" => $opt['f_name'], - "class" => $opt['class'], - "title" => $title, - "randname" => $randname, - "raw_datas" => $raw_datas, - "withdata" => $opt['withdata'] + //generate image + $params = ['image' => $image, + 'export' => $export, + 'f_name' => $opt['f_name'], + 'class' => $opt['class'], + 'title' => $title, + 'randname' => $randname, + 'raw_datas' => $raw_datas, + 'withdata' => $opt['withdata'], ]; $contents = $this->generateImage($params); @@ -1558,31 +1548,30 @@ public function showHgbar($params, $dashboard = false, $width = false) $this->showImage($contents, $export); } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "labels2" => $labels2, - "flip_data" => $flip_data, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'labels2' => $labels2, + 'flip_data' => $flip_data, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); } - - /** - * Show a vertical stacked bar chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => array(15,20,50), 'test2' => array(36,15,22)) - * - key 'labels2', ex : array('label 1', 'label 2', 'label 3') - * - key 'unit', ex : '%', 'Kg' (optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a vertical stacked bar chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => array(15,20,50), 'test2' => array(36,15,22)) + * - key 'labels2', ex : array('label 1', 'label 2', 'label 3') + * - key 'unit', ex : '%', 'Kg' (optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showVstackbar($params, $dashboard = false, $width = false) { if ($width !== false) { @@ -1595,7 +1584,7 @@ public function showVstackbar($params, $dashboard = false, $width = false) $$key = $val; } - //$rand = $opt['rand']; + //$rand = $opt['rand']; $configs = PluginMreportingConfig::initConfigParams($opt['f_name'], $opt['class']); @@ -1613,26 +1602,27 @@ public function showVstackbar($params, $dashboard = false, $width = false) $datas = []; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (count($datas) <= 0) { - if ($export != "odtall") { - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + if ($export != 'odtall') { + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end); } + return false; } @@ -1642,7 +1632,7 @@ public function showVstackbar($params, $dashboard = false, $width = false) $unit = $raw_datas['unit']; } - $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); + $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); $raw_datas['datas'] = $datas; $values = array_values($datas); @@ -1661,7 +1651,7 @@ public function showVstackbar($params, $dashboard = false, $width = false) $max = 100; } - //process datas (reverse keys) + //process datas (reverse keys) $new_datas = []; foreach ($datas as $key1 => $data) { @@ -1670,7 +1660,7 @@ public function showVstackbar($params, $dashboard = false, $width = false) } } - //calculate max cumul + //calculate max cumul $cum = 0; foreach ($new_datas as $key1 => $data) { $tmp_cum = 0; @@ -1682,55 +1672,55 @@ public function showVstackbar($params, $dashboard = false, $width = false) } } - $nb_bar = count($labels2); + $nb_bar = count($labels2); $nb_labels2 = count($datas); - $height = 400; + $height = 400; if ($dashboard) { $height = 350; } - $x_bar = (0.85 * $this->width / $nb_bar); - $width_bar = $x_bar * .85; - $y_labels_width = .1 * $this->width; + $x_bar = (0.85 * $this->width / $nb_bar); + $width_bar = $x_bar * .85; + $y_labels_width = .1 * $this->width; $x_labels_height = $height - 0.95 * $height; - $legend_height = $nb_labels2 * 15 + 10; + $legend_height = $nb_labels2 * 15 + 10; - //longueur du texte en dessous des barres + //longueur du texte en dessous des barres $index = 0; foreach ($labels2 as $label) { - $lx = 55 + $index * $width_bar; - $box = @imageTTFBbox($this->fontsize - 1, $this->fontangle, $this->font, $label); + $lx = 55 + $index * $width_bar; + $box = @imageTTFBbox($this->fontsize - 1, $this->fontangle, $this->font, $label); $textwidth[$label] = abs($box[4] - $box[0]); $index++; } $maxtextwidth = max($textwidth); - //create image + //create image $image = imagecreatetruecolor($this->width, $height + $maxtextwidth); if ($show_graph) { - //colors + //colors $palette = self::getPalette($nb_bar); $alphapalette = self::getPalette($nb_bar, 90); $darkerpalette = self::getDarkerPalette($nb_bar); - //background + //background $bg_color = hexdec($this->white); imagefilledrectangle($image, 0, 0, $this->width, $height + $maxtextwidth, $bg_color); - //create border on export + //create border on export if ($export) { imagerectangle($image, 0, 0, $this->width - 1, $height - 1 + $maxtextwidth, hexdec($this->black)); } - //draw x-axis grey step line and values ticks + //draw x-axis grey step line and values ticks $xstep = round(($height - $legend_height - $x_labels_height) / 12); for ($i = 0; $i <= 12; $i++) { $yaxis = $height - $x_labels_height - $xstep * $i; imageLine($image, .9 * $y_labels_width, $yaxis, 0.95 * $this->width, $yaxis, hexdec($this->grey)); - //value label - $val = round($i * $cum / 12, 1); - $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $val); + //value label + $val = round($i * $cum / 12, 1); + $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $val); $textwidth = abs($box[4] - $box[0]); imagettftext( @@ -1741,24 +1731,24 @@ public function showVstackbar($params, $dashboard = false, $width = false) $yaxis + 5, hexdec($this->darkgrey), $this->font, - $val + $val, ); } - //draw y-axis + //draw y-axis imageLine($image, $y_labels_width, $legend_height, $y_labels_width, $height - 28, hexdec($this->black)); - //draw x-axis + //draw x-axis imageline( $image, .9 * $y_labels_width, $height - $x_labels_height, 0.95 * $this->width, $height - $x_labels_height, - hexdec($this->black) + hexdec($this->black), ); - //add title on export + //add title on export if ($export) { imagettftext( $image, @@ -1768,7 +1758,7 @@ public function showVstackbar($params, $dashboard = false, $width = false) 20, hexdec($this->black), $this->font, - $title + $title, ); } @@ -1781,7 +1771,7 @@ public function showVstackbar($params, $dashboard = false, $width = false) 35, hexdec($this->black), $this->font, - $desc + $desc, ); } @@ -1794,7 +1784,7 @@ public function showVstackbar($params, $dashboard = false, $width = false) foreach ($data as $subdata) { $by1 = $by2; $bx1 = $y_labels_width + $index1 * $x_bar; - $by2 = $by1 - $subdata * ($height - $legend_height - $x_labels_height) / $cum; + $by2 = $by1 - $subdata * ($height - $legend_height - $x_labels_height) / $cum; $bx2 = $bx1 + $width_bar; if ($by1 != $by2) { // no draw for empty datas @@ -1802,19 +1792,19 @@ public function showVstackbar($params, $dashboard = false, $width = false) imagerectangle($image, $bx1, $by1, $bx2, $by2, hexdec($darkerpalette[$index2])); //create data label // Affichage des données à côté des barres - if (($show_label == "always" || $show_label == "hover") && $subdata > 0) { - $box = @imageTTFBbox($this->fontsize - 1, $this->fontangle, $this->font, $subdata . $unit); + if (($show_label == 'always' || $show_label == 'hover') && $subdata > 0) { + $box = @imageTTFBbox($this->fontsize - 1, $this->fontangle, $this->font, $subdata . $unit); $textwidth = abs($box[4] - $box[6]); imagettftext( $image, $this->fontsize - 1, $this->fontangle, - $bx1 + ($width_bar / 2) - ($textwidth / 2) - 4, - $by1 - ($by1 - $by2) / 2 + 5, + $bx1 + ($width_bar / 2) - ($textwidth / 2) - 4, + $by1 - ($by1 - $by2) / 2 + 5, hexdec($darkerpalette[$index2]), $this->font, - $subdata . $unit + $subdata . $unit, ); } } @@ -1822,8 +1812,8 @@ public function showVstackbar($params, $dashboard = false, $width = false) $index2++; } - //create label 2 - $box = @imageTTFBbox($this->fontsize - 1, $this->fontangle, $this->font, $labels2[$label]); + //create label 2 + $box = @imageTTFBbox($this->fontsize - 1, $this->fontangle, $this->font, $labels2[$label]); $textwidth = abs($box[4] - $box[6]); $textwidth = abs(sqrt((pow($textwidth, 2) / 2))); @@ -1836,22 +1826,22 @@ public function showVstackbar($params, $dashboard = false, $width = false) $height - $x_labels_height + 9, hexdec($this->black), $this->font, - Toolbox::stripTags($labels2[$label]) + Toolbox::stripTags($labels2[$label]), ); $index1++; $index2 = 0; } - //legend (align right) + //legend (align right) $index = 0; foreach ($datas as $label => $data) { - $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $labels[$index]); - $textwidth = abs($box[4] - $box[0]); + $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $labels[$index]); + $textwidth = abs($box[4] - $box[0]); $textheight = abs($box[5] - $box[1]); - $y_legend = 5 + ($index + 1) * 15; + $y_legend = 5 + ($index + 1) * 15; - //legend label + //legend label imagettftext( $image, $this->fontsize - 1, @@ -1860,34 +1850,34 @@ public function showVstackbar($params, $dashboard = false, $width = false) $y_legend, hexdec($this->black), $this->font, - Toolbox::stripTags($labels[$index]) + Toolbox::stripTags($labels[$index]), ); - //legend circle + //legend circle $color_rbg = self::colorHexToRGB($palette[$index]); imageSmoothArc( $image, $this->width - 10, - $y_legend - 4, + $y_legend - 4, 8, 8, $color_rbg, 0, - 2 * M_PI + 2 * M_PI, ); $index++; } } - //generate image - $params = ["image" => $image, - "export" => $export, - "f_name" => $opt['f_name'], - "class" => $opt['class'], - "title" => $title, - "randname" => $randname, - "raw_datas" => $raw_datas, - "withdata" => $opt['withdata'] + //generate image + $params = ['image' => $image, + 'export' => $export, + 'f_name' => $opt['f_name'], + 'class' => $opt['class'], + 'title' => $title, + 'randname' => $randname, + 'raw_datas' => $raw_datas, + 'withdata' => $opt['withdata'], ]; $contents = $this->generateImage($params); @@ -1895,32 +1885,31 @@ public function showVstackbar($params, $dashboard = false, $width = false) $this->showImage($contents, $export); } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "labels2" => $labels2, - "flip_data" => $flip_data, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'labels2' => $labels2, + 'flip_data' => $flip_data, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); } - - /** - * Show a Area chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) - * - key 'unit', ex : '%', 'Kg' (optionnal) - * - key 'spline', curves line (boolean - optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @param $area : show plain chart instead only a line (optionnal) - * @return void - */ + /** + * Show a Area chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) + * - key 'unit', ex : '%', 'Kg' (optionnal) + * - key 'spline', curves line (boolean - optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @param $area : show plain chart instead only a line (optionnal) + * @return void + */ public function showArea($params, $dashboard = false, $width = false) { if ($width !== false) { @@ -1933,7 +1922,7 @@ public function showArea($params, $dashboard = false, $width = false) $$key = $val; } - //$rand = $opt['rand']; + //$rand = $opt['rand']; $configs = PluginMreportingConfig::initConfigParams($opt['f_name'], $opt['class']); @@ -1951,26 +1940,27 @@ public function showArea($params, $dashboard = false, $width = false) $datas = []; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (count($datas) <= 0) { - if ($export != "odtall") { - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + if ($export != 'odtall') { + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end); } + return false; } @@ -1978,12 +1968,12 @@ public function showArea($params, $dashboard = false, $width = false) $unit = $raw_datas['unit']; } - $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); + $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); $raw_datas['datas'] = $datas; $values = array_values($datas); $labels = array_keys($datas); - $max = max($values); + $max = max($values); if ($max <= 1) { $max = 1; } @@ -1991,36 +1981,36 @@ public function showArea($params, $dashboard = false, $width = false) $max = 100; } - $nb = count($datas); - $width = $this->width; - $height = 350; + $nb = count($datas); + $width = $this->width; + $height = 350; $width_line = ($width - 45) / $nb; - $step = ceil($nb / 20); + $step = ceil($nb / 20); - //create image + //create image $image = imagecreatetruecolor($width, $height); if ($show_graph) { - //colors - $palette = self::getPalette($nb); - $alphapalette = self::getPalette($nb, "50"); + //colors + $palette = self::getPalette($nb); + $alphapalette = self::getPalette($nb, '50'); $darkerpalette = self::getDarkerPalette($nb); - //background + //background $bg_color = hexdec($this->white); imagefilledrectangle($image, 0, 0, $width - 1, $height - 1, $bg_color); - //draw x-axis grey step line and values + //draw x-axis grey step line and values $xstep = round(($height - 60) / 13); for ($i = 0; $i < 13; $i++) { $yaxis = $height - 30 - $xstep * $i; - //grey lines + //grey lines imageLine($image, 30, $yaxis, 30 + $width_line * ($nb - 1), $yaxis, hexdec($this->grey)); - //value labels - $val = round($i * $max / 12); - $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $val); + //value labels + $val = round($i * $max / 12); + $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $val); $textwidth = abs($box[4] - $box[0]); imagettftext( $image, @@ -2030,28 +2020,28 @@ public function showArea($params, $dashboard = false, $width = false) $yaxis + 5, hexdec($this->darkgrey), $this->font, - $val + $val, ); } - //draw y-axis grey step line + //draw y-axis grey step line for ($i = 0; $i < $nb; $i++) { $xaxis = 30 + $width_line * $i; imageLine($image, $xaxis, 50, $xaxis, $height - 25, hexdec($this->grey)); } - //draw y-axis + //draw y-axis imageLine($image, 30, 50, 30, $height - 25, hexdec($this->black)); - //draw x-axis + //draw x-axis imageline($image, 30, $height - 30, $width - 60, $height - 30, hexdec($this->black)); - //create border on export + //create border on export if ($export) { imagerectangle($image, 0, 0, $width - 1, $height - 1, hexdec($this->black)); } - //add title on export + //add title on export if ($export) { imagettftext( $image, @@ -2061,46 +2051,46 @@ public function showArea($params, $dashboard = false, $width = false) 20, hexdec($this->black), $this->font, - $title + $title, ); } - //on png graph, no way to draw curved polygons, force area reports to be linear + //on png graph, no way to draw curved polygons, force area reports to be linear if ($area) { $spline = false; } - //parse datas - $index = 0; + //parse datas + $index = 0; $old_data = 0; - $aCoords = []; + $aCoords = []; foreach ($datas as $label => $data) { - //if first index, continue + //if first index, continue if ($index == 0) { $old_data = $data; $index++; continue; } - // determine coords - $x1 = $index * $width_line - $width_line + 30; - $y1 = $height - 30 - $old_data * ($height - 85) / $max; - $x2 = $x1 + $width_line; - $y2 = $height - 30 - $data * ($height - 85) / $max; + // determine coords + $x1 = $index * $width_line - $width_line + 30; + $y1 = $height - 30 - $old_data * ($height - 85) / $max; + $x2 = $x1 + $width_line; + $y2 = $height - 30 - $data * ($height - 85) / $max; $aCoords[$x1] = $y1; - //in case of area chart fill under point space + //in case of area chart fill under point space if ($area > 0) { $points = [ $x1, $y1, $x2, $y2, $x2, $height - 30, - $x1, $height - 30 + $x1, $height - 30, ]; imagefilledpolygon($image, $points, 4, hexdec($alphapalette[0])); } - //trace lines between points (if linear) + //trace lines between points (if linear) if (!$spline) { $this->imageSmoothAlphaLineLarge($image, $x1, $y1, $x2, $y2, $palette[0]); } @@ -2109,50 +2099,50 @@ public function showArea($params, $dashboard = false, $width = false) $index++; } - //if curved spline activated, draw cubic spline for the current line + //if curved spline activated, draw cubic spline for the current line if ($spline) { $aCoords[$x2] = $y2; $this->imageCubicSmoothLine($image, $palette[0], $aCoords); } - //draw labels and dots - $index = 0; - $old_label = ""; + //draw labels and dots + $index = 0; + $old_label = ''; foreach ($datas as $label => $data) { - //if first index, continue + //if first index, continue if ($index == 0) { - $old_data = $data; + $old_data = $data; $old_label = $label; $index++; continue; } - // determine coords - $x1 = $index * $width_line - $width_line + 30; - $y1 = $height - 30 - $old_data * ($height - 85) / $max; + // determine coords + $x1 = $index * $width_line - $width_line + 30; + $y1 = $height - 30 - $old_data * ($height - 85) / $max; $x2 = $x1 + $width_line; $y2 = $height - 30 - $data * ($height - 85) / $max; - //trace dots + //trace dots $color_rbg = self::colorHexToRGB($darkerpalette[0]); imageSmoothArc($image, $x1 - 1, $y1 - 1, 8, 8, $color_rbg, 0, 2 * M_PI); - imageSmoothArc($image, $x1 - 1, $y1 - 1, 4, 4, [255,255,255,0], 0, 2 * M_PI); + imageSmoothArc($image, $x1 - 1, $y1 - 1, 4, 4, [255, 255, 255, 0], 0, 2 * M_PI); - //display values label - if ($show_label == "always" || $show_label == "hover") { + //display values label + if ($show_label == 'always' || $show_label == 'hover') { imagettftext( $image, $this->fontsize - 1, $this->fontangle, - ($index == 1 ? $x1 : $x1 - 6 ), + ($index == 1 ? $x1 : $x1 - 6), $y1 - 5, hexdec($darkerpalette[0]), $this->font, - $old_data + $old_data, ); } - //display y ticks and labels + //display y ticks and labels if ($step != 0 && ($index / $step) == round($index / $step)) { imageline($image, $x1, $height - 30, $x1, $height - 27, hexdec($darkerpalette[0])); @@ -2160,20 +2150,20 @@ public function showArea($params, $dashboard = false, $width = false) $image, $this->fontsize, $this->fontangle, - $x1 - 10, + $x1 - 10, $height - 10, hexdec($this->black), $this->font, - $old_label + $old_label, ); } - $old_data = $data; + $old_data = $data; $old_label = $label; $index++; } - //display last value, dot and axis label + //display last value, dot and axis label if (isset($x2)) { imagettftext( $image, @@ -2183,62 +2173,61 @@ public function showArea($params, $dashboard = false, $width = false) $y2 - 5, hexdec($darkerpalette[0]), $this->font, - $data + $data, ); $color_rbg = self::colorHexToRGB($darkerpalette[0]); imageSmoothArc($image, $x2 - 1, $y2 - 1, 8, 8, $color_rbg, 0, 2 * M_PI); - imageSmoothArc($image, $x2 - 1, $y2 - 1, 4, 4, [255,255,255,0], 0, 2 * M_PI); + imageSmoothArc($image, $x2 - 1, $y2 - 1, 4, 4, [255, 255, 255, 0], 0, 2 * M_PI); imagettftext( $image, $this->fontsize, $this->fontangle, - $x2 - 10, + $x2 - 10, $height - 10, hexdec($this->black), $this->font, - $label + $label, ); imageline($image, $x2, $height - 30, $x2, $height - 27, hexdec($darkerpalette[0])); } } - //generate image - $params = ["image" => $image, - "export" => $export, - "f_name" => $opt['f_name'], - "class" => $opt['class'], - "title" => $title, - "randname" => $randname, - "raw_datas" => $raw_datas, - "withdata" => $opt['withdata'] + //generate image + $params = ['image' => $image, + 'export' => $export, + 'f_name' => $opt['f_name'], + 'class' => $opt['class'], + 'title' => $title, + 'randname' => $randname, + 'raw_datas' => $raw_datas, + 'withdata' => $opt['withdata'], ]; $contents = $this->generateImage($params); if ($show_graph) { $this->showImage($contents, $export); } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); } - - /** - * Show a multi-area chart - * - * @param $raw_datas : an array with : - * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) - * - key 'unit', ex : '%', 'Kg' (optionnal) - * - key 'spline', curves line (boolean - optionnal) - * @param $title : title of the chart - * @param $desc : description of the chart (optionnal) - * @param $show_label : behavior of the graph labels, - * values : 'hover', 'never', 'always' (optionnal) - * @param $export : keep only svg to export (optionnal) - * @return void - */ + /** + * Show a multi-area chart + * + * @param $raw_datas : an array with : + * - key 'datas', ex : array( 'test1' => 15, 'test2' => 25) + * - key 'unit', ex : '%', 'Kg' (optionnal) + * - key 'spline', curves line (boolean - optionnal) + * @param $title : title of the chart + * @param $desc : description of the chart (optionnal) + * @param $show_label : behavior of the graph labels, + * values : 'hover', 'never', 'always' (optionnal) + * @param $export : keep only svg to export (optionnal) + * @return void + */ public function showGArea($params, $dashboard = false, $width = false) { if ($width !== false) { @@ -2251,7 +2240,7 @@ public function showGArea($params, $dashboard = false, $width = false) $$key = $val; } - //$rand = $opt['rand']; + //$rand = $opt['rand']; $configs = PluginMreportingConfig::initConfigParams($opt['f_name'], $opt['class']); @@ -2269,26 +2258,27 @@ public function showGArea($params, $dashboard = false, $width = false) $datas = []; } - $options = ["title" => $title, - "desc" => $desc, - "randname" => $randname, - "export" => $export, - "delay" => $delay, - "short_classname" => $opt["short_classname"], - "showHeader" => $dashboard + $options = ['title' => $title, + 'desc' => $desc, + 'randname' => $randname, + 'export' => $export, + 'delay' => $delay, + 'short_classname' => $opt['short_classname'], + 'showHeader' => $dashboard, ]; $this->initGraph($options); if (count($datas) <= 0) { - if ($export != "odtall") { - echo __("No data for this date range !", 'mreporting'); - $end['opt']["export"] = false; - $end['opt']["randname"] = false; - $end['opt']["f_name"] = $opt['f_name']; - $end['opt']["class"] = $opt['class']; + if ($export != 'odtall') { + echo __('No data for this date range !', 'mreporting'); + $end['opt']['export'] = false; + $end['opt']['randname'] = false; + $end['opt']['f_name'] = $opt['f_name']; + $end['opt']['class'] = $opt['class']; PluginMreportingCommon::endGraph($end); } + return false; } @@ -2298,7 +2288,7 @@ public function showGArea($params, $dashboard = false, $width = false) $unit = $raw_datas['unit']; } - $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); + $datas = PluginMreportingCommon::compileDatasForUnit($datas, $unit); $raw_datas['datas'] = $datas; $values = array_values($datas); @@ -2316,54 +2306,54 @@ public function showGArea($params, $dashboard = false, $width = false) $max = 100; } - $nb = count($labels2); + $nb = count($labels2); $width = $this->width; - $nb_bar = count($labels2); + $nb_bar = count($labels2); $nb_labels2 = count($datas); $width_line = ($this->width - 45) / $nb; - $index1 = 0; - $index3 = 1; - $step = ceil($nb / 21); - $height = 450; + $index1 = 0; + $index3 = 1; + $step = ceil($nb / 21); + $height = 450; if ($dashboard) { $height = 350; } - $y_labels_width = .1 * $this->width; + $y_labels_width = .1 * $this->width; $x_labels_height = 60; - $x_bar = 30; - $legend_height = $nb_labels2 * 15 + 20; + $x_bar = 30; + $legend_height = $nb_labels2 * 15 + 20; - //create image + //create image $image = imagecreatetruecolor($width, $height); if ($show_graph) { - //colors - $palette = self::getPalette($nb_bar); - $alphapalette = self::getPalette($nb_bar, "50"); + //colors + $palette = self::getPalette($nb_bar); + $alphapalette = self::getPalette($nb_bar, '50'); $darkerpalette = self::getDarkerPalette($nb_bar); - //background + //background $bg_color = hexdec($this->white); imagefilledrectangle($image, 0, 0, $width - 1, $height, $bg_color); - //draw x-axis grey step line and value ticks + //draw x-axis grey step line and value ticks $xstep = round(($height - $legend_height - $x_labels_height) / 12); for ($i = 0; $i < 12; $i++) { $yaxis = $height - $x_labels_height - $xstep * $i; - //horizontal grey lines + //horizontal grey lines imageLine($image, $x_bar, $yaxis, $x_bar + $width_line * ($nb - 1), $yaxis, hexdec($this->grey)); - //value ticks + //value ticks if ($i * $max / 12 < 10) { $val = round($i * $max / 12, 1); } else { $val = round($i * $max / 12); } - $box = @imageTTFBbox($this->fontsize - 1, $this->fontangle, $this->font, $val); + $box = @imageTTFBbox($this->fontsize - 1, $this->fontangle, $this->font, $val); $textwidth = abs($box[4] - $box[0]); imagettftext( @@ -2374,33 +2364,33 @@ public function showGArea($params, $dashboard = false, $width = false) $yaxis + 5, hexdec($this->darkgrey), $this->font, - $val + $val, ); } - //draw y-axis vertical grey step line + //draw y-axis vertical grey step line for ($i = 0; $i < $nb; $i++) { $xaxis = $x_bar + $width_line * $i; imageLine($image, $xaxis, $height - $x_labels_height, $xaxis, $legend_height, hexdec($this->grey)); } - //draw y-axis + //draw y-axis imageLine($image, $x_bar, $height - $x_labels_height, $x_bar, $legend_height, hexdec($this->black)); - //draw y-axis + //draw y-axis imageLine($image, $x_bar, $height - $x_labels_height, $width - 50, $height - $x_labels_height, hexdec($this->black)); - //create border on export + //create border on export if ($export) { imagerectangle($image, 0, 0, $width - 1, $height - 1, hexdec($this->black)); } - //on png graph, no way to draw curved polygons, force area reports to be linear + //on png graph, no way to draw curved polygons, force area reports to be linear if ($area) { $spline = false; } - //add title on export + //add title on export if ($export) { imagettftext( $image, @@ -2410,67 +2400,67 @@ public function showGArea($params, $dashboard = false, $width = false) 20, hexdec($this->black), $this->font, - $title + $title, ); } - //parse datas + //parse datas foreach ($datas as $label => $data) { - $aCoords = []; - $index2 = 0; + $aCoords = []; + $index2 = 0; $old_data = 0; - //parse line + //parse line foreach ($data as $subdata) { - //if first index, continue + //if first index, continue if ($index2 == 0) { $old_data = $subdata; $index2++; continue; } - // determine coords - $x1 = $index2 * $width_line - $width_line + $x_bar; - $y1 = $height - $x_labels_height - $old_data * ($height - $legend_height - $x_labels_height) / $max; + // determine coords + $x1 = $index2 * $width_line - $width_line + $x_bar; + $y1 = $height - $x_labels_height - $old_data * ($height - $legend_height - $x_labels_height) / $max; $x2 = $x1 + $width_line; $y2 = $height - $x_labels_height - $subdata * ($height - $legend_height - $x_labels_height) / $max; - //in case of area chart fill under point space + //in case of area chart fill under point space if ($area > 0) { $points = [ $x1, $y1, $x2, $y2, $x2, $height - $x_labels_height, - $x1, $height - $x_labels_height + $x1, $height - $x_labels_height, ]; imagefilledpolygon($image, $points, 4, hexdec($alphapalette[$index1])); } - //trace lines between points (if linear) + //trace lines between points (if linear) if (!$spline) { $this->imageSmoothAlphaLineLarge($image, $x1, $y1, $x2, $y2, $palette[$index1]); } $aCoords[$x1] = $y1; - //trace dots + //trace dots $color_rbg = self::colorHexToRGB($darkerpalette[$index1]); imageSmoothArc($image, $x1 - 1, $y1 - 1, 7, 7, $color_rbg, 0, 2 * M_PI); - imageSmoothArc($image, $x1 - 1, $y1 - 1, 4, 4, [255,255,255,0], 0, 2 * M_PI); + imageSmoothArc($image, $x1 - 1, $y1 - 1, 4, 4, [255, 255, 255, 0], 0, 2 * M_PI); - //display values label - if ($show_label == "always" || $show_label == "hover") { + //display values label + if ($show_label == 'always' || $show_label == 'hover') { imagettftext( $image, $this->fontsize - 2, $this->fontangle, - ($index2 == 1 ? $x1 : $x1 - 6 ), + ($index2 == 1 ? $x1 : $x1 - 6), $y1 - 5, hexdec($darkerpalette[$index1]), $this->font, - $old_data + $old_data, ); } - //show x-axis ticks + //show x-axis ticks if ($step != 0 && ($index3 / $step) == round($index3 / $step)) { imageline( $image, @@ -2478,7 +2468,7 @@ public function showGArea($params, $dashboard = false, $width = false) $height - $x_labels_height, $x1, $height - $x_labels_height + 3, - hexdec($darkerpalette[$index1]) + hexdec($darkerpalette[$index1]), ); } @@ -2487,21 +2477,21 @@ public function showGArea($params, $dashboard = false, $width = false) $index3++; } - //if curved spline activated, draw cubic spline for the current line + //if curved spline activated, draw cubic spline for the current line if ($spline) { $aCoords[$x2] = $y2; $this->imageCubicSmoothLine($image, $palette[$index1], $aCoords); } - // display last value + // display last value if (isset($x2)) { - //trace dots + //trace dots $color_rbg = self::colorHexToRGB($darkerpalette[$index1]); imageSmoothArc($image, $x2 - 1, $y2 - 1, 7, 7, $color_rbg, 0, 2 * M_PI); - imageSmoothArc($image, $x2 - 1, $y2 - 1, 4, 4, [255,255,255,0], 0, 2 * M_PI); + imageSmoothArc($image, $x2 - 1, $y2 - 1, 4, 4, [255, 255, 255, 0], 0, 2 * M_PI); - //display value label - if ($show_label == "always" || $show_label == "hover") { + //display value label + if ($show_label == 'always' || $show_label == 'hover') { imagettftext( $image, $this->fontsize - 2, @@ -2510,7 +2500,7 @@ public function showGArea($params, $dashboard = false, $width = false) $y2 - 5, hexdec($darkerpalette[$index1]), $this->font, - $old_data + $old_data, ); } } @@ -2518,7 +2508,7 @@ public function showGArea($params, $dashboard = false, $width = false) $index1++; } - //display labels2 + //display labels2 $index = 0; foreach ($labels2 as $label) { $x = $x_bar + $index * $width_line - 2; @@ -2532,19 +2522,19 @@ public function showGArea($params, $dashboard = false, $width = false) $height - $x_labels_height + 11, hexdec($this->black), $this->font, - $label + $label, ); } $index++; } - //legend (align left) + //legend (align left) $index = 0; foreach ($labels as $label) { - //legend label - $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $label); - $textwidth = abs($box[4] - $box[0]); + //legend label + $box = @imageTTFBbox($this->fontsize, $this->fontangle, $this->font, $label); + $textwidth = abs($box[4] - $box[0]); $textheight = abs($box[5] - $box[1]); imagettftext( $image, @@ -2554,25 +2544,25 @@ public function showGArea($params, $dashboard = false, $width = false) 15 + $index * 14, hexdec($this->black), $this->font, - $label + $label, ); - //legend circle + //legend circle $color_rbg = self::colorHexToRGB($palette[$index]); imageSmoothArc($image, 10, 10 + $index * 14, 7, 7, $color_rbg, 0, 2 * M_PI); $index++; } } - //generate image - $params = ["image" => $image, - "export" => $export, - "f_name" => $opt['f_name'], - "class" => $opt['class'], - "title" => $title, - "randname" => $randname, - "raw_datas" => $raw_datas, - "withdata" => $opt['withdata'] + //generate image + $params = ['image' => $image, + 'export' => $export, + 'f_name' => $opt['f_name'], + 'class' => $opt['class'], + 'title' => $title, + 'randname' => $randname, + 'raw_datas' => $raw_datas, + 'withdata' => $opt['withdata'], ]; $contents = $this->generateImage($params); @@ -2580,12 +2570,12 @@ public function showGArea($params, $dashboard = false, $width = false) $this->showImage($contents, $export); } $opt['randname'] = $randname; - $options = ["opt" => $opt, - "export" => $export, - "datas" => $datas, - "labels2" => $labels2, - "flip_data" => $flip_data, - "unit" => $unit + $options = ['opt' => $opt, + 'export' => $export, + 'datas' => $datas, + 'labels2' => $labels2, + 'flip_data' => $flip_data, + 'unit' => $unit, ]; PluginMreportingCommon::endGraph($options, $dashboard); } diff --git a/inc/helpdesk.class.php b/inc/helpdesk.class.php index 83980844..54bba47f 100644 --- a/inc/helpdesk.class.php +++ b/inc/helpdesk.class.php @@ -42,14 +42,14 @@ public function reportHbarTicketNumberByEntity($config = []) global $DB; $_SESSION['mreporting_selector']['reportHbarTicketNumberByEntity'] = ['dateinterval', - 'limit' + 'limit', ]; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "`glpi_tickets`.`date`", + '`glpi_tickets`.`date`', $config['delay'], - $config['randname'] + $config['randname'], ); $datas = []; @@ -62,7 +62,7 @@ public function reportHbarTicketNumberByEntity($config = []) WHERE {$this->sql_date} "; if (Session::isMultiEntitiesMode()) { - $query .= "AND glpi_entities.id IN (" . $this->where_entities . ") "; + $query .= 'AND glpi_entities.id IN (' . $this->where_entities . ') '; } $query .= "AND glpi_tickets.is_deleted = '0' GROUP BY glpi_entities.name @@ -74,7 +74,7 @@ public function reportHbarTicketNumberByEntity($config = []) while ($ticket = $DB->fetchAssoc($result)) { if (empty($ticket['name'])) { - $label = __("Root entity"); + $label = __('Root entity'); } else { $label = $ticket['name']; } @@ -91,17 +91,17 @@ public function reportHgbarTicketNumberByCatAndEntity($config = []) $_SESSION['mreporting_selector']['reportHgbarTicketNumberByCatAndEntity'] = ['dateinterval']; - $datas = []; + $datas = []; $tmp_datas = []; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); - //get categories used in this period + //get categories used in this period $query_cat = "SELECT DISTINCT(glpi_tickets.itilcategories_id) as itilcategories_id, glpi_itilcategories.completename as category FROM glpi_tickets @@ -110,7 +110,7 @@ public function reportHgbarTicketNumberByCatAndEntity($config = []) WHERE {$this->sql_date} "; if (Session::isMultiEntitiesMode()) { - $query_cat .= "AND glpi_tickets.entities_id IN (" . $this->where_entities . ") "; + $query_cat .= 'AND glpi_tickets.entities_id IN (' . $this->where_entities . ') '; } $query_cat .= "AND glpi_tickets.is_deleted = '0' @@ -121,7 +121,7 @@ public function reportHgbarTicketNumberByCatAndEntity($config = []) $categories = []; while ($data = $DB->fetchAssoc($res_cat)) { if (empty($data['category'])) { - $data['category'] = __("None"); + $data['category'] = __('None'); } $categories[$data['category']] = $data['itilcategories_id']; } @@ -134,7 +134,7 @@ public function reportHgbarTicketNumberByCatAndEntity($config = []) } $cat_str = "'" . implode("', '", array_values($categories)) . "'"; - //count ticket by entity and categories previously selected + //count ticket by entity and categories previously selected $query = "SELECT COUNT(glpi_tickets.id) as nb, glpi_entities.name as entity, @@ -145,32 +145,32 @@ public function reportHgbarTicketNumberByCatAndEntity($config = []) WHERE glpi_tickets.itilcategories_id IN ($cat_str) "; if (Session::isMultiEntitiesMode()) { - $query .= "AND glpi_tickets.entities_id IN (" . $this->where_entities . ")"; + $query .= 'AND glpi_tickets.entities_id IN (' . $this->where_entities . ')'; } - $query .= "AND " . $this->sql_date . " + $query .= 'AND ' . $this->sql_date . " AND glpi_tickets.is_deleted = '0' GROUP BY glpi_entities.name, glpi_tickets.itilcategories_id ORDER BY glpi_entities.name ASC, glpi_tickets.itilcategories_id ASC"; $res = $DB->query($query); while ($data = $DB->fetchAssoc($res)) { if (empty($data['entity'])) { - $data['entity'] = __("Root entity"); + $data['entity'] = __('Root entity'); } - $tmp_datas[$data['entity']]["cat_" . $data['cat_id']] = $data['nb']; + $tmp_datas[$data['entity']]['cat_' . $data['cat_id']] = $data['nb']; } - //merge missing datas (0 ticket for a category) + //merge missing datas (0 ticket for a category) foreach ($tmp_datas as &$data) { $data = $data + array_fill_keys($tmp_cat, 0); } - //replace cat_id by labels2 + //replace cat_id by labels2 foreach ($tmp_datas as $entity => &$subdata) { $tmp = []; - $i = 0; + $i = 0; foreach ($subdata as $value) { - $cat_label = $labels2[$i]; + $cat_label = $labels2[$i]; $tmp[$cat_label] = $value; $i++; } @@ -193,26 +193,26 @@ public function reportPieTicketOpenedAndClosed($config = []) $_SESSION['mreporting_selector']['reportPieTicketOpenedAndClosed'] = ['dateinterval']; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); $datas = []; foreach ($this->filters as $filter) { - $query = "SELECT COUNT(*) + $query = 'SELECT COUNT(*) FROM glpi_tickets - WHERE " . $this->sql_date . " "; + WHERE ' . $this->sql_date . ' '; if (Session::isMultiEntitiesMode()) { - $query .= "AND glpi_tickets.entities_id IN (" . $this->where_entities . ")"; + $query .= 'AND glpi_tickets.entities_id IN (' . $this->where_entities . ')'; } $query .= "AND glpi_tickets.is_deleted = '0' AND glpi_tickets.status IN('" . implode("', '", array_keys($filter['status'])) . "')"; - $result = $DB->query($query); + $result = $DB->query($query); $datas[$filter['label']] = $DB->result($result, 0, 0); } @@ -226,14 +226,14 @@ public function reportPieTicketOpenedbyStatus($config = []) $_SESSION['mreporting_selector']['reportPieTicketOpenedbyStatus'] = ['dateinterval', 'allstates']; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); - // Get status to show + // Get status to show if (isset($_POST['status_1'])) { foreach ($_POST as $key => $value) { if ((substr($key, 0, 7) == 'status_') && ($value == 1)) { @@ -244,7 +244,7 @@ public function reportPieTicketOpenedbyStatus($config = []) $status_to_show = ['1', '2', '3', '4']; } - $datas = []; + $datas = []; $status = $this->filters['open']['status'] + $this->filters['close']['status']; foreach ($status as $key => $val) { if (in_array($key, $status_to_show)) { @@ -272,16 +272,16 @@ public function reportPieTopTenAuthor($config = []) $_SESSION['mreporting_selector']['reportPieTopTenAuthor'] = ['dateinterval']; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); $this->sql_closedate = PluginMreportingCommon::getSQLDate( - "glpi_tickets.closedate", + 'glpi_tickets.closedate', $config['delay'], - $config['randname'] + $config['randname'], ); $datas = []; @@ -299,7 +299,7 @@ public function reportPieTopTenAuthor($config = []) $result = $DB->query($query); while ($ticket = $DB->fetchAssoc($result)) { if ($ticket['users_id'] == 0) { - $label = __("Undefined", 'mreporting'); + $label = __('Undefined', 'mreporting'); } else { $label = getUserName($ticket['users_id']); } @@ -309,11 +309,11 @@ public function reportPieTopTenAuthor($config = []) return $datas; } - public function reportHgbarOpenTicketNumberByCategoryAndByType($config = []) { $_SESSION['mreporting_selector']['reportHgbarOpenTicketNumberByCategoryAndByType'] = ['dateinterval']; + return $this->reportHgbarTicketNumberByCategoryAndByType($config, 'open'); } @@ -321,6 +321,7 @@ public function reportHgbarCloseTicketNumberByCategoryAndByType($config = []) { $_SESSION['mreporting_selector']['reportHgbarCloseTicketNumberByCategoryAndByType'] = ['dateinterval']; + return $this->reportHgbarTicketNumberByCategoryAndByType($config, 'close'); } @@ -333,11 +334,11 @@ private function reportHgbarTicketNumberByCategoryAndByType(array $config, $filt $datas = []; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); $query = "SELECT glpi_itilcategories.id as category_id, @@ -358,15 +359,15 @@ private function reportHgbarTicketNumberByCategoryAndByType(array $config, $filt $datas['datas'] = []; while ($ticket = $DB->fetchAssoc($result)) { if (is_null($ticket['category_id'])) { - $ticket['category_id'] = 0; - $ticket['category_name'] = __("None"); + $ticket['category_id'] = 0; + $ticket['category_name'] = __('None'); } if ($ticket['type'] == 0) { - $type = __("Undefined", 'mreporting'); + $type = __('Undefined', 'mreporting'); } else { $type = Ticket::getTicketTypeName($ticket['type']); } - $datas['labels2'][$type] = $type; + $datas['labels2'][$type] = $type; $datas['datas'][$ticket['category_name']][$type] = $ticket['count']; } @@ -382,28 +383,28 @@ public function reportHgbarTicketNumberByService($config = []) $datas = []; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); foreach ($this->filters as $class => $filter) { $datas['labels2'][$filter['label']] = $filter['label']; - $query = "SELECT COUNT(*) + $query = 'SELECT COUNT(*) FROM glpi_tickets WHERE id NOT IN ( SELECT tickets_id FROM glpi_groups_tickets WHERE glpi_groups_tickets.type = 1 ) - AND glpi_tickets.entities_id IN (" . $this->where_entities . ") + AND glpi_tickets.entities_id IN (' . $this->where_entities . ") AND {$this->sql_date} AND status IN('" . implode("', '", array_keys($filter['status'])) . "')"; $result = $DB->query($query); - $datas['datas'][__("None")][$filter['label']] = $DB->result($result, 0, 0); + $datas['datas'][__('None')][$filter['label']] = $DB->result($result, 0, 0); $query = "SELECT glpi_groups.name as group_name, COUNT(glpi_tickets.id) as count @@ -436,14 +437,14 @@ public function reportHgbarOpenedTicketNumberByCategory($config = []) $datas = []; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); - // Get status to show + // Get status to show if (isset($_POST['status_1'])) { foreach ($_POST as $key => $value) { if (substr($key, 0, 7) == 'status_' && $value == 1) { @@ -454,7 +455,7 @@ public function reportHgbarOpenedTicketNumberByCategory($config = []) $status_to_show = ['1', '2', '3', '4']; } - $status = $this->filters['open']['status'] + $this->filters['close']['status']; + $status = $this->filters['open']['status'] + $this->filters['close']['status']; $status_keys = array_keys($status); $query = "SELECT glpi_tickets.status, @@ -467,14 +468,14 @@ public function reportHgbarOpenedTicketNumberByCategory($config = []) AND glpi_tickets.entities_id IN (" . $this->where_entities . ") AND glpi_tickets.status IN('" . implode("', '", $status_keys) . "') AND glpi_tickets.is_deleted = '0' - AND status IN (" . implode(',', $status_to_show) . ") + AND status IN (" . implode(',', $status_to_show) . ') GROUP BY glpi_itilcategories.id, glpi_tickets.status - ORDER BY glpi_itilcategories.name"; + ORDER BY glpi_itilcategories.name'; $result = $DB->query($query); while ($ticket = $DB->fetchAssoc($result)) { if (is_null($ticket['category_name'])) { - $ticket['category_name'] = __("None"); + $ticket['category_name'] = __('None'); } if (!isset($datas['datas'][$ticket['category_name']])) { @@ -488,7 +489,7 @@ public function reportHgbarOpenedTicketNumberByCategory($config = []) $datas['datas'][$ticket['category_name']][$status[$ticket['status']]] = $ticket['count']; } - //Define legend for all ticket status available in GLPI + //Define legend for all ticket status available in GLPI foreach ($status as $key => $label) { if (in_array($key, $status_to_show)) { $datas['labels2'][$label] = $label; @@ -513,11 +514,11 @@ public function reportAreaNbTicket($config = [], $area = true) $datas = []; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); $query = "SELECT @@ -541,12 +542,14 @@ public function reportAreaNbTicket($config = [], $area = true) public function reportVstackbarNbTicket($config = []) { $_SESSION['mreporting_selector']['reportVstackbarNbTicket'] = ['dateinterval']; + return $this->reportGlineNbTicket($config, false); } public function reportGareaNbTicket($config = []) { $_SESSION['mreporting_selector']['reportGareaNbTicket'] = ['dateinterval']; + return $this->reportGlineNbTicket($config, true); } @@ -557,17 +560,17 @@ public function reportGlineNbTicket($config = [], $area = false) $_SESSION['mreporting_selector']['reportGlineNbTicket'] = ['dateinterval', 'period', 'allstates']; - $datas = []; + $datas = []; $tmp_datas = []; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); - // Get status to show + // Get status to show if (isset($_POST['status_1'])) { foreach ($_POST as $key => $value) { if ((substr($key, 0, 7) == 'status_') && ($value == 1)) { @@ -578,18 +581,18 @@ public function reportGlineNbTicket($config = [], $area = false) $status_to_show = ['1', '2', '3', '4']; } - //get dates used in this period + //get dates used in this period $query_date = "SELECT DISTINCT DATE_FORMAT(`date`, '" . $this->period_sort . "') AS period, DATE_FORMAT(`date`, '" . $this->period_label . "') AS period_name FROM `glpi_tickets` - WHERE " . $this->sql_date . " - AND `glpi_tickets`.`entities_id` IN (" . $this->where_entities . ") + WHERE " . $this->sql_date . ' + AND `glpi_tickets`.`entities_id` IN (' . $this->where_entities . ") AND `glpi_tickets`.`is_deleted` = '0' - AND status IN(" . implode(',', $status_to_show) . ") - ORDER BY `date` ASC"; + AND status IN(" . implode(',', $status_to_show) . ') + ORDER BY `date` ASC'; $res_date = $DB->query($query_date); - $dates = []; + $dates = []; while ($data = $DB->fetchAssoc($res_date)) { $dates[$data['period']] = $data['period']; } @@ -605,32 +608,33 @@ public function reportGlineNbTicket($config = [], $area = false) status, COUNT(id) as nb FROM glpi_tickets - WHERE " . $this->sql_date . " - AND glpi_tickets.entities_id IN (" . $this->where_entities . ") + WHERE " . $this->sql_date . ' + AND glpi_tickets.entities_id IN (' . $this->where_entities . ") AND glpi_tickets.is_deleted = '0' - AND status IN(" . implode(',', $status_to_show) . ") + AND status IN(" . implode(',', $status_to_show) . ') GROUP BY period, status - ORDER BY period, status"; + ORDER BY period, status'; $res = $DB->query($query); while ($data = $DB->fetchAssoc($res)) { - $status = Ticket::getStatus($data['status']); - $datas['labels2'][$data['period']] = $data['period_name']; + $status = Ticket::getStatus($data['status']); + $datas['labels2'][$data['period']] = $data['period_name']; $datas['datas'][$status][$data['period']] = $data['nb']; } - //merge missing datas (not defined status for a month) + //merge missing datas (not defined status for a month) if (isset($datas['datas'])) { foreach ($datas['datas'] as &$data) { $data = $data + array_fill_keys($tmp_date, 0); } } - //fix order of datas + //fix order of datas if (count($datas) > 0) { foreach ($datas['datas'] as &$data) { ksort($data); } } + return $datas; } @@ -640,15 +644,15 @@ public function reportSunburstTicketByCategories($config = []) $_SESSION['mreporting_selector']['reportSunburstTicketByCategories'] = ['dateinterval']; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); $flat_datas = []; - $datas = []; + $datas = []; $query = "SELECT glpi_tickets.itilcategories_id as id, glpi_itilcategories.name as name, @@ -667,7 +671,7 @@ public function reportSunburstTicketByCategories($config = []) $flat_datas[$data['id']] = $data; } - //get full parent list + //get full parent list krsort($flat_datas); $itilcategory = new ITILCategory(); foreach ($flat_datas as $cat_id => $current_datas) { @@ -680,7 +684,7 @@ public function reportSunburstTicketByCategories($config = []) 'id' => $current_datas['parent'], 'name' => $itilcategory->fields['name'], 'parent' => $itilcategory->fields['itilcategories_id'], - 'count' => 0 + 'count' => 0, ]; } } @@ -691,7 +695,6 @@ public function reportSunburstTicketByCategories($config = []) return $tree_datas; } - public function reportVstackbarTicketStatusByTechnician($config = []) { global $DB; @@ -699,19 +702,19 @@ public function reportVstackbarTicketStatusByTechnician($config = []) $_SESSION['mreporting_selector']['reportVstackbarTicketStatusByTechnician'] = ['dateinterval']; $datas = []; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "glpi_tickets.date", + 'glpi_tickets.date', $config['delay'], - $config['randname'] + $config['randname'], ); - $status = $this->filters['open']['status'] + $this->filters['close']['status']; + $status = $this->filters['open']['status'] + $this->filters['close']['status']; $status_keys = array_keys($status); - //get technician list + //get technician list $technicians = []; - $query = "SELECT + $query = "SELECT CONCAT(glpi_users.firstname, ' ', glpi_users.realname) as fullname, glpi_users.name as username FROM glpi_tickets @@ -728,11 +731,11 @@ public function reportVstackbarTicketStatusByTechnician($config = []) while ($technician = $DB->fetchAssoc($result)) { $technicians[] = ['username' => $technician['username'], - 'fullname' => $technician['fullname'], + 'fullname' => $technician['fullname'], ]; } - //prepare empty values with technician list + //prepare empty values with technician list foreach ($status as $key_status => $current_status) { foreach ($technicians as $technician) { $datas['datas'][$current_status][$technician['username']] = 0; @@ -765,7 +768,7 @@ public function reportVstackbarTicketStatusByTechnician($config = []) while ($ticket = $DB->fetchAssoc($result)) { if (is_null($ticket['technician'])) { - $ticket['technician'] = __("None"); + $ticket['technician'] = __('None'); } $datas['datas'][$status[$ticket['status']]][$ticket['username']] = $ticket['count']; } @@ -780,11 +783,11 @@ public function reportHbarTicketNumberByLocation($config = []) $_SESSION['mreporting_selector']['reportHbarTicketNumberByLocation'] = ['dateinterval', 'limit']; - //Init delay value + //Init delay value $this->sql_date = PluginMreportingCommon::getSQLDate( - "`glpi_tickets`.`date`", + '`glpi_tickets`.`date`', $config['delay'], - $config['randname'] + $config['randname'], ); $datas = []; @@ -810,7 +813,7 @@ public function reportHbarTicketNumberByLocation($config = []) while ($ticket = $DB->fetchAssoc($result)) { if (empty($ticket['name'])) { - $label = __("None"); + $label = __('None'); } else { $label = $ticket['name']; } @@ -820,15 +823,14 @@ public function reportHbarTicketNumberByLocation($config = []) return $datas; } - - /** - * Custom dates for allodt export - * You can configure your dates for the Allodt export - * - * @param array $opt : contains the dates - * @param type $functionname - * @return $opt - */ + /** + * Custom dates for allodt export + * You can configure your dates for the Allodt export + * + * @param array $opt : contains the dates + * @param type $functionname + * @return $opt + */ public function customExportDates(array $opt, $functionname) { $config = PluginMreportingConfig::initConfigParams($functionname, __CLASS__); @@ -838,17 +840,16 @@ public function customExportDates(array $opt, $functionname) return $opt; } - /** - * Preconfig datas with your values when init config is done - * - * @param type $funct_name - * @param type $classname - * @param PluginMreportingConfig $config - * @return $config - */ + /** + * Preconfig datas with your values when init config is done + * + * @param type $funct_name + * @param type $classname + * @param PluginMreportingConfig $config + * @return $config + */ public function preconfig($funct_name, $classname, PluginMreportingConfig $config) { - if ($funct_name != -1 && $classname) { $ex_func = preg_split('/(?<=\\w)(?=[A-Z])/', $funct_name); if ($ex_func[0] != 'report') { @@ -858,21 +859,22 @@ public function preconfig($funct_name, $classname, PluginMreportingConfig $confi switch ($gtype) { case 'pie': - $config->fields["name"] = $funct_name; - $config->fields["classname"] = $classname; - $config->fields["is_active"] = "1"; - $config->fields["show_label"] = "hover"; - $config->fields["spline"] = "0"; - $config->fields["show_area"] = "0"; - $config->fields["show_graph"] = "1"; - $config->fields["default_delay"] = "30"; - $config->fields["show_label"] = "hover"; + $config->fields['name'] = $funct_name; + $config->fields['classname'] = $classname; + $config->fields['is_active'] = '1'; + $config->fields['show_label'] = 'hover'; + $config->fields['spline'] = '0'; + $config->fields['show_area'] = '0'; + $config->fields['show_graph'] = '1'; + $config->fields['default_delay'] = '30'; + $config->fields['show_label'] = 'hover'; break; default: $config->preconfig($funct_name, $classname); break; } } + return $config->fields; } } diff --git a/inc/helpdeskplus.class.php b/inc/helpdeskplus.class.php index f8330895..b93bad98 100644 --- a/inc/helpdeskplus.class.php +++ b/inc/helpdeskplus.class.php @@ -48,34 +48,33 @@ class PluginMreportingHelpdeskplus extends PluginMreportingBaseclass protected $sql_join_gtr; protected $sql_select_sla; - public function __construct($config = []) { /** @var array $LANG */ global $LANG; - $this->sql_group_assign = "1=1"; - $this->sql_group_request = "1=1"; - $this->sql_user_assign = "1=1"; - $this->sql_type = "glpi_tickets.type IN (" . Ticket::INCIDENT_TYPE . ", " . Ticket::DEMAND_TYPE . ")"; - $this->sql_itilcat = "1=1"; - $this->sql_join_cat = "LEFT JOIN glpi_itilcategories cat - ON glpi_tickets.itilcategories_id = cat.id"; - $this->sql_join_g = "LEFT JOIN glpi_groups g - ON gt.groups_id = g.id"; - $this->sql_join_u = "LEFT JOIN glpi_users u - ON tu.users_id = u.id"; - $this->sql_join_tt = "LEFT JOIN glpi_tickettasks tt - ON tt.tickets_id = glpi_tickets.id"; - $this->sql_join_tu = "LEFT JOIN glpi_tickets_users tu + $this->sql_group_assign = '1=1'; + $this->sql_group_request = '1=1'; + $this->sql_user_assign = '1=1'; + $this->sql_type = 'glpi_tickets.type IN (' . Ticket::INCIDENT_TYPE . ', ' . Ticket::DEMAND_TYPE . ')'; + $this->sql_itilcat = '1=1'; + $this->sql_join_cat = 'LEFT JOIN glpi_itilcategories cat + ON glpi_tickets.itilcategories_id = cat.id'; + $this->sql_join_g = 'LEFT JOIN glpi_groups g + ON gt.groups_id = g.id'; + $this->sql_join_u = 'LEFT JOIN glpi_users u + ON tu.users_id = u.id'; + $this->sql_join_tt = 'LEFT JOIN glpi_tickettasks tt + ON tt.tickets_id = glpi_tickets.id'; + $this->sql_join_tu = 'LEFT JOIN glpi_tickets_users tu ON tu.tickets_id = glpi_tickets.id - AND tu.type = " . Ticket_User::ASSIGN; - $this->sql_join_gt = "LEFT JOIN glpi_groups_tickets gt + AND tu.type = ' . Ticket_User::ASSIGN; + $this->sql_join_gt = 'LEFT JOIN glpi_groups_tickets gt ON gt.tickets_id = glpi_tickets.id - AND gt.type = " . Group_Ticket::ASSIGN; - $this->sql_join_gtr = "LEFT JOIN glpi_groups_tickets gtr + AND gt.type = ' . Group_Ticket::ASSIGN; + $this->sql_join_gtr = 'LEFT JOIN glpi_groups_tickets gtr ON gtr.tickets_id = glpi_tickets.id - AND gtr.type = " . Group_Ticket::REQUESTER; - $this->sql_select_sla = "CASE WHEN glpi_slas.definition_time = 'day' + AND gtr.type = ' . Group_Ticket::REQUESTER; + $this->sql_select_sla = "CASE WHEN glpi_slas.definition_time = 'day' AND glpi_tickets.solve_delay_stat <= glpi_slas.number_time * 86400 THEN 'ok' WHEN glpi_slas.definition_time = 'hour' @@ -96,19 +95,19 @@ public function __construct($config = []) if (isset($mr_values['groups_assign_id'])) { if (is_array($mr_values['groups_assign_id'])) { - $this->sql_group_assign = "gt.groups_id IN (" . - implode(',', $mr_values['groups_assign_id']) . ")"; - } else if ($mr_values['groups_assign_id'] > 0) { - $this->sql_group_assign = "gt.groups_id = " . $mr_values['groups_assign_id']; + $this->sql_group_assign = 'gt.groups_id IN (' . + implode(',', $mr_values['groups_assign_id']) . ')'; + } elseif ($mr_values['groups_assign_id'] > 0) { + $this->sql_group_assign = 'gt.groups_id = ' . $mr_values['groups_assign_id']; } } if (isset($mr_values['groups_request_id'])) { if (is_array($mr_values['groups_request_id'])) { - $this->sql_group_request = "gtr.groups_id IN (" . - implode(',', $mr_values['groups_request_id']) . ")"; - } else if ($mr_values['groups_request_id'] > 0) { - $this->sql_group_request = "gt.groups_id = " . $mr_values['groups_request_id']; + $this->sql_group_request = 'gtr.groups_id IN (' . + implode(',', $mr_values['groups_request_id']) . ')'; + } elseif ($mr_values['groups_request_id'] > 0) { + $this->sql_group_request = 'gt.groups_id = ' . $mr_values['groups_request_id']; } } @@ -116,21 +115,21 @@ public function __construct($config = []) isset($mr_values['users_assign_id']) && $mr_values['users_assign_id'] > 0 ) { - $this->sql_user_assign = "tu.users_id = " . $mr_values['users_assign_id']; + $this->sql_user_assign = 'tu.users_id = ' . $mr_values['users_assign_id']; } if ( isset($mr_values['type']) && $mr_values['type'] > 0 ) { - $this->sql_type = "glpi_tickets.type = " . $mr_values['type']; + $this->sql_type = 'glpi_tickets.type = ' . $mr_values['type']; } if ( isset($mr_values['itilcategories_id']) && $mr_values['itilcategories_id'] > 0 ) { - $this->sql_itilcat = "glpi_tickets.itilcategories_id = " . $mr_values['itilcategories_id']; + $this->sql_itilcat = 'glpi_tickets.itilcategories_id = ' . $mr_values['itilcategories_id']; } } @@ -138,22 +137,21 @@ public function reportGlineBacklogs($config = []) { global $DB, $LANG; - $_SESSION['mreporting_selector']['reportGlineBacklogs'] = - ['dateinterval', 'period', 'backlogstates', 'multiplegrouprequest', - 'userassign', 'category', 'multiplegroupassign' - ]; + $_SESSION['mreporting_selector']['reportGlineBacklogs'] = ['dateinterval', 'period', 'backlogstates', 'multiplegrouprequest', + 'userassign', 'category', 'multiplegroupassign', + ]; $tab = []; $datas = []; - $search_new = (!isset($_SESSION['mreporting_values']['show_new']) - || ($_SESSION['mreporting_values']['show_new'] == '1')) ? true : false; - $search_solved = (!isset($_SESSION['mreporting_values']['show_solved']) - || ($_SESSION['mreporting_values']['show_solved'] == '1')) ? true : false; - $search_backlogs = (!isset($_SESSION['mreporting_values']['show_backlog']) + $search_new = (!isset($_SESSION['mreporting_values']['show_new']) + || ($_SESSION['mreporting_values']['show_new'] == '1')) ? true : false; + $search_solved = (!isset($_SESSION['mreporting_values']['show_solved']) + || ($_SESSION['mreporting_values']['show_solved'] == '1')) ? true : false; + $search_backlogs = (!isset($_SESSION['mreporting_values']['show_backlog']) || ($_SESSION['mreporting_values']['show_backlog'] == '1')) ? true : false; - $search_closed = (isset($_SESSION['mreporting_values']['show_closed']) - && ($_SESSION['mreporting_values']['show_closed'] == '1')) ? true : false; + $search_closed = (isset($_SESSION['mreporting_values']['show_closed']) + && ($_SESSION['mreporting_values']['show_closed'] == '1')) ? true : false; if ($search_new) { $sql_create = "SELECT @@ -176,7 +174,7 @@ public function reportGlineBacklogs($config = []) GROUP BY period ORDER BY period"; foreach ($DB->request($sql_create) as $data) { - $tab[$data['period']]['open'] = $data['nb']; + $tab[$data['period']]['open'] = $data['nb']; $tab[$data['period']]['period_name'] = $data['period_name']; } } @@ -201,41 +199,41 @@ public function reportGlineBacklogs($config = []) GROUP BY period ORDER BY period"; foreach ($DB->request($sql_solved) as $data) { - $tab[$data['period']]['solved'] = $data['nb']; + $tab[$data['period']]['solved'] = $data['nb']; $tab[$data['period']]['period_name'] = $data['period_name']; } } - /** - * Backlog : Tickets Ouverts à la date en cours... - */ + /** + * Backlog : Tickets Ouverts à la date en cours... + */ if ($search_backlogs) { - $date_array1 = explode("-", $_SESSION['mreporting_values']['date1' . $config['randname']]); - $time1 = mktime(0, 0, 0, $date_array1[1], $date_array1[2], $date_array1[0]); + $date_array1 = explode('-', $_SESSION['mreporting_values']['date1' . $config['randname']]); + $time1 = mktime(0, 0, 0, $date_array1[1], $date_array1[2], $date_array1[0]); - $date_array2 = explode("-", $_SESSION['mreporting_values']['date2' . $config['randname']]); - $time2 = mktime(0, 0, 0, $date_array2[1], $date_array2[2], $date_array2[0]); + $date_array2 = explode('-', $_SESSION['mreporting_values']['date2' . $config['randname']]); + $time2 = mktime(0, 0, 0, $date_array2[1], $date_array2[2], $date_array2[0]); - //if data inverted, reverse it + //if data inverted, reverse it if ($time1 > $time2) { - list($time1, $time2) = [$time2, $time1]; + list($time1, $time2) = [$time2, $time1]; list($_SESSION['mreporting_values']['date1' . $config['randname']], $_SESSION['mreporting_values']['date2' . $config['randname']]) = [ $_SESSION['mreporting_values']['date2' . $config['randname']], - $_SESSION['mreporting_values']['date1' . $config['randname']] + $_SESSION['mreporting_values']['date1' . $config['randname']], ]; } $sql_itilcat_backlog = isset($_SESSION['mreporting_values']['itilcategories_id']) && $_SESSION['mreporting_values']['itilcategories_id'] > 0 - ? " AND tic.itilcategories_id = " . $_SESSION['mreporting_values']['itilcategories_id'] - : ""; + ? ' AND tic.itilcategories_id = ' . $_SESSION['mreporting_values']['itilcategories_id'] + : ''; - $begin = date($this->period_sort_php, $time1); - $end = date($this->period_sort_php, $time2); - $sql_date_backlog = "DATE_FORMAT(list_date.period_l, '{$this->period_sort}') >= '$begin' + $begin = date($this->period_sort_php, $time1); + $end = date($this->period_sort_php, $time2); + $sql_date_backlog = "DATE_FORMAT(list_date.period_l, '{$this->period_sort}') >= '$begin' AND DATE_FORMAT(list_date.period_l, '{$this->period_sort}') <= '$end'"; $sql_list_date2 = str_replace('date', 'solvedate', $this->sql_list_date); - $sql_backlog = "SELECT + $sql_backlog = "SELECT DISTINCT(DATE_FORMAT(list_date.period_l, '$this->period_sort')) as period, DATE_FORMAT(list_date.period_l, '$this->period_label') as period_name, COUNT(DISTINCT(glpi_tickets.id)) as nb @@ -267,7 +265,7 @@ public function reportGlineBacklogs($config = []) AND $sql_date_backlog GROUP BY period"; foreach ($DB->request($sql_backlog) as $data) { - $tab[$data['period']]['backlog'] = $data['nb']; + $tab[$data['period']]['backlog'] = $data['nb']; $tab[$data['period']]['period_name'] = $data['period_name']; } } @@ -292,7 +290,7 @@ public function reportGlineBacklogs($config = []) GROUP BY period ORDER BY period"; foreach ($DB->request($sql_closed) as $data) { - $tab[$data['period']]['closed'] = $data['nb']; + $tab[$data['period']]['closed'] = $data['nb']; $tab[$data['period']]['period_name'] = $data['period_name']; } } @@ -318,8 +316,6 @@ public function reportGlineBacklogs($config = []) return $datas; } - - public function reportVstackbarLifetime($config = []) { global $DB; @@ -327,17 +323,17 @@ public function reportVstackbarLifetime($config = []) $tab = $datas = $labels2 = []; $_SESSION['mreporting_selector']['reportVstackbarLifetime'] = ['dateinterval', 'period', 'allstates', 'multiplegrouprequest', - 'multiplegroupassign', 'userassign', 'category' + 'multiplegroupassign', 'userassign', 'category', ]; if (!isset($_SESSION['mreporting_values']['date2' . $config['randname']])) { - $_SESSION['mreporting_values']['date2' . $config['randname']] = date("Y-m-d"); + $_SESSION['mreporting_values']['date2' . $config['randname']] = date('Y-m-d'); } foreach ($this->status as $current_status) { if ($_SESSION['mreporting_values']['status_' . $current_status] == '1') { $status_name = Ticket::getStatus($current_status); - $sql_status = "SELECT + $sql_status = "SELECT DISTINCT DATE_FORMAT(date, '{$this->period_sort}') as period, DATE_FORMAT(date, '{$this->period_label}') as period_name, COUNT(DISTINCT glpi_tickets.id) as nb @@ -359,40 +355,37 @@ public function reportVstackbarLifetime($config = []) $res = $DB->query($sql_status); while ($data = $DB->fetchAssoc($res)) { $tab[$data['period']][$status_name] = $data['nb']; - $labels2[$data['period']] = $data['period_name']; + $labels2[$data['period']] = $data['period_name']; } } } - //ascending order of datas by date + //ascending order of datas by date ksort($tab); - //fill missing datas with zeros + //fill missing datas with zeros $datas = $this->fillStatusMissingValues($tab, $labels2); return $datas; } - - public function reportVstackbarTicketsgroups($config = []) { global $DB; - $_SESSION['mreporting_selector']['reportVstackbarTicketsgroups'] = - ['dateinterval', 'allstates', 'multiplegroupassign', 'category']; + $_SESSION['mreporting_selector']['reportVstackbarTicketsgroups'] = ['dateinterval', 'allstates', 'multiplegroupassign', 'category']; - $tab = []; + $tab = []; $datas = []; if (!isset($_SESSION['mreporting_values']['date2' . $config['randname']])) { - $_SESSION['mreporting_values']['date2' . $config['randname']] = date("Y-m-d"); + $_SESSION['mreporting_values']['date2' . $config['randname']] = date('Y-m-d'); } foreach ($this->status as $current_status) { if ($_SESSION['mreporting_values']['status_' . $current_status] == '1') { $status_name = Ticket::getStatus($current_status); - $sql_status = "SELECT + $sql_status = "SELECT DISTINCT g.completename AS group_name, COUNT(DISTINCT glpi_tickets.id) AS nb FROM glpi_tickets @@ -410,24 +403,22 @@ public function reportVstackbarTicketsgroups($config = []) $res = $DB->query($sql_status); while ($data = $DB->fetchAssoc($res)) { if (empty($data['group_name'])) { - $data['group_name'] = __("None"); + $data['group_name'] = __('None'); } $tab[$data['group_name']][$status_name] = $data['nb']; } } } - //ascending order of datas by date + //ascending order of datas by date ksort($tab); - //fill missing datas with zeros + //fill missing datas with zeros $datas = $this->fillStatusMissingValues($tab); return $datas; } - - public function reportVstackbarTicketstech($config = []) { global $DB; @@ -435,11 +426,11 @@ public function reportVstackbarTicketstech($config = []) $_SESSION['mreporting_selector']['reportVstackbarTicketstech'] = ['dateinterval', 'multiplegroupassign', 'allstates', 'category']; - $tab = []; + $tab = []; $datas = []; if (!isset($_SESSION['mreporting_values']['date2' . $config['randname']])) { - $_SESSION['mreporting_values']['date2' . $config['randname']] = date("Y-m-d"); + $_SESSION['mreporting_values']['date2' . $config['randname']] = date('Y-m-d'); } foreach ($this->status as $current_status) { @@ -468,7 +459,7 @@ public function reportVstackbarTicketstech($config = []) ORDER BY name"; $res = $DB->query($sql_create); while ($data = $DB->fetchAssoc($res)) { - $data['name'] = empty($data['completename']) ? __("None") : $data['completename']; + $data['name'] = empty($data['completename']) ? __('None') : $data['completename']; if (!isset($tab[$data['name']][$status_name])) { $tab[$data['name']][$status_name] = 0; @@ -479,10 +470,10 @@ public function reportVstackbarTicketstech($config = []) } } - //ascending order of datas by date + //ascending order of datas by date ksort($tab); - //fill missing datas with zeros + //fill missing datas with zeros $datas = $this->fillStatusMissingValues($tab); return $datas; @@ -495,7 +486,7 @@ public function reportHbarTopcategory($config = []) $_SESSION['mreporting_selector']['reportHbarTopcategory'] = ['dateinterval', 'limit', 'userassign', 'multiplegrouprequest', 'multiplegroupassign', 'type']; - $tab = []; + $tab = []; $datas = []; $sql_create = "SELECT DISTINCT glpi_tickets.itilcategories_id, @@ -522,7 +513,7 @@ public function reportHbarTopcategory($config = []) $res = $DB->query($sql_create); while ($data = $DB->fetchAssoc($res)) { if (empty($data['completename'])) { - $data['completename'] = __("None"); + $data['completename'] = __('None'); } $datas['datas'][$data['completename']] = $data['nb']; } @@ -536,7 +527,7 @@ public function reportHbarTopapplicant($config = []) $_SESSION['mreporting_selector']['reportHbarTopapplicant'] = ['dateinterval', 'limit', 'type']; - $tab = []; + $tab = []; $datas = []; $sql_create = "SELECT DISTINCT gt.groups_id, @@ -558,7 +549,7 @@ public function reportHbarTopapplicant($config = []) $res = $DB->query($sql_create); while ($data = $DB->fetchAssoc($res)) { if (empty($data['completename'])) { - $data['completename'] = __("None"); + $data['completename'] = __('None'); } $datas['datas'][$data['completename']] = $data['nb']; } @@ -572,7 +563,7 @@ public function reportVstackbarGroupChange($config = []) $_SESSION['mreporting_selector']['reportVstackbarGroupChange'] = ['dateinterval', 'userassign', 'category', - 'multiplegrouprequest', 'multiplegroupassign' + 'multiplegrouprequest', 'multiplegroupassign', ]; $datas = []; @@ -610,22 +601,20 @@ public function reportVstackbarGroupChange($config = []) $datas['datas'] = []; while ($ticket = $DB->fetchAssoc($result)) { - $datas['labels2'][$ticket['nb_add_group']] = $ticket['nb_add_group']; - $datas['datas'][__("Number of tickets")][$ticket['nb_add_group']] = $ticket['nb_ticket']; + $datas['labels2'][$ticket['nb_add_group']] = $ticket['nb_add_group']; + $datas['datas'][__('Number of tickets')][$ticket['nb_add_group']] = $ticket['nb_ticket']; } return $datas; } - public function reportLineActiontimeVsSolvedelay($config = []) { global $DB; - $_SESSION['mreporting_selector']['reportLineActiontimeVsSolvedelay'] = - ['dateinterval', 'period', 'multiplegrouprequest', - 'userassign', 'category', 'multiplegroupassign' - ]; + $_SESSION['mreporting_selector']['reportLineActiontimeVsSolvedelay'] = ['dateinterval', 'period', 'multiplegrouprequest', + 'userassign', 'category', 'multiplegroupassign', + ]; $query = "SELECT DATE_FORMAT(glpi_tickets.date, '{$this->period_sort}') as period, @@ -659,19 +648,18 @@ public function reportLineActiontimeVsSolvedelay($config = []) ORDER BY period"; $data = []; foreach ($DB->request($query) as $result) { - $data['datas'][$result['period_name']] = floatval($result['time_percent']); + $data['datas'][$result['period_name']] = floatval($result['time_percent']); $data['labels2'][$result['period_name']] = $result['period_name']; } return $data; } - public function reportGlineNbTicketBySla($config = []) { global $DB; - $area = false; + $area = false; $datas = []; $_SESSION['mreporting_selector']['reportGlineNbTicketBySla'] @@ -681,18 +669,18 @@ public function reportGlineNbTicketBySla($config = []) isset($_SESSION['mreporting_values']['slas']) && !empty($_SESSION['mreporting_values']['slas']) ) { - //get dates used in this period + //get dates used in this period $query_date = "SELECT DISTINCT DATE_FORMAT(`glpi_tickets`.`date`, '{$this->period_sort}') AS period, DATE_FORMAT(`glpi_tickets`.`date`, '{$this->period_label}') AS period_name FROM `glpi_tickets` INNER JOIN `glpi_slas` ON `glpi_tickets`.slas_id_ttr = `glpi_slas`.id WHERE {$this->sql_date_create} - AND `glpi_tickets`.status IN (" . implode(',', array_merge(Ticket::getSolvedStatusArray(), Ticket::getClosedStatusArray())) . ") - AND `glpi_tickets`.`entities_id` IN (" . $this->where_entities . ") + AND `glpi_tickets`.status IN (" . implode(',', array_merge(Ticket::getSolvedStatusArray(), Ticket::getClosedStatusArray())) . ') + AND `glpi_tickets`.`entities_id` IN (' . $this->where_entities . ") AND `glpi_tickets`.`is_deleted` = '0' - AND `glpi_slas`.id IN (" . implode(',', $_SESSION['mreporting_values']['slas']) . ") - ORDER BY `glpi_tickets`.`date` ASC"; + AND `glpi_slas`.id IN (" . implode(',', $_SESSION['mreporting_values']['slas']) . ') + ORDER BY `glpi_tickets`.`date` ASC'; $res_date = $DB->query($query_date); $dates = []; @@ -715,13 +703,13 @@ public function reportGlineNbTicketBySla($config = []) INNER JOIN `glpi_slas` ON `glpi_tickets`.slas_id_ttr = `glpi_slas`.id WHERE {$this->sql_date_create} - AND `glpi_tickets`.status IN (" . implode(',', array_merge(Ticket::getSolvedStatusArray(), Ticket::getClosedStatusArray())) . ") - AND `glpi_tickets`.entities_id IN (" . $this->where_entities . ") + AND `glpi_tickets`.status IN (" . implode(',', array_merge(Ticket::getSolvedStatusArray(), Ticket::getClosedStatusArray())) . ') + AND `glpi_tickets`.entities_id IN (' . $this->where_entities . ") AND `glpi_tickets`.is_deleted = '0'"; if (isset($_SESSION['mreporting_values']['slas'])) { - $query .= " AND `glpi_slas`.id IN (" . implode(',', $_SESSION['mreporting_values']['slas']) . ") "; + $query .= ' AND `glpi_slas`.id IN (' . implode(',', $_SESSION['mreporting_values']['slas']) . ') '; } - $query .= "GROUP BY `glpi_slas`.name, period, respected_sla"; + $query .= 'GROUP BY `glpi_slas`.name, period, respected_sla'; $result = $DB->query($query); while ($data = $DB->fetchAssoc($result)) { @@ -744,7 +732,6 @@ public function reportGlineNbTicketBySla($config = []) return $datas; } - public function reportHgbarRespectedSlasByTopCategory($config = []) { global $DB; @@ -754,7 +741,7 @@ public function reportHgbarRespectedSlasByTopCategory($config = []) $_SESSION['mreporting_selector']['reportHgbarRespectedSlasByTopCategory'] = ['dateinterval', 'limit', 'categories']; - $datas = []; + $datas = []; $categories = []; if (isset($_POST['categories']) && $_POST['categories'] > 0) { @@ -768,7 +755,7 @@ public function reportHgbarRespectedSlasByTopCategory($config = []) $_SESSION['glpilist_limit'] = $category_limit; if (!$category) { - $query_categories = "SELECT + $query_categories = 'SELECT count(`glpi_tickets`.id) as nb, `glpi_itilcategories`.id FROM `glpi_tickets` @@ -776,8 +763,8 @@ public function reportHgbarRespectedSlasByTopCategory($config = []) ON `glpi_tickets`.slas_id_ttr = `glpi_slas`.id INNER JOIN `glpi_itilcategories` ON `glpi_tickets`.itilcategories_id = `glpi_itilcategories`.id - WHERE " . $this->sql_date_create . " - AND `glpi_tickets`.entities_id IN (" . $this->where_entities . ") + WHERE ' . $this->sql_date_create . ' + AND `glpi_tickets`.entities_id IN (' . $this->where_entities . ") AND `glpi_tickets`.is_deleted = '0' GROUP BY `glpi_itilcategories`.id ORDER BY nb DESC @@ -798,16 +785,16 @@ public function reportHgbarRespectedSlasByTopCategory($config = []) ON `glpi_tickets`.slas_id_ttr = `glpi_slas`.id INNER JOIN `glpi_itilcategories` ON `glpi_tickets`.itilcategories_id = `glpi_itilcategories`.id - WHERE " . $this->sql_date_create . " - AND `glpi_tickets`.entities_id IN (" . $this->where_entities . ") + WHERE " . $this->sql_date_create . ' + AND `glpi_tickets`.entities_id IN (' . $this->where_entities . ") AND `glpi_tickets`.is_deleted = '0'"; if ($category) { - $query .= " AND `glpi_itilcategories`.id = " . $category; - } else if (!empty($categories)) { - $query .= " AND `glpi_itilcategories`.id IN (" . implode(',', $categories) . ")"; + $query .= ' AND `glpi_itilcategories`.id = ' . $category; + } elseif (!empty($categories)) { + $query .= ' AND `glpi_itilcategories`.id IN (' . implode(',', $categories) . ')'; } - $query .= " GROUP BY respected_sla, `glpi_itilcategories`.id - ORDER BY nb DESC"; + $query .= ' GROUP BY respected_sla, `glpi_itilcategories`.id + ORDER BY nb DESC'; $result = $DB->query($query); while ($data = $DB->fetchAssoc($result)) { @@ -816,7 +803,7 @@ public function reportHgbarRespectedSlasByTopCategory($config = []) $datas['datas'][$data['name']][$value] = $data['nb']; } $datas['labels2'] = [$this->lcl_slaok => $this->lcl_slaok, - $this->lcl_slako => $this->lcl_slako + $this->lcl_slako => $this->lcl_slako, ]; if (isset($datas['datas'])) { @@ -832,7 +819,7 @@ public function reportHgbarRespectedSlasByTechnician($config = []) { global $DB; - $area = false; + $area = false; $datas = []; $_SESSION['mreporting_selector']['reportHgbarRespectedSlasByTechnician'] = ['dateinterval']; @@ -847,10 +834,10 @@ public function reportHgbarRespectedSlasByTechnician($config = []) ON `glpi_tickets`.slas_id_ttr = `glpi_slas`.id INNER JOIN `glpi_tickets_users` ON `glpi_tickets_users`.tickets_id = `glpi_tickets`.id - AND `glpi_tickets_users`.type = " . Ticket_User::ASSIGN . " + AND `glpi_tickets_users`.type = " . Ticket_User::ASSIGN . ' INNER JOIN `glpi_users` ON `glpi_users`.id = `glpi_tickets_users`.users_id - WHERE " . $this->sql_date_create . " + WHERE ' . $this->sql_date_create . " AND `glpi_tickets`.entities_id IN ({$this->where_entities}) AND `glpi_tickets`.is_deleted = '0' GROUP BY respected_sla, `glpi_users`.id @@ -866,7 +853,7 @@ public function reportHgbarRespectedSlasByTechnician($config = []) $datas['datas'][$data['fullname']][$value] = $data['nb']; } $datas['labels2'] = [$this->lcl_slaok => $this->lcl_slaok, - $this->lcl_slako => $this->lcl_slako + $this->lcl_slako => $this->lcl_slako, ]; if (isset($datas['datas'])) { @@ -901,6 +888,7 @@ public function fillStatusMissingValues($tab, $labels2 = []) $datas['labels2'][] = $labels2[$name]; } } + return $datas; } @@ -908,9 +896,9 @@ public static function selectorBacklogstates() { global $LANG; - echo "
" . $LANG['plugin_mreporting']['Helpdeskplus']['backlogstatus'] . " :
"; + echo '
' . $LANG['plugin_mreporting']['Helpdeskplus']['backlogstatus'] . ' :
'; - // Opened + // Opened echo '
"; + echo ''; + echo ''; Html::closeForm(); } public static function getFiles($directory, $ext) { - $array_dir = []; $array_file = []; @@ -163,19 +165,19 @@ public static function getFiles($directory, $ext) while (($file = readdir($dh)) !== false) { $filename = $file; $filetype = filetype($directory . $file); - $filedate = Html::convDate(date("Y-m-d", filemtime($directory . $file))); + $filedate = Html::convDate(date('Y-m-d', filemtime($directory . $file))); $basename = explode('.', basename($filename)); $extension = array_pop($basename); switch ($filename) { case '..': case '.': - echo ""; + echo ''; break; default: if ($filetype == 'file' && $extension == $ext) { $array_file[] = [$filename, $filedate, $extension]; - } else if ($filetype == "dir") { + } elseif ($filetype == 'dir') { $array_dir[] = $filename; } break; @@ -190,27 +192,26 @@ public static function getFiles($directory, $ext) return $array_file; } - public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { switch (get_class($item)) { case 'Preference': - return [1 => __("More Reporting", 'mreporting')]; + return [1 => __('More Reporting', 'mreporting')]; default: return ''; } } - public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { switch (get_class($item)) { case 'Preference': $pref = new self(); - $id = $pref->addDefaultPreference(Session::getLoginUserID()); + $id = $pref->addDefaultPreference(Session::getLoginUserID()); $pref->showForm($id); break; } + return true; } } diff --git a/inc/profile.class.php b/inc/profile.class.php index 2525a171..d7dca786 100644 --- a/inc/profile.class.php +++ b/inc/profile.class.php @@ -38,30 +38,28 @@ class PluginMreportingProfile extends CommonDBTM public static function getTypeName($nb = 0) { - return __("More Reporting", 'mreporting'); + return __('More Reporting', 'mreporting'); } - //if profile deleted + //if profile deleted public static function purgeProfiles(Profile $prof) { $plugprof = new self(); - $plugprof->deleteByCriteria(['profiles_id' => $prof->getField("id")]); + $plugprof->deleteByCriteria(['profiles_id' => $prof->getField('id')]); } - - //if reports add + //if reports add public static function addReport(PluginMreportingConfig $config) { $plugprof = new self(); - $plugprof->addRightToReports($config->getField("id")); + $plugprof->addRightToReports($config->getField('id')); } - - //if reports deleted + //if reports deleted public static function purgeProfilesByReports(PluginMreportingConfig $config) { $plugprof = new self(); - $plugprof->deleteByCriteria(['reports' => $config->getField("id")]); + $plugprof->deleteByCriteria(['reports' => $config->getField('id')]); } public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) @@ -74,29 +72,29 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) case 'Profile': return self::getTypeName(); case 'PluginMreportingConfig': - return __("Rights management", 'mreporting'); + return __('Rights management', 'mreporting'); default: return ''; } } - public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { global $CFG_GLPI; if ($item->getType() == 'Profile' && $item->getField('interface') != 'helpdesk') { - $ID = $item->getField('id'); + $ID = $item->getField('id'); $prof = new self(); if (!$prof->getFromDBByProfile($item->getField('id'))) { $prof->createAccess($item->getField('id')); } $prof->showForm($item->getField('id')); - } else if ($item->getType() == 'PluginMreportingConfig') { + } elseif ($item->getType() == 'PluginMreportingConfig') { $reportProfile = new self(); $reportProfile->showFormForManageProfile($item); } + return true; } @@ -111,26 +109,27 @@ public function getFromDBByProfile($profiles_id) return false; } $this->fields = $DB->fetchAssoc($result); + return (is_array($this->fields) && count($this->fields)); } + return false; } - - /** - * @param $right array - */ + /** + * @param $right array + */ public static function addRightToAllProfiles() { global $DB; - $result_config = $DB->request("SELECT `id` FROM `glpi_plugin_mreporting_configs`"); - foreach ($DB->request("SELECT `id` FROM `glpi_profiles`") as $prof) { + $result_config = $DB->request('SELECT `id` FROM `glpi_plugin_mreporting_configs`'); + foreach ($DB->request('SELECT `id` FROM `glpi_profiles`') as $prof) { foreach ($result_config as $report) { $DB->updateOrInsert('glpi_plugin_mreporting_profiles', [ 'profiles_id' => $prof['id'], 'reports' => $report['id'], - 'right' => null + 'right' => null, ], [ 'profiles_id' => $prof['id'], 'reports' => $report['id'], @@ -139,14 +138,13 @@ public static function addRightToAllProfiles() } } - public static function getRight() { global $DB; - $query = "SELECT `profiles_id` + $query = 'SELECT `profiles_id` FROM `glpi_plugin_mreporting_profiles` - WHERE `reports` = " . READ; + WHERE `reports` = ' . READ; $right = []; foreach ($DB->request($query) as $profile) { @@ -156,23 +154,23 @@ public static function getRight() return $right; } - /** - * Function to add right on report to a profile - * @param $idProfile - */ + /** + * Function to add right on report to a profile + * @param $idProfile + */ public static function addRightToProfile($idProfile) { global $DB; - //get all reports + //get all reports $config = new PluginMreportingConfig(); foreach ($config->find() as $report) { - // add right for any reports for profile - // Add manual request because Add function get error : right is set to NULL + // add right for any reports for profile + // Add manual request because Add function get error : right is set to NULL $DB->updateOrInsert('glpi_plugin_mreporting_profiles', [ 'profiles_id' => $idProfile, 'reports' => $report['id'], - 'right' => READ + 'right' => READ, ], [ 'profiles_id' => $idProfile, 'reports' => $report['id'], @@ -180,21 +178,20 @@ public static function addRightToProfile($idProfile) } } - - /** - * Function to add right of a new report - * @param $report_id - */ + /** + * Function to add right of a new report + * @param $report_id + */ public function addRightToReports($report_id) { global $DB; $reportProfile = new self(); - foreach ($DB->request("SELECT `id` FROM `glpi_profiles`") as $prof) { + foreach ($DB->request('SELECT `id` FROM `glpi_profiles`') as $prof) { $reportProfile->add(['profiles_id' => $prof['id'], - 'reports' => $report_id, - 'right' => READ + 'reports' => $report_id, + 'right' => READ, ]); } } @@ -208,23 +205,23 @@ public static function changeProfile() { $prof = new self(); if ($prof->getFromDBByProfile($_SESSION['glpiactiveprofile']['id'])) { - $_SESSION["glpi_plugin_mreporting_profile"] = $prof->fields; + $_SESSION['glpi_plugin_mreporting_profile'] = $prof->fields; } else { - unset($_SESSION["glpi_plugin_mreporting_profile"]); + unset($_SESSION['glpi_plugin_mreporting_profile']); } } - /** - * Form to manage report right on profile - * @param $ID (id of profile) - * @param array $options - * @return bool - */ + /** + * Form to manage report right on profile + * @param $ID (id of profile) + * @param array $options + * @return bool + */ public function showForm($ID, $options = []) { global $LANG, $CFG_GLPI; - if (!Session::haveRight("profile", READ)) { + if (!Session::haveRight('profile', READ)) { return false; } @@ -234,33 +231,33 @@ public function showForm($ID, $options = []) echo '' . self::getTypeName() . ''; - Plugin::doHook("pre_item_form", ['item' => $this, 'options' => &$options]); + Plugin::doHook('pre_item_form', ['item' => $this, 'options' => &$options]); - echo "" . __("Rights management", 'mreporting') . "\n"; + echo "" . __('Rights management', 'mreporting') . "\n"; $config = new PluginMreportingConfig(); foreach ($config->find() as $report) { $mreportingConfig = new PluginMreportingConfig(); $mreportingConfig->getFromDB($report['id']); - // If classname doesn't exists, don't display the report + // If classname doesn't exists, don't display the report if (class_exists($mreportingConfig->fields['classname'])) { $profile = $this->findByProfileAndReport($ID, $report['id']); - $index = str_replace('PluginMreporting', '', $mreportingConfig->fields['classname']); - $title = $LANG['plugin_mreporting'][$index][$report['name']]['title']; + $index = str_replace('PluginMreporting', '', $mreportingConfig->fields['classname']); + $title = $LANG['plugin_mreporting'][$index][$report['name']]['title']; echo ""; - echo "" . $mreportingConfig->getLink() . " (" . $title . "): "; - echo ""; + echo '' . $mreportingConfig->getLink() . ' (' . $title . '): '; + echo ''; Profile::dropdownRight( $report['id'], - ['value' => $profile->fields['right'], + ['value' => $profile->fields['right'], 'nonone' => 0, 'noread' => 0, - 'nowrite' => 1 - ] + 'nowrite' => 1, + ], ); - echo ""; + echo ''; echo "\n"; } } @@ -270,9 +267,9 @@ public function showForm($ID, $options = []) echo "
"; echo ""; - echo "
"; + echo ''; - echo ""; + echo ""; echo ""; - echo "

"; + echo '

'; - echo ""; + echo ''; - echo ""; - echo ""; - echo ""; + echo ''; + echo ''; + echo ''; Html::closeForm(); } - - /** - * Form to manage right on reports - * @param $items - */ + /** + * Form to manage right on reports + * @param $items + */ public function showFormForManageProfile($items, $options = []) { global $DB, $CFG_GLPI; - if (!Session::haveRight("config", READ)) { + if (!Session::haveRight('config', READ)) { return false; } @@ -312,11 +308,11 @@ public function showFormForManageProfile($items, $options = []) echo ''; echo "\n"; - echo "\n"; + echo "\n"; - $query = "SELECT `id`, `name` + $query = 'SELECT `id`, `name` FROM `glpi_profiles` - ORDER BY `name`"; + ORDER BY `name`'; foreach ($DB->request($query) as $profile) { $reportProfiles = new self(); @@ -326,17 +322,17 @@ public function showFormForManageProfile($items, $options = []) $prof->getFromDB($profile['id']); echo ""; - echo ""; - echo "'; + echo '"; + echo ''; } echo ""; @@ -349,19 +345,18 @@ public function showFormForManageProfile($items, $options = []) echo "

"; - echo ""; + echo ''; echo "
"; - echo ""; + echo ""; - echo "
"; + echo ''; - echo ""; + echo ''; echo "
" . __("Rights management", 'mreporting') . "
" . __('Rights management', 'mreporting') . "
" . $prof->getLink() . ""; + echo '' . $prof->getLink() . ''; Profile::dropdownRight( $profile['id'], - ['value' => $reportProfiles->fields['right'], + ['value' => $reportProfiles->fields['right'], 'nonone' => 0, 'noread' => 0, - 'nowrite' => 1 - ] + 'nowrite' => 1, + ], ); - echo "
\n"; Html::closeForm(); } - public function findByProfileAndReport($profil_id, $report_id) { $prof = new self(); @@ -369,8 +364,9 @@ public function findByProfileAndReport($profil_id, $report_id) [ 'profiles_id' => $profil_id, 'reports' => $report_id, - ] + ], ); + return $prof; } @@ -380,20 +376,20 @@ public function findReportByProfiles($profil_id) $prof->getFromDBByCrit( [ 'profiles_id' => $profil_id, - ] + ], ); + return $prof; } - public static function canViewReports($profil_id, $report_id) { $prof = new self(); - $res = $prof->getFromDBByCrit( + $res = $prof->getFromDBByCrit( [ 'profiles_id' => $profil_id, 'reports' => $report_id, - ] + ], ); if ($res && $prof->fields['right'] == READ) { @@ -403,7 +399,7 @@ public static function canViewReports($profil_id, $report_id) return false; } - // Hook done on add item case + // Hook done on add item case public static function addProfiles(Profile $item) { if ($item->getType() == 'Profile' && $item->getField('interface') != 'helpdesk') { diff --git a/inc/tag.class.php b/inc/tag.class.php index d66aefe4..6d45b3e5 100644 --- a/inc/tag.class.php +++ b/inc/tag.class.php @@ -30,13 +30,13 @@ class PluginMreportingTag extends PluginMreportingBaseclass { - /** - * Default pie graph for the use of tags. - * For all linked itemtypes without filter. - * - * @param array $config (optionnal) - * @return array $datas array of query results (tag => count number) - */ + /** + * Default pie graph for the use of tags. + * For all linked itemtypes without filter. + * + * @param array $config (optionnal) + * @return array $datas array of query results (tag => count number) + */ public function reportPieTag($config = []) { global $DB; @@ -49,26 +49,26 @@ public function reportPieTag($config = []) $datas = []; - $result = $DB->query("SELECT COUNT(*) as count_tag, glpi_plugin_tag_tags.name as name + $result = $DB->query('SELECT COUNT(*) as count_tag, glpi_plugin_tag_tags.name as name FROM glpi_plugin_tag_tagitems LEFT JOIN glpi_plugin_tag_tags ON plugin_tag_tags_id = glpi_plugin_tag_tags.id GROUP BY plugin_tag_tags_id - ORDER BY count_tag DESC"); + ORDER BY count_tag DESC'); while ($datas_tag = $DB->fetchAssoc($result)) { - $label = $datas_tag['name']; + $label = $datas_tag['name']; $datas['datas'][$label] = $datas_tag['count_tag']; } return $datas; } - /** - * Pie graph for the use of tags in Ticket, - * with itilcategory filter. - * - * @param array $config (optionnal) - * @return array $datas array of query results (tag => count number) - */ + /** + * Pie graph for the use of tags in Ticket, + * with itilcategory filter. + * + * @param array $config (optionnal) + * @return array $datas array of query results (tag => count number) + */ public function reportPieTagOnTicket($config = []) { global $DB; @@ -80,7 +80,7 @@ public function reportPieTagOnTicket($config = []) $_SESSION['mreporting_selector'][__FUNCTION__] = ['category']; $sql_itilcat = isset($_SESSION['mreporting_values']['itilcategories_id']) && $_SESSION['mreporting_values']['itilcategories_id'] > 0 ? - " AND glpi_tickets.itilcategories_id = " . $_SESSION['mreporting_values']['itilcategories_id'] : ""; + ' AND glpi_tickets.itilcategories_id = ' . $_SESSION['mreporting_values']['itilcategories_id'] : ''; $datas = []; @@ -93,7 +93,7 @@ public function reportPieTagOnTicket($config = []) GROUP BY plugin_tag_tags_id ORDER BY count_tag DESC"); while ($datas_tag = $DB->fetchAssoc($result)) { - $label = $datas_tag['name']; + $label = $datas_tag['name']; $datas['datas'][$label] = $datas_tag['count_tag']; } diff --git a/lib/cubic_splines/classes/CubicSplines.php b/lib/cubic_splines/classes/CubicSplines.php index 153b5920..7d65b249 100644 --- a/lib/cubic_splines/classes/CubicSplines.php +++ b/lib/cubic_splines/classes/CubicSplines.php @@ -1,18 +1,20 @@ aCrdX = array(); - $this->aCrdY = array(); - $this->aCoords = array(); + protected function prepareCoords(&$aCoords, $iStep, $iMinX = -1, $iMaxX = -1) + { + $this->aCrdX = []; + $this->aCrdY = []; + $this->aCoords = []; ksort($aCoords); foreach ($aCoords as $x => $y) { @@ -23,16 +25,19 @@ protected function prepareCoords(&$aCoords, $iStep, $iMinX = -1, $iMaxX = -1) { $this->iMinX = $iMinX; $this->iMaxX = $iMaxX; - if ($this->iMinX == -1) + if ($this->iMinX == -1) { $this->iMinX = min($this->aCrdX); - if ($this->iMaxX == -1) + } + if ($this->iMaxX == -1) { $this->iMaxX = max($this->aCrdX); + } $this->iStep = $iStep; } - public function setInitCoords(&$aCoords, $iStep = 1, $iMinX = -1, $iMaxX = -1) { - $this->aSplines = array(); + public function setInitCoords(&$aCoords, $iStep = 1, $iMinX = -1, $iMaxX = -1) + { + $this->aSplines = []; if (count($aCoords) < 4) { return false; @@ -42,7 +47,8 @@ public function setInitCoords(&$aCoords, $iStep = 1, $iMinX = -1, $iMaxX = -1) { $this->buildSpline($this->aCrdX, $this->aCrdY, count($this->aCrdX)); } - public function processCoords() { + public function processCoords() + { for ($x = $this->iMinX; $x <= $this->iMaxX; $x += $this->iStep) { $this->aCoords[$x] = $this->funcInterp($x); } @@ -50,34 +56,35 @@ public function processCoords() { return $this->aCoords; } - private function buildSpline($x, $y, $n) { + private function buildSpline($x, $y, $n) + { for ($i = 0; $i < $n; ++$i) { $this->aSplines[$i]['x'] = $x[$i]; $this->aSplines[$i]['a'] = $y[$i]; } $this->aSplines[0]['c'] = $this->aSplines[$n - 1]['c'] = 0; - $alpha[0] = $beta[0] = 0; + $alpha[0] = $beta[0] = 0; for ($i = 1; $i < $n - 1; ++$i) { - $h_i = $x[$i] - $x[$i - 1]; + $h_i = $x[$i] - $x[$i - 1]; $h_i1 = $x[$i + 1] - $x[$i]; - $A = $h_i; - $B = $h_i1; - + $A = $h_i; + $B = $h_i1; + if ($h_i == $h_i1) { - $C = 7.0 * ($h_i + $h_i1); + $C = 7.0 * ($h_i + $h_i1); } else { - $C = 2.3 * ($h_i + $h_i1); + $C = 2.3 * ($h_i + $h_i1); } $B = $h_i1; if ($h_i == $h_i1) { - $F = 3.5 * (($y[$i + 1] - $y[$i]) / $h_i1 - ($y[$i] - $y[$i - 1]) / $h_i); + $F = 3.5 * (($y[$i + 1] - $y[$i]) / $h_i1 - ($y[$i] - $y[$i - 1]) / $h_i); } else { - $F = 6.0 * (($y[$i + 1] - $y[$i]) / $h_i1 - ($y[$i] - $y[$i - 1]) / $h_i); + $F = 6.0 * (($y[$i + 1] - $y[$i]) / $h_i1 - ($y[$i] - $y[$i - 1]) / $h_i); } - $z = ($A * $alpha[$i - 1] + $C); - $alpha[$i] = - $B / $z; - $beta[$i] = ($F - $A * $beta[$i - 1]) / $z; + $z = ($A * $alpha[$i - 1] + $C); + $alpha[$i] = -$B / $z; + $beta[$i] = ($F - $A * $beta[$i - 1]) / $z; } for ($i = $n - 2; $i > 0; --$i) { @@ -85,15 +92,16 @@ private function buildSpline($x, $y, $n) { } for ($i = $n - 1; $i > 0; --$i) { - $h_i = $x[$i] - $x[$i - 1]; - $this->aSplines[$i]['d'] = ($this->aSplines[$i]['c'] - $this->aSplines[$i - 1]['c']) / $h_i; + $h_i = $x[$i] - $x[$i - 1]; + $this->aSplines[$i]['d'] = ($this->aSplines[$i]['c'] - $this->aSplines[$i - 1]['c']) / $h_i; $this->aSplines[$i]['b'] = $h_i * (2.0 * $this->aSplines[$i]['c'] + $this->aSplines[$i - 1]['c']) / 6.0 + ($y[$i] - $y[$i - 1]) / $h_i; } } - private function funcInterp($x) { + private function funcInterp($x) + { $n = count($this->aSplines); - if ($x <= $this->aSplines[0]['x']) { + if ($x <= $this->aSplines[0]['x']) { $s = $this->aSplines[1]; } else { if ($x >= $this->aSplines[$n - 1]['x']) { @@ -115,8 +123,7 @@ private function funcInterp($x) { } $dx = ($x - $s['x']); + return $s['a'] + ($s['b'] + ($s['c'] / 2.0 + $s['d'] * $dx / 6.0) * $dx) * $dx; } } - -?> diff --git a/lib/cubic_splines/classes/Plot.php b/lib/cubic_splines/classes/Plot.php index 3e5f13c6..791a7a81 100644 --- a/lib/cubic_splines/classes/Plot.php +++ b/lib/cubic_splines/classes/Plot.php @@ -1,29 +1,35 @@ aCoords = &$aCoords; } - public function drawLine($vImage, $vColor, $iPosX = 0, $iPosY = false) { - if ($iPosY === false) + public function drawLine($vImage, $vColor, $iPosX = 0, $iPosY = false) + { + if ($iPosY === false) { $iPosY = imagesy($vImage); + } reset($this->aCoords); list($iPrevX, $iPrevY) = each($this->aCoords); - while (list ($x, $y) = each($this->aCoords)) { + while (list($x, $y) = each($this->aCoords)) { imageline($vImage, $iPosX + round($iPrevX), $iPosY - round($iPrevY), $iPosX + round($x), $iPosY - round($y), $vColor); $iPrevX = $x; $iPrevY = $y; } } - public function drawDots($vImage, $vColor, $iPosX = 0, $iPosY = false, $iDotSize = 1) { - if ($iPosY === false) + public function drawDots($vImage, $vColor, $iPosX = 0, $iPosY = false, $iDotSize = 1) + { + if ($iPosY === false) { $iPosY = imagesy($vImage); + } $vBorderColor = imagecolorallocate($vImage, 0, 0, 0); foreach ($this->aCoords as $x => $y) { @@ -32,17 +38,17 @@ public function drawDots($vImage, $vColor, $iPosX = 0, $iPosY = false, $iDotSize } } - public function drawAxis($vImage, $vColor, $iPosX = 0, $iPosY = false) { - if ($iPosY === false) + public function drawAxis($vImage, $vColor, $iPosX = 0, $iPosY = false) + { + if ($iPosY === false) { $iPosY = imagesy($vImage); + } $vImageWidth = imagesx($vImage); imageline($vImage, $iPosX, $iPosY, $iPosX, 0, $vColor); imageline($vImage, $iPosX, $iPosY, $vImageWidth, $iPosY, $vColor); - imagefilledpolygon($vImage, array($iPosX, 0, $iPosX - 3, 5, $iPosX + 3, 5), 3, $vColor); - imagefilledpolygon($vImage, array($vImageWidth, $iPosY, $vImageWidth - 5, $iPosY - 3, $vImageWidth - 5, $iPosY + 3), 3, $vColor); + imagefilledpolygon($vImage, [$iPosX, 0, $iPosX - 3, 5, $iPosX + 3, 5], 3, $vColor); + imagefilledpolygon($vImage, [$vImageWidth, $iPosY, $vImageWidth - 5, $iPosY - 3, $vImageWidth - 5, $iPosY + 3], 3, $vColor); } } - -?> diff --git a/lib/cubic_splines/index.php b/lib/cubic_splines/index.php index 1af3e9e4..0e87fcf2 100644 --- a/lib/cubic_splines/index.php +++ b/lib/cubic_splines/index.php @@ -1,26 +1,27 @@ setInitCoords($aCoords, 1); $r = $oCurve->processCoords(); - if ($r) + if ($r) { $curveGraph = new Plot($r); - else + } else { continue; + } } else { $curveGraph = $oPlot; } @@ -48,7 +50,7 @@ $curveGraph->drawLine($vImage, $vColor, 10, GRAPH_HEIGHT); // unset($oCurve); -$sTime = sprintf("%1.4f", microtime(1) - $iStart); +$sTime = sprintf('%1.4f', microtime(1) - $iStart); imagefilledrectangle($vImage, 0, GRAPH_HEIGHT, GRAPH_WIDTH + 50, $vImagegHeight, $vBgColor); $oPlot->drawAxis($vImage, $vAxisColor, 10, GRAPH_HEIGHT); @@ -58,8 +60,6 @@ imagerectangle($vImage, 10, $iPanelY + 10, 20, $iPanelY + 20, $vAxisColor); imagettftext($vImage, 10, 0, 30, $iPanelY + 20, $vTextColor, 'Ds-digib.ttf', 'Cubic splines in PHP for graphs: ' . $sTime . ' sec'); -header("Content-type: image/png"); +header('Content-type: image/png'); imagepng($vImage); imagedestroy($vImage); - -?> diff --git a/lib/imagesmootharc/example.php b/lib/imagesmootharc/example.php index 3c57640d..a74e4462 100644 --- a/lib/imagesmootharc/example.php +++ b/lib/imagesmootharc/example.php @@ -1,6 +1,6 @@ +header('Content-Type: image/png'); +imagePNG($img); diff --git a/lib/imagesmootharc/imageSmoothArc.php b/lib/imagesmootharc/imageSmoothArc.php index a1d581ff..cd57d6f5 100644 --- a/lib/imagesmootharc/imageSmoothArc.php +++ b/lib/imagesmootharc/imageSmoothArc.php @@ -1,7 +1,7 @@ = abs($yStart)) { $aaStartX = true; } else { @@ -71,29 +75,26 @@ function imageSmoothArcDrawSegment (&$img, $cx, $cy, $a, $b, $aaAngleX, $aaAngle $aaStopX = false; } //$xp = +1; $yp = -1; $xa = +1; $ya = 0; - for ( $x = 0; $x < $a; $x += 1 ) { + for ($x = 0; $x < $a; $x += 1) { /*$y = $b * sqrt( 1 - ($x*$x)/($a*$a) ); - + $error = $y - (int)($y); $y = (int)($y); - + $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );*/ - - $_y1 = $dyStop*$x; - $_y2 = $dyStart*$x; - if ($xStart > $xStop) - { - $error1 = $_y1 - (int)($_y1); - $error2 = 1 - $_y2 + (int)$_y2; - $_y1 = $_y1-$error1; - $_y2 = $_y2+$error2; - } - else - { - $error1 = 1 - $_y1 + (int)$_y1; - $error2 = $_y2 - (int)($_y2); - $_y1 = $_y1+$error1; - $_y2 = $_y2-$error2; + + $_y1 = $dyStop * $x; + $_y2 = $dyStart * $x; + if ($xStart > $xStop) { + $error1 = $_y1 - (int) ($_y1); + $error2 = 1 - $_y2 + (int) $_y2; + $_y1 = $_y1 - $error1; + $_y2 = $_y2 + $error2; + } else { + $error1 = 1 - $_y1 + (int) $_y1; + $error2 = $_y2 - (int) ($_y2); + $_y1 = $_y1 + $error1; + $_y2 = $_y2 - $error2; } /* if ($aaStopX) @@ -101,149 +102,204 @@ function imageSmoothArcDrawSegment (&$img, $cx, $cy, $a, $b, $aaAngleX, $aaAngle if ($aaStartX) $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); */ - - if ($seg == 0 || $seg == 2) - { + + if ($seg == 0 || $seg == 2) { $i = $seg; - if (!($start > $i*M_PI/2 && $x > $xStart)) { + if (!($start > $i * M_PI / 2 && $x > $xStart)) { if ($i == 0) { - $xp = +1; $yp = -1; $xa = +1; $ya = 0; + $xp = +1; + $yp = -1; + $xa = +1; + $ya = 0; } else { - $xp = -1; $yp = +1; $xa = 0; $ya = +1; + $xp = -1; + $yp = +1; + $xa = 0; + $ya = +1; } - if ( $stop < ($i+1)*(M_PI/2) && $x <= $xStop ) { - $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); - $y1 = $_y1; if ($aaStopX) imageSetPixel($img, $cx+$xp*($x)+$xa, $cy+$yp*($y1+1)+$ya, $diffColor1); - + if ($stop < ($i + 1) * (M_PI / 2) && $x <= $xStop) { + $diffColor1 = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error1); + $y1 = $_y1; + if ($aaStopX) { + imageSetPixel($img, $cx + $xp * ($x) + $xa, $cy + $yp * ($y1 + 1) + $ya, $diffColor1); + } } else { - $y = $b * sqrt( 1 - ($x*$x)/($a*$a) ); - $error = $y - (int)($y); - $y = (int)($y); - $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); - $y1 = $y; if ($x < $aaAngleX ) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor); + $y = $b * sqrt(1 - ($x * $x) / ($a * $a)); + $error = $y - (int) ($y); + $y = (int) ($y); + $diffColor = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error); + $y1 = $y; + if ($x < $aaAngleX) { + imageSetPixel($img, $cx + $xp * $x + $xa, $cy + $yp * ($y1 + 1) + $ya, $diffColor); + } } - if ($start > $i*M_PI/2 && $x <= $xStart) { - $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); - $y2 = $_y2; if ($aaStartX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y2-1)+$ya, $diffColor2); + if ($start > $i * M_PI / 2 && $x <= $xStart) { + $diffColor2 = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error2); + $y2 = $_y2; + if ($aaStartX) { + imageSetPixel($img, $cx + $xp * $x + $xa, $cy + $yp * ($y2 - 1) + $ya, $diffColor2); + } } else { $y2 = 0; } - if ($y2 <= $y1) imageLine($img, $cx+$xp*$x+$xa, $cy+$yp*$y1+$ya , $cx+$xp*$x+$xa, $cy+$yp*$y2+$ya, $fillColor); + if ($y2 <= $y1) { + imageLine($img, $cx + $xp * $x + $xa, $cy + $yp * $y1 + $ya, $cx + $xp * $x + $xa, $cy + $yp * $y2 + $ya, $fillColor); + } } } - - if ($seg == 1 || $seg == 3) - { + + if ($seg == 1 || $seg == 3) { $i = $seg; - if (!($stop < ($i+1)*M_PI/2 && $x > $xStop)) { + if (!($stop < ($i + 1) * M_PI / 2 && $x > $xStop)) { if ($i == 1) { - $xp = -1; $yp = -1; $xa = 0; $ya = 0; + $xp = -1; + $yp = -1; + $xa = 0; + $ya = 0; } else { - $xp = +1; $yp = +1; $xa = 1; $ya = 1; + $xp = +1; + $yp = +1; + $xa = 1; + $ya = 1; } - if ( $start > $i*M_PI/2 && $x < $xStart ) { - $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); - $y1 = $_y2; if ($aaStartX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor2); - + if ($start > $i * M_PI / 2 && $x < $xStart) { + $diffColor2 = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error2); + $y1 = $_y2; + if ($aaStartX) { + imageSetPixel($img, $cx + $xp * $x + $xa, $cy + $yp * ($y1 + 1) + $ya, $diffColor2); + } } else { - $y = $b * sqrt( 1 - ($x*$x)/($a*$a) ); - $error = $y - (int)($y); - $y = (int) $y; - $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); - $y1 = $y; if ($x < $aaAngleX ) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor); + $y = $b * sqrt(1 - ($x * $x) / ($a * $a)); + $error = $y - (int) ($y); + $y = (int) $y; + $diffColor = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error); + $y1 = $y; + if ($x < $aaAngleX) { + imageSetPixel($img, $cx + $xp * $x + $xa, $cy + $yp * ($y1 + 1) + $ya, $diffColor); + } } - if ($stop < ($i+1)*M_PI/2 && $x <= $xStop) { - $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); - $y2 = $_y1; if ($aaStopX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y2-1)+$ya, $diffColor1); + if ($stop < ($i + 1) * M_PI / 2 && $x <= $xStop) { + $diffColor1 = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error1); + $y2 = $_y1; + if ($aaStopX) { + imageSetPixel($img, $cx + $xp * $x + $xa, $cy + $yp * ($y2 - 1) + $ya, $diffColor1); + } } else { $y2 = 0; } - if ($y2 <= $y1) imageLine($img, $cx+$xp*$x+$xa, $cy+$yp*$y1+$ya, $cx+$xp*$x+$xa, $cy+$yp*$y2+$ya, $fillColor); + if ($y2 <= $y1) { + imageLine($img, $cx + $xp * $x + $xa, $cy + $yp * $y1 + $ya, $cx + $xp * $x + $xa, $cy + $yp * $y2 + $ya, $fillColor); + } } } } - + ///YYYYY - - for ( $y = 0; $y < $b; $y += 1 ) { + + for ($y = 0; $y < $b; $y += 1) { /*$x = $a * sqrt( 1 - ($y*$y)/($b*$b) ); - + $error = $x - (int)($x); $x = (int)($x); - + $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); */ - $_x1 = $dxStop*$y; - $_x2 = $dxStart*$y; - if ($yStart > $yStop) - { - $error1 = $_x1 - (int)($_x1); - $error2 = 1 - $_x2 + (int)$_x2; - $_x1 = $_x1-$error1; - $_x2 = $_x2+$error2; - } - else - { - $error1 = 1 - $_x1 + (int)$_x1; - $error2 = $_x2 - (int)($_x2); - $_x1 = $_x1+$error1; - $_x2 = $_x2-$error2; + $_x1 = $dxStop * $y; + $_x2 = $dxStart * $y; + if ($yStart > $yStop) { + $error1 = $_x1 - (int) ($_x1); + $error2 = 1 - $_x2 + (int) $_x2; + $_x1 = $_x1 - $error1; + $_x2 = $_x2 + $error2; + } else { + $error1 = 1 - $_x1 + (int) $_x1; + $error2 = $_x2 - (int) ($_x2); + $_x1 = $_x1 + $error1; + $_x2 = $_x2 - $error2; } -/* - if (!$aaStopX) - $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); - if (!$aaStartX) - $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); -*/ - - if ($seg == 0 || $seg == 2) - { + /* + if (!$aaStopX) + $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); + if (!$aaStartX) + $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); + */ + + if ($seg == 0 || $seg == 2) { $i = $seg; - if (!($start > $i*M_PI/2 && $y > $yStop)) { + if (!($start > $i * M_PI / 2 && $y > $yStop)) { if ($i == 0) { - $xp = +1; $yp = -1; $xa = 1; $ya = 0; + $xp = +1; + $yp = -1; + $xa = 1; + $ya = 0; } else { - $xp = -1; $yp = +1; $xa = 0; $ya = 1; + $xp = -1; + $yp = +1; + $xa = 0; + $ya = 1; } - if ( $stop < ($i+1)*(M_PI/2) && $y <= $yStop ) { - $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); - $x1 = $_x1; if (!$aaStopX) imageSetPixel($img, $cx+$xp*($x1-1)+$xa, $cy+$yp*($y)+$ya, $diffColor1); - } - if ($start > $i*M_PI/2 && $y < $yStart) { - $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); - $x2 = $_x2; if (!$aaStartX) imageSetPixel($img, $cx+$xp*($x2+1)+$xa, $cy+$yp*($y)+$ya, $diffColor2); + if ($stop < ($i + 1) * (M_PI / 2) && $y <= $yStop) { + $diffColor1 = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error1); + $x1 = $_x1; + if (!$aaStopX) { + imageSetPixel($img, $cx + $xp * ($x1 - 1) + $xa, $cy + $yp * ($y) + $ya, $diffColor1); + } + } + if ($start > $i * M_PI / 2 && $y < $yStart) { + $diffColor2 = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error2); + $x2 = $_x2; + if (!$aaStartX) { + imageSetPixel($img, $cx + $xp * ($x2 + 1) + $xa, $cy + $yp * ($y) + $ya, $diffColor2); + } } else { - $x = $a * sqrt( 1 - ($y*$y)/($b*$b) ); - $error = $x - (int)($x); - $x = (int)($x); - $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); - $x1 = $x; if ($y < $aaAngleY && $y <= $yStop ) imageSetPixel($img, $cx+$xp*($x1+1)+$xa, $cy+$yp*$y+$ya, $diffColor); + $x = $a * sqrt(1 - ($y * $y) / ($b * $b)); + $error = $x - (int) ($x); + $x = (int) ($x); + $diffColor = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error); + $x1 = $x; + if ($y < $aaAngleY && $y <= $yStop) { + imageSetPixel($img, $cx + $xp * ($x1 + 1) + $xa, $cy + $yp * $y + $ya, $diffColor); + } } } } - - if ($seg == 1 || $seg == 3) - { + + if ($seg == 1 || $seg == 3) { $i = $seg; - if (!($stop < ($i+1)*M_PI/2 && $y > $yStart)) { + if (!($stop < ($i + 1) * M_PI / 2 && $y > $yStart)) { if ($i == 1) { - $xp = -1; $yp = -1; $xa = 0; $ya = 0; + $xp = -1; + $yp = -1; + $xa = 0; + $ya = 0; } else { - $xp = +1; $yp = +1; $xa = 1; $ya = 1; + $xp = +1; + $yp = +1; + $xa = 1; + $ya = 1; } - if ( $start > $i*M_PI/2 && $y < $yStart ) { - $diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 ); - $x1 = $_x2; if (!$aaStartX) imageSetPixel($img, $cx+$xp*($x1-1)+$xa, $cy+$yp*$y+$ya, $diffColor2); - } - if ($stop < ($i+1)*M_PI/2 && $y <= $yStop) { - $diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 ); - $x2 = $_x1; if (!$aaStopX) imageSetPixel($img, $cx+$xp*($x2+1)+$xa, $cy+$yp*$y+$ya, $diffColor1); + if ($start > $i * M_PI / 2 && $y < $yStart) { + $diffColor2 = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error2); + $x1 = $_x2; + if (!$aaStartX) { + imageSetPixel($img, $cx + $xp * ($x1 - 1) + $xa, $cy + $yp * $y + $ya, $diffColor2); + } + } + if ($stop < ($i + 1) * M_PI / 2 && $y <= $yStop) { + $diffColor1 = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error1); + $x2 = $_x1; + if (!$aaStopX) { + imageSetPixel($img, $cx + $xp * ($x2 + 1) + $xa, $cy + $yp * $y + $ya, $diffColor1); + } } else { - $x = $a * sqrt( 1 - ($y*$y)/($b*$b) ); - $error = $x - (int)($x); - $x = (int)($x); - $diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error ); - $x1 = $x; if ($y < $aaAngleY && $y < $yStart) imageSetPixel($img,$cx+$xp*($x1+1)+$xa, $cy+$yp*$y+$ya, $diffColor); + $x = $a * sqrt(1 - ($y * $y) / ($b * $b)); + $error = $x - (int) ($x); + $x = (int) ($x); + $diffColor = imageColorExactAlpha($img, $color[0], $color[1], $color[2], 127 - (127 - $color[3]) * $error); + $x1 = $x; + if ($y < $aaAngleY && $y < $yStart) { + imageSetPixel($img, $cx + $xp * ($x1 + 1) + $xa, $cy + $yp * $y + $ya, $diffColor); + } } } } @@ -251,20 +307,20 @@ function imageSmoothArcDrawSegment (&$img, $cx, $cy, $a, $b, $aaAngleX, $aaAngle } -function imageSmoothArc ( &$img, $cx, $cy, $w, $h, $color, $start, $stop) +function imageSmoothArc(&$img, $cx, $cy, $w, $h, $color, $start, $stop) { // Originally written from scratch by Ulrich Mierendorff, 06/2006 // Rewritten and improved, 04/2007, 07/2007 // compared to old version: // + Support for transparency added // + Improved quality of edges & antialiasing - + // note: This function does not represent the fastest way to draw elliptical // arcs. It was written without reading any papers on that subject. Better // algorithms may be twice as fast or even more. - + // what it cannot do: It does not support outlined arcs, only filled - + // Parameters: // $cx - Center of ellipse, X-coord // $cy - Center of ellipse, Y-coord @@ -275,70 +331,62 @@ function imageSmoothArc ( &$img, $cx, $cy, $w, $h, $color, $start, $stop) // $stop - Stop angle of the arc, no limited range! // $start _can_ be greater than $stop! // If any value is not in the given range, results are undefined! - + // This script does not use any special algorithms, everything is completely // written from scratch; see http://de.wikipedia.org/wiki/Ellipse for formulas. - - while ($start < 0) - $start += 2*M_PI; - while ($stop < 0) - $stop += 2*M_PI; - - while ($start > 2*M_PI) - $start -= 2*M_PI; - - while ($stop > 2*M_PI) - $stop -= 2*M_PI; - - - if ($start > $stop) - { - imageSmoothArc ( $img, $cx, $cy, $w, $h, $color, $start, 2*M_PI); - imageSmoothArc ( $img, $cx, $cy, $w, $h, $color, 0, $stop); + + while ($start < 0) { + $start += 2 * M_PI; + } + while ($stop < 0) { + $stop += 2 * M_PI; + } + + while ($start > 2 * M_PI) { + $start -= 2 * M_PI; + } + + while ($stop > 2 * M_PI) { + $stop -= 2 * M_PI; + } + + + if ($start > $stop) { + imageSmoothArc($img, $cx, $cy, $w, $h, $color, $start, 2 * M_PI); + imageSmoothArc($img, $cx, $cy, $w, $h, $color, 0, $stop); + return; } - - $a = 1.0*round ($w/2); - $b = 1.0*round ($h/2); - $cx = 1.0*round ($cx); - $cy = 1.0*round ($cy); - - $aaAngle = atan(($b*$b)/($a*$a)*tan(0.25*M_PI)); - $aaAngleX = $a*cos($aaAngle); - $aaAngleY = $b*sin($aaAngle); - + + $a = 1.0 * round($w / 2); + $b = 1.0 * round($h / 2); + $cx = 1.0 * round($cx); + $cy = 1.0 * round($cy); + + $aaAngle = atan(($b * $b) / ($a * $a) * tan(0.25 * M_PI)); + $aaAngleX = $a * cos($aaAngle); + $aaAngleY = $b * sin($aaAngle); + $a -= 0.5; // looks better... $b -= 0.5; - - for ($i=0; $i<4;$i++) - { - if ($start < ($i+1)*M_PI/2) - { - if ($start > $i*M_PI/2) - { - if ($stop > ($i+1)*M_PI/2) - { - imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY , $color, $start, ($i+1)*M_PI/2, $i); - } - else - { + + for ($i = 0; $i < 4; $i++) { + if ($start < ($i + 1) * M_PI / 2) { + if ($start > $i * M_PI / 2) { + if ($stop > ($i + 1) * M_PI / 2) { + imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $start, ($i + 1) * M_PI / 2, $i); + } else { imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $start, $stop, $i); break; } - } - else - { - if ($stop > ($i+1)*M_PI/2) - { - imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i*M_PI/2, ($i+1)*M_PI/2, $i); - } - else - { - imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i*M_PI/2, $stop, $i); + } else { + if ($stop > ($i + 1) * M_PI / 2) { + imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i * M_PI / 2, ($i + 1) * M_PI / 2, $i); + } else { + imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i * M_PI / 2, $stop, $i); break; } } } } } -?> diff --git a/lib/index.php b/lib/index.php index 759513ba..656e794a 100644 --- a/lib/index.php +++ b/lib/index.php @@ -1,2 +1,3 @@ "Služba podpory", - - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Počty požadavků podle entity", - 'desc' => "Pruhový", - 'category' => "Podle entity", - ], - - 'reportPieTicketNumberByEntity' => [ - 'title' => "Počty požadavků podle entity", - 'desc' => "Výsečový", - 'category' => "Podle entity", - ], - - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Počty požadavků podle kategorie a entity", - 'desc' => "Skupinový pruhový", - 'category' => "Podle entity", - ], - - 'reportPieTopTenAuthor' => [ - 'title' => "Deset nejčastějších žadatelů", - 'desc' => "Výsečový", - 'category' => "Podle žadatele", - ], - - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Počty otevřených požadavků podle kategorie a typu", - 'desc' => "Skupinový pruhový", - 'category' => "Podle kategorie", - ], - - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Počty uzavřených požadavků podle kategorie a typu", - 'desc' => "Skupinový pruhový", - 'category' => "Podle kategorie", - ], - - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Počty otevřených požadavků podle kategorie a stavu", - 'desc' => "Skupinový pruhový", - 'category' => "Podle kategorie", - ], - - 'reportHgbarTicketNumberByService' => [ - 'title' => "Počty otevřených a uzavřených požadavků podle služby", - 'desc' => "Skupinový pruhový", - 'category' => "Podle služby", - ], - - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Počty otevřených a uzavřených požadavků", - 'desc' => "Výsečový", - 'category' => "Podle požadavku", - ], - - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Počty otevřených požadavků podle stavu", - 'desc' => "Výsečový", - 'category' => "Podle požadavku", - ], - - 'reportAreaNbTicket' => [ - 'title' => "Počty událostí v požadavku za období", - 'desc' => "Plošný", - 'category' => "Podle požadavku", - ], - - 'reportLineNbTicket' => [ - 'title' => "Počty událostí v požadavku za období", - 'desc' => "Spojnicový", - 'category' => "Podle požadavku", - ], - - 'reportGlineNbTicket' => [ - 'title' => "Počty událostí v požadavku za období (podle stavu)", - 'desc' => "Spojnicový", - 'category' => "Podle požadavku", - ], - - 'reportGareaNbTicket' => [ - 'title' => "Počty událostí v požadavku za období (podle stavu)", - 'desc' => "Plošný", - 'category' => "Podle požadavku", - ], - - 'reportVstackbarNbTicket' => [ - 'title' => "Počty událostí v požadavku za období (podle stavu)", - 'desc' => "Skládaný pruhový", - 'category' => "Podle požadavku", - ], - - 'reportSunburstTicketByCategories' => [ - 'title' => "Rozložení požadavků podle kategorie a podkategorie", - 'desc' => "Prstencový", - 'category' => "Podle kategorie", - ], - - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Počty požadavků podle stavu a technika", - 'desc' => "Skládaný pruhový", - 'category' => "Podle požadavku", - ], - - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Počty požadavků podle umístění žadatele", - 'desc' => "Pruhový", - 'category' => "Podle žadatele", - ], + 'title' => 'Služba podpory', + + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Počty požadavků podle entity', + 'desc' => 'Pruhový', + 'category' => 'Podle entity', + ], + + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Počty požadavků podle entity', + 'desc' => 'Výsečový', + 'category' => 'Podle entity', + ], + + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Počty požadavků podle kategorie a entity', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podle entity', + ], + + 'reportPieTopTenAuthor' => [ + 'title' => 'Deset nejčastějších žadatelů', + 'desc' => 'Výsečový', + 'category' => 'Podle žadatele', + ], + + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Počty otevřených požadavků podle kategorie a typu', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podle kategorie', + ], + + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Počty uzavřených požadavků podle kategorie a typu', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podle kategorie', + ], + + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Počty otevřených požadavků podle kategorie a stavu', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podle kategorie', + ], + + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Počty otevřených a uzavřených požadavků podle služby', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podle služby', + ], + + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Počty otevřených a uzavřených požadavků', + 'desc' => 'Výsečový', + 'category' => 'Podle požadavku', + ], + + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Počty otevřených požadavků podle stavu', + 'desc' => 'Výsečový', + 'category' => 'Podle požadavku', + ], + + 'reportAreaNbTicket' => [ + 'title' => 'Počty událostí v požadavku za období', + 'desc' => 'Plošný', + 'category' => 'Podle požadavku', + ], + + 'reportLineNbTicket' => [ + 'title' => 'Počty událostí v požadavku za období', + 'desc' => 'Spojnicový', + 'category' => 'Podle požadavku', + ], + + 'reportGlineNbTicket' => [ + 'title' => 'Počty událostí v požadavku za období (podle stavu)', + 'desc' => 'Spojnicový', + 'category' => 'Podle požadavku', + ], + + 'reportGareaNbTicket' => [ + 'title' => 'Počty událostí v požadavku za období (podle stavu)', + 'desc' => 'Plošný', + 'category' => 'Podle požadavku', + ], + + 'reportVstackbarNbTicket' => [ + 'title' => 'Počty událostí v požadavku za období (podle stavu)', + 'desc' => 'Skládaný pruhový', + 'category' => 'Podle požadavku', + ], + + 'reportSunburstTicketByCategories' => [ + 'title' => 'Rozložení požadavků podle kategorie a podkategorie', + 'desc' => 'Prstencový', + 'category' => 'Podle kategorie', + ], + + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Počty požadavků podle stavu a technika', + 'desc' => 'Skládaný pruhový', + 'category' => 'Podle požadavku', + ], + + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Počty požadavků podle umístění žadatele', + 'desc' => 'Pruhový', + 'category' => 'Podle žadatele', + ], ]; diff --git a/locales/reports_locales/helpdesk_de_DE.php b/locales/reports_locales/helpdesk_de_DE.php index 14611ffb..1252a423 100644 --- a/locales/reports_locales/helpdesk_de_DE.php +++ b/locales/reports_locales/helpdesk_de_DE.php @@ -31,113 +31,113 @@ global $LANG; $LANG['plugin_mreporting']['Helpdesk'] = [ - 'title' => "Helpdesk", - - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Anzahl Tickets pro Einheit", - 'desc' => "Bars", - 'category' => "Pro Einheit", - ], - - 'reportPieTicketNumberByEntity' => [ - 'title' => "Anzahl Tickets pro Einheit", - 'desc' => "Pie", - 'category' => "Pro Einheit", - ], - - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Anzahl Tickets pro Kategorie und Einheit", - 'desc' => "Stacked bars", - 'category' => "Pro Einheit", - ], - - 'reportPieTopTenAuthor' => [ - 'title' => "Top 10 Anforderer", - 'desc' => "Pie", - 'category' => "Pro Anforderer", - ], - - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Anzahl erstellter Tickets pro Kategorie und Typ", - 'desc' => "Stacked bars", - 'category' => "Pro Kategorie", - ], - - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Anzahl erstellter Tickets pro Kategorie und Typ", - 'desc' => "Stacked bars", - 'category' => "Pro Kategorie", - ], - - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Anzahl erstellter Tickets pro Kategorie und Status", - 'desc' => "Stacked bars", - 'category' => "Pro Kategorie", - ], - - 'reportHgbarTicketNumberByService' => [ - 'title' => "Anzahl erstellter und geschlossener Tickets pro Service", - 'desc' => "Stacked bars", - 'category' => "Pro Service", - ], - - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Anzahl erstellter und geschlossener Tickets", - 'desc' => "Pie", - 'category' => "Pro Ticket", - ], - - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Anzahl erstellter Tickets pro Status", - 'desc' => "Pie", - 'category' => "Pro Ticket", - ], - - 'reportAreaNbTicket' => [ - 'title' => "Entwicklung der Tickets über einen Zeitraum", - 'desc' => "Area", - 'category' => "Pro Ticket", - ], - - 'reportLineNbTicket' => [ - 'title' => "Entwicklung der Tickets über einen Zeitraum", - 'desc' => "Linie", - 'category' => "Pro Ticket", - ], - - 'reportGlineNbTicket' => [ - 'title' => "Entwicklung der Tickets über einen Zeitraum (nach Status)", - 'desc' => "Linien", - 'category' => "Pro Ticket", - ], - - 'reportGareaNbTicket' => [ - 'title' => "Entwicklung der Tickets über einen Zeitraum (nach Status)", - 'desc' => "Area", - 'category' => "Pro Ticket", - ], - - 'reportVstackbarNbTicket' => [ - 'title' => "Entwicklung der Tickets über einen Zeitraum (nach Status)", - 'desc' => "Stacked bars", - 'category' => "Pro Ticket", - ], - - 'reportSunburstTicketByCategories' => [ - 'title' => "Verteilung der Tickets nach Kategorie und Unterkategorie", - 'desc' => "Donut", - 'category' => "Pro Kategorie", - ], - - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Anzahl Tickets pro Status und Techniker", - 'desc' => "Stacked bars", - 'category' => "Pro Ticket", - ], - - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Anzahl Tickets pro Anforderer-Standort", - 'desc' => "Bars", - 'category' => "Pro Anforderer", - ], + 'title' => 'Helpdesk', + + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Anzahl Tickets pro Einheit', + 'desc' => 'Bars', + 'category' => 'Pro Einheit', + ], + + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Anzahl Tickets pro Einheit', + 'desc' => 'Pie', + 'category' => 'Pro Einheit', + ], + + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Anzahl Tickets pro Kategorie und Einheit', + 'desc' => 'Stacked bars', + 'category' => 'Pro Einheit', + ], + + 'reportPieTopTenAuthor' => [ + 'title' => 'Top 10 Anforderer', + 'desc' => 'Pie', + 'category' => 'Pro Anforderer', + ], + + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Anzahl erstellter Tickets pro Kategorie und Typ', + 'desc' => 'Stacked bars', + 'category' => 'Pro Kategorie', + ], + + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Anzahl erstellter Tickets pro Kategorie und Typ', + 'desc' => 'Stacked bars', + 'category' => 'Pro Kategorie', + ], + + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Anzahl erstellter Tickets pro Kategorie und Status', + 'desc' => 'Stacked bars', + 'category' => 'Pro Kategorie', + ], + + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Anzahl erstellter und geschlossener Tickets pro Service', + 'desc' => 'Stacked bars', + 'category' => 'Pro Service', + ], + + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Anzahl erstellter und geschlossener Tickets', + 'desc' => 'Pie', + 'category' => 'Pro Ticket', + ], + + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Anzahl erstellter Tickets pro Status', + 'desc' => 'Pie', + 'category' => 'Pro Ticket', + ], + + 'reportAreaNbTicket' => [ + 'title' => 'Entwicklung der Tickets über einen Zeitraum', + 'desc' => 'Area', + 'category' => 'Pro Ticket', + ], + + 'reportLineNbTicket' => [ + 'title' => 'Entwicklung der Tickets über einen Zeitraum', + 'desc' => 'Linie', + 'category' => 'Pro Ticket', + ], + + 'reportGlineNbTicket' => [ + 'title' => 'Entwicklung der Tickets über einen Zeitraum (nach Status)', + 'desc' => 'Linien', + 'category' => 'Pro Ticket', + ], + + 'reportGareaNbTicket' => [ + 'title' => 'Entwicklung der Tickets über einen Zeitraum (nach Status)', + 'desc' => 'Area', + 'category' => 'Pro Ticket', + ], + + 'reportVstackbarNbTicket' => [ + 'title' => 'Entwicklung der Tickets über einen Zeitraum (nach Status)', + 'desc' => 'Stacked bars', + 'category' => 'Pro Ticket', + ], + + 'reportSunburstTicketByCategories' => [ + 'title' => 'Verteilung der Tickets nach Kategorie und Unterkategorie', + 'desc' => 'Donut', + 'category' => 'Pro Kategorie', + ], + + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Anzahl Tickets pro Status und Techniker', + 'desc' => 'Stacked bars', + 'category' => 'Pro Ticket', + ], + + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Anzahl Tickets pro Anforderer-Standort', + 'desc' => 'Bars', + 'category' => 'Pro Anforderer', + ], ]; diff --git a/locales/reports_locales/helpdesk_en_GB.php b/locales/reports_locales/helpdesk_en_GB.php index 85221a18..a141fae8 100644 --- a/locales/reports_locales/helpdesk_en_GB.php +++ b/locales/reports_locales/helpdesk_en_GB.php @@ -31,113 +31,113 @@ global $LANG; $LANG['plugin_mreporting']['Helpdesk'] = [ - 'title' => "Helpdesk", - - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Number of ticket per entity", - 'desc' => "Bars", - 'category' => "Per entity", - ], - - 'reportPieTicketNumberByEntity' => [ - 'title' => "Number of ticket per entity", - 'desc' => "Pie", - 'category' => "Per entity", - ], - - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Number of ticket per category and entity", - 'desc' => "Grouped bar", - 'category' => "Per entity", - ], - - 'reportPieTopTenAuthor' => [ - 'title' => "Top 10 requesters", - 'desc' => "Pie", - 'category' => "By requester", - ], - - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Number of opened tickets per category and type", - 'desc' => "grouped bar", - 'category' => "per category", - ], - - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Number of closed tickets per category and type", - 'desc' => "grouped bar", - 'category' => "per category", - ], - - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Number of openened tickets per category and status", - 'desc' => "Grouped bar", - 'category' => "per category", - ], - - 'reportHgbarTicketNumberByService' => [ - 'title' => "Number of opened and closed tickets per service", - 'desc' => "Grouped bar", - 'category' => "Per service", - ], - - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Number of opened and closed tickets", - 'desc' => "Pie", - 'category' => "Per ticket", - ], - - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Number of opened tickets per status", - 'desc' => "Pie", - 'category' => "Per ticket", - ], - - 'reportAreaNbTicket' => [ - 'title' => "Number of ticket evolution over the period", - 'desc' => "Area", - 'category' => "Per ticket", - ], - - 'reportLineNbTicket' => [ - 'title' => "Number of ticket evolution over the period", - 'desc' => "Line", - 'category' => "Per ticket", - ], - - 'reportGlineNbTicket' => [ - 'title' => "Number of ticket evolution over the period (per status)", - 'desc' => "Lines", - 'category' => "Per ticket", - ], - - 'reportGareaNbTicket' => [ - 'title' => "Number of ticket evolution over the period (per status)", - 'desc' => "Area", - 'category' => "Per ticket", - ], - - 'reportVstackbarNbTicket' => [ - 'title' => "Number of ticket evolution over the period (per status)", - 'desc' => "Stacked bars", - 'category' => "Per ticket", - ], - - 'reportSunburstTicketByCategories' => [ - 'title' => "Distribution of tickets per category and child categories", - 'desc' => "Donut", - 'category' => "Per category", - ], - - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Number of tickets per status and technician", - 'desc' => "Stacked bars", - 'category' => "Per ticket", - ], - - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Number of ticket per requester location", - 'desc' => "Bars", - 'category' => "Per requester", - ], -]; \ No newline at end of file + 'title' => 'Helpdesk', + + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Number of ticket per entity', + 'desc' => 'Bars', + 'category' => 'Per entity', + ], + + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Number of ticket per entity', + 'desc' => 'Pie', + 'category' => 'Per entity', + ], + + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Number of ticket per category and entity', + 'desc' => 'Grouped bar', + 'category' => 'Per entity', + ], + + 'reportPieTopTenAuthor' => [ + 'title' => 'Top 10 requesters', + 'desc' => 'Pie', + 'category' => 'By requester', + ], + + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Number of opened tickets per category and type', + 'desc' => 'grouped bar', + 'category' => 'per category', + ], + + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Number of closed tickets per category and type', + 'desc' => 'grouped bar', + 'category' => 'per category', + ], + + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Number of openened tickets per category and status', + 'desc' => 'Grouped bar', + 'category' => 'per category', + ], + + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Number of opened and closed tickets per service', + 'desc' => 'Grouped bar', + 'category' => 'Per service', + ], + + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Number of opened and closed tickets', + 'desc' => 'Pie', + 'category' => 'Per ticket', + ], + + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Number of opened tickets per status', + 'desc' => 'Pie', + 'category' => 'Per ticket', + ], + + 'reportAreaNbTicket' => [ + 'title' => 'Number of ticket evolution over the period', + 'desc' => 'Area', + 'category' => 'Per ticket', + ], + + 'reportLineNbTicket' => [ + 'title' => 'Number of ticket evolution over the period', + 'desc' => 'Line', + 'category' => 'Per ticket', + ], + + 'reportGlineNbTicket' => [ + 'title' => 'Number of ticket evolution over the period (per status)', + 'desc' => 'Lines', + 'category' => 'Per ticket', + ], + + 'reportGareaNbTicket' => [ + 'title' => 'Number of ticket evolution over the period (per status)', + 'desc' => 'Area', + 'category' => 'Per ticket', + ], + + 'reportVstackbarNbTicket' => [ + 'title' => 'Number of ticket evolution over the period (per status)', + 'desc' => 'Stacked bars', + 'category' => 'Per ticket', + ], + + 'reportSunburstTicketByCategories' => [ + 'title' => 'Distribution of tickets per category and child categories', + 'desc' => 'Donut', + 'category' => 'Per category', + ], + + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Number of tickets per status and technician', + 'desc' => 'Stacked bars', + 'category' => 'Per ticket', + ], + + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Number of ticket per requester location', + 'desc' => 'Bars', + 'category' => 'Per requester', + ], +]; diff --git a/locales/reports_locales/helpdesk_es_VE.php b/locales/reports_locales/helpdesk_es_VE.php index 32ee0e82..09820b8b 100644 --- a/locales/reports_locales/helpdesk_es_VE.php +++ b/locales/reports_locales/helpdesk_es_VE.php @@ -31,113 +31,113 @@ global $LANG; $LANG['plugin_mreporting']['Helpdesk'] = [ - 'title' => "Soporte", - - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Número de casos por entidad", - 'desc' => "Barras", - 'category' => "Por entidad", - ], - - 'reportPieTicketNumberByEntity' => [ - 'title' => "Número de casos por entidad", - 'desc' => "Torta", - 'category' => "Por entidad", - ], - - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Número de casos por categoría y entidad", - 'desc' => "Barra agrupada", - 'category' => "Por entidad", - ], - - 'reportPieTopTenAuthor' => [ - 'title' => "Primeros 10 con mas solicitudes", - 'desc' => "Torta", - 'category' => "Por solicitantes", - ], - - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Casos abiertos por categoría y tipo", - 'desc' => "Barra agrupada", - 'category' => "por categoria", - ], - - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Casos cerrados por categoría y tipo", - 'desc' => "Barra agrupada", - 'category' => "por categoria", - ], - - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Casos abiertos por categoría y estado", - 'desc' => "Barra agrupada", - 'category' => "por categoria", - ], - - 'reportHgbarTicketNumberByService' => [ - 'title' => "Casos abiertos y cerrados por unidad solicitante", - 'desc' => "Barra agrupada", - 'category' => "Por unidad solicitante", - ], - - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Numero de casos abiertos y cerrados", - 'desc' => "Torta", - 'category' => "Por casos", - ], - - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Casos abiertos por estado", - 'desc' => "Torta", - 'category' => "Por casos", - ], - - 'reportAreaNbTicket' => [ - 'title' => "Evolución de casos por periodo", - 'desc' => "Area", - 'category' => "Por casos", - ], - - 'reportLineNbTicket' => [ - 'title' => "Evolución de casos por periodo", - 'desc' => "Linea", - 'category' => "Por casos", - ], - - 'reportGlineNbTicket' => [ - 'title' => "Evolución de casos por periodo (por estado)", - 'desc' => "Lineas", - 'category' => "Por casos", - ], - - 'reportGareaNbTicket' => [ - 'title' => "Evolución de casos por periodo (por estado)", - 'desc' => "Area", - 'category' => "Por casos", - ], - - 'reportVstackbarNbTicket' => [ - 'title' => "Evolución de casos por periodo (por estado)", - 'desc' => "Barras apiladas", - 'category' => "Por casos", - ], - - 'reportSunburstTicketByCategories' => [ - 'title' => "Distribución de caso por categorías y subcategorías", - 'desc' => "Dona", - 'category' => "por categoria", - ], - - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Numero de casos por tecnico (por estado)", - 'desc' => "Barras apiladas", - 'category' => "Por casos", - ], - - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Numero de casos por ubicación del solicitante", - 'desc' => "Bars", - 'category' => "Per requester", - ], + 'title' => 'Soporte', + + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Número de casos por entidad', + 'desc' => 'Barras', + 'category' => 'Por entidad', + ], + + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Número de casos por entidad', + 'desc' => 'Torta', + 'category' => 'Por entidad', + ], + + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Número de casos por categoría y entidad', + 'desc' => 'Barra agrupada', + 'category' => 'Por entidad', + ], + + 'reportPieTopTenAuthor' => [ + 'title' => 'Primeros 10 con mas solicitudes', + 'desc' => 'Torta', + 'category' => 'Por solicitantes', + ], + + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Casos abiertos por categoría y tipo', + 'desc' => 'Barra agrupada', + 'category' => 'por categoria', + ], + + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Casos cerrados por categoría y tipo', + 'desc' => 'Barra agrupada', + 'category' => 'por categoria', + ], + + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Casos abiertos por categoría y estado', + 'desc' => 'Barra agrupada', + 'category' => 'por categoria', + ], + + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Casos abiertos y cerrados por unidad solicitante', + 'desc' => 'Barra agrupada', + 'category' => 'Por unidad solicitante', + ], + + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Numero de casos abiertos y cerrados', + 'desc' => 'Torta', + 'category' => 'Por casos', + ], + + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Casos abiertos por estado', + 'desc' => 'Torta', + 'category' => 'Por casos', + ], + + 'reportAreaNbTicket' => [ + 'title' => 'Evolución de casos por periodo', + 'desc' => 'Area', + 'category' => 'Por casos', + ], + + 'reportLineNbTicket' => [ + 'title' => 'Evolución de casos por periodo', + 'desc' => 'Linea', + 'category' => 'Por casos', + ], + + 'reportGlineNbTicket' => [ + 'title' => 'Evolución de casos por periodo (por estado)', + 'desc' => 'Lineas', + 'category' => 'Por casos', + ], + + 'reportGareaNbTicket' => [ + 'title' => 'Evolución de casos por periodo (por estado)', + 'desc' => 'Area', + 'category' => 'Por casos', + ], + + 'reportVstackbarNbTicket' => [ + 'title' => 'Evolución de casos por periodo (por estado)', + 'desc' => 'Barras apiladas', + 'category' => 'Por casos', + ], + + 'reportSunburstTicketByCategories' => [ + 'title' => 'Distribución de caso por categorías y subcategorías', + 'desc' => 'Dona', + 'category' => 'por categoria', + ], + + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Numero de casos por tecnico (por estado)', + 'desc' => 'Barras apiladas', + 'category' => 'Por casos', + ], + + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Numero de casos por ubicación del solicitante', + 'desc' => 'Bars', + 'category' => 'Per requester', + ], ]; diff --git a/locales/reports_locales/helpdesk_fr_FR.php b/locales/reports_locales/helpdesk_fr_FR.php index 39774bdb..88744a84 100644 --- a/locales/reports_locales/helpdesk_fr_FR.php +++ b/locales/reports_locales/helpdesk_fr_FR.php @@ -31,114 +31,114 @@ global $LANG; $LANG['plugin_mreporting']['Helpdesk'] = [ - 'title' => "Helpdesk", - - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Nombre de ticket par entités", - 'desc' => "Barres", - 'category' => "Par entités", - ], - - 'reportPieTicketNumberByEntity' => [ - 'title' => "Nombre de ticket par entités", - 'desc' => "Camembert", - 'category' => "Par entités", - ], - - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Nombre de ticket par catégories et entités", - 'desc' => "Barres groupées", - 'category' => "Par entités", - ], - - 'reportPieTopTenAuthor' => [ - 'title' => "Top 10 des demandeurs", - 'desc' => "Camembert", - 'category' => "Par demandeurs", - ], - - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Nombre de tickets ouverts par catégories et par types", - 'desc' => "Barres groupées", - 'category' => "Par catégories", - ], - - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Nombre de tickets clôturés par catégories et par types", - 'desc' => "Barres groupées", - 'category' => "Par catégories", - ], - - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Nombre de tickets ouverts par catégories et par statuts", - 'desc' => "Barres groupées", - 'category' => "Par catégories", - ], - - 'reportHgbarTicketNumberByService' => [ - 'title' => "Nombre de tickets ouverts et clôturés par services", - 'desc' => "Barres groupées", - 'category' => "Par services", - ], - - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Nombre de tickets ouverts et clôturés", - 'desc' => "Camembert", - 'category' => "Par tickets", - ], - - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Nombre de tickets ouverts par statuts", - 'desc' => "Camembert", - 'category' => "Par tickets", - ], - - 'reportAreaNbTicket' => [ - 'title' => "Evolution du nombre de ticket sur la période", - 'desc' => "Aire", - 'category' => "Par tickets", - ], - - 'reportLineNbTicket' => [ - 'title' => "Evolution du nombre de ticket sur la période", - 'desc' => "Ligne", - 'category' => "Par tickets", - ], - - 'reportGlineNbTicket' => [ - 'title' => "Evolution du nombre de ticket sur la période (par Statut)", - 'desc' => "Lignes", - 'category' => "Par tickets", - ], - - 'reportGareaNbTicket' => [ - 'title' => "Evolution du nombre de ticket sur la période (par Statut)", - 'desc' => "Aire", - 'category' => "Par tickets", - ], - - 'reportVstackbarNbTicket' => [ - 'title' => "Evolution du nombre de ticket sur la période (par Statut)", - 'desc' => "Barres empilées", - 'category' => "Par tickets", - ], - - 'reportSunburstTicketByCategories' => [ - 'title' => "Repartition des tickets par catégories et sous catégories", - 'desc' => "Donut", - 'category' => "Par catégories", - ], - - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Nombre de tickets par statuts et technicien", - 'desc' => "Barres empilées", - 'category' => "Par tickets", - ], - - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Nombre de ticket par lieu des demandeurs", - 'desc' => "Barres", - 'category' => "Par demandeurs", - ], - -]; \ No newline at end of file + 'title' => 'Helpdesk', + + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Nombre de ticket par entités', + 'desc' => 'Barres', + 'category' => 'Par entités', + ], + + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Nombre de ticket par entités', + 'desc' => 'Camembert', + 'category' => 'Par entités', + ], + + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Nombre de ticket par catégories et entités', + 'desc' => 'Barres groupées', + 'category' => 'Par entités', + ], + + 'reportPieTopTenAuthor' => [ + 'title' => 'Top 10 des demandeurs', + 'desc' => 'Camembert', + 'category' => 'Par demandeurs', + ], + + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Nombre de tickets ouverts par catégories et par types', + 'desc' => 'Barres groupées', + 'category' => 'Par catégories', + ], + + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Nombre de tickets clôturés par catégories et par types', + 'desc' => 'Barres groupées', + 'category' => 'Par catégories', + ], + + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Nombre de tickets ouverts par catégories et par statuts', + 'desc' => 'Barres groupées', + 'category' => 'Par catégories', + ], + + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Nombre de tickets ouverts et clôturés par services', + 'desc' => 'Barres groupées', + 'category' => 'Par services', + ], + + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Nombre de tickets ouverts et clôturés', + 'desc' => 'Camembert', + 'category' => 'Par tickets', + ], + + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Nombre de tickets ouverts par statuts', + 'desc' => 'Camembert', + 'category' => 'Par tickets', + ], + + 'reportAreaNbTicket' => [ + 'title' => 'Evolution du nombre de ticket sur la période', + 'desc' => 'Aire', + 'category' => 'Par tickets', + ], + + 'reportLineNbTicket' => [ + 'title' => 'Evolution du nombre de ticket sur la période', + 'desc' => 'Ligne', + 'category' => 'Par tickets', + ], + + 'reportGlineNbTicket' => [ + 'title' => 'Evolution du nombre de ticket sur la période (par Statut)', + 'desc' => 'Lignes', + 'category' => 'Par tickets', + ], + + 'reportGareaNbTicket' => [ + 'title' => 'Evolution du nombre de ticket sur la période (par Statut)', + 'desc' => 'Aire', + 'category' => 'Par tickets', + ], + + 'reportVstackbarNbTicket' => [ + 'title' => 'Evolution du nombre de ticket sur la période (par Statut)', + 'desc' => 'Barres empilées', + 'category' => 'Par tickets', + ], + + 'reportSunburstTicketByCategories' => [ + 'title' => 'Repartition des tickets par catégories et sous catégories', + 'desc' => 'Donut', + 'category' => 'Par catégories', + ], + + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Nombre de tickets par statuts et technicien', + 'desc' => 'Barres empilées', + 'category' => 'Par tickets', + ], + + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Nombre de ticket par lieu des demandeurs', + 'desc' => 'Barres', + 'category' => 'Par demandeurs', + ], + +]; diff --git a/locales/reports_locales/helpdesk_hr_HR.php b/locales/reports_locales/helpdesk_hr_HR.php index d4849a0c..22662f03 100644 --- a/locales/reports_locales/helpdesk_hr_HR.php +++ b/locales/reports_locales/helpdesk_hr_HR.php @@ -31,113 +31,113 @@ global $LANG; $LANG['plugin_mreporting']['Helpdesk'] = [ - 'title' => "Podrška", - - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Broj naloga po entitetu", - 'desc' => "Stupci", - 'category' => "Po entitetu", - ], - - 'reportPieTicketNumberByEntity' => [ - 'title' => "Broj naloga po entitetu", - 'desc' => "Torta", - 'category' => "Po entitetu", - ], - - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Broj naloga po kategoriji i entitetu", - 'desc' => "Grupirani stupci", - 'category' => "Po entitetu", - ], - - 'reportPieTopTenAuthor' => [ - 'title' => "Top 10 podnositelja", - 'desc' => "Torta", - 'category' => "Po podnositelju", - ], - - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Broj otvorenih naloga po kategoriji i vrsti", - 'desc' => "Grupirani stupci", - 'category' => "Po kategoriji", - ], - - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Broj zatvorenih naloga po kategoriji i vrsti", - 'desc' => "Grupirani stupci", - 'category' => "Po kategoriji", - ], - - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Broj otvorenih naloga po kategoriji i stanju", - 'desc' => "Grupirani stupci", - 'category' => "Po kategoriji", - ], - - 'reportHgbarTicketNumberByService' => [ - 'title' => "Broj otvorenih i zatvorenih naloga po usluzi", - 'desc' => "Grupirani stupci", - 'category' => "Po usluzi", - ], - - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Broj otvorenih i zatvorenih naloga", - 'desc' => "Torta", - 'category' => "Po nalogu", - ], - - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Broj otvorenih naloga po stanju", - 'desc' => "Torta", - 'category' => "Po nalogu", - ], - - 'reportAreaNbTicket' => [ - 'title' => "Razvoj broja naloga u razdoblju", - 'desc' => "Područje", - 'category' => "Po nalogu", - ], - - 'reportLineNbTicket' => [ - 'title' => "Razvoj broja naloga u razdoblju", - 'desc' => "Linija", - 'category' => "Po nalogu", - ], - - 'reportGlineNbTicket' => [ - 'title' => "Razvoj broja naloga u razdoblju (po stanju)", - 'desc' => "Linija", - 'category' => "Po nalogu", - ], - - 'reportGareaNbTicket' => [ - 'title' => "Razvoj broja naloga u razdoblju (po stanju)", - 'desc' => "Područje", - 'category' => "Po nalogu", - ], - - 'reportVstackbarNbTicket' => [ - 'title' => "Razvoj broja naloga u razdoblju (po stanju)", - 'desc' => "Složeni stupci", - 'category' => "Po nalogu", - ], - - 'reportSunburstTicketByCategories' => [ - 'title' => "Podjela naloga po kategoriji i podkategorijama", - 'desc' => "Prsten", - 'category' => "Po kategoriji", - ], - - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Broj naloga po stanju i tehničaru", - 'desc' => "Složeni stupci", - 'category' => "Po nalogu", - ], - - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Broj naloga po lokaciji podnositelja", - 'desc' => "Stupci", - 'category' => "Po podnositelju", - ], -]; \ No newline at end of file + 'title' => 'Podrška', + + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Broj naloga po entitetu', + 'desc' => 'Stupci', + 'category' => 'Po entitetu', + ], + + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Broj naloga po entitetu', + 'desc' => 'Torta', + 'category' => 'Po entitetu', + ], + + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Broj naloga po kategoriji i entitetu', + 'desc' => 'Grupirani stupci', + 'category' => 'Po entitetu', + ], + + 'reportPieTopTenAuthor' => [ + 'title' => 'Top 10 podnositelja', + 'desc' => 'Torta', + 'category' => 'Po podnositelju', + ], + + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Broj otvorenih naloga po kategoriji i vrsti', + 'desc' => 'Grupirani stupci', + 'category' => 'Po kategoriji', + ], + + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Broj zatvorenih naloga po kategoriji i vrsti', + 'desc' => 'Grupirani stupci', + 'category' => 'Po kategoriji', + ], + + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Broj otvorenih naloga po kategoriji i stanju', + 'desc' => 'Grupirani stupci', + 'category' => 'Po kategoriji', + ], + + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Broj otvorenih i zatvorenih naloga po usluzi', + 'desc' => 'Grupirani stupci', + 'category' => 'Po usluzi', + ], + + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Broj otvorenih i zatvorenih naloga', + 'desc' => 'Torta', + 'category' => 'Po nalogu', + ], + + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Broj otvorenih naloga po stanju', + 'desc' => 'Torta', + 'category' => 'Po nalogu', + ], + + 'reportAreaNbTicket' => [ + 'title' => 'Razvoj broja naloga u razdoblju', + 'desc' => 'Područje', + 'category' => 'Po nalogu', + ], + + 'reportLineNbTicket' => [ + 'title' => 'Razvoj broja naloga u razdoblju', + 'desc' => 'Linija', + 'category' => 'Po nalogu', + ], + + 'reportGlineNbTicket' => [ + 'title' => 'Razvoj broja naloga u razdoblju (po stanju)', + 'desc' => 'Linija', + 'category' => 'Po nalogu', + ], + + 'reportGareaNbTicket' => [ + 'title' => 'Razvoj broja naloga u razdoblju (po stanju)', + 'desc' => 'Područje', + 'category' => 'Po nalogu', + ], + + 'reportVstackbarNbTicket' => [ + 'title' => 'Razvoj broja naloga u razdoblju (po stanju)', + 'desc' => 'Složeni stupci', + 'category' => 'Po nalogu', + ], + + 'reportSunburstTicketByCategories' => [ + 'title' => 'Podjela naloga po kategoriji i podkategorijama', + 'desc' => 'Prsten', + 'category' => 'Po kategoriji', + ], + + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Broj naloga po stanju i tehničaru', + 'desc' => 'Složeni stupci', + 'category' => 'Po nalogu', + ], + + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Broj naloga po lokaciji podnositelja', + 'desc' => 'Stupci', + 'category' => 'Po podnositelju', + ], +]; diff --git a/locales/reports_locales/helpdesk_pl_PL.php b/locales/reports_locales/helpdesk_pl_PL.php index adf0986f..e83f2bb3 100644 --- a/locales/reports_locales/helpdesk_pl_PL.php +++ b/locales/reports_locales/helpdesk_pl_PL.php @@ -31,113 +31,113 @@ global $LANG; $LANG['plugin_mreporting']['Helpdesk'] = [ - 'title' => "Zgłoszenia", - - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Zgłoszenia na jednostkę", - 'desc' => "wykres słupkowy", - 'category' => "Raporty wg jednostki", - ], - - 'reportPieTicketNumberByEntity' => [ - 'title' => "Zgłoszenia na jednostkę", - 'desc' => "wykres kołowy", - 'category' => "Raporty wg jednostki", - ], - - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Zgłoszenia wg ich kategorii i jednostki", - 'desc' => "wykres słupkowy", - 'category' => "Raporty wg jednostki", - ], - - 'reportPieTopTenAuthor' => [ - 'title' => "10 najbardziej aktywnych zgłaszających", - 'desc' => "wykres kołowy", - 'category' => "Raporty wg zgłaszającego", - ], - - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Zgłoszenia otwarte wg ich kategorii i typu", - 'desc' => "wykres słupkowy", - 'category' => "Raporty wg kategorii", - ], - - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Zgłoszenia zamknięte wg ich kategorii i typu", - 'desc' => "wykres słupkowy", - 'category' => "Raporty wg kategorii", - ], - - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Zgłoszenia otwarte wg ich kategorii i statusu", - 'desc' => "wykres słupkowy", - 'category' => "Raporty wg kategorii", - ], - - 'reportHgbarTicketNumberByService' => [ - 'title' => "Zgłoszenia otwarte i zamknięte wg usługi", - 'desc' => "wykres słupkowy", - 'category' => "Raporty wg usługi", - ], - - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Zgłoszenia otwarte i zamknięte", - 'desc' => "wykres kołowy", - 'category' => "Raporty wg zgłoszeń", - ], - - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Zgłoszenia otwarte wg ich statusu", - 'desc' => "wykres kołowy", - 'category' => "Raporty wg zgłoszeń", - ], - - 'reportAreaNbTicket' => [ - 'title' => "Zmiana ilości zgłoszeń w czasie", - 'desc' => "wykres obszarowy", - 'category' => "Raporty wg zgłoszeń", - ], - - 'reportLineNbTicket' => [ - 'title' => "Zmiana ilości zgłoszeń w czasie", - 'desc' => "wykres liniowy", - 'category' => "Raporty wg zgłoszeń", - ], - - 'reportGlineNbTicket' => [ - 'title' => "Zmiana ilości zgłoszeń w czasie (wg ich statusu)", - 'desc' => "wykres liniowy", - 'category' => "Raporty wg zgłoszeń", - ], - - 'reportGareaNbTicket' => [ - 'title' => "Zmiana ilości zgłoszeń w czasie (wg ich statusu)", - 'desc' => "wykres obszarowy", - 'category' => "Raporty wg zgłoszeń", - ], - - 'reportVstackbarNbTicket' => [ - 'title' => "Zmiana ilości zgłoszeń w czasie (wg ich statusu)", - 'desc' => "wykres kolumnowy zestawiony", - 'category' => "Raporty wg zgłoszeń", - ], - - 'reportSunburstTicketByCategories' => [ - 'title' => "Dystrybucja zgłoszeń wg kategorii i podkategorii", - 'desc' => "Donut", - 'category' => "Raporty wg kategorii", - ], - - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Zgłoszenia wg statusu z rozbiciem na przypisanych techników", - 'desc' => "wykres kolumnowy zestawiony", - 'category' => "Raporty wg zgłoszeń", - ], - - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Zgłoszenia wg lokalizacji zgłaszających", - 'desc' => "wykres słupkowy", - 'category' => "Raporty wg zgłaszających", - ], + 'title' => 'Zgłoszenia', + + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Zgłoszenia na jednostkę', + 'desc' => 'wykres słupkowy', + 'category' => 'Raporty wg jednostki', + ], + + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Zgłoszenia na jednostkę', + 'desc' => 'wykres kołowy', + 'category' => 'Raporty wg jednostki', + ], + + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Zgłoszenia wg ich kategorii i jednostki', + 'desc' => 'wykres słupkowy', + 'category' => 'Raporty wg jednostki', + ], + + 'reportPieTopTenAuthor' => [ + 'title' => '10 najbardziej aktywnych zgłaszających', + 'desc' => 'wykres kołowy', + 'category' => 'Raporty wg zgłaszającego', + ], + + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Zgłoszenia otwarte wg ich kategorii i typu', + 'desc' => 'wykres słupkowy', + 'category' => 'Raporty wg kategorii', + ], + + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Zgłoszenia zamknięte wg ich kategorii i typu', + 'desc' => 'wykres słupkowy', + 'category' => 'Raporty wg kategorii', + ], + + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Zgłoszenia otwarte wg ich kategorii i statusu', + 'desc' => 'wykres słupkowy', + 'category' => 'Raporty wg kategorii', + ], + + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Zgłoszenia otwarte i zamknięte wg usługi', + 'desc' => 'wykres słupkowy', + 'category' => 'Raporty wg usługi', + ], + + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Zgłoszenia otwarte i zamknięte', + 'desc' => 'wykres kołowy', + 'category' => 'Raporty wg zgłoszeń', + ], + + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Zgłoszenia otwarte wg ich statusu', + 'desc' => 'wykres kołowy', + 'category' => 'Raporty wg zgłoszeń', + ], + + 'reportAreaNbTicket' => [ + 'title' => 'Zmiana ilości zgłoszeń w czasie', + 'desc' => 'wykres obszarowy', + 'category' => 'Raporty wg zgłoszeń', + ], + + 'reportLineNbTicket' => [ + 'title' => 'Zmiana ilości zgłoszeń w czasie', + 'desc' => 'wykres liniowy', + 'category' => 'Raporty wg zgłoszeń', + ], + + 'reportGlineNbTicket' => [ + 'title' => 'Zmiana ilości zgłoszeń w czasie (wg ich statusu)', + 'desc' => 'wykres liniowy', + 'category' => 'Raporty wg zgłoszeń', + ], + + 'reportGareaNbTicket' => [ + 'title' => 'Zmiana ilości zgłoszeń w czasie (wg ich statusu)', + 'desc' => 'wykres obszarowy', + 'category' => 'Raporty wg zgłoszeń', + ], + + 'reportVstackbarNbTicket' => [ + 'title' => 'Zmiana ilości zgłoszeń w czasie (wg ich statusu)', + 'desc' => 'wykres kolumnowy zestawiony', + 'category' => 'Raporty wg zgłoszeń', + ], + + 'reportSunburstTicketByCategories' => [ + 'title' => 'Dystrybucja zgłoszeń wg kategorii i podkategorii', + 'desc' => 'Donut', + 'category' => 'Raporty wg kategorii', + ], + + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Zgłoszenia wg statusu z rozbiciem na przypisanych techników', + 'desc' => 'wykres kolumnowy zestawiony', + 'category' => 'Raporty wg zgłoszeń', + ], + + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Zgłoszenia wg lokalizacji zgłaszających', + 'desc' => 'wykres słupkowy', + 'category' => 'Raporty wg zgłaszających', + ], ]; diff --git a/locales/reports_locales/helpdesk_pt_BR.php b/locales/reports_locales/helpdesk_pt_BR.php index 778a5766..41bae798 100644 --- a/locales/reports_locales/helpdesk_pt_BR.php +++ b/locales/reports_locales/helpdesk_pt_BR.php @@ -30,76 +30,75 @@ global $LANG; -$LANG['plugin_mreporting']['Helpdesk']['title'] = "Helpdesk"; -$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByEntity']['title'] = "Nº de chamados por entidade"; -$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByEntity']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByEntity']['category'] = "Por entidade"; - -$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketNumberByEntity']['title'] = "Nº de chamados por entidade"; -$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketNumberByEntity']['desc'] = "Pizza"; -$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketNumberByEntity']['category'] = "Por entidade"; - -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByCatAndEntity']['title'] = "Nº de chamados por categoria e entidade"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByCatAndEntity']['desc'] = "Barras agrupadas"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByCatAndEntity']['category'] = "Por entidade"; - -$LANG['plugin_mreporting']['Helpdesk']['reportPieTopTenAuthor']['title'] = "Top 10 requerentes"; -$LANG['plugin_mreporting']['Helpdesk']['reportPieTopTenAuthor']['desc'] = "Pizza"; -$LANG['plugin_mreporting']['Helpdesk']['reportPieTopTenAuthor']['category'] = "Por requerente"; - -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenTicketNumberByCategoryAndByType']['title'] = "Nº de chamados abertos por categoria e tipo"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenTicketNumberByCategoryAndByType']['desc'] = "Barras agrupadas"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenTicketNumberByCategoryAndByType']['category'] = "Por categoria"; - -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarCloseTicketNumberByCategoryAndByType']['title'] = "Nº de chamados fechados por categoria e tipo"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarCloseTicketNumberByCategoryAndByType']['desc'] = "Barras agrupadas"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarCloseTicketNumberByCategoryAndByType']['category'] = "Por categoria"; - -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenedTicketNumberByCategory']['title'] = "Nº de chamados abertos por categoria e status"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenedTicketNumberByCategory']['desc'] = "Barras agrupadas"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenedTicketNumberByCategory']['category'] = "Por categoria"; - -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByService']['title'] = "Nº de chamados abertos e fechados por serviço"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByService']['desc'] = "Barras agrupadas"; -$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByService']['category'] = "Por serviço"; - -$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedAndClosed']['title'] = "Nº de chamados abertos e fechados"; -$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedAndClosed']['desc'] = "Pizza"; -$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedAndClosed']['category'] = "Por chamado"; - -$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedbyStatus']['title'] = "Nº de chamados abertos por status"; -$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedbyStatus']['desc'] = "Pizza"; -$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedbyStatus']['category'] = "Por chamado"; - -$LANG['plugin_mreporting']['Helpdesk']['reportAreaNbTicket']['title'] = "Nº de evolução dos chamados ao longo do período"; -$LANG['plugin_mreporting']['Helpdesk']['reportAreaNbTicket']['desc'] = "Analítico"; -$LANG['plugin_mreporting']['Helpdesk']['reportAreaNbTicket']['category'] = "Por chamado"; - -$LANG['plugin_mreporting']['Helpdesk']['reportLineNbTicket']['title'] = "Nº de evolução dos chamados ao longo do período"; -$LANG['plugin_mreporting']['Helpdesk']['reportLineNbTicket']['desc'] = "Linha"; -$LANG['plugin_mreporting']['Helpdesk']['reportLineNbTicket']['category'] = "Por chamado"; - -$LANG['plugin_mreporting']['Helpdesk']['reportGlineNbTicket']['title'] = "Nº de evolução dos chamados ao longo do período (por status)"; -$LANG['plugin_mreporting']['Helpdesk']['reportGlineNbTicket']['desc'] = "Linhas"; -$LANG['plugin_mreporting']['Helpdesk']['reportGlineNbTicket']['category'] = "Por chamado"; - -$LANG['plugin_mreporting']['Helpdesk']['reportGareaNbTicket']['title'] = "Nº de evolução dos chamados ao longo do período (por status)"; -$LANG['plugin_mreporting']['Helpdesk']['reportGareaNbTicket']['desc'] = "Analítico"; -$LANG['plugin_mreporting']['Helpdesk']['reportGareaNbTicket']['category'] = "Por chamado"; - -$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarNbTicket']['title'] = "Nº de evolução dos chamados ao longo do período (por status)"; -$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarNbTicket']['desc'] = "Barras empilhadas"; -$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarNbTicket']['category'] = "Por chamado"; - -$LANG['plugin_mreporting']['Helpdesk']['reportSunburstTicketByCategories']['title'] = "Distribuição de chamados por categoria e subcategorias"; -$LANG['plugin_mreporting']['Helpdesk']['reportSunburstTicketByCategories']['desc'] = "Donut"; -$LANG['plugin_mreporting']['Helpdesk']['reportSunburstTicketByCategories']['category'] = "Por categoria"; - -$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarTicketStatusByTechnician']['title'] = "Nº de chamados por status e técnico"; -$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarTicketStatusByTechnician']['desc'] = "Stacked bars"; -$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarTicketStatusByTechnician']['category'] = "Por chamado"; - -$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByLocation']['title'] = "Nº de chamados por localização do requerente"; -$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByLocation']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByLocation']['category'] = "Por requerente"; - +$LANG['plugin_mreporting']['Helpdesk']['title'] = 'Helpdesk'; +$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByEntity']['title'] = 'Nº de chamados por entidade'; +$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByEntity']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByEntity']['category'] = 'Por entidade'; + +$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketNumberByEntity']['title'] = 'Nº de chamados por entidade'; +$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketNumberByEntity']['desc'] = 'Pizza'; +$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketNumberByEntity']['category'] = 'Por entidade'; + +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByCatAndEntity']['title'] = 'Nº de chamados por categoria e entidade'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByCatAndEntity']['desc'] = 'Barras agrupadas'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByCatAndEntity']['category'] = 'Por entidade'; + +$LANG['plugin_mreporting']['Helpdesk']['reportPieTopTenAuthor']['title'] = 'Top 10 requerentes'; +$LANG['plugin_mreporting']['Helpdesk']['reportPieTopTenAuthor']['desc'] = 'Pizza'; +$LANG['plugin_mreporting']['Helpdesk']['reportPieTopTenAuthor']['category'] = 'Por requerente'; + +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenTicketNumberByCategoryAndByType']['title'] = 'Nº de chamados abertos por categoria e tipo'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenTicketNumberByCategoryAndByType']['desc'] = 'Barras agrupadas'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenTicketNumberByCategoryAndByType']['category'] = 'Por categoria'; + +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarCloseTicketNumberByCategoryAndByType']['title'] = 'Nº de chamados fechados por categoria e tipo'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarCloseTicketNumberByCategoryAndByType']['desc'] = 'Barras agrupadas'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarCloseTicketNumberByCategoryAndByType']['category'] = 'Por categoria'; + +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenedTicketNumberByCategory']['title'] = 'Nº de chamados abertos por categoria e status'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenedTicketNumberByCategory']['desc'] = 'Barras agrupadas'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarOpenedTicketNumberByCategory']['category'] = 'Por categoria'; + +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByService']['title'] = 'Nº de chamados abertos e fechados por serviço'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByService']['desc'] = 'Barras agrupadas'; +$LANG['plugin_mreporting']['Helpdesk']['reportHgbarTicketNumberByService']['category'] = 'Por serviço'; + +$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedAndClosed']['title'] = 'Nº de chamados abertos e fechados'; +$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedAndClosed']['desc'] = 'Pizza'; +$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedAndClosed']['category'] = 'Por chamado'; + +$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedbyStatus']['title'] = 'Nº de chamados abertos por status'; +$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedbyStatus']['desc'] = 'Pizza'; +$LANG['plugin_mreporting']['Helpdesk']['reportPieTicketOpenedbyStatus']['category'] = 'Por chamado'; + +$LANG['plugin_mreporting']['Helpdesk']['reportAreaNbTicket']['title'] = 'Nº de evolução dos chamados ao longo do período'; +$LANG['plugin_mreporting']['Helpdesk']['reportAreaNbTicket']['desc'] = 'Analítico'; +$LANG['plugin_mreporting']['Helpdesk']['reportAreaNbTicket']['category'] = 'Por chamado'; + +$LANG['plugin_mreporting']['Helpdesk']['reportLineNbTicket']['title'] = 'Nº de evolução dos chamados ao longo do período'; +$LANG['plugin_mreporting']['Helpdesk']['reportLineNbTicket']['desc'] = 'Linha'; +$LANG['plugin_mreporting']['Helpdesk']['reportLineNbTicket']['category'] = 'Por chamado'; + +$LANG['plugin_mreporting']['Helpdesk']['reportGlineNbTicket']['title'] = 'Nº de evolução dos chamados ao longo do período (por status)'; +$LANG['plugin_mreporting']['Helpdesk']['reportGlineNbTicket']['desc'] = 'Linhas'; +$LANG['plugin_mreporting']['Helpdesk']['reportGlineNbTicket']['category'] = 'Por chamado'; + +$LANG['plugin_mreporting']['Helpdesk']['reportGareaNbTicket']['title'] = 'Nº de evolução dos chamados ao longo do período (por status)'; +$LANG['plugin_mreporting']['Helpdesk']['reportGareaNbTicket']['desc'] = 'Analítico'; +$LANG['plugin_mreporting']['Helpdesk']['reportGareaNbTicket']['category'] = 'Por chamado'; + +$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarNbTicket']['title'] = 'Nº de evolução dos chamados ao longo do período (por status)'; +$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarNbTicket']['desc'] = 'Barras empilhadas'; +$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarNbTicket']['category'] = 'Por chamado'; + +$LANG['plugin_mreporting']['Helpdesk']['reportSunburstTicketByCategories']['title'] = 'Distribuição de chamados por categoria e subcategorias'; +$LANG['plugin_mreporting']['Helpdesk']['reportSunburstTicketByCategories']['desc'] = 'Donut'; +$LANG['plugin_mreporting']['Helpdesk']['reportSunburstTicketByCategories']['category'] = 'Por categoria'; + +$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarTicketStatusByTechnician']['title'] = 'Nº de chamados por status e técnico'; +$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarTicketStatusByTechnician']['desc'] = 'Stacked bars'; +$LANG['plugin_mreporting']['Helpdesk']['reportVstackbarTicketStatusByTechnician']['category'] = 'Por chamado'; + +$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByLocation']['title'] = 'Nº de chamados por localização do requerente'; +$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByLocation']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Helpdesk']['reportHbarTicketNumberByLocation']['category'] = 'Por requerente'; diff --git a/locales/reports_locales/helpdesk_pt_PT.php b/locales/reports_locales/helpdesk_pt_PT.php index 37cea60b..231c3bdd 100644 --- a/locales/reports_locales/helpdesk_pt_PT.php +++ b/locales/reports_locales/helpdesk_pt_PT.php @@ -30,95 +30,95 @@ global $LANG; $LANG['plugin_mreporting']['Helpdesk'] = [ - 'title' => "Helpdesk", - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Número de indidências por Entidade", - 'desc' => "Barras", - 'category' => "Por entidade", - ], - 'reportPieTicketNumberByEntity' => [ - 'title' => "Número de indidências por Entidade", - 'desc' => "Circular", - 'category' => "Por entidade", - ], - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Número de indidências por Categoria e Entidade", - 'desc' => "Barras Agrupadas", - 'category' => "Por entidade", - ], - 'reportPieTopTenAuthor' => [ - 'title' => "Top 10 solicitantes", - 'desc' => "Circular", - 'category' => "Por solicitante", - ], - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Número de indidências abertas por Categoria e Tipo", - 'desc' => "Barras Agrupadas", - 'category' => "Por categoria", - ], - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Número de indidências fechadas por Categoria e Tipo", - 'desc' => "Barras Agrupadas", - 'category' => "Por categoria", - ], - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Número de indidências abertas por Categoria e Estado", - 'desc' => "Barras Agrupadas", - 'category' => "Por categoria", - ], - 'reportHgbarTicketNumberByService' => [ - 'title' => "Número de indidências abertas e fechadas por serviço", - 'desc' => "Barras Agrupadas", - 'category' => "Por serviço", - ], - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Número de indidências abertas e fechadas", - 'desc' => "Circular", - 'category' => "Por indidência", - ], - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Número de indidências abertas por estado", - 'desc' => "Circular", - 'category' => "Por indidência", - ], - 'reportAreaNbTicket' => [ - 'title' => "Evolução do número de indidências num perido", - 'desc' => "Area", - 'category' => "Por indidência", - ], - 'reportLineNbTicket' => [ - 'title' => "Evolução do número de indidências num perido", - 'desc' => "Linhas", - 'category' => "Por indidência", - ], - 'reportGlineNbTicket' => [ - 'title' => "Evolução do número de indidências num perido (por estado)", - 'desc' => "Linhas", - 'category' => "Por indidência", - ], - 'reportGareaNbTicket' => [ - 'title' => "Evolução do número de indidências num perido (por estado)", - 'desc' => "Area", - 'category' => "Por indidência", - ], - 'reportVstackbarNbTicket' => [ - 'title' => "Evolução do número de indidências num perido (por estado)", - 'desc' => "Barras Empilhadas", - 'category' => "Por indidência", - ], - 'reportSunburstTicketByCategories' => [ - 'title' => "Distribuição de indidências por categoria e categorias filho", - 'desc' => "Donut", - 'category' => "Por categoria", - ], - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Número de indidências por estado e técnico", - 'desc' => "Barras Empilhadas", - 'category' => "Por indidência", - ], - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Número de indidências por solicitante e local", - 'desc' => "Barras", - 'category' => "Por solicitante", - ], + 'title' => 'Helpdesk', + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Número de indidências por Entidade', + 'desc' => 'Barras', + 'category' => 'Por entidade', + ], + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Número de indidências por Entidade', + 'desc' => 'Circular', + 'category' => 'Por entidade', + ], + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Número de indidências por Categoria e Entidade', + 'desc' => 'Barras Agrupadas', + 'category' => 'Por entidade', + ], + 'reportPieTopTenAuthor' => [ + 'title' => 'Top 10 solicitantes', + 'desc' => 'Circular', + 'category' => 'Por solicitante', + ], + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Número de indidências abertas por Categoria e Tipo', + 'desc' => 'Barras Agrupadas', + 'category' => 'Por categoria', + ], + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Número de indidências fechadas por Categoria e Tipo', + 'desc' => 'Barras Agrupadas', + 'category' => 'Por categoria', + ], + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Número de indidências abertas por Categoria e Estado', + 'desc' => 'Barras Agrupadas', + 'category' => 'Por categoria', + ], + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Número de indidências abertas e fechadas por serviço', + 'desc' => 'Barras Agrupadas', + 'category' => 'Por serviço', + ], + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Número de indidências abertas e fechadas', + 'desc' => 'Circular', + 'category' => 'Por indidência', + ], + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Número de indidências abertas por estado', + 'desc' => 'Circular', + 'category' => 'Por indidência', + ], + 'reportAreaNbTicket' => [ + 'title' => 'Evolução do número de indidências num perido', + 'desc' => 'Area', + 'category' => 'Por indidência', + ], + 'reportLineNbTicket' => [ + 'title' => 'Evolução do número de indidências num perido', + 'desc' => 'Linhas', + 'category' => 'Por indidência', + ], + 'reportGlineNbTicket' => [ + 'title' => 'Evolução do número de indidências num perido (por estado)', + 'desc' => 'Linhas', + 'category' => 'Por indidência', + ], + 'reportGareaNbTicket' => [ + 'title' => 'Evolução do número de indidências num perido (por estado)', + 'desc' => 'Area', + 'category' => 'Por indidência', + ], + 'reportVstackbarNbTicket' => [ + 'title' => 'Evolução do número de indidências num perido (por estado)', + 'desc' => 'Barras Empilhadas', + 'category' => 'Por indidência', + ], + 'reportSunburstTicketByCategories' => [ + 'title' => 'Distribuição de indidências por categoria e categorias filho', + 'desc' => 'Donut', + 'category' => 'Por categoria', + ], + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Número de indidências por estado e técnico', + 'desc' => 'Barras Empilhadas', + 'category' => 'Por indidência', + ], + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Número de indidências por solicitante e local', + 'desc' => 'Barras', + 'category' => 'Por solicitante', + ], ]; diff --git a/locales/reports_locales/helpdesk_ru_RU.php b/locales/reports_locales/helpdesk_ru_RU.php index 32b6cace..e4e3dd25 100644 --- a/locales/reports_locales/helpdesk_ru_RU.php +++ b/locales/reports_locales/helpdesk_ru_RU.php @@ -31,113 +31,113 @@ global $LANG; $LANG['plugin_mreporting']['Helpdesk'] = [ - 'title' => "Служба поддержки", - - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Количество заявок по организации", - 'desc' => "Бары", - 'category' => "По организации", - ], - - 'reportPieTicketNumberByEntity' => [ - 'title' => "Количество заявок по организации", - 'desc' => "Пирог", - 'category' => "По организации", - ], - - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Количество заявок по категории и организации", - 'desc' => "Группированый бар", - 'category' => "По организации", - ], - - 'reportPieTopTenAuthor' => [ - 'title' => "Топ 10 инициаторов запроса", - 'desc' => "Пирог", - 'category' => "По заказчику", - ], - - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Количество открытых заявок по категории и типу", - 'desc' => "Группированый бар", - 'category' => "По категории", - ], - - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Количество закрытых заявок по категории и типу", - 'desc' => "Группированый бар", - 'category' => "По категории", - ], - - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Количество открытых заявок по категории и статусу", - 'desc' => "Группированый бар", - 'category' => "По категории", - ], - - 'reportHgbarTicketNumberByService' => [ - 'title' => "Количество открытых и закрытых заявок по сервису", - 'desc' => "Группированый бар", - 'category' => "По сервису", - ], - - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Количество открытых и закрытых заявок", - 'desc' => "Пирог", - 'category' => "По заявке", - ], - - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Количество развивающихся заявок за период (по статусу)", - 'desc' => "Пирог", - 'category' => "По заявке", - ], - - 'reportAreaNbTicket' => [ - 'title' => "Количество развивающихся заявок за период", - 'desc' => "Область", - 'category' => "По заявке", - ], - - 'reportLineNbTicket' => [ - 'title' => "Количество развивающихся заявок за период", - 'desc' => "Линия", - 'category' => "По заявке", - ], - - 'reportGlineNbTicket' => [ - 'title' => "Количество развивающихся заявок за период (по статусу)", - 'desc' => "Линия", - 'category' => "По заявке", - ], - - 'reportGareaNbTicket' => [ - 'title' => "Количество развивающихся заявок за период (по статусу)", - 'desc' => "Область", - 'category' => "По заявке", - ], - - 'reportVstackbarNbTicket' => [ - 'title' => "Количество развивающихся заявок за период (по статусу)", - 'desc' => "Многоярусные бары", - 'category' => "По заявке", - ], - - 'reportSunburstTicketByCategories' => [ - 'title' => "Распределение заявок по категориям и подкатегориям", - 'desc' => "Бублик", - 'category' => "По категории", - ], - - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Количество заявок по статусу и специалисту", - 'desc' => "Многоярусные бары", - 'category' => "По заявке", - ], - - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Количество заявок по местоположению заказчика", - 'desc' => "Бары", - 'category' => "По заказчику", - ], -]; \ No newline at end of file + 'title' => 'Служба поддержки', + + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Количество заявок по организации', + 'desc' => 'Бары', + 'category' => 'По организации', + ], + + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Количество заявок по организации', + 'desc' => 'Пирог', + 'category' => 'По организации', + ], + + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Количество заявок по категории и организации', + 'desc' => 'Группированый бар', + 'category' => 'По организации', + ], + + 'reportPieTopTenAuthor' => [ + 'title' => 'Топ 10 инициаторов запроса', + 'desc' => 'Пирог', + 'category' => 'По заказчику', + ], + + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Количество открытых заявок по категории и типу', + 'desc' => 'Группированый бар', + 'category' => 'По категории', + ], + + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Количество закрытых заявок по категории и типу', + 'desc' => 'Группированый бар', + 'category' => 'По категории', + ], + + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Количество открытых заявок по категории и статусу', + 'desc' => 'Группированый бар', + 'category' => 'По категории', + ], + + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Количество открытых и закрытых заявок по сервису', + 'desc' => 'Группированый бар', + 'category' => 'По сервису', + ], + + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Количество открытых и закрытых заявок', + 'desc' => 'Пирог', + 'category' => 'По заявке', + ], + + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Количество развивающихся заявок за период (по статусу)', + 'desc' => 'Пирог', + 'category' => 'По заявке', + ], + + 'reportAreaNbTicket' => [ + 'title' => 'Количество развивающихся заявок за период', + 'desc' => 'Область', + 'category' => 'По заявке', + ], + + 'reportLineNbTicket' => [ + 'title' => 'Количество развивающихся заявок за период', + 'desc' => 'Линия', + 'category' => 'По заявке', + ], + + 'reportGlineNbTicket' => [ + 'title' => 'Количество развивающихся заявок за период (по статусу)', + 'desc' => 'Линия', + 'category' => 'По заявке', + ], + + 'reportGareaNbTicket' => [ + 'title' => 'Количество развивающихся заявок за период (по статусу)', + 'desc' => 'Область', + 'category' => 'По заявке', + ], + + 'reportVstackbarNbTicket' => [ + 'title' => 'Количество развивающихся заявок за период (по статусу)', + 'desc' => 'Многоярусные бары', + 'category' => 'По заявке', + ], + + 'reportSunburstTicketByCategories' => [ + 'title' => 'Распределение заявок по категориям и подкатегориям', + 'desc' => 'Бублик', + 'category' => 'По категории', + ], + + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Количество заявок по статусу и специалисту', + 'desc' => 'Многоярусные бары', + 'category' => 'По заявке', + ], + + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Количество заявок по местоположению заказчика', + 'desc' => 'Бары', + 'category' => 'По заказчику', + ], +]; diff --git a/locales/reports_locales/helpdesk_sk_SK.php b/locales/reports_locales/helpdesk_sk_SK.php index 82f892c1..29c8c6d3 100644 --- a/locales/reports_locales/helpdesk_sk_SK.php +++ b/locales/reports_locales/helpdesk_sk_SK.php @@ -31,113 +31,113 @@ global $LANG; $LANG['plugin_mreporting']['Helpdesk'] = [ - 'title' => "Helpdesk", - - 'reportHbarTicketNumberByEntity' => [ - 'title' => "Počet požiadaviek podľa entity", - 'desc' => "Pruhový", - 'category' => "Podľa entity", - ], - - 'reportPieTicketNumberByEntity' => [ - 'title' => "Počet požiadaviek podľa entity", - 'desc' => "Koláčový", - 'category' => "Podľa entity", - ], - - 'reportHgbarTicketNumberByCatAndEntity' => [ - 'title' => "Počet požiadaviek podľa kategórie a entity", - 'desc' => "Skupinový pruhový", - 'category' => "Podľa entity", - ], - - 'reportPieTopTenAuthor' => [ - 'title' => "Desať najčastejších žiadateľov", - 'desc' => "Koláčový", - 'category' => "Podľa žiadateľa", - ], - - 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ - 'title' => "Počet otvorených požiadaviek podľa kategórie a typu", - 'desc' => "Skupinový pruhový", - 'category' => "Podľa kategórie", - ], - - 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ - 'title' => "Počet uzavretých požiadaviek podľa kategórie a typu", - 'desc' => "Skupinový pruhový", - 'category' => "Podľa kategórie", - ], - - 'reportHgbarOpenedTicketNumberByCategory' => [ - 'title' => "Počet otvorených požiadaviek podľa kategórie a stavu", - 'desc' => "Skupinový pruhový", - 'category' => "Podľa kategórie", - ], - - 'reportHgbarTicketNumberByService' => [ - 'title' => "Počet otvorených a uzavretých požiadaviek podľa služby", - 'desc' => "Skupinový pruhový", - 'category' => "Podľa služby", - ], - - 'reportPieTicketOpenedAndClosed' => [ - 'title' => "Počet otvorených a uzavretých požiadaviek", - 'desc' => "Koláčový", - 'category' => "Podľa požiadavky", - ], - - 'reportPieTicketOpenedbyStatus' => [ - 'title' => "Počet otvorených požiadaviek podľa stavu", - 'desc' => "Koláčový", - 'category' => "Podľa požiadavky", - ], - - 'reportAreaNbTicket' => [ - 'title' => "Vývoj počtu požiadaviek za obdobie", - 'desc' => "Plošný", - 'category' => "Podľa požiadavky", - ], - - 'reportLineNbTicket' => [ - 'title' => "Vývoj počtu požiadaviek za obdobie", - 'desc' => "Čiarový", - 'category' => "Podľa požiadavky", - ], - - 'reportGlineNbTicket' => [ - 'title' => "Vývoj počtu požiadaviek za obdobie (podľa stavu)", - 'desc' => "Čiarový", - 'category' => "Podľa požiadavky", - ], - - 'reportGareaNbTicket' => [ - 'title' => "Vývoj počtu požiadaviek za obdobie (podľa stavu)", - 'desc' => "Plošný", - 'category' => "Podľa požiadavky", - ], - - 'reportVstackbarNbTicket' => [ - 'title' => "Vývoj počtu požiadaviek za obdobie (podľa stavu)", - 'desc' => "Skladaný pruhový", - 'category' => "Podľa požiadavky", - ], - - 'reportSunburstTicketByCategories' => [ - 'title' => "Distribúcia požiadaviek podľa kategórie a podkategórie", - 'desc' => "Prstencový", - 'category' => "Podľa kategórie", - ], - - 'reportVstackbarTicketStatusByTechnician' => [ - 'title' => "Počet požiadaviek podľa stavu a technika", - 'desc' => "Skladaný pruhový", - 'category' => "Podľa požiadavky", - ], - - 'reportHbarTicketNumberByLocation' => [ - 'title' => "Počet požiadaviek podľa umiestnenia žiadateľa", - 'desc' => "Pruhový", - 'category' => "Podľa žiadateľa", - ], -]; \ No newline at end of file + 'title' => 'Helpdesk', + + 'reportHbarTicketNumberByEntity' => [ + 'title' => 'Počet požiadaviek podľa entity', + 'desc' => 'Pruhový', + 'category' => 'Podľa entity', + ], + + 'reportPieTicketNumberByEntity' => [ + 'title' => 'Počet požiadaviek podľa entity', + 'desc' => 'Koláčový', + 'category' => 'Podľa entity', + ], + + 'reportHgbarTicketNumberByCatAndEntity' => [ + 'title' => 'Počet požiadaviek podľa kategórie a entity', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podľa entity', + ], + + 'reportPieTopTenAuthor' => [ + 'title' => 'Desať najčastejších žiadateľov', + 'desc' => 'Koláčový', + 'category' => 'Podľa žiadateľa', + ], + + 'reportHgbarOpenTicketNumberByCategoryAndByType' => [ + 'title' => 'Počet otvorených požiadaviek podľa kategórie a typu', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podľa kategórie', + ], + + 'reportHgbarCloseTicketNumberByCategoryAndByType' => [ + 'title' => 'Počet uzavretých požiadaviek podľa kategórie a typu', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podľa kategórie', + ], + + 'reportHgbarOpenedTicketNumberByCategory' => [ + 'title' => 'Počet otvorených požiadaviek podľa kategórie a stavu', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podľa kategórie', + ], + + 'reportHgbarTicketNumberByService' => [ + 'title' => 'Počet otvorených a uzavretých požiadaviek podľa služby', + 'desc' => 'Skupinový pruhový', + 'category' => 'Podľa služby', + ], + + 'reportPieTicketOpenedAndClosed' => [ + 'title' => 'Počet otvorených a uzavretých požiadaviek', + 'desc' => 'Koláčový', + 'category' => 'Podľa požiadavky', + ], + + 'reportPieTicketOpenedbyStatus' => [ + 'title' => 'Počet otvorených požiadaviek podľa stavu', + 'desc' => 'Koláčový', + 'category' => 'Podľa požiadavky', + ], + + 'reportAreaNbTicket' => [ + 'title' => 'Vývoj počtu požiadaviek za obdobie', + 'desc' => 'Plošný', + 'category' => 'Podľa požiadavky', + ], + + 'reportLineNbTicket' => [ + 'title' => 'Vývoj počtu požiadaviek za obdobie', + 'desc' => 'Čiarový', + 'category' => 'Podľa požiadavky', + ], + + 'reportGlineNbTicket' => [ + 'title' => 'Vývoj počtu požiadaviek za obdobie (podľa stavu)', + 'desc' => 'Čiarový', + 'category' => 'Podľa požiadavky', + ], + + 'reportGareaNbTicket' => [ + 'title' => 'Vývoj počtu požiadaviek za obdobie (podľa stavu)', + 'desc' => 'Plošný', + 'category' => 'Podľa požiadavky', + ], + + 'reportVstackbarNbTicket' => [ + 'title' => 'Vývoj počtu požiadaviek za obdobie (podľa stavu)', + 'desc' => 'Skladaný pruhový', + 'category' => 'Podľa požiadavky', + ], + + 'reportSunburstTicketByCategories' => [ + 'title' => 'Distribúcia požiadaviek podľa kategórie a podkategórie', + 'desc' => 'Prstencový', + 'category' => 'Podľa kategórie', + ], + + 'reportVstackbarTicketStatusByTechnician' => [ + 'title' => 'Počet požiadaviek podľa stavu a technika', + 'desc' => 'Skladaný pruhový', + 'category' => 'Podľa požiadavky', + ], + + 'reportHbarTicketNumberByLocation' => [ + 'title' => 'Počet požiadaviek podľa umiestnenia žiadateľa', + 'desc' => 'Pruhový', + 'category' => 'Podľa žiadateľa', + ], +]; diff --git a/locales/reports_locales/helpdeskplus_cs_CZ.php b/locales/reports_locales/helpdeskplus_cs_CZ.php index 035ca7ad..06ee1453 100644 --- a/locales/reports_locales/helpdeskplus_cs_CZ.php +++ b/locales/reports_locales/helpdeskplus_cs_CZ.php @@ -31,110 +31,110 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Služba podpory – pokročilé', - - // MISC LOCALES - 'backlogs' => "Nahromaděná nedodělaná práce", - 'opened' => "Otevřené", - 'period' => "Období", - 'backlogstatus' => "Stav který zobrazit", - 'slaobserved' => "SLA pozorováno", - 'slanotobserved'=> "SLA nepozorováno", - 'observed' => "pozorováno", - 'notobserved' => "nepozorováno", - - - // SELECTOR - 'selector' => [ - 'slas' => "SLA smlouvy", - 'categories' => "Kategorie", - ], - - - // GENERAL REPORTS - 'reportGlineBacklogs' => [ - 'title' => "Nashromážděná nedodělaná práce", - 'desc' => "", - 'category' => "Celkové", - ], - - 'reportVstackbarLifetime' => [ - 'title' => "Stáří požadavku", - 'desc' => "", - 'category' => "Celkové", - ], - - 'reportVstackbarTicketsgroups' => [ - 'title' => "Požadavky podle skupiny", - 'desc' => "", - 'category' => "Celkové", - ], - - 'reportVstackbarTicketstech' => [ - 'title' => "Požadavky podle technika", - 'desc' => "", - 'category' => "Celkové", - ], - - 'reportVstackbarWorkflow' => [ - 'title' => "Orientační fronty", - 'desc' => "", - 'category' => "Celkové", - ], - - 'reportHbarTopcategory' => [ - 'title' => "Nejčastější kategorie", - 'desc' => "", - 'category' => "Celkové", - ], - - 'reportHbarTopapplicant' => [ - 'title' => "Nejčastější žádající skupiny", - 'desc' => "", - 'category' => "Celkové", - ], - - 'reportVstackbarGroupChange' => [ - 'title' => "Počty skupinových změn", - 'desc' => "", - 'category' => "Celkové", - ], - - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Porovnání akčních časů úkolu a prodlevy vyřešení", - 'desc' => "", - 'category' => "Celkové", - ], - - - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Počty požadavků podle SLA", - 'desc' => "", - 'category' => "Podle SLA", - ], - - 'reportGlineNbTicketBySla' => [ - 'title' => "Události v požadavku podle SLA", - 'desc' => "", - 'category' => "Podle SLA", - ], - - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Požadavky v jednotlivých SLA seřazené podle kategorií", - 'desc' => "", - 'category' => "Podle SLA", - ], - - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Požadavky v jednotlivých SLA seřazené podle techniků", - 'desc' => "", - 'category' => "Podle SLA", - ], - - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Požadavky v jednotlivých SLA seřazené podle skupin", - 'desc' => "", - 'category' => "Podle SLA", - ], + 'title' => 'Služba podpory – pokročilé', + + // MISC LOCALES + 'backlogs' => 'Nahromaděná nedodělaná práce', + 'opened' => 'Otevřené', + 'period' => 'Období', + 'backlogstatus' => 'Stav který zobrazit', + 'slaobserved' => 'SLA pozorováno', + 'slanotobserved' => 'SLA nepozorováno', + 'observed' => 'pozorováno', + 'notobserved' => 'nepozorováno', + + + // SELECTOR + 'selector' => [ + 'slas' => 'SLA smlouvy', + 'categories' => 'Kategorie', + ], + + + // GENERAL REPORTS + 'reportGlineBacklogs' => [ + 'title' => 'Nashromážděná nedodělaná práce', + 'desc' => '', + 'category' => 'Celkové', + ], + + 'reportVstackbarLifetime' => [ + 'title' => 'Stáří požadavku', + 'desc' => '', + 'category' => 'Celkové', + ], + + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Požadavky podle skupiny', + 'desc' => '', + 'category' => 'Celkové', + ], + + 'reportVstackbarTicketstech' => [ + 'title' => 'Požadavky podle technika', + 'desc' => '', + 'category' => 'Celkové', + ], + + 'reportVstackbarWorkflow' => [ + 'title' => 'Orientační fronty', + 'desc' => '', + 'category' => 'Celkové', + ], + + 'reportHbarTopcategory' => [ + 'title' => 'Nejčastější kategorie', + 'desc' => '', + 'category' => 'Celkové', + ], + + 'reportHbarTopapplicant' => [ + 'title' => 'Nejčastější žádající skupiny', + 'desc' => '', + 'category' => 'Celkové', + ], + + 'reportVstackbarGroupChange' => [ + 'title' => 'Počty skupinových změn', + 'desc' => '', + 'category' => 'Celkové', + ], + + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Porovnání akčních časů úkolu a prodlevy vyřešení', + 'desc' => '', + 'category' => 'Celkové', + ], + + + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Počty požadavků podle SLA', + 'desc' => '', + 'category' => 'Podle SLA', + ], + + 'reportGlineNbTicketBySla' => [ + 'title' => 'Události v požadavku podle SLA', + 'desc' => '', + 'category' => 'Podle SLA', + ], + + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Požadavky v jednotlivých SLA seřazené podle kategorií', + 'desc' => '', + 'category' => 'Podle SLA', + ], + + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Požadavky v jednotlivých SLA seřazené podle techniků', + 'desc' => '', + 'category' => 'Podle SLA', + ], + + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Požadavky v jednotlivých SLA seřazené podle skupin', + 'desc' => '', + 'category' => 'Podle SLA', + ], ]; diff --git a/locales/reports_locales/helpdeskplus_de_DE.php b/locales/reports_locales/helpdeskplus_de_DE.php index 2194560b..82eb882a 100644 --- a/locales/reports_locales/helpdeskplus_de_DE.php +++ b/locales/reports_locales/helpdeskplus_de_DE.php @@ -31,110 +31,110 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Helpdesk erweitert', - - // MISC LOCALES - 'backlogs' => "Backlogs", - 'opened' => "Erstellt", - 'period' => "Zeitraum", - 'backlogstatus' => "Status anzeigen", - 'slaobserved' => "SLA beaobachtet", - 'slanotobserved'=> "SLA nicht beaobachtet", - 'observed' => "Beobachtet", - 'notobserved' => "Nicht beaobachtet", - - - // SELECTOR - 'selector' => [ - 'slas' => "SLAs", - 'categories' => "Kategorien", - ], - - - // GENERAL REPORTS - 'reportGlineBacklogs' => [ - 'title' => "Backlog", - 'desc' => "", - 'category' => "Allgemein", - ], - - 'reportVstackbarLifetime' => [ - 'title' => "Ticketalter", - 'desc' => "", - 'category' => "Allgemein", - ], - - 'reportVstackbarTicketsgroups' => [ - 'title' => "Tickets pro Gruppe", - 'desc' => "", - 'category' => "Allgemein", - ], - - 'reportVstackbarTicketstech' => [ - 'title' => "Tickets pro Techniker", - 'desc' => "", - 'category' => "Allgemein", - ], - - 'reportVstackbarWorkflow' => [ - 'title' => "Orientation queues", - 'desc' => "", - 'category' => "Allgemein", - ], - - 'reportHbarTopcategory' => [ - 'title' => "TOP Kategorien", - 'desc' => "", - 'category' => "Allgemein", - ], - - 'reportHbarTopapplicant' => [ - 'title' => "TOP Anforderer Gruppen", - 'desc' => "", - 'category' => "Allgemein", - ], - - 'reportVstackbarGroupChange' => [ - 'title' => "Anzahl Gruppenänderungen", - 'desc' => "", - 'category' => "Allgemein", - ], - - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Vergleich Aufgabenzeit mit Lösungsdauer", - 'desc' => "", - 'category' => "Allgemein", - ], - - - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Anzahl Tickets pro SLA", - 'desc' => "", - 'category' => "Pro SLA", - ], - - 'reportGlineNbTicketBySla' => [ - 'title' => "Ticketentwicklung pro SLA", - 'desc' => "", - 'category' => "Pro SLA", - ], - - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Tickets pro SLA sortiert nach Kategorien", - 'desc' => "", - 'category' => "Pro SLA", - ], - - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Tickets pro SLA sortiert nach Techniker", - 'desc' => "", - 'category' => "Pro SLA", - ], - - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Tickets pro SLA sortiert nach Gruppen", - 'desc' => "", - 'category' => "Pro SLA", - ], + 'title' => 'Helpdesk erweitert', + + // MISC LOCALES + 'backlogs' => 'Backlogs', + 'opened' => 'Erstellt', + 'period' => 'Zeitraum', + 'backlogstatus' => 'Status anzeigen', + 'slaobserved' => 'SLA beaobachtet', + 'slanotobserved' => 'SLA nicht beaobachtet', + 'observed' => 'Beobachtet', + 'notobserved' => 'Nicht beaobachtet', + + + // SELECTOR + 'selector' => [ + 'slas' => 'SLAs', + 'categories' => 'Kategorien', + ], + + + // GENERAL REPORTS + 'reportGlineBacklogs' => [ + 'title' => 'Backlog', + 'desc' => '', + 'category' => 'Allgemein', + ], + + 'reportVstackbarLifetime' => [ + 'title' => 'Ticketalter', + 'desc' => '', + 'category' => 'Allgemein', + ], + + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Tickets pro Gruppe', + 'desc' => '', + 'category' => 'Allgemein', + ], + + 'reportVstackbarTicketstech' => [ + 'title' => 'Tickets pro Techniker', + 'desc' => '', + 'category' => 'Allgemein', + ], + + 'reportVstackbarWorkflow' => [ + 'title' => 'Orientation queues', + 'desc' => '', + 'category' => 'Allgemein', + ], + + 'reportHbarTopcategory' => [ + 'title' => 'TOP Kategorien', + 'desc' => '', + 'category' => 'Allgemein', + ], + + 'reportHbarTopapplicant' => [ + 'title' => 'TOP Anforderer Gruppen', + 'desc' => '', + 'category' => 'Allgemein', + ], + + 'reportVstackbarGroupChange' => [ + 'title' => 'Anzahl Gruppenänderungen', + 'desc' => '', + 'category' => 'Allgemein', + ], + + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Vergleich Aufgabenzeit mit Lösungsdauer', + 'desc' => '', + 'category' => 'Allgemein', + ], + + + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Anzahl Tickets pro SLA', + 'desc' => '', + 'category' => 'Pro SLA', + ], + + 'reportGlineNbTicketBySla' => [ + 'title' => 'Ticketentwicklung pro SLA', + 'desc' => '', + 'category' => 'Pro SLA', + ], + + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Tickets pro SLA sortiert nach Kategorien', + 'desc' => '', + 'category' => 'Pro SLA', + ], + + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Tickets pro SLA sortiert nach Techniker', + 'desc' => '', + 'category' => 'Pro SLA', + ], + + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Tickets pro SLA sortiert nach Gruppen', + 'desc' => '', + 'category' => 'Pro SLA', + ], ]; diff --git a/locales/reports_locales/helpdeskplus_en_GB.php b/locales/reports_locales/helpdeskplus_en_GB.php index a8ce3a14..ccc56fc0 100644 --- a/locales/reports_locales/helpdeskplus_en_GB.php +++ b/locales/reports_locales/helpdeskplus_en_GB.php @@ -31,110 +31,110 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Helpdesk Avancé', - - // MISC LOCALES - 'backlogs' => "Backlogs", - 'opened' => "Opened", - 'period' => "Period", - 'backlogstatus' => "Status to display", - 'slaobserved' => "SLA observed", - 'slanotobserved'=> "SLA not observed", - 'observed' => "observed", - 'notobserved' => "not observed", - - - // SELECTOR - 'selector' => [ - 'slas' => "SLAS", - 'categories' => "Categories", - ], - - - // GENERAL REPORTS - 'reportGlineBacklogs' => [ - 'title' => "Backlog", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarLifetime' => [ - 'title' => "Ticket age", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarTicketsgroups' => [ - 'title' => "Tickets per group", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarTicketstech' => [ - 'title' => "Tickets per technician", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarWorkflow' => [ - 'title' => "Orientation queues", - 'desc' => "", - 'category' => "General", - ], - - 'reportHbarTopcategory' => [ - 'title' => "TOP categories", - 'desc' => "", - 'category' => "General", - ], - - 'reportHbarTopapplicant' => [ - 'title' => "TOP requester groups", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarGroupChange' => [ - 'title' => "Number of group changes", - 'desc' => "", - 'category' => "General", - ], - - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Task action times and solve delay comparison", - 'desc' => "", - 'category' => "General", - ], - - - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Number of tickets per SLA", - 'desc' => "", - 'category' => "Per SLA", - ], - - 'reportGlineNbTicketBySla' => [ - 'title' => "Tickets evolution per SLA", - 'desc' => "", - 'category' => "Per SLA", - ], - - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Tickets per SLA ordered by categories", - 'desc' => "", - 'category' => "Per SLA", - ], - - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Tickets per SLA ordered by techicians", - 'desc' => "", - 'category' => "Per SLA", - ], - - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Tickets per SLA sorted by groups", - 'desc' => "", - 'category' => "Per SLA", - ], -]; \ No newline at end of file + 'title' => 'Helpdesk Avancé', + + // MISC LOCALES + 'backlogs' => 'Backlogs', + 'opened' => 'Opened', + 'period' => 'Period', + 'backlogstatus' => 'Status to display', + 'slaobserved' => 'SLA observed', + 'slanotobserved' => 'SLA not observed', + 'observed' => 'observed', + 'notobserved' => 'not observed', + + + // SELECTOR + 'selector' => [ + 'slas' => 'SLAS', + 'categories' => 'Categories', + ], + + + // GENERAL REPORTS + 'reportGlineBacklogs' => [ + 'title' => 'Backlog', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarLifetime' => [ + 'title' => 'Ticket age', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Tickets per group', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarTicketstech' => [ + 'title' => 'Tickets per technician', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarWorkflow' => [ + 'title' => 'Orientation queues', + 'desc' => '', + 'category' => 'General', + ], + + 'reportHbarTopcategory' => [ + 'title' => 'TOP categories', + 'desc' => '', + 'category' => 'General', + ], + + 'reportHbarTopapplicant' => [ + 'title' => 'TOP requester groups', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarGroupChange' => [ + 'title' => 'Number of group changes', + 'desc' => '', + 'category' => 'General', + ], + + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Task action times and solve delay comparison', + 'desc' => '', + 'category' => 'General', + ], + + + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Number of tickets per SLA', + 'desc' => '', + 'category' => 'Per SLA', + ], + + 'reportGlineNbTicketBySla' => [ + 'title' => 'Tickets evolution per SLA', + 'desc' => '', + 'category' => 'Per SLA', + ], + + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Tickets per SLA ordered by categories', + 'desc' => '', + 'category' => 'Per SLA', + ], + + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Tickets per SLA ordered by techicians', + 'desc' => '', + 'category' => 'Per SLA', + ], + + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Tickets per SLA sorted by groups', + 'desc' => '', + 'category' => 'Per SLA', + ], +]; diff --git a/locales/reports_locales/helpdeskplus_es_VE.php b/locales/reports_locales/helpdeskplus_es_VE.php index 73054048..61737681 100644 --- a/locales/reports_locales/helpdeskplus_es_VE.php +++ b/locales/reports_locales/helpdeskplus_es_VE.php @@ -31,110 +31,110 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Soporte avanzado', - - // MISC LOCALES - 'backlogs' => "Atrasos", - 'opened' => "Abierto", - 'period' => "Período", - 'backlogstatus' => "Estado para mostrar", - 'slaobserved' => "ANS supervisado", - 'slanotobserved'=> "ANS no supervisado", - 'observed' => "supervisado", - 'notobserved' => "no supervisado", - - - // SELECTOR - 'selector' => [ - 'slas' => "ANSs", - 'categories' => "Categorias", - ], - - - // GENERAL REPORTS - 'reportGlineBacklogs' => [ - 'title' => "Atraso", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarLifetime' => [ - 'title' => "Antiguedad del caso", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarTicketsgroups' => [ - 'title' => "Casos por grupo", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarTicketstech' => [ - 'title' => "Casos por técnico", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarWorkflow' => [ - 'title' => "Orientation queues", - 'desc' => "", - 'category' => "General", - ], - - 'reportHbarTopcategory' => [ - 'title' => "TOP categorías", - 'desc' => "", - 'category' => "General", - ], - - 'reportHbarTopapplicant' => [ - 'title' => "TOP grupos de solicitantes", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarGroupChange' => [ - 'title' => "Caso por numero de cambios de grupos", - 'desc' => "Agrupa los casos segun el numero de cambios de grupos", - 'category' => "General", - ], - - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Comparativa entre el retrazo de la solución y tiempo de ejecución", - 'desc' => "", - 'category' => "General", - ], - - - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Casos por ANS", - 'desc' => "", - 'category' => "Por ANS", - ], - - 'reportGlineNbTicketBySla' => [ - 'title' => "Evolución de casos por ANS", - 'desc' => "", - 'category' => "Por ANS", - ], - - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Casos por ANS ordenados por categorias", - 'desc' => "", - 'category' => "Por ANS", - ], - - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Casos por ANS ordenados por técnicos", - 'desc' => "", - 'category' => "Por ANS", - ], - - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Casos por ANS ordenados por grupos", - 'desc' => "", - 'category' => "Por ANS", - ], + 'title' => 'Soporte avanzado', + + // MISC LOCALES + 'backlogs' => 'Atrasos', + 'opened' => 'Abierto', + 'period' => 'Período', + 'backlogstatus' => 'Estado para mostrar', + 'slaobserved' => 'ANS supervisado', + 'slanotobserved' => 'ANS no supervisado', + 'observed' => 'supervisado', + 'notobserved' => 'no supervisado', + + + // SELECTOR + 'selector' => [ + 'slas' => 'ANSs', + 'categories' => 'Categorias', + ], + + + // GENERAL REPORTS + 'reportGlineBacklogs' => [ + 'title' => 'Atraso', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarLifetime' => [ + 'title' => 'Antiguedad del caso', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Casos por grupo', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarTicketstech' => [ + 'title' => 'Casos por técnico', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarWorkflow' => [ + 'title' => 'Orientation queues', + 'desc' => '', + 'category' => 'General', + ], + + 'reportHbarTopcategory' => [ + 'title' => 'TOP categorías', + 'desc' => '', + 'category' => 'General', + ], + + 'reportHbarTopapplicant' => [ + 'title' => 'TOP grupos de solicitantes', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarGroupChange' => [ + 'title' => 'Caso por numero de cambios de grupos', + 'desc' => 'Agrupa los casos segun el numero de cambios de grupos', + 'category' => 'General', + ], + + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Comparativa entre el retrazo de la solución y tiempo de ejecución', + 'desc' => '', + 'category' => 'General', + ], + + + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Casos por ANS', + 'desc' => '', + 'category' => 'Por ANS', + ], + + 'reportGlineNbTicketBySla' => [ + 'title' => 'Evolución de casos por ANS', + 'desc' => '', + 'category' => 'Por ANS', + ], + + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Casos por ANS ordenados por categorias', + 'desc' => '', + 'category' => 'Por ANS', + ], + + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Casos por ANS ordenados por técnicos', + 'desc' => '', + 'category' => 'Por ANS', + ], + + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Casos por ANS ordenados por grupos', + 'desc' => '', + 'category' => 'Por ANS', + ], ]; diff --git a/locales/reports_locales/helpdeskplus_fr_FR.php b/locales/reports_locales/helpdeskplus_fr_FR.php index 5757b2fd..66ad40dc 100644 --- a/locales/reports_locales/helpdeskplus_fr_FR.php +++ b/locales/reports_locales/helpdeskplus_fr_FR.php @@ -31,117 +31,117 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Helpdesk Avancé', - - // MISC LOCALES - 'backlogs' => "Backlogs", - 'opened' => "Ouverts", - 'period' => "Période", - 'backlogstatus' => "Statuts à afficher", - 'slaobserved' => "SLA respecté(s)", - 'slanotobserved'=> "SLA non respecté(s)", - 'observed' => "respecté", - 'notobserved' => "non respecté", - - // SELECTOR - 'selector' => [ - 'slas' => "SLAS", - 'categories' => "Catégories", - ], - - 'reportGlineBacklogs' => [ - 'title' => "Backlog", - 'desc' => "Ce rapport affiche le nombre de ticket groupé par la période selectionnée (jour, semaine, ...).
". - "Il ajoute par ailleurs une nouvelle ligne nommée \"Backlogs\" permettant de visualiser l'en cours des tickets à une date donnée", - 'category' => "Général", - ], - - 'reportVstackbarLifetime' => [ - 'title' => "Ancienneté des tickets", - 'desc' => "Ce rapport affiche des barres indiquant le nombre de tickets pour la période selectionnée (jour, semaine, ...).
". - "Les tickets sont affichés dans leurs statuts courants. Par exemple, les blocs 'Nouveau' affiche les tickets dans un statut nouveau à la date d'aujourd'hui.", - 'category' => "Général", - ], - - 'reportVstackbarTicketsgroups' => [ - 'title' => "Quantitatif par groupes", - 'desc' => "Ce rapport affiche le nombre de tickets ouverts entre les dates selectionnées par leur groupe d'attribution", - 'category' => "Général", - ], - - 'reportVstackbarTicketstech' => [ - 'title' => "Quantitatif par technicien", - 'desc' => "Ce rapport affiche le nombre de tickets ouverts entre les dates selectionnées groupés par techniciens.
". - "Vous devez selectionner au préalable un groupe de technicien pour afficher les données.", - 'category' => "Général", - ], - - 'reportVstackbarWorkflow' => [ - 'title' => "Orientation des files", - 'desc' => "Nombre de tickets pour chaque groupe d'arrivée en fonction d'un groupe de départ.
". - "- Sélectionnez un groupe demandeur pour afficher le nombre de ticket pour les groupes attribués.
". - "- Sélectionnez un groupe chargé du ticket pour afficher le nombre de ticket pour les groupes demandeurs.
". - "Vous ne pouvez sélectionner qu'un critère à la fois !", - 'category' => "Général", - ], - - 'reportHbarTopcategory' => [ - 'title' => "TOP catégories", - 'desc' => "Nombre croissant de ticket affiché par catégorie.
". - "Il est possible limiter le nombre de catégories affichées !", - 'category' => "Général", - ], - - 'reportHbarTopapplicant' => [ - 'title' => "TOP groupes demandeurs", - 'desc' => "Nombre croissant de ticket affiché par groupe demandeur.
". - "Il est possible limiter le nombre de groupes affichés !", - 'category' => "Général", - ], - - 'reportVstackbarGroupChange' => [ - 'title' => "Nombre de changement de groupe", - 'desc' => "Le graphique suivant affiche les nombres de tickets classé par nombre de changements.
". - "En ordonnée est affiché le nombre de ticket.
". - "En abscisse, le nombre de changements.", - 'category' => "Général", - ], - - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Comparaison des durées de taches et du temps de traitement ", - 'desc' => "Le graphique affiche un pourcentage comparant le temps déclaré dans les taches de tickets par rapport au temps de traitement calculés.
", - 'category' => "Général", - ], - - - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Nombre de tickets par SLA", - 'desc' => "Barres empilées", - 'category' => "Par SLA", - ], - - 'reportGlineNbTicketBySla' => [ - 'title' => "Evolution du nombre de tickets par SLA", - 'desc' => "Lignes", - 'category' => "Par SLA", - ], - - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Nombre de tickets par SLA ordonnés par catégories", - 'desc' => "Barres groupées", - 'category' => "Par SLA", - ], - - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Nombre de tickets par SLA ordonnées par techniciens", - 'desc' => "Barres groupées", - 'category' => "Par SLA", - ], - - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Nombre de tickets par SLA ordonnés par groupes", - 'desc' => "Barres groupées", - 'category' => "Par SLA", - ], -]; \ No newline at end of file + 'title' => 'Helpdesk Avancé', + + // MISC LOCALES + 'backlogs' => 'Backlogs', + 'opened' => 'Ouverts', + 'period' => 'Période', + 'backlogstatus' => 'Statuts à afficher', + 'slaobserved' => 'SLA respecté(s)', + 'slanotobserved' => 'SLA non respecté(s)', + 'observed' => 'respecté', + 'notobserved' => 'non respecté', + + // SELECTOR + 'selector' => [ + 'slas' => 'SLAS', + 'categories' => 'Catégories', + ], + + 'reportGlineBacklogs' => [ + 'title' => 'Backlog', + 'desc' => 'Ce rapport affiche le nombre de ticket groupé par la période selectionnée (jour, semaine, ...).
' . + "Il ajoute par ailleurs une nouvelle ligne nommée \"Backlogs\" permettant de visualiser l'en cours des tickets à une date donnée", + 'category' => 'Général', + ], + + 'reportVstackbarLifetime' => [ + 'title' => 'Ancienneté des tickets', + 'desc' => 'Ce rapport affiche des barres indiquant le nombre de tickets pour la période selectionnée (jour, semaine, ...).
' . + "Les tickets sont affichés dans leurs statuts courants. Par exemple, les blocs 'Nouveau' affiche les tickets dans un statut nouveau à la date d'aujourd'hui.", + 'category' => 'Général', + ], + + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Quantitatif par groupes', + 'desc' => "Ce rapport affiche le nombre de tickets ouverts entre les dates selectionnées par leur groupe d'attribution", + 'category' => 'Général', + ], + + 'reportVstackbarTicketstech' => [ + 'title' => 'Quantitatif par technicien', + 'desc' => 'Ce rapport affiche le nombre de tickets ouverts entre les dates selectionnées groupés par techniciens.
' . + 'Vous devez selectionner au préalable un groupe de technicien pour afficher les données.', + 'category' => 'Général', + ], + + 'reportVstackbarWorkflow' => [ + 'title' => 'Orientation des files', + 'desc' => "Nombre de tickets pour chaque groupe d'arrivée en fonction d'un groupe de départ.
" . + '- Sélectionnez un groupe demandeur pour afficher le nombre de ticket pour les groupes attribués.
' . + '- Sélectionnez un groupe chargé du ticket pour afficher le nombre de ticket pour les groupes demandeurs.
' . + "Vous ne pouvez sélectionner qu'un critère à la fois !", + 'category' => 'Général', + ], + + 'reportHbarTopcategory' => [ + 'title' => 'TOP catégories', + 'desc' => 'Nombre croissant de ticket affiché par catégorie.
' . + 'Il est possible limiter le nombre de catégories affichées !', + 'category' => 'Général', + ], + + 'reportHbarTopapplicant' => [ + 'title' => 'TOP groupes demandeurs', + 'desc' => 'Nombre croissant de ticket affiché par groupe demandeur.
' . + 'Il est possible limiter le nombre de groupes affichés !', + 'category' => 'Général', + ], + + 'reportVstackbarGroupChange' => [ + 'title' => 'Nombre de changement de groupe', + 'desc' => 'Le graphique suivant affiche les nombres de tickets classé par nombre de changements.
' . + 'En ordonnée est affiché le nombre de ticket.
' . + 'En abscisse, le nombre de changements.', + 'category' => 'Général', + ], + + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Comparaison des durées de taches et du temps de traitement ', + 'desc' => 'Le graphique affiche un pourcentage comparant le temps déclaré dans les taches de tickets par rapport au temps de traitement calculés.
', + 'category' => 'Général', + ], + + + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Nombre de tickets par SLA', + 'desc' => 'Barres empilées', + 'category' => 'Par SLA', + ], + + 'reportGlineNbTicketBySla' => [ + 'title' => 'Evolution du nombre de tickets par SLA', + 'desc' => 'Lignes', + 'category' => 'Par SLA', + ], + + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Nombre de tickets par SLA ordonnés par catégories', + 'desc' => 'Barres groupées', + 'category' => 'Par SLA', + ], + + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Nombre de tickets par SLA ordonnées par techniciens', + 'desc' => 'Barres groupées', + 'category' => 'Par SLA', + ], + + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Nombre de tickets par SLA ordonnés par groupes', + 'desc' => 'Barres groupées', + 'category' => 'Par SLA', + ], +]; diff --git a/locales/reports_locales/helpdeskplus_hr_HR.php b/locales/reports_locales/helpdeskplus_hr_HR.php index 37a692d3..30f06f89 100644 --- a/locales/reports_locales/helpdeskplus_hr_HR.php +++ b/locales/reports_locales/helpdeskplus_hr_HR.php @@ -31,110 +31,110 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Proširena podrška', - - // MISC LOCALES - 'backlogs' => "Zaostaci", - 'opened' => "Otvoreni", - 'period' => "Razdoblje", - 'backlogstatus' => "Stanje za prikaz", - 'slaobserved' => "UGOVOR O RAZINI USLUGE promatrano", - 'slanotobserved'=> "UGOVOR O RAZINI USLUGE nepromatrano", - 'observed' => "promatrano", - 'notobserved' => "nepromatrano", - - - // SELECTOR - 'selector' => [ - 'slas' => "UGOVORI O RAZINI USLUGE", - 'categories' => "Kategorija", - ], - - - // GENERAL REPORTS - 'reportGlineBacklogs' => [ - 'title' => "Zaostaci", - 'desc' => "", - 'category' => "Opće", - ], - - 'reportVstackbarLifetime' => [ - 'title' => "Starost naloga", - 'desc' => "", - 'category' => "Opće", - ], - - 'reportVstackbarTicketsgroups' => [ - 'title' => "Nalozi po grupi", - 'desc' => "", - 'category' => "Opće", - ], - - 'reportVstackbarTicketstech' => [ - 'title' => "Nalozi po tehničaru", - 'desc' => "", - 'category' => "Opće", - ], - - 'reportVstackbarWorkflow' => [ - 'title' => "Smjer redova čekanja", - 'desc' => "", - 'category' => "Opće", - ], - - 'reportHbarTopcategory' => [ - 'title' => "TOP kategorije", - 'desc' => "", - 'category' => "Opće", - ], - - 'reportHbarTopapplicant' => [ - 'title' => "TOP grupe podnositelja", - 'desc' => "", - 'category' => "Opće", - ], - - 'reportVstackbarGroupChange' => [ - 'title' => "Broj promjena grupe", - 'desc' => "", - 'category' => "Opće", - ], - - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Usporedba vremena zadatka i vremena rješavanja", - 'desc' => "", - 'category' => "Opće", - ], - - - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Broj naloga po ugovoru o razini usluge", - 'desc' => "", - 'category' => "Po ugovoru o razini usluge", - ], - - 'reportGlineNbTicketBySla' => [ - 'title' => "Razvoj naloga po ugovoru o razini usluge", - 'desc' => "", - 'category' => "Po ugovoru o razini usluge", - ], - - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Nalozi po ugovoru o razini usluge, razvrstani po kategorijama", - 'desc' => "", - 'category' => "Po ugovoru o razini usluge", - ], - - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Nalozi po ugovoru o razini usluge, razvrstani po tehničarima", - 'desc' => "", - 'category' => "Po ugovoru o razini usluge", - ], - - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Nalozi po ugovoru o razini usluge, razvrstani po grupama", - 'desc' => "", - 'category' => "Po ugovoru o razini usluge", - ], -]; \ No newline at end of file + 'title' => 'Proširena podrška', + + // MISC LOCALES + 'backlogs' => 'Zaostaci', + 'opened' => 'Otvoreni', + 'period' => 'Razdoblje', + 'backlogstatus' => 'Stanje za prikaz', + 'slaobserved' => 'UGOVOR O RAZINI USLUGE promatrano', + 'slanotobserved' => 'UGOVOR O RAZINI USLUGE nepromatrano', + 'observed' => 'promatrano', + 'notobserved' => 'nepromatrano', + + + // SELECTOR + 'selector' => [ + 'slas' => 'UGOVORI O RAZINI USLUGE', + 'categories' => 'Kategorija', + ], + + + // GENERAL REPORTS + 'reportGlineBacklogs' => [ + 'title' => 'Zaostaci', + 'desc' => '', + 'category' => 'Opće', + ], + + 'reportVstackbarLifetime' => [ + 'title' => 'Starost naloga', + 'desc' => '', + 'category' => 'Opće', + ], + + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Nalozi po grupi', + 'desc' => '', + 'category' => 'Opće', + ], + + 'reportVstackbarTicketstech' => [ + 'title' => 'Nalozi po tehničaru', + 'desc' => '', + 'category' => 'Opće', + ], + + 'reportVstackbarWorkflow' => [ + 'title' => 'Smjer redova čekanja', + 'desc' => '', + 'category' => 'Opće', + ], + + 'reportHbarTopcategory' => [ + 'title' => 'TOP kategorije', + 'desc' => '', + 'category' => 'Opće', + ], + + 'reportHbarTopapplicant' => [ + 'title' => 'TOP grupe podnositelja', + 'desc' => '', + 'category' => 'Opće', + ], + + 'reportVstackbarGroupChange' => [ + 'title' => 'Broj promjena grupe', + 'desc' => '', + 'category' => 'Opće', + ], + + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Usporedba vremena zadatka i vremena rješavanja', + 'desc' => '', + 'category' => 'Opće', + ], + + + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Broj naloga po ugovoru o razini usluge', + 'desc' => '', + 'category' => 'Po ugovoru o razini usluge', + ], + + 'reportGlineNbTicketBySla' => [ + 'title' => 'Razvoj naloga po ugovoru o razini usluge', + 'desc' => '', + 'category' => 'Po ugovoru o razini usluge', + ], + + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Nalozi po ugovoru o razini usluge, razvrstani po kategorijama', + 'desc' => '', + 'category' => 'Po ugovoru o razini usluge', + ], + + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Nalozi po ugovoru o razini usluge, razvrstani po tehničarima', + 'desc' => '', + 'category' => 'Po ugovoru o razini usluge', + ], + + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Nalozi po ugovoru o razini usluge, razvrstani po grupama', + 'desc' => '', + 'category' => 'Po ugovoru o razini usluge', + ], +]; diff --git a/locales/reports_locales/helpdeskplus_pl_PL.php b/locales/reports_locales/helpdeskplus_pl_PL.php index ed00a51d..824fdd24 100644 --- a/locales/reports_locales/helpdeskplus_pl_PL.php +++ b/locales/reports_locales/helpdeskplus_pl_PL.php @@ -31,110 +31,110 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Zgłoszenia - rozszerzone', - - // MISC LOCALES - 'backlogs' => "Backlogs", - 'opened' => "Otwarte", - 'period' => "Period", - 'backlogstatus' => "Status to display", - 'slaobserved' => "SLA observed", - 'slanotobserved'=> "SLA not observed", - 'observed' => "observed", - 'notobserved' => "not observed", - - - // SELECTOR - 'selector' => [ - 'slas' => "SLAS", - 'categories' => "Categories", - ], - - - // GENERAL REPORTS - 'reportGlineBacklogs' => [ - 'title' => "Backlog", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarLifetime' => [ - 'title' => "Wiek nierozwiązanych zgłoszeń", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarTicketsgroups' => [ - 'title' => "Zgłoszenia nierozwiązane wg grup", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarTicketstech' => [ - 'title' => "Zgłoszenia nierozwiązane wg przypisanego technika", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarWorkflow' => [ - 'title' => "Orientation queues", - 'desc' => "", - 'category' => "General", - ], - - 'reportHbarTopcategory' => [ - 'title' => "Najbardziej popularne kategorie", - 'desc' => "", - 'category' => "General", - ], - - 'reportHbarTopapplicant' => [ - 'title' => "Najbardziej popularne grupy techników", - 'desc' => "", - 'category' => "General", - ], - - 'reportVstackbarGroupChange' => [ - 'title' => "Number of group changes", - 'desc' => "", - 'category' => "General", - ], - - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Task action times and solve delay comparison", - 'desc' => "", - 'category' => "General", - ], - - - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Zgłoszenia wg SLA", - 'desc' => "", - 'category' => "Per SLA", - ], - - 'reportGlineNbTicketBySla' => [ - 'title' => "Zmiana zgłoszeń wg SLA", - 'desc' => "", - 'category' => "Per SLA", - ], - - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Zgłoszenia wg SLA uporządkowane po kategorii", - 'desc' => "", - 'category' => "Per SLA", - ], - - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Zgłoszenia wg SLA uporządkowane po przypisanym techniku", - 'desc' => "", - 'category' => "Per SLA", - ], - - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Zgłoszenia wg SLA uporządkowane po grupach", - 'desc' => "", - 'category' => "Per SLA", - ], -]; \ No newline at end of file + 'title' => 'Zgłoszenia - rozszerzone', + + // MISC LOCALES + 'backlogs' => 'Backlogs', + 'opened' => 'Otwarte', + 'period' => 'Period', + 'backlogstatus' => 'Status to display', + 'slaobserved' => 'SLA observed', + 'slanotobserved' => 'SLA not observed', + 'observed' => 'observed', + 'notobserved' => 'not observed', + + + // SELECTOR + 'selector' => [ + 'slas' => 'SLAS', + 'categories' => 'Categories', + ], + + + // GENERAL REPORTS + 'reportGlineBacklogs' => [ + 'title' => 'Backlog', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarLifetime' => [ + 'title' => 'Wiek nierozwiązanych zgłoszeń', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Zgłoszenia nierozwiązane wg grup', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarTicketstech' => [ + 'title' => 'Zgłoszenia nierozwiązane wg przypisanego technika', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarWorkflow' => [ + 'title' => 'Orientation queues', + 'desc' => '', + 'category' => 'General', + ], + + 'reportHbarTopcategory' => [ + 'title' => 'Najbardziej popularne kategorie', + 'desc' => '', + 'category' => 'General', + ], + + 'reportHbarTopapplicant' => [ + 'title' => 'Najbardziej popularne grupy techników', + 'desc' => '', + 'category' => 'General', + ], + + 'reportVstackbarGroupChange' => [ + 'title' => 'Number of group changes', + 'desc' => '', + 'category' => 'General', + ], + + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Task action times and solve delay comparison', + 'desc' => '', + 'category' => 'General', + ], + + + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Zgłoszenia wg SLA', + 'desc' => '', + 'category' => 'Per SLA', + ], + + 'reportGlineNbTicketBySla' => [ + 'title' => 'Zmiana zgłoszeń wg SLA', + 'desc' => '', + 'category' => 'Per SLA', + ], + + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Zgłoszenia wg SLA uporządkowane po kategorii', + 'desc' => '', + 'category' => 'Per SLA', + ], + + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Zgłoszenia wg SLA uporządkowane po przypisanym techniku', + 'desc' => '', + 'category' => 'Per SLA', + ], + + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Zgłoszenia wg SLA uporządkowane po grupach', + 'desc' => '', + 'category' => 'Per SLA', + ], +]; diff --git a/locales/reports_locales/helpdeskplus_pt_BR.php b/locales/reports_locales/helpdeskplus_pt_BR.php index 51eb9451..c8cd81af 100644 --- a/locales/reports_locales/helpdeskplus_pt_BR.php +++ b/locales/reports_locales/helpdeskplus_pt_BR.php @@ -32,75 +32,75 @@ $LANG['plugin_mreporting']['Helpdeskplus']['title'] = 'Helpdesk Avançado'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineBacklogs']['title'] = 'Histórico'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineBacklogs']['desc'] = ''; -$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineBacklogs']['category'] = 'Geral'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineBacklogs']['title'] = 'Histórico'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineBacklogs']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineBacklogs']['category'] = 'Geral'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarLifetime']['title'] = 'Chamados por Período'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarLifetime']['desc'] = ''; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarLifetime']['category'] = 'Geral'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarLifetime']['title'] = 'Chamados por Período'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarLifetime']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarLifetime']['category'] = 'Geral'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketsgroups']['title'] = 'Chamados por Grupo'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketsgroups']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketsgroups']['title'] = 'Chamados por Grupo'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketsgroups']['desc'] = ''; $LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketsgroups']['category'] = 'Geral'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketstech']['title'] = 'Chamados por Técnico'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketstech']['desc'] = ''; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketstech']['category'] = 'Geral'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketstech']['title'] = 'Chamados por Técnico'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketstech']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarTicketstech']['category'] = 'Geral'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarWorkflow']['title'] = 'Orientação dos arquivos'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarWorkflow']['desc'] = 'Nº de chamados para cada grupo chegada com base em um grupo de partida.
+$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarWorkflow']['title'] = 'Orientação dos arquivos'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarWorkflow']['desc'] = 'Nº de chamados para cada grupo chegada com base em um grupo de partida.
- Selecione um grupo requerente para exibir o Nº de chamados atribuídos aos grupos.
- Selecione um grupo para exibir o número de chamados por grupos.
Você não pode selecionar ambos os critérios!'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarWorkflow']['category'] = 'Geral'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarWorkflow']['category'] = 'Geral'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopcategory']['title'] = 'Top Categorias'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopcategory']['desc'] = ''; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopcategory']['category'] = 'Geral'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopcategory']['title'] = 'Top Categorias'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopcategory']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopcategory']['category'] = 'Geral'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopapplicant']['title'] = 'Top Grupos requerentes'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopapplicant']['desc'] = ''; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopapplicant']['category'] = 'Geral'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopapplicant']['title'] = 'Top Grupos requerentes'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopapplicant']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHbarTopapplicant']['category'] = 'Geral'; -$LANG['plugin_mreporting']['Helpdeskplus']['backlogs'] = 'Backlogs'; -$LANG['plugin_mreporting']['Helpdeskplus']['opened'] = 'Aberto'; -$LANG['plugin_mreporting']['Helpdeskplus']['period'] = 'Período'; -$LANG['plugin_mreporting']['Helpdeskplus']['backlogstatus'] = 'Status para exibir'; +$LANG['plugin_mreporting']['Helpdeskplus']['backlogs'] = 'Backlogs'; +$LANG['plugin_mreporting']['Helpdeskplus']['opened'] = 'Aberto'; +$LANG['plugin_mreporting']['Helpdeskplus']['period'] = 'Período'; +$LANG['plugin_mreporting']['Helpdeskplus']['backlogstatus'] = 'Status para exibir'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarGroupChange']['title'] = "Nº de mudanças por grupo"; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarGroupChange']['desc'] = ""; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarGroupChange']['title'] = 'Nº de mudanças por grupo'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarGroupChange']['desc'] = ''; -$LANG['plugin_mreporting']['Helpdeskplus']['reportLineActiontimeVsSolvedelay']['title'] = 'Comparação dos tempos de ação de tarefas e de atrasos de resolução'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportLineActiontimeVsSolvedelay']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportLineActiontimeVsSolvedelay']['title'] = 'Comparação dos tempos de ação de tarefas e de atrasos de resolução'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportLineActiontimeVsSolvedelay']['desc'] = ''; $LANG['plugin_mreporting']['Helpdeskplus']['reportLineActiontimeVsSolvedelay']['category'] = 'Geral'; -$LANG['plugin_mreporting']['selector']["slas"] = "SLAs"; +$LANG['plugin_mreporting']['selector']['slas'] = 'SLAs'; -$LANG['plugin_mreporting']['selector']["categories"] = "Categorias"; +$LANG['plugin_mreporting']['selector']['categories'] = 'Categorias'; -$LANG['plugin_mreporting']['Helpdeskplus']['slaobserved'] = "SLA observada"; -$LANG['plugin_mreporting']['Helpdeskplus']['slanotobserved'] = "SLA não observada"; +$LANG['plugin_mreporting']['Helpdeskplus']['slaobserved'] = 'SLA observada'; +$LANG['plugin_mreporting']['Helpdeskplus']['slanotobserved'] = 'SLA não observada'; -$LANG['plugin_mreporting']['Helpdeskplus']['observed'] = "observado"; -$LANG['plugin_mreporting']['Helpdeskplus']['notobserved'] = "não observado"; +$LANG['plugin_mreporting']['Helpdeskplus']['observed'] = 'observado'; +$LANG['plugin_mreporting']['Helpdeskplus']['notobserved'] = 'não observado'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarNbTicketBySla']['title'] = "Nº de chamados por SLA"; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarNbTicketBySla']['desc'] = ""; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarNbTicketBySla']['category'] = "Por SLA"; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarNbTicketBySla']['title'] = 'Nº de chamados por SLA'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarNbTicketBySla']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarNbTicketBySla']['category'] = 'Por SLA'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineNbTicketBySla']['title'] = "Evolução de chamados por SLA"; -$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineNbTicketBySla']['desc'] = ""; -$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineNbTicketBySla']['category'] = "Por SLA"; +$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineNbTicketBySla']['title'] = 'Evolução de chamados por SLA'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineNbTicketBySla']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportGlineNbTicketBySla']['category'] = 'Por SLA'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTopCategory']['title'] = "Chamados por SLA classificados por categorias"; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTopCategory']['desc'] = ""; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTopCategory']['category'] = "Por SLA"; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTopCategory']['title'] = 'Chamados por SLA classificados por categorias'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTopCategory']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTopCategory']['category'] = 'Por SLA'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTechnician']['title'] = "Chamados por SLA classificados por técnicos"; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTechnician']['desc'] = ""; -$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTechnician']['category'] = "Por SLA"; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTechnician']['title'] = 'Chamados por SLA classificados por técnicos'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTechnician']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportHgbarRespectedSlasByTechnician']['category'] = 'Por SLA'; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarRespectedSlasByGroup']['title'] = "Chamados por SLA classificados por grupos"; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarRespectedSlasByGroup']['desc'] = ""; -$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarRespectedSlasByGroup']['category'] = "Por SLA"; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarRespectedSlasByGroup']['title'] = 'Chamados por SLA classificados por grupos'; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarRespectedSlasByGroup']['desc'] = ''; +$LANG['plugin_mreporting']['Helpdeskplus']['reportVstackbarRespectedSlasByGroup']['category'] = 'Por SLA'; diff --git a/locales/reports_locales/helpdeskplus_pt_PT.php b/locales/reports_locales/helpdeskplus_pt_PT.php index 68b7fafb..506d7005 100644 --- a/locales/reports_locales/helpdeskplus_pt_PT.php +++ b/locales/reports_locales/helpdeskplus_pt_PT.php @@ -30,91 +30,91 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Helpdesk Avançado', - // MISC LOCALES - 'backlogs' => "Em espera", - 'opened' => "Abertas", - 'period' => "Periodo", - 'backlogstatus' => "Estado a mostrar", - 'slaobserved' => "SLA observado", - 'slanotobserved'=> "SLA não observado", - 'observed' => "observado", - 'notobserved' => "não observado", - // SELECTOR - 'selector' => [ - 'slas' => "SLAS", - 'categories' => "Categorias", - ], - // GENERAL REPORTS - 'reportGlineBacklogs' => [ - 'title' => "Em espera", - 'desc' => "", - 'category' => "Geral", - ], - 'reportVstackbarLifetime' => [ - 'title' => "Tempo da Incidência", - 'desc' => "", - 'category' => "Geral", - ], - 'reportVstackbarTicketsgroups' => [ - 'title' => "Incidências por grupo", - 'desc' => "", - 'category' => "Geral", - ], - 'reportVstackbarTicketstech' => [ - 'title' => "Incidências por técnico", - 'desc' => "", - 'category' => "Geral", - ], - 'reportVstackbarWorkflow' => [ - 'title' => "Filas de orientação", - 'desc' => "", - 'category' => "Geral", - ], - 'reportHbarTopcategory' => [ - 'title' => "TOP categorias", - 'desc' => "", - 'category' => "Geral", - ], - 'reportHbarTopapplicant' => [ - 'title' => "TOP grupos solicitantes", - 'desc' => "", - 'category' => "Geral", - ], - 'reportVstackbarGroupChange' => [ - 'title' => "Number of group changes", - 'desc' => "", - 'category' => "Geral", - ], - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Comparação dos tempos de acção das tarefas e tempo de resolução", - 'desc' => "", - 'category' => "Geral", - ], - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Número de incidências por SLA", - 'desc' => "", - 'category' => "Por SLA", - ], - 'reportGlineNbTicketBySla' => [ - 'title' => "Evolução das incidências por SLA", - 'desc' => "", - 'category' => "Por SLA", - ], - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Incidências por SLA ordenadas por categorias", - 'desc' => "", - 'category' => "Por SLA", - ], - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Incidências por SLA ordenadas por técnicos", - 'desc' => "", - 'category' => "Por SLA", - ], - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Incidências por SLA classificado por grupos", - 'desc' => "", - 'category' => "Por SLA", - ], + 'title' => 'Helpdesk Avançado', + // MISC LOCALES + 'backlogs' => 'Em espera', + 'opened' => 'Abertas', + 'period' => 'Periodo', + 'backlogstatus' => 'Estado a mostrar', + 'slaobserved' => 'SLA observado', + 'slanotobserved' => 'SLA não observado', + 'observed' => 'observado', + 'notobserved' => 'não observado', + // SELECTOR + 'selector' => [ + 'slas' => 'SLAS', + 'categories' => 'Categorias', + ], + // GENERAL REPORTS + 'reportGlineBacklogs' => [ + 'title' => 'Em espera', + 'desc' => '', + 'category' => 'Geral', + ], + 'reportVstackbarLifetime' => [ + 'title' => 'Tempo da Incidência', + 'desc' => '', + 'category' => 'Geral', + ], + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Incidências por grupo', + 'desc' => '', + 'category' => 'Geral', + ], + 'reportVstackbarTicketstech' => [ + 'title' => 'Incidências por técnico', + 'desc' => '', + 'category' => 'Geral', + ], + 'reportVstackbarWorkflow' => [ + 'title' => 'Filas de orientação', + 'desc' => '', + 'category' => 'Geral', + ], + 'reportHbarTopcategory' => [ + 'title' => 'TOP categorias', + 'desc' => '', + 'category' => 'Geral', + ], + 'reportHbarTopapplicant' => [ + 'title' => 'TOP grupos solicitantes', + 'desc' => '', + 'category' => 'Geral', + ], + 'reportVstackbarGroupChange' => [ + 'title' => 'Number of group changes', + 'desc' => '', + 'category' => 'Geral', + ], + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Comparação dos tempos de acção das tarefas e tempo de resolução', + 'desc' => '', + 'category' => 'Geral', + ], + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Número de incidências por SLA', + 'desc' => '', + 'category' => 'Por SLA', + ], + 'reportGlineNbTicketBySla' => [ + 'title' => 'Evolução das incidências por SLA', + 'desc' => '', + 'category' => 'Por SLA', + ], + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Incidências por SLA ordenadas por categorias', + 'desc' => '', + 'category' => 'Por SLA', + ], + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Incidências por SLA ordenadas por técnicos', + 'desc' => '', + 'category' => 'Por SLA', + ], + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Incidências por SLA classificado por grupos', + 'desc' => '', + 'category' => 'Por SLA', + ], ]; diff --git a/locales/reports_locales/helpdeskplus_ru_RU.php b/locales/reports_locales/helpdeskplus_ru_RU.php index b88d42ee..656a0bbb 100644 --- a/locales/reports_locales/helpdeskplus_ru_RU.php +++ b/locales/reports_locales/helpdeskplus_ru_RU.php @@ -31,110 +31,110 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Служба поддержки расширенная', - - // MISC LOCALES - 'backlogs' => "Задержки", - 'opened' => "Открытые", - 'period' => "Период", - 'backlogstatus' => "Отображаемый статус", - 'slaobserved' => "SLA отмечен", - 'slanotobserved'=> "SLA не отмечен", - 'observed' => "отмечен", - 'notobserved' => "не отмечен", - - - // SELECTOR - 'selector' => [ - 'slas' => "SLAS", - 'categories' => "Категории", - ], - - - // GENERAL REPORTS - 'reportGlineBacklogs' => [ - 'title' => "Задержки", - 'desc' => "", - 'category' => "Общие", - ], - - 'reportVstackbarLifetime' => [ - 'title' => "Возраст заявки", - 'desc' => "", - 'category' => "Общие", - ], - - 'reportVstackbarTicketsgroups' => [ - 'title' => "Заявки по группам", - 'desc' => "", - 'category' => "Общие", - ], - - 'reportVstackbarTicketstech' => [ - 'title' => "Заявки по специалисту", - 'desc' => "", - 'category' => "Общие", - ], - - 'reportVstackbarWorkflow' => [ - 'title' => "Ориентированные очереди", - 'desc' => "", - 'category' => "Общие", - ], - - 'reportHbarTopcategory' => [ - 'title' => "ТОП категорий", - 'desc' => "", - 'category' => "Общие", - ], - - 'reportHbarTopapplicant' => [ - 'title' => "ТОП групп заказчиков", - 'desc' => "", - 'category' => "Общие", - ], - - 'reportVstackbarGroupChange' => [ - 'title' => "Количество групп изменений", - 'desc' => "", - 'category' => "Общие", - ], - - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Сравнение задержки активного времени заявки и решения", - 'desc' => "", - 'category' => "Общие", - ], - - - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Количество заявок по SLA", - 'desc' => "", - 'category' => "Согласно SLA", - ], - - 'reportGlineNbTicketBySla' => [ - 'title' => "Динамика заявки согласно SLA", - 'desc' => "", - 'category' => "Согласно SLA", - ], - - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Заявки согласно SLA по категориям", - 'desc' => "", - 'category' => "Согласно SLA", - ], - - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Заявки согласно SLA по специалистам", - 'desc' => "", - 'category' => "Согласно SLA", - ], - - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Заявки согласно SLA отобранные по группам", - 'desc' => "", - 'category' => "Согласно SLA", - ], -]; \ No newline at end of file + 'title' => 'Служба поддержки расширенная', + + // MISC LOCALES + 'backlogs' => 'Задержки', + 'opened' => 'Открытые', + 'period' => 'Период', + 'backlogstatus' => 'Отображаемый статус', + 'slaobserved' => 'SLA отмечен', + 'slanotobserved' => 'SLA не отмечен', + 'observed' => 'отмечен', + 'notobserved' => 'не отмечен', + + + // SELECTOR + 'selector' => [ + 'slas' => 'SLAS', + 'categories' => 'Категории', + ], + + + // GENERAL REPORTS + 'reportGlineBacklogs' => [ + 'title' => 'Задержки', + 'desc' => '', + 'category' => 'Общие', + ], + + 'reportVstackbarLifetime' => [ + 'title' => 'Возраст заявки', + 'desc' => '', + 'category' => 'Общие', + ], + + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Заявки по группам', + 'desc' => '', + 'category' => 'Общие', + ], + + 'reportVstackbarTicketstech' => [ + 'title' => 'Заявки по специалисту', + 'desc' => '', + 'category' => 'Общие', + ], + + 'reportVstackbarWorkflow' => [ + 'title' => 'Ориентированные очереди', + 'desc' => '', + 'category' => 'Общие', + ], + + 'reportHbarTopcategory' => [ + 'title' => 'ТОП категорий', + 'desc' => '', + 'category' => 'Общие', + ], + + 'reportHbarTopapplicant' => [ + 'title' => 'ТОП групп заказчиков', + 'desc' => '', + 'category' => 'Общие', + ], + + 'reportVstackbarGroupChange' => [ + 'title' => 'Количество групп изменений', + 'desc' => '', + 'category' => 'Общие', + ], + + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Сравнение задержки активного времени заявки и решения', + 'desc' => '', + 'category' => 'Общие', + ], + + + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Количество заявок по SLA', + 'desc' => '', + 'category' => 'Согласно SLA', + ], + + 'reportGlineNbTicketBySla' => [ + 'title' => 'Динамика заявки согласно SLA', + 'desc' => '', + 'category' => 'Согласно SLA', + ], + + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Заявки согласно SLA по категориям', + 'desc' => '', + 'category' => 'Согласно SLA', + ], + + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Заявки согласно SLA по специалистам', + 'desc' => '', + 'category' => 'Согласно SLA', + ], + + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Заявки согласно SLA отобранные по группам', + 'desc' => '', + 'category' => 'Согласно SLA', + ], +]; diff --git a/locales/reports_locales/helpdeskplus_sk_SK.php b/locales/reports_locales/helpdeskplus_sk_SK.php index bc95f71d..0675b949 100644 --- a/locales/reports_locales/helpdeskplus_sk_SK.php +++ b/locales/reports_locales/helpdeskplus_sk_SK.php @@ -31,110 +31,110 @@ global $LANG; $LANG['plugin_mreporting']['Helpdeskplus'] = [ - 'title' => 'Helpdesk - pokročilé', - - // MISC LOCALES - 'backlogs' => "Nedokončené", - 'opened' => "Otvorené", - 'period' => "Obdobie", - 'backlogstatus' => "Stav, ktorý sa má zobraziť", - 'slaobserved' => "SLA sledované", - 'slanotobserved'=> "SLA nesledované", - 'observed' => "sledované", - 'notobserved' => "nesledované", - - - // SELECTOR - 'selector' => [ - 'slas' => "SLA", - 'categories' => "Kategórie", - ], - - - // GENERAL REPORTS - 'reportGlineBacklogs' => [ - 'title' => "Nedokončené položky", - 'desc' => "", - 'category' => "Všeobecné", - ], - - 'reportVstackbarLifetime' => [ - 'title' => "Vek požiadavky", - 'desc' => "", - 'category' => "Všeobecné", - ], - - 'reportVstackbarTicketsgroups' => [ - 'title' => "Požiadavky podľa skupiny", - 'desc' => "", - 'category' => "Všeobecné", - ], - - 'reportVstackbarTicketstech' => [ - 'title' => "Požiadavky podľa technika", - 'desc' => "", - 'category' => "Všeobecné", - ], - - 'reportVstackbarWorkflow' => [ - 'title' => "Orientačné fronty", - 'desc' => "", - 'category' => "Všeobecné", - ], - - 'reportHbarTopcategory' => [ - 'title' => "TOP kategórie", - 'desc' => "", - 'category' => "Všeobecné", - ], - - 'reportHbarTopapplicant' => [ - 'title' => "TOP skupiny žiadateľov", - 'desc' => "", - 'category' => "Všeobecné", - ], - - 'reportVstackbarGroupChange' => [ - 'title' => "Počet skupinových zmien", - 'desc' => "", - 'category' => "Všeobecné", - ], - - 'reportLineActiontimeVsSolvedelay' => [ - 'title' => "Porovnanie akčných časov úloh a oneskorenia vyriešenia", - 'desc' => "", - 'category' => "Všeobecné", - ], - - - // SLA REPORTS - 'reportVstackbarNbTicketBySla' => [ - 'title' => "Počet požiadaviek podľa SLA", - 'desc' => "", - 'category' => "Podľa SLA", - ], - - 'reportGlineNbTicketBySla' => [ - 'title' => "Vývoj požiadaviek podľa SLA", - 'desc' => "", - 'category' => "Podľa SLA", - ], - - 'reportHgbarRespectedSlasByTopCategory' => [ - 'title' => "Požiadavky za SLA zoradené podľa kategórií", - 'desc' => "", - 'category' => "Podľa SLA", - ], - - 'reportHgbarRespectedSlasByTechnician' => [ - 'title' => "Požiadavky za SLA zoradené podľa technikov", - 'desc' => "", - 'category' => "Podľa SLA", - ], - - 'reportVstackbarRespectedSlasByGroup' => [ - 'title' => "Požiadavky za SLA zoradené podľa skupín", - 'desc' => "", - 'category' => "Podľa SLA", - ], -]; \ No newline at end of file + 'title' => 'Helpdesk - pokročilé', + + // MISC LOCALES + 'backlogs' => 'Nedokončené', + 'opened' => 'Otvorené', + 'period' => 'Obdobie', + 'backlogstatus' => 'Stav, ktorý sa má zobraziť', + 'slaobserved' => 'SLA sledované', + 'slanotobserved' => 'SLA nesledované', + 'observed' => 'sledované', + 'notobserved' => 'nesledované', + + + // SELECTOR + 'selector' => [ + 'slas' => 'SLA', + 'categories' => 'Kategórie', + ], + + + // GENERAL REPORTS + 'reportGlineBacklogs' => [ + 'title' => 'Nedokončené položky', + 'desc' => '', + 'category' => 'Všeobecné', + ], + + 'reportVstackbarLifetime' => [ + 'title' => 'Vek požiadavky', + 'desc' => '', + 'category' => 'Všeobecné', + ], + + 'reportVstackbarTicketsgroups' => [ + 'title' => 'Požiadavky podľa skupiny', + 'desc' => '', + 'category' => 'Všeobecné', + ], + + 'reportVstackbarTicketstech' => [ + 'title' => 'Požiadavky podľa technika', + 'desc' => '', + 'category' => 'Všeobecné', + ], + + 'reportVstackbarWorkflow' => [ + 'title' => 'Orientačné fronty', + 'desc' => '', + 'category' => 'Všeobecné', + ], + + 'reportHbarTopcategory' => [ + 'title' => 'TOP kategórie', + 'desc' => '', + 'category' => 'Všeobecné', + ], + + 'reportHbarTopapplicant' => [ + 'title' => 'TOP skupiny žiadateľov', + 'desc' => '', + 'category' => 'Všeobecné', + ], + + 'reportVstackbarGroupChange' => [ + 'title' => 'Počet skupinových zmien', + 'desc' => '', + 'category' => 'Všeobecné', + ], + + 'reportLineActiontimeVsSolvedelay' => [ + 'title' => 'Porovnanie akčných časov úloh a oneskorenia vyriešenia', + 'desc' => '', + 'category' => 'Všeobecné', + ], + + + // SLA REPORTS + 'reportVstackbarNbTicketBySla' => [ + 'title' => 'Počet požiadaviek podľa SLA', + 'desc' => '', + 'category' => 'Podľa SLA', + ], + + 'reportGlineNbTicketBySla' => [ + 'title' => 'Vývoj požiadaviek podľa SLA', + 'desc' => '', + 'category' => 'Podľa SLA', + ], + + 'reportHgbarRespectedSlasByTopCategory' => [ + 'title' => 'Požiadavky za SLA zoradené podľa kategórií', + 'desc' => '', + 'category' => 'Podľa SLA', + ], + + 'reportHgbarRespectedSlasByTechnician' => [ + 'title' => 'Požiadavky za SLA zoradené podľa technikov', + 'desc' => '', + 'category' => 'Podľa SLA', + ], + + 'reportVstackbarRespectedSlasByGroup' => [ + 'title' => 'Požiadavky za SLA zoradené podľa skupín', + 'desc' => '', + 'category' => 'Podľa SLA', + ], +]; diff --git a/locales/reports_locales/inventory_cs_CZ.php b/locales/reports_locales/inventory_cs_CZ.php index 662a0d13..808c75f6 100644 --- a/locales/reports_locales/inventory_cs_CZ.php +++ b/locales/reports_locales/inventory_cs_CZ.php @@ -32,119 +32,119 @@ $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Inventura", - - 'reportHbarComputersByOS' => [ - 'title' => "Počítače podle operačních systémů", - 'desc' => "Pruhový", - 'category' => "Operační systémy", - ], - - 'reportPieComputersByOS' => [ - 'title' => "Počítače podle operačních systémů", - 'desc' => "Výsečový", - 'category' => "Operační systémy", - ], - - 'reportHbarComputersByFabricant' => [ - 'title' => "Počítače podle výrobců", - 'desc' => "Pruhový", - 'category' => "Výrobci", - ], - - 'reportPieComputersByFabricant' => [ - 'title' => "Počítače podle výrobců", - 'desc' => "Výsečový", - 'category' => "Výrobci", - ], - - 'reportHbarComputersByType' => [ - 'title' => "Počítače podle typů", - 'desc' => "Pruhový", - 'category' => "Typy", - ], - - 'reportPieComputersByType' => [ - 'title' => "Počítače podle typů", - 'desc' => "Výsečový", - 'category' => "Typy", - ], - - 'reportHbarComputersByStatus' => [ - 'title' => "Počítač podle stavů", - 'desc' => "Pruhový", - 'category' => "Stavy", - ], - - 'reportHbarPrintersByStatus' => [ - 'title' => "Tiskárny podle stavů", - 'desc' => "Pruhový", - 'category' => "Stavy", - ], - - 'reportHbarWindows' => [ - 'title' => "Verze Windows", - 'desc' => "Pruhový", - 'category' => "Operační systémy", - ], - - 'reportHbarLinux' => [ - 'title' => "Linuxové distribuce podrobně", - 'desc' => "Pruhový", - 'category' => "Operační systémy", - ], - - 'reportHbarLinuxDistro' => [ - 'title' => "Linuxové distribuce podrobně", - 'desc' => "Pruhový", - 'category' => "Operační systémy", - ], - - 'reportHbarMac' => [ - 'title' => "Verze macOS podrobně", - 'desc' => "Pruhový", - 'category' => "Operační systémy", - ], - - 'reportHbarMacFamily' => [ - 'title' => "Přehled verzí macOS", - 'desc' => "Pruhový", - 'category' => "Operační systémy", - ], - - 'reportHbarComputersByAge' => [ - 'title' => "Počítače podle stáří", - 'desc' => "Pruhový", - 'category' => "Inventář", - ], - - 'reportPieComputersByAge' => [ - 'title' => "Počítače podle stáří", - 'desc' => "Výsečový", - 'category' => "Inventář", - ], - - 'reportHbarFusionInventory' => [ - 'title' => "Rozložení verzí FusionInventory agentů", - 'desc' => "Pruhový", - 'category' => "Agenti", - ], - - 'reportPieFusionInventory' => [ - 'title' => "Rozložení verzí FusionInventory agentů", - 'desc' => "Výsečový", - 'category' => "Agenti", - ], - - 'reportHbarMonitors' => [ - 'title' => "Rozložení obrazovek podle počítačů", - 'desc' => "Pruhový", - 'category' => "Inventář", - ], + 'title' => 'Inventura', + + 'reportHbarComputersByOS' => [ + 'title' => 'Počítače podle operačních systémů', + 'desc' => 'Pruhový', + 'category' => 'Operační systémy', + ], + + 'reportPieComputersByOS' => [ + 'title' => 'Počítače podle operačních systémů', + 'desc' => 'Výsečový', + 'category' => 'Operační systémy', + ], + + 'reportHbarComputersByFabricant' => [ + 'title' => 'Počítače podle výrobců', + 'desc' => 'Pruhový', + 'category' => 'Výrobci', + ], + + 'reportPieComputersByFabricant' => [ + 'title' => 'Počítače podle výrobců', + 'desc' => 'Výsečový', + 'category' => 'Výrobci', + ], + + 'reportHbarComputersByType' => [ + 'title' => 'Počítače podle typů', + 'desc' => 'Pruhový', + 'category' => 'Typy', + ], + + 'reportPieComputersByType' => [ + 'title' => 'Počítače podle typů', + 'desc' => 'Výsečový', + 'category' => 'Typy', + ], + + 'reportHbarComputersByStatus' => [ + 'title' => 'Počítač podle stavů', + 'desc' => 'Pruhový', + 'category' => 'Stavy', + ], + + 'reportHbarPrintersByStatus' => [ + 'title' => 'Tiskárny podle stavů', + 'desc' => 'Pruhový', + 'category' => 'Stavy', + ], + + 'reportHbarWindows' => [ + 'title' => 'Verze Windows', + 'desc' => 'Pruhový', + 'category' => 'Operační systémy', + ], + + 'reportHbarLinux' => [ + 'title' => 'Linuxové distribuce podrobně', + 'desc' => 'Pruhový', + 'category' => 'Operační systémy', + ], + + 'reportHbarLinuxDistro' => [ + 'title' => 'Linuxové distribuce podrobně', + 'desc' => 'Pruhový', + 'category' => 'Operační systémy', + ], + + 'reportHbarMac' => [ + 'title' => 'Verze macOS podrobně', + 'desc' => 'Pruhový', + 'category' => 'Operační systémy', + ], + + 'reportHbarMacFamily' => [ + 'title' => 'Přehled verzí macOS', + 'desc' => 'Pruhový', + 'category' => 'Operační systémy', + ], + + 'reportHbarComputersByAge' => [ + 'title' => 'Počítače podle stáří', + 'desc' => 'Pruhový', + 'category' => 'Inventář', + ], + + 'reportPieComputersByAge' => [ + 'title' => 'Počítače podle stáří', + 'desc' => 'Výsečový', + 'category' => 'Inventář', + ], + + 'reportHbarFusionInventory' => [ + 'title' => 'Rozložení verzí FusionInventory agentů', + 'desc' => 'Pruhový', + 'category' => 'Agenti', + ], + + 'reportPieFusionInventory' => [ + 'title' => 'Rozložení verzí FusionInventory agentů', + 'desc' => 'Výsečový', + 'category' => 'Agenti', + ], + + 'reportHbarMonitors' => [ + 'title' => 'Rozložení obrazovek podle počítačů', + 'desc' => 'Pruhový', + 'category' => 'Inventář', + ], 'reportHbarComputersByEntity' => [ - 'title' => "Počítače podle entit", - 'desc' => "Pruhový", - 'category' => "Entity", + 'title' => 'Počítače podle entit', + 'desc' => 'Pruhový', + 'category' => 'Entity', ], ]; diff --git a/locales/reports_locales/inventory_de_DE.php b/locales/reports_locales/inventory_de_DE.php index ae2af7d4..9cef970f 100644 --- a/locales/reports_locales/inventory_de_DE.php +++ b/locales/reports_locales/inventory_de_DE.php @@ -32,119 +32,119 @@ $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Inventar", - - 'reportHbarComputersByOS' => [ - 'title' => "Computer nach Betriebssystem", - 'desc' => "Bars", - 'category' => "Betriebssystem", - ], - - 'reportPieComputersByOS' => [ - 'title' => "Computer nach Betriebssystem", - 'desc' => "Camenbert", - 'category' => "Betriebssystem", - ], - - 'reportHbarComputersByFabricant' => [ - 'title' => "Computer nach Hersteller", - 'desc' => "Bars", - 'category' => "Hersteller", - ], - - 'reportPieComputersByFabricant' => [ - 'title' => "Computer nach Hersteller", - 'desc' => "Pie", - 'category' => "Hersteller", - ], - - 'reportHbarComputersByType' => [ - 'title' => "Computer nach Typ", - 'desc' => "Bars", - 'category' => "Typ", - ], - - 'reportPieComputersByType' => [ - 'title' => "Computer nach Typ", - 'desc' => "Pie", - 'category' => "Typ", - ], - - 'reportHbarComputersByStatus' => [ - 'title' => "Computer nach Status", - 'desc' => "Bars", - 'category' => "Status", - ], - - 'reportHbarPrintersByStatus' => [ - 'title' => "Drucker nach Status", - 'desc' => "Bars", - 'category' => "Status", - ], - - 'reportHbarWindows' => [ - 'title' => "Windows Verteilung", - 'desc' => "Bars", - 'category' => "Betriebssystem", - ], - - 'reportHbarLinux' => [ - 'title' => "Linux Verteilung Versionen", - 'desc' => "Bars", - 'category' => "Betriebssystem", - ], - - 'reportHbarLinuxDistro' => [ - 'title' => "Linux Verteilung Distributionen", - 'desc' => "Bars", - 'category' => "Betriebssystem", - ], - - 'reportHbarMac' => [ - 'title' => "Mac OS X Versionen", - 'desc' => "Bars", - 'category' => "Betriebssystem", - ], - - 'reportHbarMacFamily' => [ - 'title' => "MAC OS X-Versionen Verteilung", - 'desc' => "Bars", - 'category' => "Betriebssystem", - ], - - 'reportHbarComputersByAge' => [ - 'title' => "Computer nach Alter", - 'desc' => "Bars", - 'category' => "Inventar", - ], - - 'reportPieComputersByAge' => [ - 'title' => "Computer nach Alter", - 'desc' => "Pie", - 'category' => "Inventar", - ], - - 'reportHbarFusionInventory' => [ - 'title' => "FusionInventory Agenten-Verteilung", - 'desc' => "Bars", - 'category' => "Agent", - ], - - 'reportPieFusionInventory' => [ - 'title' => "FusionInventory Agenten-Verteilung", - 'desc' => "Pie", - 'category' => "Agent", - ], - - 'reportHbarMonitors' => [ - 'title' => "Bildschirme pro Computer", - 'desc' => "Bars", - 'category' => "Inventar", - ], + 'title' => 'Inventar', + + 'reportHbarComputersByOS' => [ + 'title' => 'Computer nach Betriebssystem', + 'desc' => 'Bars', + 'category' => 'Betriebssystem', + ], + + 'reportPieComputersByOS' => [ + 'title' => 'Computer nach Betriebssystem', + 'desc' => 'Camenbert', + 'category' => 'Betriebssystem', + ], + + 'reportHbarComputersByFabricant' => [ + 'title' => 'Computer nach Hersteller', + 'desc' => 'Bars', + 'category' => 'Hersteller', + ], + + 'reportPieComputersByFabricant' => [ + 'title' => 'Computer nach Hersteller', + 'desc' => 'Pie', + 'category' => 'Hersteller', + ], + + 'reportHbarComputersByType' => [ + 'title' => 'Computer nach Typ', + 'desc' => 'Bars', + 'category' => 'Typ', + ], + + 'reportPieComputersByType' => [ + 'title' => 'Computer nach Typ', + 'desc' => 'Pie', + 'category' => 'Typ', + ], + + 'reportHbarComputersByStatus' => [ + 'title' => 'Computer nach Status', + 'desc' => 'Bars', + 'category' => 'Status', + ], + + 'reportHbarPrintersByStatus' => [ + 'title' => 'Drucker nach Status', + 'desc' => 'Bars', + 'category' => 'Status', + ], + + 'reportHbarWindows' => [ + 'title' => 'Windows Verteilung', + 'desc' => 'Bars', + 'category' => 'Betriebssystem', + ], + + 'reportHbarLinux' => [ + 'title' => 'Linux Verteilung Versionen', + 'desc' => 'Bars', + 'category' => 'Betriebssystem', + ], + + 'reportHbarLinuxDistro' => [ + 'title' => 'Linux Verteilung Distributionen', + 'desc' => 'Bars', + 'category' => 'Betriebssystem', + ], + + 'reportHbarMac' => [ + 'title' => 'Mac OS X Versionen', + 'desc' => 'Bars', + 'category' => 'Betriebssystem', + ], + + 'reportHbarMacFamily' => [ + 'title' => 'MAC OS X-Versionen Verteilung', + 'desc' => 'Bars', + 'category' => 'Betriebssystem', + ], + + 'reportHbarComputersByAge' => [ + 'title' => 'Computer nach Alter', + 'desc' => 'Bars', + 'category' => 'Inventar', + ], + + 'reportPieComputersByAge' => [ + 'title' => 'Computer nach Alter', + 'desc' => 'Pie', + 'category' => 'Inventar', + ], + + 'reportHbarFusionInventory' => [ + 'title' => 'FusionInventory Agenten-Verteilung', + 'desc' => 'Bars', + 'category' => 'Agent', + ], + + 'reportPieFusionInventory' => [ + 'title' => 'FusionInventory Agenten-Verteilung', + 'desc' => 'Pie', + 'category' => 'Agent', + ], + + 'reportHbarMonitors' => [ + 'title' => 'Bildschirme pro Computer', + 'desc' => 'Bars', + 'category' => 'Inventar', + ], 'reportHbarComputersByEntity' => [ - 'title' => "Computer nach Einheiten", - 'desc' => "Bars", - 'category' => "Einheit", + 'title' => 'Computer nach Einheiten', + 'desc' => 'Bars', + 'category' => 'Einheit', ], ]; diff --git a/locales/reports_locales/inventory_en_GB.php b/locales/reports_locales/inventory_en_GB.php index 4f2ae423..9d69bfa2 100644 --- a/locales/reports_locales/inventory_en_GB.php +++ b/locales/reports_locales/inventory_en_GB.php @@ -32,119 +32,119 @@ $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Inventory", - - 'reportHbarComputersByOS' => [ - 'title' => "Computers per OS", - 'desc' => "Bars", - 'category' => "OS", - ], - - 'reportPieComputersByOS' => [ - 'title' => "Computers per OS", - 'desc' => "Camenbert", - 'category' => "OS", - ], - - 'reportHbarComputersByFabricant' => [ - 'title' => "Computers per manufacturer", - 'desc' => "Bars", - 'category' => "Manufacturer", - ], - - 'reportPieComputersByFabricant' => [ - 'title' => "Computers per manufacturer", - 'desc' => "Pie", - 'category' => "Manufacturer", - ], - - 'reportHbarComputersByType' => [ - 'title' => "Computers per type", - 'desc' => "Bars", - 'category' => "Type", - ], - - 'reportPieComputersByType' => [ - 'title' => "Computers per type", - 'desc' => "Pie", - 'category' => "Type", - ], - - 'reportHbarComputersByStatus' => [ - 'title' => "Computers per status", - 'desc' => "Bars", - 'category' => "Statut", - ], - - 'reportHbarPrintersByStatus' => [ - 'title' => "Printers per status", - 'desc' => "Bars", - 'category' => "Statut", - ], - - 'reportHbarWindows' => [ - 'title' => "Windows distribution", - 'desc' => "Bars", - 'category' => "OS", - ], - - 'reportHbarLinux' => [ - 'title' => "Linux distribution detail", - 'desc' => "Bars", - 'category' => "OS", - ], - - 'reportHbarLinuxDistro' => [ - 'title' => "Linux distribution detail", - 'desc' => "Bars", - 'category' => "OS", - ], - - 'reportHbarMac' => [ - 'title' => "Mac OS X versions details", - 'desc' => "Bars", - 'category' => "OS", - ], - - 'reportHbarMacFamily' => [ - 'title' => "MAC OS X version overview", - 'desc' => "Bars", - 'category' => "OS", - ], - - 'reportHbarComputersByAge' => [ - 'title' => "Computer per age", - 'desc' => "Bars", - 'category' => "Inventaire", - ], - - 'reportPieComputersByAge' => [ - 'title' => "Computer per age", - 'desc' => "Pie", - 'category' => "Inventaire", - ], - - 'reportHbarFusionInventory' => [ - 'title' => "FusionInventory agent distribution", - 'desc' => "Bars", - 'category' => "Agent", - ], - - 'reportPieFusionInventory' => [ - 'title' => "FusionInventory agent distribution", - 'desc' => "Pie", - 'category' => "Agent", - ], - - 'reportHbarMonitors' => [ - 'title' => "Screens per computer distribution", - 'desc' => "Bars", - 'category' => "Inventaire", - ], + 'title' => 'Inventory', + + 'reportHbarComputersByOS' => [ + 'title' => 'Computers per OS', + 'desc' => 'Bars', + 'category' => 'OS', + ], + + 'reportPieComputersByOS' => [ + 'title' => 'Computers per OS', + 'desc' => 'Camenbert', + 'category' => 'OS', + ], + + 'reportHbarComputersByFabricant' => [ + 'title' => 'Computers per manufacturer', + 'desc' => 'Bars', + 'category' => 'Manufacturer', + ], + + 'reportPieComputersByFabricant' => [ + 'title' => 'Computers per manufacturer', + 'desc' => 'Pie', + 'category' => 'Manufacturer', + ], + + 'reportHbarComputersByType' => [ + 'title' => 'Computers per type', + 'desc' => 'Bars', + 'category' => 'Type', + ], + + 'reportPieComputersByType' => [ + 'title' => 'Computers per type', + 'desc' => 'Pie', + 'category' => 'Type', + ], + + 'reportHbarComputersByStatus' => [ + 'title' => 'Computers per status', + 'desc' => 'Bars', + 'category' => 'Statut', + ], + + 'reportHbarPrintersByStatus' => [ + 'title' => 'Printers per status', + 'desc' => 'Bars', + 'category' => 'Statut', + ], + + 'reportHbarWindows' => [ + 'title' => 'Windows distribution', + 'desc' => 'Bars', + 'category' => 'OS', + ], + + 'reportHbarLinux' => [ + 'title' => 'Linux distribution detail', + 'desc' => 'Bars', + 'category' => 'OS', + ], + + 'reportHbarLinuxDistro' => [ + 'title' => 'Linux distribution detail', + 'desc' => 'Bars', + 'category' => 'OS', + ], + + 'reportHbarMac' => [ + 'title' => 'Mac OS X versions details', + 'desc' => 'Bars', + 'category' => 'OS', + ], + + 'reportHbarMacFamily' => [ + 'title' => 'MAC OS X version overview', + 'desc' => 'Bars', + 'category' => 'OS', + ], + + 'reportHbarComputersByAge' => [ + 'title' => 'Computer per age', + 'desc' => 'Bars', + 'category' => 'Inventaire', + ], + + 'reportPieComputersByAge' => [ + 'title' => 'Computer per age', + 'desc' => 'Pie', + 'category' => 'Inventaire', + ], + + 'reportHbarFusionInventory' => [ + 'title' => 'FusionInventory agent distribution', + 'desc' => 'Bars', + 'category' => 'Agent', + ], + + 'reportPieFusionInventory' => [ + 'title' => 'FusionInventory agent distribution', + 'desc' => 'Pie', + 'category' => 'Agent', + ], + + 'reportHbarMonitors' => [ + 'title' => 'Screens per computer distribution', + 'desc' => 'Bars', + 'category' => 'Inventaire', + ], 'reportHbarComputersByEntity' => [ - 'title' => "Computers per entities", - 'desc' => "Bars", - 'category' => "Entity", + 'title' => 'Computers per entities', + 'desc' => 'Bars', + 'category' => 'Entity', ], ]; diff --git a/locales/reports_locales/inventory_es_VE.php b/locales/reports_locales/inventory_es_VE.php index 370a646a..f20f2984 100644 --- a/locales/reports_locales/inventory_es_VE.php +++ b/locales/reports_locales/inventory_es_VE.php @@ -32,119 +32,119 @@ $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Inventario", - - 'reportHbarComputersByOS' => [ - 'title' => "Computadoras por sistema operativo", - 'desc' => "Barras", - 'category' => "Sistema Operativo", - ], - - 'reportPieComputersByOS' => [ - 'title' => "Computadoras por sistema operativo", - 'desc' => "Torta con corte", - 'category' => "Sistema Operativo", - ], - - 'reportHbarComputersByFabricant' => [ - 'title' => "Computadoras por fabricante", - 'desc' => "Barras", - 'category' => "Fabricante", - ], - - 'reportPieComputersByFabricant' => [ - 'title' => "Computadoras por fabricante", - 'desc' => "Pie", - 'category' => "Fabricante", - ], - - 'reportHbarComputersByType' => [ - 'title' => "Computadoras por tipo", - 'desc' => "Barras", - 'category' => "Tipo", - ], - - 'reportPieComputersByType' => [ - 'title' => "Computadoras por tipo", - 'desc' => "Pie", - 'category' => "Tipo", - ], - - 'reportHbarComputersByStatus' => [ - 'title' => "Computadoras por estado", - 'desc' => "Barras", - 'category' => "Estado", - ], - - 'reportHbarPrintersByStatus' => [ - 'title' => "Impresoras por estado", - 'desc' => "Barras", - 'category' => "Estado", - ], - - 'reportHbarWindows' => [ - 'title' => "Distribución Windows", - 'desc' => "Barras", - 'category' => "Sistema Operativo", - ], - - 'reportHbarLinux' => [ - 'title' => "Detalle distribución Linux", - 'desc' => "Barras", - 'category' => "Sistema Operativo", - ], - - 'reportHbarLinuxDistro' => [ - 'title' => "Detalle distribución Linux", - 'desc' => "Barras", - 'category' => "Sistema Operativo", - ], - - 'reportHbarMac' => [ - 'title' => "Detalle versiones MAC OS X", - 'desc' => "Barras", - 'category' => "Sistema Operativo", - ], - - 'reportHbarMacFamily' => [ - 'title' => "Vista general versiones MAC OS X", - 'desc' => "Barras", - 'category' => "Sistema Operativo", - ], - - 'reportHbarComputersByAge' => [ - 'title' => "Computadoras por antiguedad", - 'desc' => "Barras", - 'category' => "Activos", - ], - - 'reportPieComputersByAge' => [ - 'title' => "Computadoras por antiguedad", - 'desc' => "Pie", - 'category' => "Activos", - ], - - 'reportHbarFusionInventory' => [ - 'title' => "Distribución de agentes FusionInventory", - 'desc' => "Barras", - 'category' => "Agente", - ], - - 'reportPieFusionInventory' => [ - 'title' => "Distribución de agentes FusionInventory", - 'desc' => "Pie", - 'category' => "Agente", - ], - - 'reportHbarMonitors' => [ - 'title' => "Distribución de computadoras por Numero de Monitores", - 'desc' => "Barras", - 'category' => "Activos", - ], + 'title' => 'Inventario', + + 'reportHbarComputersByOS' => [ + 'title' => 'Computadoras por sistema operativo', + 'desc' => 'Barras', + 'category' => 'Sistema Operativo', + ], + + 'reportPieComputersByOS' => [ + 'title' => 'Computadoras por sistema operativo', + 'desc' => 'Torta con corte', + 'category' => 'Sistema Operativo', + ], + + 'reportHbarComputersByFabricant' => [ + 'title' => 'Computadoras por fabricante', + 'desc' => 'Barras', + 'category' => 'Fabricante', + ], + + 'reportPieComputersByFabricant' => [ + 'title' => 'Computadoras por fabricante', + 'desc' => 'Pie', + 'category' => 'Fabricante', + ], + + 'reportHbarComputersByType' => [ + 'title' => 'Computadoras por tipo', + 'desc' => 'Barras', + 'category' => 'Tipo', + ], + + 'reportPieComputersByType' => [ + 'title' => 'Computadoras por tipo', + 'desc' => 'Pie', + 'category' => 'Tipo', + ], + + 'reportHbarComputersByStatus' => [ + 'title' => 'Computadoras por estado', + 'desc' => 'Barras', + 'category' => 'Estado', + ], + + 'reportHbarPrintersByStatus' => [ + 'title' => 'Impresoras por estado', + 'desc' => 'Barras', + 'category' => 'Estado', + ], + + 'reportHbarWindows' => [ + 'title' => 'Distribución Windows', + 'desc' => 'Barras', + 'category' => 'Sistema Operativo', + ], + + 'reportHbarLinux' => [ + 'title' => 'Detalle distribución Linux', + 'desc' => 'Barras', + 'category' => 'Sistema Operativo', + ], + + 'reportHbarLinuxDistro' => [ + 'title' => 'Detalle distribución Linux', + 'desc' => 'Barras', + 'category' => 'Sistema Operativo', + ], + + 'reportHbarMac' => [ + 'title' => 'Detalle versiones MAC OS X', + 'desc' => 'Barras', + 'category' => 'Sistema Operativo', + ], + + 'reportHbarMacFamily' => [ + 'title' => 'Vista general versiones MAC OS X', + 'desc' => 'Barras', + 'category' => 'Sistema Operativo', + ], + + 'reportHbarComputersByAge' => [ + 'title' => 'Computadoras por antiguedad', + 'desc' => 'Barras', + 'category' => 'Activos', + ], + + 'reportPieComputersByAge' => [ + 'title' => 'Computadoras por antiguedad', + 'desc' => 'Pie', + 'category' => 'Activos', + ], + + 'reportHbarFusionInventory' => [ + 'title' => 'Distribución de agentes FusionInventory', + 'desc' => 'Barras', + 'category' => 'Agente', + ], + + 'reportPieFusionInventory' => [ + 'title' => 'Distribución de agentes FusionInventory', + 'desc' => 'Pie', + 'category' => 'Agente', + ], + + 'reportHbarMonitors' => [ + 'title' => 'Distribución de computadoras por Numero de Monitores', + 'desc' => 'Barras', + 'category' => 'Activos', + ], 'reportHbarComputersByEntity' => [ - 'title' => "Computadoras por entidad", - 'desc' => "Barras", - 'category' => "Entidad", + 'title' => 'Computadoras por entidad', + 'desc' => 'Barras', + 'category' => 'Entidad', ], ]; diff --git a/locales/reports_locales/inventory_fr_FR.php b/locales/reports_locales/inventory_fr_FR.php index 574abf14..c122c982 100644 --- a/locales/reports_locales/inventory_fr_FR.php +++ b/locales/reports_locales/inventory_fr_FR.php @@ -32,120 +32,120 @@ $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Inventaire", - - 'reportHbarComputersByOS' => [ - 'title' => "Ordinateurs par OS", - 'desc' => "Barres", - 'category' => "OS", - ], - - 'reportPieComputersByOS' => [ - 'title' => "Ordinateurs par OS", - 'desc' => "Camenbert", - 'category' => "OS", - ], - - 'reportHbarComputersByFabricant' => [ - 'title' => "Ordinateurs par fabricant", - 'desc' => "Barres", - 'category' => "Fabricant", - ], - - 'reportPieComputersByFabricant' => [ - 'title' => "Ordinateurs par fabricant", - 'desc' => "Camembert", - 'category' => "Fabricant", - ], - - 'reportHbarComputersByType' => [ - 'title' => "Ordinateurs par type", - 'desc' => "Barres", - 'category' => "Type", - ], - - 'reportPieComputersByType' => [ - 'title' => "Ordinateurs par type", - 'desc' => "Camembert", - 'category' => "Type", - ], - - 'reportHbarComputersByStatus' => [ - 'title' => "Ordinateurs par statut", - 'desc' => "Barres", - 'category' => "Statut", - ], - - 'reportHbarPrintersByStatus' => [ - 'title' => "Imprimantes par statut", - 'desc' => "Barres", - 'category' => "Statut", - ], - - 'reportHbarWindows' => [ - 'title' => "Répartition des versions de Windows dans le parc", - 'desc' => "Barres", - 'category' => "OS", - ], - - 'reportHbarLinux' => [ - 'title' => "Détail des versions de Linux dans le parc", - 'desc' => "Barres", - 'category' => "OS", - ], - - 'reportHbarLinuxDistro' => [ - 'title' => "Répartition des distributions de Linux dans le parc", - 'desc' => "Barres", - 'category' => "OS", - ], - - 'reportHbarMac' => [ - 'title' => "Détail des versions de Mac OS X dans le parc", - 'desc' => "Barres", - 'category' => "OS", - ], - - 'reportHbarMacFamily' => [ - 'title' => "Répartition des versions de Mac OS X dans le parc", - 'desc' => "Barres", - 'category' => "OS", - ], - - 'reportHbarComputersByAge' => [ - 'title' => "Ordinateurs par âge", - 'desc' => "Barres", - 'category' => "Inventaire", - ], - - 'reportPieComputersByAge' => [ - 'title' => "Ordinateurs par âge", - 'desc' => "Camembert", - 'category' => "Inventaire", - ], - - 'reportHbarFusionInventory' => [ - 'title' => "Répartition version agent FusionInventory", - 'desc' => "Barres", - 'category' => "Agent", - ], - - 'reportPieFusionInventory' => [ - 'title' => "Répartition version agent FusionInventory", - 'desc' => "Camembert", - 'category' => "Agent", - ], - - 'reportHbarMonitors' => [ - 'title' => "Répartition du nombre d'écrans par ordinateur", - 'desc' => "Barres", - 'category' => "Inventaire", - ], + 'title' => 'Inventaire', + + 'reportHbarComputersByOS' => [ + 'title' => 'Ordinateurs par OS', + 'desc' => 'Barres', + 'category' => 'OS', + ], + + 'reportPieComputersByOS' => [ + 'title' => 'Ordinateurs par OS', + 'desc' => 'Camenbert', + 'category' => 'OS', + ], + + 'reportHbarComputersByFabricant' => [ + 'title' => 'Ordinateurs par fabricant', + 'desc' => 'Barres', + 'category' => 'Fabricant', + ], + + 'reportPieComputersByFabricant' => [ + 'title' => 'Ordinateurs par fabricant', + 'desc' => 'Camembert', + 'category' => 'Fabricant', + ], + + 'reportHbarComputersByType' => [ + 'title' => 'Ordinateurs par type', + 'desc' => 'Barres', + 'category' => 'Type', + ], + + 'reportPieComputersByType' => [ + 'title' => 'Ordinateurs par type', + 'desc' => 'Camembert', + 'category' => 'Type', + ], + + 'reportHbarComputersByStatus' => [ + 'title' => 'Ordinateurs par statut', + 'desc' => 'Barres', + 'category' => 'Statut', + ], + + 'reportHbarPrintersByStatus' => [ + 'title' => 'Imprimantes par statut', + 'desc' => 'Barres', + 'category' => 'Statut', + ], + + 'reportHbarWindows' => [ + 'title' => 'Répartition des versions de Windows dans le parc', + 'desc' => 'Barres', + 'category' => 'OS', + ], + + 'reportHbarLinux' => [ + 'title' => 'Détail des versions de Linux dans le parc', + 'desc' => 'Barres', + 'category' => 'OS', + ], + + 'reportHbarLinuxDistro' => [ + 'title' => 'Répartition des distributions de Linux dans le parc', + 'desc' => 'Barres', + 'category' => 'OS', + ], + + 'reportHbarMac' => [ + 'title' => 'Détail des versions de Mac OS X dans le parc', + 'desc' => 'Barres', + 'category' => 'OS', + ], + + 'reportHbarMacFamily' => [ + 'title' => 'Répartition des versions de Mac OS X dans le parc', + 'desc' => 'Barres', + 'category' => 'OS', + ], + + 'reportHbarComputersByAge' => [ + 'title' => 'Ordinateurs par âge', + 'desc' => 'Barres', + 'category' => 'Inventaire', + ], + + 'reportPieComputersByAge' => [ + 'title' => 'Ordinateurs par âge', + 'desc' => 'Camembert', + 'category' => 'Inventaire', + ], + + 'reportHbarFusionInventory' => [ + 'title' => 'Répartition version agent FusionInventory', + 'desc' => 'Barres', + 'category' => 'Agent', + ], + + 'reportPieFusionInventory' => [ + 'title' => 'Répartition version agent FusionInventory', + 'desc' => 'Camembert', + 'category' => 'Agent', + ], + + 'reportHbarMonitors' => [ + 'title' => "Répartition du nombre d'écrans par ordinateur", + 'desc' => 'Barres', + 'category' => 'Inventaire', + ], 'reportHbarComputersByEntity' => [ - 'title' => "Répartition du nombre d'ordinateurs par entités", - 'desc' => "Barres", - 'category' => "Entité", + 'title' => "Répartition du nombre d'ordinateurs par entités", + 'desc' => 'Barres', + 'category' => 'Entité', ], ]; diff --git a/locales/reports_locales/inventory_hr_HR.php b/locales/reports_locales/inventory_hr_HR.php index 7816a629..c2fe4861 100644 --- a/locales/reports_locales/inventory_hr_HR.php +++ b/locales/reports_locales/inventory_hr_HR.php @@ -32,119 +32,119 @@ $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Inventar", - - 'reportHbarComputersByOS' => [ - 'title' => "Računala po OS-u", - 'desc' => "Stupci", - 'category' => "OS", - ], - - 'reportPieComputersByOS' => [ - 'title' => "Računala po OS-u", - 'desc' => "Torta", - 'category' => "OS", - ], - - 'reportHbarComputersByFabricant' => [ - 'title' => "Računala po proizvođaču", - 'desc' => "Stupci", - 'category' => "Proizvođač", - ], - - 'reportPieComputersByFabricant' => [ - 'title' => "Računala po proizvođaču", - 'desc' => "Torta", - 'category' => "Proizvođač", - ], - - 'reportHbarComputersByType' => [ - 'title' => "Računala po vrsti", - 'desc' => "Stupci", - 'category' => "Vrsta", - ], - - 'reportPieComputersByType' => [ - 'title' => "Računala po vrsti", - 'desc' => "Torta", - 'category' => "Vrsta", - ], - - 'reportHbarComputersByStatus' => [ - 'title' => "Računala po stanju", - 'desc' => "Stupci", - 'category' => "Stanje", - ], - - 'reportHbarPrintersByStatus' => [ - 'title' => "Pisači po stanju", - 'desc' => "Stupci", - 'category' => "Stanje", - ], - - 'reportHbarWindows' => [ - 'title' => "Windows verzije", - 'desc' => "Stupci", - 'category' => "OS", - ], - - 'reportHbarLinux' => [ - 'title' => "Linux verzije", - 'desc' => "Stupci", - 'category' => "OS", - ], - - 'reportHbarLinuxDistro' => [ - 'title' => "Linux distribucije", - 'desc' => "Stupci", - 'category' => "OS", - ], - - 'reportHbarMac' => [ - 'title' => "Mac OS X verzije", - 'desc' => "Stupci", - 'category' => "OS", - ], - - 'reportHbarMacFamily' => [ - 'title' => "MAC OS X verzije, pregled", - 'desc' => "Stupci", - 'category' => "OS", - ], - - 'reportHbarComputersByAge' => [ - 'title' => "Računala po starosti", - 'desc' => "Stupci", - 'category' => "Inventar", - ], - - 'reportPieComputersByAge' => [ - 'title' => "Računala po starosti", - 'desc' => "Torta", - 'category' => "Inventar", - ], - - 'reportHbarFusionInventory' => [ - 'title' => "FusionInventory agenti", - 'desc' => "Stupci", - 'category' => "Agent", - ], - - 'reportPieFusionInventory' => [ - 'title' => "FusionInventory agenti", - 'desc' => "Torta", - 'category' => "Agent", - ], - - 'reportHbarMonitors' => [ - 'title' => "Ekrani po računalu", - 'desc' => "Stupci", - 'category' => "Inventar", - ], + 'title' => 'Inventar', + + 'reportHbarComputersByOS' => [ + 'title' => 'Računala po OS-u', + 'desc' => 'Stupci', + 'category' => 'OS', + ], + + 'reportPieComputersByOS' => [ + 'title' => 'Računala po OS-u', + 'desc' => 'Torta', + 'category' => 'OS', + ], + + 'reportHbarComputersByFabricant' => [ + 'title' => 'Računala po proizvođaču', + 'desc' => 'Stupci', + 'category' => 'Proizvođač', + ], + + 'reportPieComputersByFabricant' => [ + 'title' => 'Računala po proizvođaču', + 'desc' => 'Torta', + 'category' => 'Proizvođač', + ], + + 'reportHbarComputersByType' => [ + 'title' => 'Računala po vrsti', + 'desc' => 'Stupci', + 'category' => 'Vrsta', + ], + + 'reportPieComputersByType' => [ + 'title' => 'Računala po vrsti', + 'desc' => 'Torta', + 'category' => 'Vrsta', + ], + + 'reportHbarComputersByStatus' => [ + 'title' => 'Računala po stanju', + 'desc' => 'Stupci', + 'category' => 'Stanje', + ], + + 'reportHbarPrintersByStatus' => [ + 'title' => 'Pisači po stanju', + 'desc' => 'Stupci', + 'category' => 'Stanje', + ], + + 'reportHbarWindows' => [ + 'title' => 'Windows verzije', + 'desc' => 'Stupci', + 'category' => 'OS', + ], + + 'reportHbarLinux' => [ + 'title' => 'Linux verzije', + 'desc' => 'Stupci', + 'category' => 'OS', + ], + + 'reportHbarLinuxDistro' => [ + 'title' => 'Linux distribucije', + 'desc' => 'Stupci', + 'category' => 'OS', + ], + + 'reportHbarMac' => [ + 'title' => 'Mac OS X verzije', + 'desc' => 'Stupci', + 'category' => 'OS', + ], + + 'reportHbarMacFamily' => [ + 'title' => 'MAC OS X verzije, pregled', + 'desc' => 'Stupci', + 'category' => 'OS', + ], + + 'reportHbarComputersByAge' => [ + 'title' => 'Računala po starosti', + 'desc' => 'Stupci', + 'category' => 'Inventar', + ], + + 'reportPieComputersByAge' => [ + 'title' => 'Računala po starosti', + 'desc' => 'Torta', + 'category' => 'Inventar', + ], + + 'reportHbarFusionInventory' => [ + 'title' => 'FusionInventory agenti', + 'desc' => 'Stupci', + 'category' => 'Agent', + ], + + 'reportPieFusionInventory' => [ + 'title' => 'FusionInventory agenti', + 'desc' => 'Torta', + 'category' => 'Agent', + ], + + 'reportHbarMonitors' => [ + 'title' => 'Ekrani po računalu', + 'desc' => 'Stupci', + 'category' => 'Inventar', + ], 'reportHbarComputersByEntity' => [ - 'title' => "Računala po entitetu", - 'desc' => "Stupci", - 'category' => "Entitet", + 'title' => 'Računala po entitetu', + 'desc' => 'Stupci', + 'category' => 'Entitet', ], ]; diff --git a/locales/reports_locales/inventory_pl_PL.php b/locales/reports_locales/inventory_pl_PL.php index 4169beca..f9308aa5 100644 --- a/locales/reports_locales/inventory_pl_PL.php +++ b/locales/reports_locales/inventory_pl_PL.php @@ -32,119 +32,119 @@ $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Zasoby", - - 'reportHbarComputersByOS' => [ - 'title' => "Komputery wg OS", - 'desc' => "wykres słupkowy", - 'category' => "OS", - ], - - 'reportPieComputersByOS' => [ - 'title' => "Komputery wg OS", - 'desc' => "wykres kołowy", - 'category' => "OS", - ], - - 'reportHbarComputersByFabricant' => [ - 'title' => "Komputery wg producenta", - 'desc' => "wykres słupkowy", - 'category' => "Producent", - ], - - 'reportPieComputersByFabricant' => [ - 'title' => "Komputery wg producenta", - 'desc' => "wykres kołowy", - 'category' => "Producent", - ], - - 'reportHbarComputersByType' => [ - 'title' => "Komputery wg typu", - 'desc' => "wykres słupkowy", - 'category' => "Typ", - ], - - 'reportPieComputersByType' => [ - 'title' => "Komputery wg typu", - 'desc' => "wykres kołowy", - 'category' => "Typ", - ], - - 'reportHbarComputersByStatus' => [ - 'title' => "Komputery wg statusu", - 'desc' => "wykres słupkowy", - 'category' => "Status", - ], - - 'reportHbarPrintersByStatus' => [ - 'title' => "Komputery wg statusu", - 'desc' => "wykres słupkowy", - 'category' => "Status", - ], - - 'reportHbarWindows' => [ - 'title' => "Windows - wersje", - 'desc' => "wykres słupkowy", - 'category' => "OS", - ], - - 'reportHbarLinux' => [ - 'title' => "Linux - wersje", - 'desc' => "wykres słupkowy", - 'category' => "OS", - ], - - 'reportHbarLinuxDistro' => [ - 'title' => "Linux - wersje", - 'desc' => "wykres słupkowy", - 'category' => "OS", - ], - - 'reportHbarMac' => [ - 'title' => "Mac OS X versions details", - 'desc' => "wykres słupkowy", - 'category' => "OS", - ], - - 'reportHbarMacFamily' => [ - 'title' => "MAC OS X version overview", - 'desc' => "wykres słupkowy", - 'category' => "OS", - ], - - 'reportHbarComputersByAge' => [ - 'title' => "Komputery wg wieku", - 'desc' => "wykres słupkowy", - 'category' => "Inne", - ], - - 'reportPieComputersByAge' => [ - 'title' => "Komputery wg wieku", - 'desc' => "wykres kołowy", - 'category' => "Inne", - ], - - 'reportHbarFusionInventory' => [ - 'title' => "FusionInventory agent - wersje", - 'desc' => "wykres słupkowy", - 'category' => "Agent", - ], - - 'reportPieFusionInventory' => [ - 'title' => "FusionInventory agent - wersje", - 'desc' => "wykres kołowy", - 'category' => "Agent", - ], - - 'reportHbarMonitors' => [ - 'title' => "Ilość monitorów na komputer", - 'desc' => "wykres słupkowy", - 'category' => "Inne", - ], + 'title' => 'Zasoby', + + 'reportHbarComputersByOS' => [ + 'title' => 'Komputery wg OS', + 'desc' => 'wykres słupkowy', + 'category' => 'OS', + ], + + 'reportPieComputersByOS' => [ + 'title' => 'Komputery wg OS', + 'desc' => 'wykres kołowy', + 'category' => 'OS', + ], + + 'reportHbarComputersByFabricant' => [ + 'title' => 'Komputery wg producenta', + 'desc' => 'wykres słupkowy', + 'category' => 'Producent', + ], + + 'reportPieComputersByFabricant' => [ + 'title' => 'Komputery wg producenta', + 'desc' => 'wykres kołowy', + 'category' => 'Producent', + ], + + 'reportHbarComputersByType' => [ + 'title' => 'Komputery wg typu', + 'desc' => 'wykres słupkowy', + 'category' => 'Typ', + ], + + 'reportPieComputersByType' => [ + 'title' => 'Komputery wg typu', + 'desc' => 'wykres kołowy', + 'category' => 'Typ', + ], + + 'reportHbarComputersByStatus' => [ + 'title' => 'Komputery wg statusu', + 'desc' => 'wykres słupkowy', + 'category' => 'Status', + ], + + 'reportHbarPrintersByStatus' => [ + 'title' => 'Komputery wg statusu', + 'desc' => 'wykres słupkowy', + 'category' => 'Status', + ], + + 'reportHbarWindows' => [ + 'title' => 'Windows - wersje', + 'desc' => 'wykres słupkowy', + 'category' => 'OS', + ], + + 'reportHbarLinux' => [ + 'title' => 'Linux - wersje', + 'desc' => 'wykres słupkowy', + 'category' => 'OS', + ], + + 'reportHbarLinuxDistro' => [ + 'title' => 'Linux - wersje', + 'desc' => 'wykres słupkowy', + 'category' => 'OS', + ], + + 'reportHbarMac' => [ + 'title' => 'Mac OS X versions details', + 'desc' => 'wykres słupkowy', + 'category' => 'OS', + ], + + 'reportHbarMacFamily' => [ + 'title' => 'MAC OS X version overview', + 'desc' => 'wykres słupkowy', + 'category' => 'OS', + ], + + 'reportHbarComputersByAge' => [ + 'title' => 'Komputery wg wieku', + 'desc' => 'wykres słupkowy', + 'category' => 'Inne', + ], + + 'reportPieComputersByAge' => [ + 'title' => 'Komputery wg wieku', + 'desc' => 'wykres kołowy', + 'category' => 'Inne', + ], + + 'reportHbarFusionInventory' => [ + 'title' => 'FusionInventory agent - wersje', + 'desc' => 'wykres słupkowy', + 'category' => 'Agent', + ], + + 'reportPieFusionInventory' => [ + 'title' => 'FusionInventory agent - wersje', + 'desc' => 'wykres kołowy', + 'category' => 'Agent', + ], + + 'reportHbarMonitors' => [ + 'title' => 'Ilość monitorów na komputer', + 'desc' => 'wykres słupkowy', + 'category' => 'Inne', + ], 'reportHbarComputersByEntity' => [ - 'title' => "Komputery wg jednostki", - 'desc' => "wykres słupkowy", - 'category' => "Entity", + 'title' => 'Komputery wg jednostki', + 'desc' => 'wykres słupkowy', + 'category' => 'Entity', ], ]; diff --git a/locales/reports_locales/inventory_pt_BR.php b/locales/reports_locales/inventory_pt_BR.php index 47cae2d2..554563a0 100644 --- a/locales/reports_locales/inventory_pt_BR.php +++ b/locales/reports_locales/inventory_pt_BR.php @@ -30,80 +30,80 @@ global $LANG; -$LANG['plugin_mreporting']['Inventory']['title'] = "Inventário"; +$LANG['plugin_mreporting']['Inventory']['title'] = 'Inventário'; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByOS']['title'] = "Computadores por sistema operacional"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByOS']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByOS']['category'] = "Sistema Operacional"; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByOS']['title'] = 'Computadores por sistema operacional'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByOS']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByOS']['category'] = 'Sistema Operacional'; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByOS']['title'] = "Computadores por sistema operacional"; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByOS']['desc'] = "Pizza"; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByOS']['category'] = "Sistema Operacional"; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByOS']['title'] = 'Computadores por sistema operacional'; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByOS']['desc'] = 'Pizza'; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByOS']['category'] = 'Sistema Operacional'; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByFabricant']['title'] = "Computadores por fabricante"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByFabricant']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByFabricant']['category'] = "Fabricante"; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByFabricant']['title'] = 'Computadores por fabricante'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByFabricant']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByFabricant']['category'] = 'Fabricante'; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByFabricant']['title'] = "Computadores por fabricante"; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByFabricant']['desc'] = "Pizza"; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByFabricant']['category'] = "Fabricante"; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByFabricant']['title'] = 'Computadores por fabricante'; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByFabricant']['desc'] = 'Pizza'; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByFabricant']['category'] = 'Fabricante'; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByType']['title'] = "Computadores por tipo"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByType']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByType']['category'] = "Tipo"; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByType']['title'] = 'Computadores por tipo'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByType']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByType']['category'] = 'Tipo'; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByStatus']['title'] = "Computadores por status"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByStatus']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByStatus']['category'] = "Status"; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByStatus']['title'] = 'Computadores por status'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByStatus']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByStatus']['category'] = 'Status'; -$LANG['plugin_mreporting']['Inventory']['reportHbarPrintersByStatus']['title'] = "Impressoras por status"; -$LANG['plugin_mreporting']['Inventory']['reportHbarPrintersByStatus']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarPrintersByStatus']['category'] = "Status"; +$LANG['plugin_mreporting']['Inventory']['reportHbarPrintersByStatus']['title'] = 'Impressoras por status'; +$LANG['plugin_mreporting']['Inventory']['reportHbarPrintersByStatus']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarPrintersByStatus']['category'] = 'Status'; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByType']['title'] = "Computadores por tipo"; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByType']['desc'] = "Pizza"; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByType']['category'] = "Tipo"; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByType']['title'] = 'Computadores por tipo'; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByType']['desc'] = 'Pizza'; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByType']['category'] = 'Tipo'; -$LANG['plugin_mreporting']['Inventory']['reportHbarWindows']['title'] = "Versões do Windows"; -$LANG['plugin_mreporting']['Inventory']['reportHbarWindows']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarWindows']['category'] = "Sistema Operacional"; +$LANG['plugin_mreporting']['Inventory']['reportHbarWindows']['title'] = 'Versões do Windows'; +$LANG['plugin_mreporting']['Inventory']['reportHbarWindows']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarWindows']['category'] = 'Sistema Operacional'; -$LANG['plugin_mreporting']['Inventory']['reportHbarLinux']['title'] = "Distribuições Linux (detalhes)"; -$LANG['plugin_mreporting']['Inventory']['reportHbarLinux']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarLinux']['category'] = "Sistema Operacional"; +$LANG['plugin_mreporting']['Inventory']['reportHbarLinux']['title'] = 'Distribuições Linux (detalhes)'; +$LANG['plugin_mreporting']['Inventory']['reportHbarLinux']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarLinux']['category'] = 'Sistema Operacional'; -$LANG['plugin_mreporting']['Inventory']['reportHbarLinuxDistro']['title'] = "Distribuições Linux (geral)"; -$LANG['plugin_mreporting']['Inventory']['reportHbarLinuxDistro']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarLinuxDistro']['category'] = "Sistema Operacional"; +$LANG['plugin_mreporting']['Inventory']['reportHbarLinuxDistro']['title'] = 'Distribuições Linux (geral)'; +$LANG['plugin_mreporting']['Inventory']['reportHbarLinuxDistro']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarLinuxDistro']['category'] = 'Sistema Operacional'; -$LANG['plugin_mreporting']['Inventory']['reportHbarMac']['title'] = "Versões do macOS (detalhes)"; -$LANG['plugin_mreporting']['Inventory']['reportHbarMac']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarMac']['category'] = "Sistema Operacional"; +$LANG['plugin_mreporting']['Inventory']['reportHbarMac']['title'] = 'Versões do macOS (detalhes)'; +$LANG['plugin_mreporting']['Inventory']['reportHbarMac']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarMac']['category'] = 'Sistema Operacional'; -$LANG['plugin_mreporting']['Inventory']['reportHbarMacFamily']['title'] = "Versões do macOS (geral)"; -$LANG['plugin_mreporting']['Inventory']['reportHbarMacFamily']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarMacFamily']['category'] = "Sistema Operacional"; +$LANG['plugin_mreporting']['Inventory']['reportHbarMacFamily']['title'] = 'Versões do macOS (geral)'; +$LANG['plugin_mreporting']['Inventory']['reportHbarMacFamily']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarMacFamily']['category'] = 'Sistema Operacional'; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByAge']['title'] = "Computadores por período"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByAge']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByAge']['category'] = "Inventário"; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByAge']['title'] = 'Computadores por período'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByAge']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByAge']['category'] = 'Inventário'; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByAge']['title'] = "Computadores por período"; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByAge']['desc'] = "Pizza"; -$LANG['plugin_mreporting']['Inventory']['reportPieComputersByAge']['category'] = "Inventário"; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByAge']['title'] = 'Computadores por período'; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByAge']['desc'] = 'Pizza'; +$LANG['plugin_mreporting']['Inventory']['reportPieComputersByAge']['category'] = 'Inventário'; -$LANG['plugin_mreporting']['Inventory']['reportHbarFusionInventory']['title'] = "Versões do agente FusionInventory"; -$LANG['plugin_mreporting']['Inventory']['reportHbarFusionInventory']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarFusionInventory']['category'] = "Inventário"; +$LANG['plugin_mreporting']['Inventory']['reportHbarFusionInventory']['title'] = 'Versões do agente FusionInventory'; +$LANG['plugin_mreporting']['Inventory']['reportHbarFusionInventory']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarFusionInventory']['category'] = 'Inventário'; -$LANG['plugin_mreporting']['Inventory']['reportPieFusionInventory']['title'] = "Versões do agente FusionInventory"; -$LANG['plugin_mreporting']['Inventory']['reportPieFusionInventory']['desc'] = "Pizza"; -$LANG['plugin_mreporting']['Inventory']['reportPieFusionInventory']['category'] = "Inventário"; +$LANG['plugin_mreporting']['Inventory']['reportPieFusionInventory']['title'] = 'Versões do agente FusionInventory'; +$LANG['plugin_mreporting']['Inventory']['reportPieFusionInventory']['desc'] = 'Pizza'; +$LANG['plugin_mreporting']['Inventory']['reportPieFusionInventory']['category'] = 'Inventário'; -$LANG['plugin_mreporting']['Inventory']['reportHbarMonitors']['title'] = "Computadores por resolução"; -$LANG['plugin_mreporting']['Inventory']['reportHbarMonitors']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarMonitors']['category'] = "Inventário"; +$LANG['plugin_mreporting']['Inventory']['reportHbarMonitors']['title'] = 'Computadores por resolução'; +$LANG['plugin_mreporting']['Inventory']['reportHbarMonitors']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarMonitors']['category'] = 'Inventário'; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByEntity']['title'] = "Computadores por entidade"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByEntity']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByEntity']['category'] = "Entidade"; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByEntity']['title'] = 'Computadores por entidade'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByEntity']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Inventory']['reportHbarComputersByEntity']['category'] = 'Entidade'; diff --git a/locales/reports_locales/inventory_pt_PT.php b/locales/reports_locales/inventory_pt_PT.php index b010459c..125c9864 100644 --- a/locales/reports_locales/inventory_pt_PT.php +++ b/locales/reports_locales/inventory_pt_PT.php @@ -30,100 +30,100 @@ global $LANG; $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Inventário", - 'reportHbarComputersByOS' => [ - 'title' => "Computadores por SO", - 'desc' => "Barras", - 'category' => "SO", - ], - 'reportPieComputersByOS' => [ - 'title' => "Computadores por SO", - 'desc' => "Circular", - 'category' => "SO", - ], - 'reportHbarComputersByFabricant' => [ - 'title' => "Computadores por fabricante", - 'desc' => "Barras", - 'category' => "Fabricante", - ], - 'reportPieComputersByFabricant' => [ - 'title' => "Computadores por fabricante", - 'desc' => "Circular", - 'category' => "Fabricante", - ], - 'reportHbarComputersByType' => [ - 'title' => "Computadores por tipo", - 'desc' => "Barras", - 'category' => "Tipo", - ], - 'reportPieComputersByType' => [ - 'title' => "Computadores por tipo", - 'desc' => "Circular", - 'category' => "Tipo", - ], - 'reportHbarComputersByStatus' => [ - 'title' => "Computadores por estado", - 'desc' => "Barras", - 'category' => "Estado", - ], - 'reportHbarPrintersByStatus' => [ - 'title' => "Impressoras por estado", - 'desc' => "Barras", - 'category' => "Estado", - ], - 'reportHbarWindows' => [ - 'title' => "Distribuição Windows", - 'desc' => "Barras", - 'category' => "SO", - ], - 'reportHbarLinux' => [ - 'title' => "Distribuição Linux detalhe", - 'desc' => "Barras", - 'category' => "SO", - ], - 'reportHbarLinuxDistro' => [ - 'title' => "Distribuição Linux detalhe", - 'desc' => "Barras", - 'category' => "SO", - ], - 'reportHbarMac' => [ - 'title' => "Distribuições Mac OS X detalhes", - 'desc' => "Barras", - 'category' => "SO", - ], - 'reportHbarMacFamily' => [ - 'title' => "Versão MAC OS X visão geral", - 'desc' => "Barras", - 'category' => "SO", - ], - 'reportHbarComputersByAge' => [ - 'title' => "Computador por idade", - 'desc' => "Barras", - 'category' => "Inventário", - ], - 'reportPieComputersByAge' => [ - 'title' => "Computador por idade", - 'desc' => "Circular", - 'category' => "Inventário", - ], - 'reportHbarFusionInventory' => [ - 'title' => "Distribuição agente FusionInventory", - 'desc' => "Barras", - 'category' => "Agent", - ], - 'reportPieFusionInventory' => [ - 'title' => "Distribuição agente FusionInventory", - 'desc' => "Circular", - 'category' => "Agent", - ], - 'reportHbarMonitors' => [ - 'title' => "Distribuição de monitores por computador", - 'desc' => "Barras", - 'category' => "Inventário", - ], + 'title' => 'Inventário', + 'reportHbarComputersByOS' => [ + 'title' => 'Computadores por SO', + 'desc' => 'Barras', + 'category' => 'SO', + ], + 'reportPieComputersByOS' => [ + 'title' => 'Computadores por SO', + 'desc' => 'Circular', + 'category' => 'SO', + ], + 'reportHbarComputersByFabricant' => [ + 'title' => 'Computadores por fabricante', + 'desc' => 'Barras', + 'category' => 'Fabricante', + ], + 'reportPieComputersByFabricant' => [ + 'title' => 'Computadores por fabricante', + 'desc' => 'Circular', + 'category' => 'Fabricante', + ], + 'reportHbarComputersByType' => [ + 'title' => 'Computadores por tipo', + 'desc' => 'Barras', + 'category' => 'Tipo', + ], + 'reportPieComputersByType' => [ + 'title' => 'Computadores por tipo', + 'desc' => 'Circular', + 'category' => 'Tipo', + ], + 'reportHbarComputersByStatus' => [ + 'title' => 'Computadores por estado', + 'desc' => 'Barras', + 'category' => 'Estado', + ], + 'reportHbarPrintersByStatus' => [ + 'title' => 'Impressoras por estado', + 'desc' => 'Barras', + 'category' => 'Estado', + ], + 'reportHbarWindows' => [ + 'title' => 'Distribuição Windows', + 'desc' => 'Barras', + 'category' => 'SO', + ], + 'reportHbarLinux' => [ + 'title' => 'Distribuição Linux detalhe', + 'desc' => 'Barras', + 'category' => 'SO', + ], + 'reportHbarLinuxDistro' => [ + 'title' => 'Distribuição Linux detalhe', + 'desc' => 'Barras', + 'category' => 'SO', + ], + 'reportHbarMac' => [ + 'title' => 'Distribuições Mac OS X detalhes', + 'desc' => 'Barras', + 'category' => 'SO', + ], + 'reportHbarMacFamily' => [ + 'title' => 'Versão MAC OS X visão geral', + 'desc' => 'Barras', + 'category' => 'SO', + ], + 'reportHbarComputersByAge' => [ + 'title' => 'Computador por idade', + 'desc' => 'Barras', + 'category' => 'Inventário', + ], + 'reportPieComputersByAge' => [ + 'title' => 'Computador por idade', + 'desc' => 'Circular', + 'category' => 'Inventário', + ], + 'reportHbarFusionInventory' => [ + 'title' => 'Distribuição agente FusionInventory', + 'desc' => 'Barras', + 'category' => 'Agent', + ], + 'reportPieFusionInventory' => [ + 'title' => 'Distribuição agente FusionInventory', + 'desc' => 'Circular', + 'category' => 'Agent', + ], + 'reportHbarMonitors' => [ + 'title' => 'Distribuição de monitores por computador', + 'desc' => 'Barras', + 'category' => 'Inventário', + ], 'reportHbarComputersByEntity' => [ - 'title' => "Computadores por entidade", - 'desc' => "Barras", - 'category' => "Entidade", + 'title' => 'Computadores por entidade', + 'desc' => 'Barras', + 'category' => 'Entidade', ], ]; diff --git a/locales/reports_locales/inventory_ru_RU.php b/locales/reports_locales/inventory_ru_RU.php index 0a0d198b..210385a6 100644 --- a/locales/reports_locales/inventory_ru_RU.php +++ b/locales/reports_locales/inventory_ru_RU.php @@ -32,118 +32,118 @@ $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Активы", - - 'reportHbarComputersByOS' => [ - 'title' => "Компьютеры по операционной системе", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Операционная система", - ], - - 'reportPieComputersByOS' => [ - 'title' => "Компьютеры по операционной системе", - 'desc' => "Круговой", - 'category' => "Операционная система", - ], - - 'reportHbarComputersByFabricant' => [ - 'title' => "Компьютеры по производителю", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Производитель", - ], - - 'reportPieComputersByFabricant' => [ - 'title' => "Компьютеры по производителю", - 'desc' => "Пирог", - 'category' => "Производитель", - ], - - 'reportHbarComputersByType' => [ - 'title' => "Компьютеры по типу", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Тип", - ], - 'reportPieComputersByType' => [ - 'title' => "Компьютеры по типу", - 'desc' => "Пирог", - 'category' => "Тип", - ], - - 'reportHbarComputersByStatus' => [ - 'title' => "Компьютеры по статусу", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Статус", - ], - - 'reportHbarPrintersByStatus' => [ - 'title' => "Принтеры по статусу", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Статус", - ], - - 'reportHbarWindows' => [ - 'title' => "Распределение Windows", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Операционная система", - ], - - 'reportHbarLinux' => [ - 'title' => "Детальное распределение Linux", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Операционная система", - ], - - 'reportHbarLinuxDistro' => [ - 'title' => "Детальное распределение Linux", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Операционная система", - ], - - 'reportHbarMac' => [ - 'title' => "Детальные версии Mac OS X", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Операционная система", - ], - - 'reportHbarMacFamily' => [ - 'title' => "Обзор версий MAC OS X", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Операционная система", - ], - - 'reportHbarComputersByAge' => [ - 'title' => "Компьютер по возрасту", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Оборудование", - ], - - 'reportPieComputersByAge' => [ - 'title' => "Компьютер по возрасту", - 'desc' => "Пирог", - 'category' => "Оборудование", - ], - - 'reportHbarFusionInventory' => [ - 'title' => "Версия агента FusionInventory", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Оборудование", - ], - - 'reportPieFusionInventory' => [ - 'title' => "Версия агента FusionInventory", - 'desc' => "Пирог", - 'category' => "Агент", - ], - - 'reportHbarMonitors' => [ - 'title' => "Распределение количества мониторов на компьютерах", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Активы", - ], - - 'reportHbarComputersByEntity' => [ - 'title' => "Компьютеры по организациям", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Организация", - ], -]; \ No newline at end of file + 'title' => 'Активы', + + 'reportHbarComputersByOS' => [ + 'title' => 'Компьютеры по операционной системе', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Операционная система', + ], + + 'reportPieComputersByOS' => [ + 'title' => 'Компьютеры по операционной системе', + 'desc' => 'Круговой', + 'category' => 'Операционная система', + ], + + 'reportHbarComputersByFabricant' => [ + 'title' => 'Компьютеры по производителю', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Производитель', + ], + + 'reportPieComputersByFabricant' => [ + 'title' => 'Компьютеры по производителю', + 'desc' => 'Пирог', + 'category' => 'Производитель', + ], + + 'reportHbarComputersByType' => [ + 'title' => 'Компьютеры по типу', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Тип', + ], + 'reportPieComputersByType' => [ + 'title' => 'Компьютеры по типу', + 'desc' => 'Пирог', + 'category' => 'Тип', + ], + + 'reportHbarComputersByStatus' => [ + 'title' => 'Компьютеры по статусу', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Статус', + ], + + 'reportHbarPrintersByStatus' => [ + 'title' => 'Принтеры по статусу', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Статус', + ], + + 'reportHbarWindows' => [ + 'title' => 'Распределение Windows', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Операционная система', + ], + + 'reportHbarLinux' => [ + 'title' => 'Детальное распределение Linux', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Операционная система', + ], + + 'reportHbarLinuxDistro' => [ + 'title' => 'Детальное распределение Linux', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Операционная система', + ], + + 'reportHbarMac' => [ + 'title' => 'Детальные версии Mac OS X', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Операционная система', + ], + + 'reportHbarMacFamily' => [ + 'title' => 'Обзор версий MAC OS X', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Операционная система', + ], + + 'reportHbarComputersByAge' => [ + 'title' => 'Компьютер по возрасту', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Оборудование', + ], + + 'reportPieComputersByAge' => [ + 'title' => 'Компьютер по возрасту', + 'desc' => 'Пирог', + 'category' => 'Оборудование', + ], + + 'reportHbarFusionInventory' => [ + 'title' => 'Версия агента FusionInventory', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Оборудование', + ], + + 'reportPieFusionInventory' => [ + 'title' => 'Версия агента FusionInventory', + 'desc' => 'Пирог', + 'category' => 'Агент', + ], + + 'reportHbarMonitors' => [ + 'title' => 'Распределение количества мониторов на компьютерах', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Активы', + ], + + 'reportHbarComputersByEntity' => [ + 'title' => 'Компьютеры по организациям', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Организация', + ], +]; diff --git a/locales/reports_locales/inventory_sk_SK.php b/locales/reports_locales/inventory_sk_SK.php index 062b9b50..41567a95 100644 --- a/locales/reports_locales/inventory_sk_SK.php +++ b/locales/reports_locales/inventory_sk_SK.php @@ -32,119 +32,119 @@ $LANG['plugin_mreporting']['Inventory'] = [ - 'title' => "Inventár", - - 'reportHbarComputersByOS' => [ - 'title' => "Počítače podľa OS", - 'desc' => "Pruhový", - 'category' => "OS", - ], - - 'reportPieComputersByOS' => [ - 'title' => "Počítače podľa OS", - 'desc' => "Koláčový", - 'category' => "OS", - ], - - 'reportHbarComputersByFabricant' => [ - 'title' => "Počítače podľa výrobcu", - 'desc' => "Pruhový", - 'category' => "Výrobca", - ], - - 'reportPieComputersByFabricant' => [ - 'title' => "Počítače podľa výrobcu", - 'desc' => "Koláčový", - 'category' => "Výrobca", - ], - - 'reportHbarComputersByType' => [ - 'title' => "Počítače podľa typu", - 'desc' => "Pruhový", - 'category' => "Typ", - ], - - 'reportPieComputersByType' => [ - 'title' => "Počítače podľa typu", - 'desc' => "Koláčový", - 'category' => "Typ", - ], - - 'reportHbarComputersByStatus' => [ - 'title' => "Počítače podľa stavu", - 'desc' => "Pruhový", - 'category' => "Stav", - ], - - 'reportHbarPrintersByStatus' => [ - 'title' => "Tlačiarne podľa stavu", - 'desc' => "Pruhový", - 'category' => "Stav", - ], - - 'reportHbarWindows' => [ - 'title' => "Windows verzie", - 'desc' => "Pruhový", - 'category' => "OS", - ], - - 'reportHbarLinux' => [ - 'title' => "Linux distribúcie - podrobnosti", - 'desc' => "Pruhový", - 'category' => "OS", - ], - - 'reportHbarLinuxDistro' => [ - 'title' => "Linux distribúcie - podrobnosti", - 'desc' => "Pruhový", - 'category' => "OS", - ], - - 'reportHbarMac' => [ - 'title' => "MacOS verzie - podrobnosti", - 'desc' => "Pruhový", - 'category' => "OS", - ], - - 'reportHbarMacFamily' => [ - 'title' => "MacOS verzie - prehľad", - 'desc' => "Pruhový", - 'category' => "OS", - ], - - 'reportHbarComputersByAge' => [ - 'title' => "Počítače podľa veku", - 'desc' => "Pruhový", - 'category' => "Inventár", - ], - - 'reportPieComputersByAge' => [ - 'title' => "Počítače podľa veku", - 'desc' => "Koláčový", - 'category' => "Inventár", - ], - - 'reportHbarFusionInventory' => [ - 'title' => "FusionInventory agent", - 'desc' => "Pruhový", - 'category' => "Agent", - ], - - 'reportPieFusionInventory' => [ - 'title' => "FusionInventory agent", - 'desc' => "Koláčový", - 'category' => "Agent", - ], - - 'reportHbarMonitors' => [ - 'title' => "Obrazovky podľa počítačov", - 'desc' => "Pruhový", - 'category' => "Inventár", - ], + 'title' => 'Inventár', + + 'reportHbarComputersByOS' => [ + 'title' => 'Počítače podľa OS', + 'desc' => 'Pruhový', + 'category' => 'OS', + ], + + 'reportPieComputersByOS' => [ + 'title' => 'Počítače podľa OS', + 'desc' => 'Koláčový', + 'category' => 'OS', + ], + + 'reportHbarComputersByFabricant' => [ + 'title' => 'Počítače podľa výrobcu', + 'desc' => 'Pruhový', + 'category' => 'Výrobca', + ], + + 'reportPieComputersByFabricant' => [ + 'title' => 'Počítače podľa výrobcu', + 'desc' => 'Koláčový', + 'category' => 'Výrobca', + ], + + 'reportHbarComputersByType' => [ + 'title' => 'Počítače podľa typu', + 'desc' => 'Pruhový', + 'category' => 'Typ', + ], + + 'reportPieComputersByType' => [ + 'title' => 'Počítače podľa typu', + 'desc' => 'Koláčový', + 'category' => 'Typ', + ], + + 'reportHbarComputersByStatus' => [ + 'title' => 'Počítače podľa stavu', + 'desc' => 'Pruhový', + 'category' => 'Stav', + ], + + 'reportHbarPrintersByStatus' => [ + 'title' => 'Tlačiarne podľa stavu', + 'desc' => 'Pruhový', + 'category' => 'Stav', + ], + + 'reportHbarWindows' => [ + 'title' => 'Windows verzie', + 'desc' => 'Pruhový', + 'category' => 'OS', + ], + + 'reportHbarLinux' => [ + 'title' => 'Linux distribúcie - podrobnosti', + 'desc' => 'Pruhový', + 'category' => 'OS', + ], + + 'reportHbarLinuxDistro' => [ + 'title' => 'Linux distribúcie - podrobnosti', + 'desc' => 'Pruhový', + 'category' => 'OS', + ], + + 'reportHbarMac' => [ + 'title' => 'MacOS verzie - podrobnosti', + 'desc' => 'Pruhový', + 'category' => 'OS', + ], + + 'reportHbarMacFamily' => [ + 'title' => 'MacOS verzie - prehľad', + 'desc' => 'Pruhový', + 'category' => 'OS', + ], + + 'reportHbarComputersByAge' => [ + 'title' => 'Počítače podľa veku', + 'desc' => 'Pruhový', + 'category' => 'Inventár', + ], + + 'reportPieComputersByAge' => [ + 'title' => 'Počítače podľa veku', + 'desc' => 'Koláčový', + 'category' => 'Inventár', + ], + + 'reportHbarFusionInventory' => [ + 'title' => 'FusionInventory agent', + 'desc' => 'Pruhový', + 'category' => 'Agent', + ], + + 'reportPieFusionInventory' => [ + 'title' => 'FusionInventory agent', + 'desc' => 'Koláčový', + 'category' => 'Agent', + ], + + 'reportHbarMonitors' => [ + 'title' => 'Obrazovky podľa počítačov', + 'desc' => 'Pruhový', + 'category' => 'Inventár', + ], 'reportHbarComputersByEntity' => [ - 'title' => "Počítače podľa entít", - 'desc' => "Pruhový", - 'category' => "Entita", + 'title' => 'Počítače podľa entít', + 'desc' => 'Pruhový', + 'category' => 'Entita', ], ]; diff --git a/locales/reports_locales/other_cs_CZ.php b/locales/reports_locales/other_cs_CZ.php index 6a622eda..c0c29cdd 100644 --- a/locales/reports_locales/other_cs_CZ.php +++ b/locales/reports_locales/other_cs_CZ.php @@ -31,11 +31,11 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Ostatní", + 'title' => 'Ostatní', - 'reportHbarLogs' => [ - 'title' => "Rozložení záznamů událostí", - 'desc' => "Pruhový", - 'category' => "Záznamy událostí (log)", - ] + 'reportHbarLogs' => [ + 'title' => 'Rozložení záznamů událostí', + 'desc' => 'Pruhový', + 'category' => 'Záznamy událostí (log)', + ], ]; diff --git a/locales/reports_locales/other_de_DE.php b/locales/reports_locales/other_de_DE.php index 87aa8f52..b21d92ac 100644 --- a/locales/reports_locales/other_de_DE.php +++ b/locales/reports_locales/other_de_DE.php @@ -31,11 +31,11 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Weiteres", + 'title' => 'Weiteres', - 'reportHbarLogs' => [ - 'title' => "Log-Verteilung", - 'desc' => "Bars", - 'category' => "Logs", - ] + 'reportHbarLogs' => [ + 'title' => 'Log-Verteilung', + 'desc' => 'Bars', + 'category' => 'Logs', + ], ]; diff --git a/locales/reports_locales/other_en_GB.php b/locales/reports_locales/other_en_GB.php index dd12711d..27040768 100644 --- a/locales/reports_locales/other_en_GB.php +++ b/locales/reports_locales/other_en_GB.php @@ -31,11 +31,11 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Other", + 'title' => 'Other', - 'reportHbarLogs' => [ - 'title' => "Logs distribution", - 'desc' => "Bars", - 'category' => "Logs", - ] -]; \ No newline at end of file + 'reportHbarLogs' => [ + 'title' => 'Logs distribution', + 'desc' => 'Bars', + 'category' => 'Logs', + ], +]; diff --git a/locales/reports_locales/other_es_VE.php b/locales/reports_locales/other_es_VE.php index eb3a3793..7a2cd6b1 100644 --- a/locales/reports_locales/other_es_VE.php +++ b/locales/reports_locales/other_es_VE.php @@ -31,11 +31,11 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Otro", + 'title' => 'Otro', - 'reportHbarLogs' => [ - 'title' => "Distribución de eventos", - 'desc' => "Barras", - 'category' => "Eventos", - ] + 'reportHbarLogs' => [ + 'title' => 'Distribución de eventos', + 'desc' => 'Barras', + 'category' => 'Eventos', + ], ]; diff --git a/locales/reports_locales/other_fr_FR.php b/locales/reports_locales/other_fr_FR.php index 232399a1..b25a0872 100644 --- a/locales/reports_locales/other_fr_FR.php +++ b/locales/reports_locales/other_fr_FR.php @@ -31,11 +31,11 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Autres", + 'title' => 'Autres', - 'reportHbarLogs' => [ - 'title' => "Répartition des logs", - 'desc' => "Barres", - 'category' => "Logs", - ] -]; \ No newline at end of file + 'reportHbarLogs' => [ + 'title' => 'Répartition des logs', + 'desc' => 'Barres', + 'category' => 'Logs', + ], +]; diff --git a/locales/reports_locales/other_hr_HR.php b/locales/reports_locales/other_hr_HR.php index 3883f96b..a89334e4 100644 --- a/locales/reports_locales/other_hr_HR.php +++ b/locales/reports_locales/other_hr_HR.php @@ -31,11 +31,11 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Ostalo", + 'title' => 'Ostalo', - 'reportHbarLogs' => [ - 'title' => "Log-zapisi", - 'desc' => "Stupci", - 'category' => "Log-zapisi", - ] -]; \ No newline at end of file + 'reportHbarLogs' => [ + 'title' => 'Log-zapisi', + 'desc' => 'Stupci', + 'category' => 'Log-zapisi', + ], +]; diff --git a/locales/reports_locales/other_pl_PL.php b/locales/reports_locales/other_pl_PL.php index 490a2e0f..4779442e 100644 --- a/locales/reports_locales/other_pl_PL.php +++ b/locales/reports_locales/other_pl_PL.php @@ -31,11 +31,11 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Inne", + 'title' => 'Inne', - 'reportHbarLogs' => [ - 'title' => "Statystyka logów", - 'desc' => "wykres słupkowy", - 'category' => "Logi", - ] -]; \ No newline at end of file + 'reportHbarLogs' => [ + 'title' => 'Statystyka logów', + 'desc' => 'wykres słupkowy', + 'category' => 'Logi', + ], +]; diff --git a/locales/reports_locales/other_pt_BR.php b/locales/reports_locales/other_pt_BR.php index 917e6c51..9526baf2 100644 --- a/locales/reports_locales/other_pt_BR.php +++ b/locales/reports_locales/other_pt_BR.php @@ -30,7 +30,7 @@ global $LANG; -$LANG['plugin_mreporting']['Other']['title'] = "Outros"; -$LANG['plugin_mreporting']['Other']['reportHbarLogs']['title'] = "Distribuição de logs"; -$LANG['plugin_mreporting']['Other']['reportHbarLogs']['desc'] = "Barras"; -$LANG['plugin_mreporting']['Other']['reportHbarLogs']['category'] = "Logs"; +$LANG['plugin_mreporting']['Other']['title'] = 'Outros'; +$LANG['plugin_mreporting']['Other']['reportHbarLogs']['title'] = 'Distribuição de logs'; +$LANG['plugin_mreporting']['Other']['reportHbarLogs']['desc'] = 'Barras'; +$LANG['plugin_mreporting']['Other']['reportHbarLogs']['category'] = 'Logs'; diff --git a/locales/reports_locales/other_pt_PT.php b/locales/reports_locales/other_pt_PT.php index 0e81c3ff..2a278c70 100644 --- a/locales/reports_locales/other_pt_PT.php +++ b/locales/reports_locales/other_pt_PT.php @@ -30,10 +30,10 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Outros", - 'reportHbarLogs' => [ - 'title' => "Distribuição de Registros", - 'desc' => "Barras", - 'category' => "Registros", - ] + 'title' => 'Outros', + 'reportHbarLogs' => [ + 'title' => 'Distribuição de Registros', + 'desc' => 'Barras', + 'category' => 'Registros', + ], ]; diff --git a/locales/reports_locales/other_ru_RU.php b/locales/reports_locales/other_ru_RU.php index 85f09fd2..ad4b5e53 100644 --- a/locales/reports_locales/other_ru_RU.php +++ b/locales/reports_locales/other_ru_RU.php @@ -31,11 +31,11 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Другое", + 'title' => 'Другое', - 'reportHbarLogs' => [ - 'title' => "Информация по логам", - 'desc' => "Горизонтальная диаграмма", - 'category' => "Логи", - ], -]; \ No newline at end of file + 'reportHbarLogs' => [ + 'title' => 'Информация по логам', + 'desc' => 'Горизонтальная диаграмма', + 'category' => 'Логи', + ], +]; diff --git a/locales/reports_locales/other_sk_SK.php b/locales/reports_locales/other_sk_SK.php index 4f6a07b2..c00c902a 100644 --- a/locales/reports_locales/other_sk_SK.php +++ b/locales/reports_locales/other_sk_SK.php @@ -31,11 +31,11 @@ global $LANG; $LANG['plugin_mreporting']['Other'] = [ - 'title' => "Iné", + 'title' => 'Iné', - 'reportHbarLogs' => [ - 'title' => "Distribúcia logov", - 'desc' => "Pruhový", - 'category' => "Logy", - ] -]; \ No newline at end of file + 'reportHbarLogs' => [ + 'title' => 'Distribúcia logov', + 'desc' => 'Pruhový', + 'category' => 'Logy', + ], +]; diff --git a/locales/reports_locales/tag_cs_CZ.php b/locales/reports_locales/tag_cs_CZ.php index 0774bb2f..c895cd3f 100644 --- a/locales/reports_locales/tag_cs_CZ.php +++ b/locales/reports_locales/tag_cs_CZ.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "Zásuvný modul pro štítky", + 'title' => 'Zásuvný modul pro štítky', - 'reportPieTag' => [ - 'title' => "Počty použitých štítků", - 'desc' => "Výsečový", - 'category' => "Pro všechny GLPi objekty", - ], + 'reportPieTag' => [ + 'title' => 'Počty použitých štítků', + 'desc' => 'Výsečový', + 'category' => 'Pro všechny GLPi objekty', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Počty použitých štítků", - 'desc' => "Výsečový", - 'category' => "Pro požadavky", - ] + 'reportPieTagOnTicket' => [ + 'title' => 'Počty použitých štítků', + 'desc' => 'Výsečový', + 'category' => 'Pro požadavky', + ], ]; diff --git a/locales/reports_locales/tag_de_DE.php b/locales/reports_locales/tag_de_DE.php index 616467d1..58a57b34 100644 --- a/locales/reports_locales/tag_de_DE.php +++ b/locales/reports_locales/tag_de_DE.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "Plugin TAG", + 'title' => 'Plugin TAG', - 'reportPieTag' => [ - 'title' => "Anzahl verwendeter Tags", - 'desc' => "Pie", - 'category' => "Für alle GLPi Objekte", - ], + 'reportPieTag' => [ + 'title' => 'Anzahl verwendeter Tags', + 'desc' => 'Pie', + 'category' => 'Für alle GLPi Objekte', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Anzahl verwendeter Tags", - 'desc' => "Pie", - 'category' => "Für Tickets", - ] + 'reportPieTagOnTicket' => [ + 'title' => 'Anzahl verwendeter Tags', + 'desc' => 'Pie', + 'category' => 'Für Tickets', + ], ]; diff --git a/locales/reports_locales/tag_en_GB.php b/locales/reports_locales/tag_en_GB.php index ac5f4f78..45db8cb6 100644 --- a/locales/reports_locales/tag_en_GB.php +++ b/locales/reports_locales/tag_en_GB.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "Plugin TAG", + 'title' => 'Plugin TAG', - 'reportPieTag' => [ - 'title' => "Number of used TAG", - 'desc' => "Pie", - 'category' => "For all GLPi objects", - ], + 'reportPieTag' => [ + 'title' => 'Number of used TAG', + 'desc' => 'Pie', + 'category' => 'For all GLPi objects', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Number of used TAG", - 'desc' => "Pie", - 'category' => "For tickets", - ] + 'reportPieTagOnTicket' => [ + 'title' => 'Number of used TAG', + 'desc' => 'Pie', + 'category' => 'For tickets', + ], -]; \ No newline at end of file +]; diff --git a/locales/reports_locales/tag_es_VE.php b/locales/reports_locales/tag_es_VE.php index 5a311e07..96918a86 100644 --- a/locales/reports_locales/tag_es_VE.php +++ b/locales/reports_locales/tag_es_VE.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "Complemento Etiqueta", + 'title' => 'Complemento Etiqueta', - 'reportPieTag' => [ - 'title' => "Numero de Etiquetas usadas", - 'desc' => "Torta", - 'category' => "Para todos los objetos GLPI", - ], + 'reportPieTag' => [ + 'title' => 'Numero de Etiquetas usadas', + 'desc' => 'Torta', + 'category' => 'Para todos los objetos GLPI', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Numero de Etiquetas usadas", - 'desc' => "Torta", - 'category' => "Por casos", - ] + 'reportPieTagOnTicket' => [ + 'title' => 'Numero de Etiquetas usadas', + 'desc' => 'Torta', + 'category' => 'Por casos', + ], ]; diff --git a/locales/reports_locales/tag_fr_FR.php b/locales/reports_locales/tag_fr_FR.php index b1fececf..b43f4a74 100644 --- a/locales/reports_locales/tag_fr_FR.php +++ b/locales/reports_locales/tag_fr_FR.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "Plugin TAG", + 'title' => 'Plugin TAG', - 'reportPieTag' => [ - 'title' => "Nombre d'utilisation des TAG", - 'desc' => "Camembert", - 'category' => "Pour tous les objets GLPi", - ], + 'reportPieTag' => [ + 'title' => "Nombre d'utilisation des TAG", + 'desc' => 'Camembert', + 'category' => 'Pour tous les objets GLPi', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Nombre d'utilisation des TAG", - 'desc' => "Camembert", - 'category' => "Pour les tickets", - ] + 'reportPieTagOnTicket' => [ + 'title' => "Nombre d'utilisation des TAG", + 'desc' => 'Camembert', + 'category' => 'Pour les tickets', + ], -]; \ No newline at end of file +]; diff --git a/locales/reports_locales/tag_hr_HR.php b/locales/reports_locales/tag_hr_HR.php index e601b184..1a6b989d 100644 --- a/locales/reports_locales/tag_hr_HR.php +++ b/locales/reports_locales/tag_hr_HR.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "Dodatak „Oznake”", + 'title' => 'Dodatak „Oznake”', - 'reportPieTag' => [ - 'title' => "Broj korištenih oznaka", - 'desc' => "Torta", - 'category' => "Za sve GLPI objekte", - ], + 'reportPieTag' => [ + 'title' => 'Broj korištenih oznaka', + 'desc' => 'Torta', + 'category' => 'Za sve GLPI objekte', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Broj korištenih oznaka", - 'desc' => "Torta", - 'category' => "Za naloge", - ] + 'reportPieTagOnTicket' => [ + 'title' => 'Broj korištenih oznaka', + 'desc' => 'Torta', + 'category' => 'Za naloge', + ], -]; \ No newline at end of file +]; diff --git a/locales/reports_locales/tag_pl_PL.php b/locales/reports_locales/tag_pl_PL.php index c8792250..83cb2fac 100644 --- a/locales/reports_locales/tag_pl_PL.php +++ b/locales/reports_locales/tag_pl_PL.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "Wtyczka TAG", + 'title' => 'Wtyczka TAG', - 'reportPieTag' => [ - 'title' => "Liczba użytych tagów", - 'desc' => "wykres kołowy", - 'category' => "Dla wszystkich obiektów w GLPI", - ], + 'reportPieTag' => [ + 'title' => 'Liczba użytych tagów', + 'desc' => 'wykres kołowy', + 'category' => 'Dla wszystkich obiektów w GLPI', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Liczba użytych tagów", - 'desc' => "wykres kołowy", - 'category' => "Dla zgłoszeń", - ] + 'reportPieTagOnTicket' => [ + 'title' => 'Liczba użytych tagów', + 'desc' => 'wykres kołowy', + 'category' => 'Dla zgłoszeń', + ], -]; \ No newline at end of file +]; diff --git a/locales/reports_locales/tag_pt_BR.php b/locales/reports_locales/tag_pt_BR.php index dd16b1c7..99d12cfc 100644 --- a/locales/reports_locales/tag_pt_BR.php +++ b/locales/reports_locales/tag_pt_BR.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "Plugin TAG", + 'title' => 'Plugin TAG', - 'reportPieTag' => [ - 'title' => "Número de TAGs usadas", - 'desc' => "Pizza", - 'category' => "Para todos os objetos do GLPI", - ], + 'reportPieTag' => [ + 'title' => 'Número de TAGs usadas', + 'desc' => 'Pizza', + 'category' => 'Para todos os objetos do GLPI', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Número de TAGs usadas", - 'desc' => "Pizza", - 'category' => "Para chamados", - ] + 'reportPieTagOnTicket' => [ + 'title' => 'Número de TAGs usadas', + 'desc' => 'Pizza', + 'category' => 'Para chamados', + ], -]; \ No newline at end of file +]; diff --git a/locales/reports_locales/tag_ru_RU.php b/locales/reports_locales/tag_ru_RU.php index 4a9698f8..49f1ec68 100644 --- a/locales/reports_locales/tag_ru_RU.php +++ b/locales/reports_locales/tag_ru_RU.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "TAG плагина", + 'title' => 'TAG плагина', - 'reportPieTag' => [ - 'title' => "Количество использования TAG", - 'desc' => "Круговая диаграмма", - 'category' => "Для всех объектов GLPi", - ], + 'reportPieTag' => [ + 'title' => 'Количество использования TAG', + 'desc' => 'Круговая диаграмма', + 'category' => 'Для всех объектов GLPi', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Количество использования TAG", - 'desc' => "Круговая диаграмма", - 'category' => "Для заявок", - ] + 'reportPieTagOnTicket' => [ + 'title' => 'Количество использования TAG', + 'desc' => 'Круговая диаграмма', + 'category' => 'Для заявок', + ], -]; \ No newline at end of file +]; diff --git a/locales/reports_locales/tag_sk_SK.php b/locales/reports_locales/tag_sk_SK.php index 42cc08f7..6223b494 100644 --- a/locales/reports_locales/tag_sk_SK.php +++ b/locales/reports_locales/tag_sk_SK.php @@ -32,18 +32,18 @@ $LANG['plugin_mreporting']['Tag'] = [ - 'title' => "Plugin značky (tag)", + 'title' => 'Plugin značky (tag)', - 'reportPieTag' => [ - 'title' => "Počet použitých značiek", - 'desc' => "Koláčový", - 'category' => "Pre všetky GLPi objekty", - ], + 'reportPieTag' => [ + 'title' => 'Počet použitých značiek', + 'desc' => 'Koláčový', + 'category' => 'Pre všetky GLPi objekty', + ], - 'reportPieTagOnTicket' => [ - 'title' => "Počet použitých značiek", - 'desc' => "Koláčový", - 'category' => "Pre požiadavky", - ] + 'reportPieTagOnTicket' => [ + 'title' => 'Počet použitých značiek', + 'desc' => 'Koláčový', + 'category' => 'Pre požiadavky', + ], -]; \ No newline at end of file +]; diff --git a/setup.php b/setup.php index f43029ab..d11f98ba 100644 --- a/setup.php +++ b/setup.php @@ -31,20 +31,20 @@ define('PLUGIN_MREPORTING_VERSION', '1.8.6'); // Minimal GLPI version, inclusive -define("PLUGIN_MREPORTING_MIN_GLPI", "10.0.0"); +define('PLUGIN_MREPORTING_MIN_GLPI', '10.0.0'); // Maximum GLPI version, exclusive -define("PLUGIN_MREPORTING_MAX_GLPI", "10.0.99"); +define('PLUGIN_MREPORTING_MAX_GLPI', '10.0.99'); if (!defined('PLUGIN_MREPORTING_DIR')) { - define("PLUGIN_MREPORTING_DIR", __DIR__); + define('PLUGIN_MREPORTING_DIR', __DIR__); } if (!defined('PLUGIN_MREPORTING_TEMPLATE_DIR')) { - define("PLUGIN_MREPORTING_TEMPLATE_DIR", PLUGIN_MREPORTING_DIR . "/templates/"); + define('PLUGIN_MREPORTING_TEMPLATE_DIR', PLUGIN_MREPORTING_DIR . '/templates/'); } if (!defined('PLUGIN_MREPORTING_TEMPLATE_EXTENSION')) { - define("PLUGIN_MREPORTING_TEMPLATE_EXTENSION", "odt"); + define('PLUGIN_MREPORTING_TEMPLATE_EXTENSION', 'odt'); } if (isset($_SESSION['glpi_use_mode']) && $_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) { @@ -56,7 +56,7 @@ if (!defined('PCLZIP_TEMPORARY_DIR')) { define('PCLZIP_TEMPORARY_DIR', GLPI_DOC_DIR . '/_tmp/pclzip'); } -include_once __DIR__ . "/vendor/autoload.php"; +include_once __DIR__ . '/vendor/autoload.php'; /** @@ -71,101 +71,101 @@ function plugin_init_mreporting() $PLUGIN_HOOKS['csrf_compliant']['mreporting'] = true; - if (Plugin::isPluginActive("mreporting")) { - // *Direct* access to rapport file (from e-mail) : + if (Plugin::isPluginActive('mreporting')) { + // *Direct* access to rapport file (from e-mail) : if (isset($_GET['redirect']) && strpos($_GET['redirect'], 'plugin_mreporting') !== false) { $filename = str_replace('plugin_mreporting_', '', $_GET['redirect']); - Html::redirect($CFG_GLPI["root_doc"] . "/files/_plugins/mreporting/notifications/" . $filename); + Html::redirect($CFG_GLPI['root_doc'] . '/files/_plugins/mreporting/notifications/' . $filename); } - //Load additionnal language files in needed + //Load additionnal language files in needed includeAdditionalLanguageFiles(); if (Session::getCurrentInterface()) { - /* Profile */ + /* Profile */ $PLUGIN_HOOKS['change_profile']['mreporting'] = ['PluginMreportingProfile', - 'changeProfile' + 'changeProfile', ]; - $PLUGIN_HOOKS['redirect_page']['mreporting'] = 'front/download.php'; + $PLUGIN_HOOKS['redirect_page']['mreporting'] = 'front/download.php'; Plugin::registerClass( 'PluginMreportingNotification', - ['notificationtemplates_types' => true] + ['notificationtemplates_types' => true], ); Plugin::registerClass( 'PluginMreportingDashboard', - ['addtabon' => ['Central']] + ['addtabon' => ['Central']], ); Plugin::registerClass( 'PluginMreportingProfile', - ['addtabon' => 'Profile'] + ['addtabon' => 'Profile'], ); Plugin::registerClass( 'PluginMreportingPreference', - ['addtabon' => 'Preference'] + ['addtabon' => 'Preference'], ); $mreporting_profile = new PluginMreportingProfile(); - $reports_profiles = $mreporting_profile->find( + $reports_profiles = $mreporting_profile->find( [ 'profiles_id' => $_SESSION['glpiactiveprofile']['id'], - 'right' => READ, - ] + 'right' => READ, + ], ); - /* Menu */ + /* Menu */ $PLUGIN_HOOKS['config_page']['mreporting'] = 'front/config.php'; if (count($reports_profiles) > 0) { $PLUGIN_HOOKS['menu_toadd']['mreporting'] = ['tools' => 'PluginMreportingCommon']; } - /* Show Reports in standart stats page */ + /* Show Reports in standart stats page */ if (preg_match('#front/stat.*\.php#', $_SERVER['SCRIPT_NAME'])) { $mreporting_common = new PluginMreportingCommon(); - $reports = $mreporting_common->getAllReports(); + $reports = $mreporting_common->getAllReports(); if ($reports !== false) { foreach ($reports as $report) { foreach ($report['functions'] as $func) { - $PLUGIN_HOOKS['stats']['mreporting'][$func['min_url_graph']] = $func['title']; + $PLUGIN_HOOKS['stats']['mreporting'][$func['min_url_graph']] = $func['title']; } } } } $PLUGIN_HOOKS['pre_item_purge']['mreporting'] - = ['Profile' => ['PluginMreportingProfile', 'purgeProfiles'], - 'PluginMreportingConfig' => ['PluginMreportingProfile', 'purgeProfilesByReports'] + = ['Profile' => ['PluginMreportingProfile', 'purgeProfiles'], + 'PluginMreportingConfig' => ['PluginMreportingProfile', 'purgeProfilesByReports'], ]; $PLUGIN_HOOKS['item_add']['mreporting'] - = ['Profile' => ['PluginMreportingProfile', 'addProfiles'], - 'PluginMreportingConfig' => ['PluginMreportingProfile', 'addReport'] + = ['Profile' => ['PluginMreportingProfile', 'addProfiles'], + 'PluginMreportingConfig' => ['PluginMreportingProfile', 'addReport'], ]; } if (isset($_SESSION['glpiactiveprofile']['id']) && $_SESSION['glpiactiveprofile']['interface'] == 'helpdesk') { if (PluginMreportingCommon::canAccessAtLeastOneReport($_SESSION['glpiactiveprofile']['id'])) { - $PLUGIN_HOOKS['add_javascript']['mreporting'][] = 'js/helpdesk-menu.js'; //This need Ext js lib ! - $PLUGIN_HOOKS["helpdesk_menu_entry"]['mreporting'] = false; + $PLUGIN_HOOKS['add_javascript']['mreporting'][] = 'js/helpdesk-menu.js'; //This need Ext js lib ! + $PLUGIN_HOOKS['helpdesk_menu_entry']['mreporting'] = false; } } else { - $PLUGIN_HOOKS["helpdesk_menu_entry"]['mreporting'] = true; + $PLUGIN_HOOKS['helpdesk_menu_entry']['mreporting'] = true; } - if (strpos($_SERVER['REQUEST_URI'] ?? '', "/mreporting/") !== false) { - // Add specific files to add to the header : javascript + if (strpos($_SERVER['REQUEST_URI'] ?? '', '/mreporting/') !== false) { + // Add specific files to add to the header : javascript $PLUGIN_HOOKS['add_javascript']['mreporting'] = [ - "lib/protovis/protovis.js", - "lib/jquery.tipsy/jquery.tipsy.js", - "lib/jquery.tipsy/tipsy.js" + 'lib/protovis/protovis.js', + 'lib/jquery.tipsy/jquery.tipsy.js', + 'lib/jquery.tipsy/tipsy.js', ]; - //Add specific files to add to the header : css + //Add specific files to add to the header : css $PLUGIN_HOOKS['add_css']['mreporting'] = [ - "css/mreporting.css", - "lib/jquery.tipsy/jquery.tipsy.css" + 'css/mreporting.css', + 'lib/jquery.tipsy/jquery.tipsy.css', ]; } @@ -184,32 +184,32 @@ function plugin_init_mreporting() function plugin_version_mreporting() { return [ - 'name' => __('More Reporting', 'mreporting'), - 'version' => PLUGIN_MREPORTING_VERSION, - 'author' => "Teclib' & Infotel", - 'homepage' => "https://github.com/pluginsGLPI/mreporting", - 'license' => 'GPLv2+', - 'requirements' => [ + 'name' => __('More Reporting', 'mreporting'), + 'version' => PLUGIN_MREPORTING_VERSION, + 'author' => "Teclib' & Infotel", + 'homepage' => 'https://github.com/pluginsGLPI/mreporting', + 'license' => 'GPLv2+', + 'requirements' => [ 'glpi' => [ 'min' => PLUGIN_MREPORTING_MIN_GLPI, 'max' => PLUGIN_MREPORTING_MAX_GLPI, - ] - ] + ], + ], ]; } function includeAdditionalLanguageFiles() { - $translations_path = __DIR__ . "/locales/reports_locales/"; + $translations_path = __DIR__ . '/locales/reports_locales/'; - // Load default translations - foreach (glob($translations_path . "*_en_GB.php") as $path) { + // Load default translations + foreach (glob($translations_path . '*_en_GB.php') as $path) { include_once($path); } - // if isset user langage, overload translations by user langage ones if presents - if (isset($_SESSION["glpilanguage"])) { - foreach (glob($translations_path . "*_" . $_SESSION["glpilanguage"] . ".php") as $path) { + // if isset user langage, overload translations by user langage ones if presents + if (isset($_SESSION['glpilanguage'])) { + foreach (glob($translations_path . '*_' . $_SESSION['glpilanguage'] . '.php') as $path) { include_once($path); } }