diff --git a/www/class/centreon-clapi/centreonACLAction.class.php b/www/class/centreon-clapi/centreonACLAction.class.php index 2863bdfa0553cb720e6442e61e8631979ea9606a..152a561037ec98370a5b152f6c7f44c1245c1779 100644 --- a/www/class/centreon-clapi/centreonACLAction.class.php +++ b/www/class/centreon-clapi/centreonACLAction.class.php @@ -288,16 +288,16 @@ class CentreonACLAction extends CentreonObject } } - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $aclActionRuleList = $this->object->getList('*', -1, 0, null, null, $filters); diff --git a/www/class/centreon-clapi/centreonACLGroup.class.php b/www/class/centreon-clapi/centreonACLGroup.class.php index bf89799e0ceb865ccd780733d136c01b7433c87a..c2eef0d1e1078fb0bf622538cbefac2c339234a7 100644 --- a/www/class/centreon-clapi/centreonACLGroup.class.php +++ b/www/class/centreon-clapi/centreonACLGroup.class.php @@ -240,16 +240,16 @@ class CentreonACLGroup extends CentreonObject /** * @param null $filters */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $aclGroupList = $this->object->getList('*', -1, 0, null, null, $filters); diff --git a/www/class/centreon-clapi/centreonACLMenu.class.php b/www/class/centreon-clapi/centreonACLMenu.class.php index b4e8311db6032b15ebc5eb697099c7a9f344d100..75470ca6f9c96e0fef69d7af61f1776a3c0bcc4d 100644 --- a/www/class/centreon-clapi/centreonACLMenu.class.php +++ b/www/class/centreon-clapi/centreonACLMenu.class.php @@ -386,16 +386,16 @@ class CentreonACLMenu extends CentreonObject /** * @param array $filters */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $aclMenuList = $this->object->getList('*', -1, 0, null, null, $filters); diff --git a/www/class/centreon-clapi/centreonACLResource.class.php b/www/class/centreon-clapi/centreonACLResource.class.php index fdc5500efff033c47893df9b712903f03f7e15f5..f47209da79d5055fb52a6c2e89c0f8256b63d490 100644 --- a/www/class/centreon-clapi/centreonACLResource.class.php +++ b/www/class/centreon-clapi/centreonACLResource.class.php @@ -426,16 +426,16 @@ class CentreonACLResource extends CentreonObject /** * @param null $filters */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $aclResourceList = $this->object->getList('*', -1, 0, null, null, $filters); diff --git a/www/class/centreon-clapi/centreonCentbrokerCfg.class.php b/www/class/centreon-clapi/centreonCentbrokerCfg.class.php index 36abfbb1921101afb2e73afd9dff1773c14d6454..d6d87a2ed42b7d9d4af6aaf13aa35c0d40001e1f 100644 --- a/www/class/centreon-clapi/centreonCentbrokerCfg.class.php +++ b/www/class/centreon-clapi/centreonCentbrokerCfg.class.php @@ -699,16 +699,16 @@ class CentreonCentbrokerCfg extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $elements = $this->object->getList("*", -1, 0, null, null, $filters, "AND"); foreach ($elements as $element) { diff --git a/www/class/centreon-clapi/centreonCommand.class.php b/www/class/centreon-clapi/centreonCommand.class.php index 3ebeb0f5e142fe7bbb253f74d073c341b680891a..3d73c9cd14b6b708a48c2b5eb06de74f63f0aff1 100644 --- a/www/class/centreon-clapi/centreonCommand.class.php +++ b/www/class/centreon-clapi/centreonCommand.class.php @@ -214,16 +214,16 @@ class CentreonCommand extends CentreonObject * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $elements = $this->object->getList( "*", diff --git a/www/class/centreon-clapi/centreonContact.class.php b/www/class/centreon-clapi/centreonContact.class.php index 5a66235244bc27b24c2c7c4a09d28b3750f3f06d..f69c025a06b20168ba9dc40ff9f22724b43fdb0a 100644 --- a/www/class/centreon-clapi/centreonContact.class.php +++ b/www/class/centreon-clapi/centreonContact.class.php @@ -462,16 +462,16 @@ class CentreonContact extends CentreonObject * @param string $parameters * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array("contact_register" => $this->register); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $elements = $this->object->getList( "*", diff --git a/www/class/centreon-clapi/centreonContactGroup.class.php b/www/class/centreon-clapi/centreonContactGroup.class.php index 0aa7b100d66caa98d6d3750cc3ed1b21a2557f9e..1b4dd3c865805bb08cf263edd180e3259f234032 100644 --- a/www/class/centreon-clapi/centreonContactGroup.class.php +++ b/www/class/centreon-clapi/centreonContactGroup.class.php @@ -216,9 +216,9 @@ class CentreonContactGroup extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!parent::export($filter_name)) { + if (!parent::export($filterName)) { return false; } @@ -227,8 +227,8 @@ class CentreonContactGroup extends CentreonObject $cgFieldName = $this->object->getUniqueLabelField(); $cFieldName = $contactObj->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$cgFieldName] = $filter_name; + if (!is_null($filterName)) { + $filters[$cgFieldName] = $filterName; } $elements = $relObj->getMergedParameters( array($cgFieldName), diff --git a/www/class/centreon-clapi/centreonDowntime.class.php b/www/class/centreon-clapi/centreonDowntime.class.php index a20135e08162246423cee7c756bb9c08a8f15f7d..635be690db376292ec78e61315ea4fada2de5457 100644 --- a/www/class/centreon-clapi/centreonDowntime.class.php +++ b/www/class/centreon-clapi/centreonDowntime.class.php @@ -827,10 +827,10 @@ class CentreonDowntime extends CentreonObject /** * Export */ - public function export($filter_name) + public function export($filterName) { // generic add & setparam - if (!parent::export($filter_name)) { + if (!parent::export($filterName)) { return false; } diff --git a/www/class/centreon-clapi/centreonEngineCfg.class.php b/www/class/centreon-clapi/centreonEngineCfg.class.php index ae9247083bff7e63c63aacbdfca368e6bfdb36c9..16da6a976f2606b0d196c92173225c81893d50a8 100644 --- a/www/class/centreon-clapi/centreonEngineCfg.class.php +++ b/www/class/centreon-clapi/centreonEngineCfg.class.php @@ -284,16 +284,16 @@ class CentreonEngineCfg extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $elements = $this->object->getList("*", -1, 0, null, null, $filters, "AND"); diff --git a/www/class/centreon-clapi/centreonHost.class.php b/www/class/centreon-clapi/centreonHost.class.php index d4499bf12ac6e13f4fee30401df6b45814fd9825..060aedf62d9982af3e89b1588d4afc69c0a7c77d 100644 --- a/www/class/centreon-clapi/centreonHost.class.php +++ b/www/class/centreon-clapi/centreonHost.class.php @@ -1118,16 +1118,16 @@ class CentreonHost extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return 0; } $labelField = $this->object->getUniqueLabelField(); $filters = array("host_register" => $this->register); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $elements = $this->object->getList("*", -1, 0, null, null, $filters, "AND"); @@ -1264,8 +1264,8 @@ class CentreonHost extends CentreonObject $cgRel = new \Centreon_Object_Relation_Contact_Group_Host(); $filters_cgRel = array("host_register" => $this->register); - if (!is_null($filter_name)) { - $filters_cgRel['host_name'] = $filter_name; + if (!is_null($filterName)) { + $filters_cgRel['host_name'] = $filterName; } $elements = $cgRel->getMergedParameters( array("cg_name", "cg_id"), @@ -1286,8 +1286,8 @@ class CentreonHost extends CentreonObject } $contactRel = new \Centreon_Object_Relation_Contact_Host(); $filters_contactRel = array("host_register" => $this->register); - if (!is_null($filter_name)) { - $filters_contactRel['host_name'] = $filter_name; + if (!is_null($filterName)) { + $filters_contactRel['host_name'] = $filterName; } $elements = $contactRel->getMergedParameters( array("contact_alias", "contact_id"), @@ -1308,8 +1308,8 @@ class CentreonHost extends CentreonObject } $htplRel = new \Centreon_Object_Relation_Host_Template_Host(); $filters_htplRel = array("h.host_register" => $this->register); - if (!is_null($filter_name)) { - $filters_htplRel['h.host_name'] = $filter_name; + if (!is_null($filterName)) { + $filters_htplRel['h.host_name'] = $filterName; } $elements = $htplRel->getMergedParameters( array("host_name as host"), @@ -1330,7 +1330,7 @@ class CentreonHost extends CentreonObject } // Filter only - if (!is_null($filter_name)) { + if (!is_null($filterName)) { # service templates linked $hostRel = new \Centreon_Object_Relation_Host_Service(); $helements = $hostRel->getMergedParameters( @@ -1340,7 +1340,7 @@ class CentreonHost extends CentreonObject 0, null, null, - array("service_register" => 0, "host_name" => $filter_name), + array("service_register" => 0, "host_name" => $filterName), "AND" ); foreach ($helements as $helement) { @@ -1356,11 +1356,11 @@ class CentreonHost extends CentreonObject 0, null, null, - array("service_register" => 1, "host_name" => $filter_name), + array("service_register" => 1, "host_name" => $filterName), "AND" ); foreach ($helements as $helement) { - CentreonService::getInstance()->export($filter_name . ';' . $helement['service_description']); + CentreonService::getInstance()->export($filterName . ';' . $helement['service_description']); } # service hg linked and hostgroups @@ -1372,7 +1372,7 @@ class CentreonHost extends CentreonObject 0, null, null, - array("host_name" => $filter_name), + array("host_name" => $filterName), "AND" ); foreach ($helements as $helement) { diff --git a/www/class/centreon-clapi/centreonHostCategory.class.php b/www/class/centreon-clapi/centreonHostCategory.class.php index fde3cd35423f3ef7bcaf5a67baf44fdbda15b6ee..87e711c956fc3bb9d3c4b92718daa74adcc3610e 100644 --- a/www/class/centreon-clapi/centreonHostCategory.class.php +++ b/www/class/centreon-clapi/centreonHostCategory.class.php @@ -238,17 +238,17 @@ class CentreonHostCategory extends CentreonSeverityAbstract * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!parent::export($filter_name)) { + if (!parent::export($filterName)) { return false; } $relobj = new \Centreon_Object_Relation_Host_Category_Host(); $hcFieldName = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$hcFieldName] = $filter_name; + if (!is_null($filterName)) { + $filters[$hcFieldName] = $filterName; } $elements = $relobj->getMergedParameters( array($hcFieldName), diff --git a/www/class/centreon-clapi/centreonHostGroup.class.php b/www/class/centreon-clapi/centreonHostGroup.class.php index b990bd981a3383984862250ccf146518fd898737..1fdcf842339bc1ab456319ee713639e3103ba86f 100644 --- a/www/class/centreon-clapi/centreonHostGroup.class.php +++ b/www/class/centreon-clapi/centreonHostGroup.class.php @@ -278,16 +278,16 @@ class CentreonHostGroup extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!parent::export($filter_name)) { + if (!parent::export($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $relObj = new \Centreon_Object_Relation_Host_Group_Host(); $hostObj = new \Centreon_Object_Host(); diff --git a/www/class/centreon-clapi/centreonHostGroupService.class.php b/www/class/centreon-clapi/centreonHostGroupService.class.php index 6935b40823fefd83846fdd81f757a86c644ad300..6f49eb6d00e68a85b2f4a9e426ceba6f2fb4589a 100644 --- a/www/class/centreon-clapi/centreonHostGroupService.class.php +++ b/www/class/centreon-clapi/centreonHostGroupService.class.php @@ -914,16 +914,16 @@ class CentreonHostGroupService extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return 0; } $labelField = $this->object->getUniqueLabelField(); $filters = array("service_register" => $this->register); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $hostRel = new \Centreon_Object_Relation_Host_Group_Service(); $elements = $hostRel->getMergedParameters( diff --git a/www/class/centreon-clapi/centreonLDAP.class.php b/www/class/centreon-clapi/centreonLDAP.class.php index fd676a883b25b40aa89a2deddc3c7523fbb2f333..e284797da1e0d9b862547245862d5010b7fd44a2 100644 --- a/www/class/centreon-clapi/centreonLDAP.class.php +++ b/www/class/centreon-clapi/centreonLDAP.class.php @@ -395,19 +395,18 @@ class CentreonLDAP extends CentreonObject /** * Export data * - * @param null $filter_id - * @param null $filter_name + * @param null $filterName */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return 0; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $configurationLdapObj = new \Centreon_Object_Configuration_Ldap(); diff --git a/www/class/centreon-clapi/centreonObject.class.php b/www/class/centreon-clapi/centreonObject.class.php index fced63849f24c3cdc53285709a375a91a5914fed..fc1fc33c4a4b17d993d05bb14e6bbed107374968 100644 --- a/www/class/centreon-clapi/centreonObject.class.php +++ b/www/class/centreon-clapi/centreonObject.class.php @@ -422,10 +422,8 @@ abstract class CentreonObject /** * Export from a specific object * - * @param $action - * @param $filter_id - * @param $filter_name - * @return int + * @param $filterName + * @return bool */ public function export($filterName) { diff --git a/www/class/centreon-clapi/centreonResourceCfg.class.php b/www/class/centreon-clapi/centreonResourceCfg.class.php index 37fa8f84369e3096b635cb39dde37ce2e15aabf3..3d4411a8e3929c9c9c4cb3b95ecf2c46000d1d33 100644 --- a/www/class/centreon-clapi/centreonResourceCfg.class.php +++ b/www/class/centreon-clapi/centreonResourceCfg.class.php @@ -332,19 +332,19 @@ class CentreonResourceCfg extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return 0; } $labelField = $this->object->getUniqueLabelField(); $elements = $this->object->getList(); - if (!is_null($filter_name) && !empty($filter_name)) { + if (!is_null($filterName) && !empty($filterName)) { $nbElements = count($elements); for ($i = 0; $i < $nbElements; $i++) { - if ($elements[$i][$labelField] != $filter_name) { + if ($elements[$i][$labelField] != $filterName) { unset($elements[$i]); } } diff --git a/www/class/centreon-clapi/centreonService.class.php b/www/class/centreon-clapi/centreonService.class.php index a652485e169568f849f380504a0bbbd1a42a69da..a403d05049b54619a2eecbe5a08053abf88ebf4f 100644 --- a/www/class/centreon-clapi/centreonService.class.php +++ b/www/class/centreon-clapi/centreonService.class.php @@ -1067,17 +1067,17 @@ class CentreonService extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array("service_register" => $this->register); $filterId = null; - if (!is_null($filter_name)) { - $filterId = $this->getObjectId($filter_name); + if (!is_null($filterName)) { + $filterId = $this->getObjectId($filterName); $filters['service_id'] = $filterId; } diff --git a/www/class/centreon-clapi/centreonServiceCategory.class.php b/www/class/centreon-clapi/centreonServiceCategory.class.php index de6e4afa547d9547069462d3b4d7eb568b058034..83fd795692d8fa556f601ab3c8c173ef620f0b5f 100644 --- a/www/class/centreon-clapi/centreonServiceCategory.class.php +++ b/www/class/centreon-clapi/centreonServiceCategory.class.php @@ -399,16 +399,16 @@ class CentreonServiceCategory extends CentreonSeverityAbstract * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!parent::export($filter_name)) { + if (!parent::export($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $scs = $this->object->getList( array($this->object->getPrimaryKey(), $labelField), diff --git a/www/class/centreon-clapi/centreonServiceGroup.class.php b/www/class/centreon-clapi/centreonServiceGroup.class.php index 9deb0c414de636cbfc9dd5295f940d7da3426aad..1d2861c9442f3a3fb35329353aca8fc7d873c054 100644 --- a/www/class/centreon-clapi/centreonServiceGroup.class.php +++ b/www/class/centreon-clapi/centreonServiceGroup.class.php @@ -320,16 +320,16 @@ class CentreonServiceGroup extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!parent::export($filter_name)) { + if (!parent::export($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $sgs = $this->object->getList( diff --git a/www/class/centreon-clapi/centreonServiceTemplate.class.php b/www/class/centreon-clapi/centreonServiceTemplate.class.php index a931c7c9559c1b6fc1395fe94a2a51c4a072721a..c6466eed80806f9146ad420182eb50860d9e01ee 100644 --- a/www/class/centreon-clapi/centreonServiceTemplate.class.php +++ b/www/class/centreon-clapi/centreonServiceTemplate.class.php @@ -918,19 +918,19 @@ class CentreonServiceTemplate extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } - if (!is_null($filter_name)) { - $filterId = $this->getObjectId($filter_name); + if (!is_null($filterName)) { + $filterId = $this->getObjectId($filterName); } $labelField = $this->object->getUniqueLabelField(); $filters = array("service_register" => $this->register); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $elements = $this->object->getList( "*", diff --git a/www/class/centreon-clapi/centreonTrap.class.php b/www/class/centreon-clapi/centreonTrap.class.php index 17ec0df0ae0c257e7c11faf7ce325f18c4c19c93..7cd1e58b16c9c6f7f2bed6a8ad5d6416b10ecf49 100644 --- a/www/class/centreon-clapi/centreonTrap.class.php +++ b/www/class/centreon-clapi/centreonTrap.class.php @@ -324,16 +324,16 @@ class CentreonTrap extends CentreonObject * * @return void */ - public function export($filter_name) + public function export($filterName) { - if (!$this->canBeExported($filter_name)) { + if (!$this->canBeExported($filterName)) { return false; } $labelField = $this->object->getUniqueLabelField(); $filters = array(); - if (!is_null($filter_name)) { - $filters[$labelField] = $filter_name; + if (!is_null($filterName)) { + $filters[$labelField] = $filterName; } $elements = $this->object->getList("*", -1, 0, null, null, $filters, "AND");