diff --git a/GPL_LIB/Smarty/libs/Smarty_Compiler.class.php b/GPL_LIB/Smarty/libs/Smarty_Compiler.class.php index 5fc8f0bcb534f84ef9c83e191bef7bb508ecceb1..3201195c8ca9bbd443235704abed82212cef0d36 100644 --- a/GPL_LIB/Smarty/libs/Smarty_Compiler.class.php +++ b/GPL_LIB/Smarty/libs/Smarty_Compiler.class.php @@ -273,7 +273,7 @@ class Smarty_Compiler extends Smarty { preg_match_all("~{$ldq}\s*(.*?)\s*{$rdq}~s", $source_content, $_match); $template_tags = $_match[1]; /* preg_split content by template tags to obtain non-template content. */ - $text_blocks = preg_preg_split("~{$ldq}.*?{$rdq}~s", $source_content); + $text_blocks = preg_split("~{$ldq}.*?{$rdq}~s", $source_content); /* loop through text blocks */ for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; $curr_tb++) { @@ -1706,7 +1706,7 @@ class Smarty_Compiler extends Smarty { function _parse_var($var_expr) { $_has_math = false; - $_math_vars = preg_preg_split('~('.$this->_dvar_math_regexp.'|'.$this->_qstr_regexp.')~', $var_expr, -1, PREG_preg_split_DELIM_CAPTURE); + $_math_vars = preg_split('~('.$this->_dvar_math_regexp.'|'.$this->_qstr_regexp.')~', $var_expr, -1, preg_split_DELIM_CAPTURE); if(count($_math_vars) > 1) { $_first_var = ""; diff --git a/GPL_LIB/Smarty/libs/internals/core.assign_smarty_interface.php b/GPL_LIB/Smarty/libs/internals/core.assign_smarty_interface.php index 5056ca02e1cbc9a572cf4a1e572d019524f8b85e..2266ff425068b9326a4718f1b21aa8d52433eab1 100644 --- a/GPL_LIB/Smarty/libs/internals/core.assign_smarty_interface.php +++ b/GPL_LIB/Smarty/libs/internals/core.assign_smarty_interface.php @@ -28,7 +28,7 @@ function smarty_core_assign_smarty_interface($params, &$smarty) $_smarty_vars_request = array(); - foreach (preg_preg_split('!!', strtolower($smarty->request_vars_order)) as $_c) { + foreach (preg_split('!!', strtolower($smarty->request_vars_order)) as $_c) { if (isset($_globals_map[$_c])) { $_smarty_vars_request = array_merge($_smarty_vars_request, $GLOBALS[$_globals_map[$_c]]); } diff --git a/GPL_LIB/Smarty/libs/internals/core.create_dir_structure.php b/GPL_LIB/Smarty/libs/internals/core.create_dir_structure.php index 06b695c931e3bc28607fa8f64ec3f03d2a686a34..657fe13133576f54b024de3b029c2231cc96c76f 100644 --- a/GPL_LIB/Smarty/libs/internals/core.create_dir_structure.php +++ b/GPL_LIB/Smarty/libs/internals/core.create_dir_structure.php @@ -21,7 +21,7 @@ function smarty_core_create_dir_structure($params, &$smarty) if (DIRECTORY_SEPARATOR=='/') { /* unix-style paths */ $_dir = $params['dir']; - $_dir_parts = preg_preg_split('!/+!', $_dir, -1, PREG_preg_split_NO_EMPTY); + $_dir_parts = preg_split('!/+!', $_dir, -1, preg_split_NO_EMPTY); $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/'; if($_use_open_basedir = !empty($_open_basedir_ini)) { $_open_basedirs = explode(':', $_open_basedir_ini); @@ -30,7 +30,7 @@ function smarty_core_create_dir_structure($params, &$smarty) } else { /* other-style paths */ $_dir = str_replace('\\','/', $params['dir']); - $_dir_parts = preg_preg_split('!/+!', $_dir, -1, PREG_preg_split_NO_EMPTY); + $_dir_parts = preg_split('!/+!', $_dir, -1, preg_split_NO_EMPTY); if (preg_match('!^((//)|([a-zA-Z]:/))!', $_dir, $_root_dir)) { /* leading "//" for network volume, or "[letter]:/" for full path */ $_new_dir = $_root_dir[1]; diff --git a/GPL_LIB/Smarty/libs/internals/core.write_cache_file.php b/GPL_LIB/Smarty/libs/internals/core.write_cache_file.php index d142701154c3ec1ec3c561cd5a334ac1adb5275d..943f802515def4c4f2dd489cd6d102ad7b290ae5 100644 --- a/GPL_LIB/Smarty/libs/internals/core.write_cache_file.php +++ b/GPL_LIB/Smarty/libs/internals/core.write_cache_file.php @@ -39,7 +39,7 @@ function smarty_core_write_cache_file($params, &$smarty) // smarty_core_process_compiled_includes() on a cache-read $match_count = count($match[0]); - $results = preg_preg_split('!(\{/?nocache\:[0-9a-f]{32}#\d+\})!', $params['results'], -1, PREG_preg_split_DELIM_CAPTURE); + $results = preg_split('!(\{/?nocache\:[0-9a-f]{32}#\d+\})!', $params['results'], -1, preg_split_DELIM_CAPTURE); $level = 0; $j = 0; diff --git a/GPL_LIB/Smarty/libs/plugins/block.textformat.php b/GPL_LIB/Smarty/libs/plugins/block.textformat.php index 41697bff33f6c73befc7fd6c5fa7ba6da73de7dc..bce4ee9105c0273d121c603f7e3e07938661fbbd 100644 --- a/GPL_LIB/Smarty/libs/plugins/block.textformat.php +++ b/GPL_LIB/Smarty/libs/plugins/block.textformat.php @@ -72,7 +72,7 @@ function smarty_block_textformat($params, $content, &$smarty) } // preg_split into paragraphs - $_paragraphs = preg_preg_split('![\r\n][\r\n]!',$content); + $_paragraphs = preg_split('![\r\n][\r\n]!',$content); $_output = ''; for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) { diff --git a/GPL_LIB/Smarty/libs/plugins/modifier.count_paragraphs.php b/GPL_LIB/Smarty/libs/plugins/modifier.count_paragraphs.php index ce3078b8da52777f66863401b1f0e34ee8cc30d3..8a8bef65d1181298b7ee3dd12626e33b16407a32 100644 --- a/GPL_LIB/Smarty/libs/plugins/modifier.count_paragraphs.php +++ b/GPL_LIB/Smarty/libs/plugins/modifier.count_paragraphs.php @@ -21,7 +21,7 @@ function smarty_modifier_count_paragraphs($string) { // count \r or \n characters - return count(preg_preg_split('/[\r\n]+/', $string)); + return count(preg_split('/[\r\n]+/', $string)); } /* vim: set expandtab: */ diff --git a/GPL_LIB/Smarty/libs/plugins/modifier.count_words.php b/GPL_LIB/Smarty/libs/plugins/modifier.count_words.php index 495a24d003145bc3aa0e869ea565d2da137502c2..ddb328d08b54ef97f9fb4c8d4594e7965f0a56c8 100644 --- a/GPL_LIB/Smarty/libs/plugins/modifier.count_words.php +++ b/GPL_LIB/Smarty/libs/plugins/modifier.count_words.php @@ -21,7 +21,7 @@ function smarty_modifier_count_words($string) { // preg_split text by ' ',\r,\n,\f,\t - $preg_split_array = preg_preg_split('/\s+/',$string); + $preg_split_array = preg_split('/\s+/',$string); // count matches that contain alphanumerics $word_count = preg_grep('/[a-zA-Z0-9\\x80-\\xff]/', $preg_split_array); diff --git a/GPL_LIB/Smarty/libs/plugins/modifier.spacify.php b/GPL_LIB/Smarty/libs/plugins/modifier.spacify.php index 0de7b7ce019782e302707a1ffab22853279546f7..00e50a2247c612a4fb5b892432395b76979c646e 100644 --- a/GPL_LIB/Smarty/libs/plugins/modifier.spacify.php +++ b/GPL_LIB/Smarty/libs/plugins/modifier.spacify.php @@ -22,7 +22,7 @@ function smarty_modifier_spacify($string, $spacify_char = ' ') { return implode($spacify_char, - preg_preg_split('//', $string, -1, PREG_preg_split_NO_EMPTY)); + preg_split('//', $string, -1, preg_split_NO_EMPTY)); } /* vim: set expandtab: */ diff --git a/www/class/centreonExternalCommand.class.php b/www/class/centreonExternalCommand.class.php index e71f29757a53bd491176ea592444b95072853505..e4346a2c2d57974bed5b4fd51b518a3d427faba0 100644 --- a/www/class/centreonExternalCommand.class.php +++ b/www/class/centreonExternalCommand.class.php @@ -303,9 +303,9 @@ class CentreonExternalCommand { * @param string $string */ private function getDate($string) { - $res = preg_preg_split("/ /", $string); - $res3 = preg_preg_split("/\//", $res[0]); - $res4 = preg_preg_split("/:/", $res[1]); + $res = preg_split("/ /", $string); + $res3 = preg_split("/\//", $res[0]); + $res4 = preg_split("/:/", $res[1]); $end_time = mktime($res4[0], $res4[1], "0", $res3[1], $res3[2], $res3[0]); unset($res); return $end_time; diff --git a/www/include/monitoring/downtime/AddHostDowntime.php b/www/include/monitoring/downtime/AddHostDowntime.php index 383f7827f35adeb9b0224e09da74a18c5b7bca2d..99d798eddccad102fe4b5242b87daaa77a74a005 100644 --- a/www/include/monitoring/downtime/AddHostDowntime.php +++ b/www/include/monitoring/downtime/AddHostDowntime.php @@ -177,7 +177,7 @@ */ $hg = new CentreonHostgroups($pearDB); $hostlist = $hg->getHostGroupHosts($_POST['hostgroup_id']); - $host_acl_id = preg_preg_split('/,/', $hostStr); + $host_acl_id = preg_split('/,/', $hostStr); foreach ($hostlist as $host_id) { if ($oreon->user->access->admin || in_array($host_id, $host_acl_id)) { $ecObj->AddHostDowntime($host_id, $_POST["comment"], $_POST["start"], $_POST["end"], $_POST["persistant"], $duration, $dt_w_services); diff --git a/www/include/monitoring/external_cmd/functionsPopup.php b/www/include/monitoring/external_cmd/functionsPopup.php index ad34fc9a8b3fa2a709d96ac24fd09787cab20290..7057589c77215ccddaf73d7e33f7dcadb6d988b6 100644 --- a/www/include/monitoring/external_cmd/functionsPopup.php +++ b/www/include/monitoring/external_cmd/functionsPopup.php @@ -170,22 +170,22 @@ isset($_GET['fixed']) && $_GET['fixed'] == "true" ? $fixed = 1 : $fixed = 0; isset($_GET['duration']) && $_GET['duration'] && is_numeric($_GET['duration']) ? $duration = $_GET['duration'] : $duration = 0; - $res = preg_preg_split("/ /", $start); + $res = preg_split("/ /", $start); if (count($res) != 2) { throw new Exception('Start date format is not valid'); } - $res1 = preg_preg_split("/\//", $res[0]); - $res2 = preg_preg_split("/:/", $res[1]); + $res1 = preg_split("/\//", $res[0]); + $res2 = preg_split("/:/", $res[1]); $start_time = mktime($res2[0], $res2[1], "0", $res1[1], $res1[2], $res1[0]); $start_time = $centreonGMT->getUTCDate($start_time); - $res = preg_preg_split("/ /", $end); + $res = preg_split("/ /", $end); if (count($res) != 2) { throw new Exception('End date format is not valid'); } - $res3 = preg_preg_split("/\//", $res[0]); - $res4 = preg_preg_split("/:/", $res[1]); + $res3 = preg_split("/\//", $res[0]); + $res4 = preg_split("/:/", $res[1]); $end_time = mktime($res4[0], $res4[1], "0", $res3[1], $res3[2], $res3[0]); $end_time = $centreonGMT->getUTCDate($end_time); if (!$duration) { @@ -241,21 +241,21 @@ isset($_GET['fixed']) && $_GET['fixed'] == "true" ? $fixed = 1 : $fixed = 0; isset($_GET['duration']) && $_GET['duration'] && is_numeric($_GET['duration']) ? $duration = $_GET['duration'] : $duration = 0; - $res = preg_preg_split("/ /", $start); + $res = preg_split("/ /", $start); if (count($res) != 2) { throw new Exception('Start date format is not valid'); } - $res1 = preg_preg_split("/\//", $res[0]); - $res2 = preg_preg_split("/:/", $res[1]); + $res1 = preg_split("/\//", $res[0]); + $res2 = preg_split("/:/", $res[1]); $start_time = mktime($res2[0], $res2[1], "0", $res1[1], $res1[2], $res1[0], -1); $start_time = $centreonGMT->getUTCDate($start_time); - $res = preg_preg_split("/ /", $end); + $res = preg_split("/ /", $end); if (count($res) != 2) { throw new Exception('End date format is not valid'); } - $res3 = preg_preg_split("/\//", $res[0]); - $res4 = preg_preg_split("/:/", $res[1]); + $res3 = preg_split("/\//", $res[0]); + $res4 = preg_split("/:/", $res[1]); $end_time = mktime($res4[0], $res4[1], "0", $res3[1], $res3[2], $res3[0], -1); $end_time = $centreonGMT->getUTCDate($end_time); if (!$duration) { diff --git a/www/include/monitoring/status/Services/xml/broker/makeXMLForOneService.php b/www/include/monitoring/status/Services/xml/broker/makeXMLForOneService.php index 0686f23397d45c55ac61bcf2e15f0cd2f1fcdd3b..e8a46f41e2bd8cc552650b906ff57e3747c5b1db 100644 --- a/www/include/monitoring/status/Services/xml/broker/makeXMLForOneService.php +++ b/www/include/monitoring/status/Services/xml/broker/makeXMLForOneService.php @@ -174,7 +174,7 @@ */ /* $obj->XML->writeElement("long_name", _("Extended Status Information"), 0); - $lo_array = preg_preg_split('/<br \/>|<br>|\\\n|\x0A|\x0D\x0A/', $data["long_output"]); + $lo_array = preg_split('/<br \/>|<br>|\\\n|\x0A|\x0D\x0A/', $data["long_output"]); foreach ($lo_array as $val) { if ($val != "") { $obj->XML->startElement("long_output_data"); diff --git a/www/include/monitoring/status/Services/xml/ndo/makeXMLForOneService.php b/www/include/monitoring/status/Services/xml/ndo/makeXMLForOneService.php index afda6bec820fe10a54fe09c1563f218b9170c5e4..b20f09fbec204730c78a5604f23f2cd02cadb08f 100644 --- a/www/include/monitoring/status/Services/xml/ndo/makeXMLForOneService.php +++ b/www/include/monitoring/status/Services/xml/ndo/makeXMLForOneService.php @@ -209,7 +209,7 @@ * Long Output */ $buffer->writeElement("long_name", _("Extended Status Information"), 0); - $lo_array = preg_preg_split('/<br \/>|<br>|\\\n|\x0A|\x0D\x0A/', $ndo["long_output"]); + $lo_array = preg_split('/<br \/>|<br>|\\\n|\x0A|\x0D\x0A/', $ndo["long_output"]); foreach ($lo_array as $val) { if ($val != "") { $buffer->startElement("long_output_data"); diff --git a/www/include/options/oreon/modules/listModules.php b/www/include/options/oreon/modules/listModules.php index 8787c74cf02888138a66d60f4573735e8657ea67..0ccbf0f9dc19c9fa6f2e21ac090484298980cfb5 100644 --- a/www/include/options/oreon/modules/listModules.php +++ b/www/include/options/oreon/modules/listModules.php @@ -46,7 +46,7 @@ * @return array */ function parse_zend_license_file($file) { - $lines = preg_preg_split('/\n/', file_get_contents($file)); + $lines = preg_split('/\n/', file_get_contents($file)); $infos = array(); foreach ($lines as $line) { if (preg_match('/^([^= ]+)\s*=\s*(.+)$/', $line, $match)) { diff --git a/www/include/reporting/dashboard/DB-Func.php b/www/include/reporting/dashboard/DB-Func.php index 76d5c22580b02535024f71c09c77ec30d73af67b..43560f1234c5238509bda56f86a312afe0a82856 100644 --- a/www/include/reporting/dashboard/DB-Func.php +++ b/www/include/reporting/dashboard/DB-Func.php @@ -471,15 +471,15 @@ $serviceGroupStats[$host_service_id][$name] = 0; } $servicesStats = array(); - $res = preg_preg_split("/_/", $host_service_id); + $res = preg_split("/_/", $host_service_id); $servicesStats = getLogInDbForOneSVC($res[0], $res[1], $start_date, $end_date, $reportTimePeriod); if (isset($servicesStats)) { $serviceGroupStats[$host_service_id] = $servicesStats; - $res = preg_preg_split("/_/", $host_service_id); + $res = preg_split("/_/", $host_service_id); $serviceGroupStats[$host_service_id]["HOST_ID"] = $res[0]; $serviceGroupStats[$host_service_id]["SERVICE_ID"] = $res[1]; - $res = preg_preg_split("/:::/", $host_service_name); + $res = preg_split("/:::/", $host_service_name); $serviceGroupStats[$host_service_id]["HOST_NAME"] = $res[0]; $serviceGroupStats[$host_service_id]["SERVICE_DESC"] = $res[1]; foreach ($serviceStatsLabels as $name)