From 6788adeae473b4abceaa24c409351395d965280a Mon Sep 17 00:00:00 2001 From: Matthew Vale Date: Tue, 5 Jan 2016 15:17:20 +0000 Subject: [PATCH 01/10] Updated ring_group_forward for user dashboard this is so the user_dashboard consistently shows the ring group name (as used elsewhere to refer to a ring group) --- app/ring_groups/ring_group_forward.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ring_groups/ring_group_forward.php b/app/ring_groups/ring_group_forward.php index b733d884ea..b04816015a 100644 --- a/app/ring_groups/ring_group_forward.php +++ b/app/ring_groups/ring_group_forward.php @@ -128,7 +128,6 @@ require_once "resources/paging.php"; echo "\n"; echo "\n"; - //echo th_order_by('ring_group_name', $text['label-name'], $order_by, $order); echo th_order_by('ring_group_extension', $text['label-ring-group-extension'], $order_by, $order); //echo th_order_by('ring_group_context', 'Context', $order_by, $order); //echo th_order_by('ring_group_strategy', 'Strategy', $order_by, $order); @@ -136,13 +135,13 @@ require_once "resources/paging.php"; //echo th_order_by('ring_group_timeout_data', 'Timeout Data', $order_by, $order); //echo th_order_by('ring_group_enabled', $text['label-enabled'], $order_by, $order); echo ""; + echo th_order_by('ring_group_name', $text['label-name'], $order_by, $order); echo th_order_by('ring_group_description', $text['label-description'], $order_by, $order); echo "\n"; if ($result_count > 0) { foreach($result as $row) { echo "\n"; - //echo " \n"; echo " \n"; //echo " \n"; //echo " \n"; @@ -150,6 +149,7 @@ require_once "resources/paging.php"; //echo " \n"; //echo " \n"; echo " \n"; + echo " \n"; echo " \n"; echo "\n"; if ($c==0) { $c=1; } else { $c=0; } From 52b71faa5f94fbbbc7027227936bfe5f1f2df61f Mon Sep 17 00:00:00 2001 From: blackc2004 Date: Tue, 5 Jan 2016 09:50:10 -0800 Subject: [PATCH 02/10] Update y000000000035.cfg --- resources/templates/provision/yealink/t48g/y000000000035.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/yealink/t48g/y000000000035.cfg b/resources/templates/provision/yealink/t48g/y000000000035.cfg index 268aacde40..db5057e912 100644 --- a/resources/templates/provision/yealink/t48g/y000000000035.cfg +++ b/resources/templates/provision/yealink/t48g/y000000000035.cfg @@ -1565,7 +1565,7 @@ super_search.url = ## Sirectory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = +directory_setting.url = {$yealink_directory_setting_url} ####################################################################################### ## Configure the access URL of firmware ## From 95f0ca4207f1b15a2f07bd0e0bb39b68f0fdc05a Mon Sep 17 00:00:00 2001 From: blackc2004 Date: Tue, 5 Jan 2016 09:51:58 -0800 Subject: [PATCH 03/10] Update y000000000005.cfg --- .../templates/provision/yealink/t22p/y000000000005.cfg | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/templates/provision/yealink/t22p/y000000000005.cfg b/resources/templates/provision/yealink/t22p/y000000000005.cfg index b47609c381..96a4a75ec9 100644 --- a/resources/templates/provision/yealink/t22p/y000000000005.cfg +++ b/resources/templates/provision/yealink/t22p/y000000000005.cfg @@ -590,7 +590,7 @@ programablekey.1.history_type = programablekey.1.label = ########################################################################################## -## Expansion Key £¨For T38G only£© ## +## Expansion Key £¨For T38G only£© ## ########################################################################################## #X ranges from 1 to 6, Y ranges from 1 to 39. #expansion_module.x.key.y.type = 37 (Switch by default) @@ -1075,7 +1075,7 @@ phone_setting.lock = phone_setting.phone_lock.unlock_pin = phone_setting.phone_lock.lock_time_out = -#Configure the ring tone for the phone. System ring tones are: Ring1.wav (default), Ring2.wav¡­¡­Ring8.wav. +#Configure the ring tone for the phone. System ring tones are: Ring1.wav (default), Ring2.wav¡­¡­Ring8.wav. #You can configure the custom ring tone (Busy.wav) for the phone, the value is: phone_setting.ring_type = Busy.wav phone_setting.ring_type = @@ -1133,6 +1133,12 @@ phone_setting.mute_power_led_flash_enable = #Enable or disable the phone to flash the power LED when placing a calll on hold; 0-Disabled (default), 1-Enabled; phone_setting.hold_power_led_flash_enable = +####################################################################################### +## Directory Setting ## +####################################################################################### +#Configure the access URL of the directory setting file. +directory_setting.url = {$yealink_directory_setting_url} + ####################################################################################### ## Configure the access URL of firmware ## ####################################################################################### From 5b61d2974964bcb813b7ab8c146d4dedd94cff3d Mon Sep 17 00:00:00 2001 From: blackc2004 Date: Tue, 5 Jan 2016 09:53:43 -0800 Subject: [PATCH 04/10] Update y000000000046.cfg --- resources/templates/provision/yealink/t29g/y000000000046.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/yealink/t29g/y000000000046.cfg b/resources/templates/provision/yealink/t29g/y000000000046.cfg index 7e540ed1fe..9d7ea59c52 100644 --- a/resources/templates/provision/yealink/t29g/y000000000046.cfg +++ b/resources/templates/provision/yealink/t29g/y000000000046.cfg @@ -1525,7 +1525,7 @@ super_search.url = ## Directory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = +directory_setting.url = {$yealink_directory_setting_url} ####################################################################################### ## Configure the access URL of firmware ## From e6fa94fbf748aab4745ee3840861e3e56fff60bd Mon Sep 17 00:00:00 2001 From: blackc2004 Date: Tue, 5 Jan 2016 09:54:38 -0800 Subject: [PATCH 05/10] Update y000000000029.cfg --- resources/templates/provision/yealink/t42g/y000000000029.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/yealink/t42g/y000000000029.cfg b/resources/templates/provision/yealink/t42g/y000000000029.cfg index f255bf51cd..81150da5f7 100644 --- a/resources/templates/provision/yealink/t42g/y000000000029.cfg +++ b/resources/templates/provision/yealink/t42g/y000000000029.cfg @@ -1565,7 +1565,7 @@ super_search.url = ## Directory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = +directory_setting.url = {$yealink_directory_settingurl} ####################################################################################### ## Configure the access URL of firmware ## From 37379daf386f5b6265926b5fbfd4ee09108ebab8 Mon Sep 17 00:00:00 2001 From: blackc2004 Date: Tue, 5 Jan 2016 09:58:00 -0800 Subject: [PATCH 06/10] Update y000000000035.cfg --- resources/templates/provision/yealink/t48g/y000000000035.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/provision/yealink/t48g/y000000000035.cfg b/resources/templates/provision/yealink/t48g/y000000000035.cfg index 268aacde40..db5057e912 100644 --- a/resources/templates/provision/yealink/t48g/y000000000035.cfg +++ b/resources/templates/provision/yealink/t48g/y000000000035.cfg @@ -1565,7 +1565,7 @@ super_search.url = ## Sirectory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = +directory_setting.url = {$yealink_directory_setting_url} ####################################################################################### ## Configure the access URL of firmware ## From 68d260921cd8cb44f8961bf74eb1b819a98a3c99 Mon Sep 17 00:00:00 2001 From: blackc2004 Date: Tue, 5 Jan 2016 10:12:39 -0800 Subject: [PATCH 07/10] Update xml_cdr_search.php --- app/xml_cdr/xml_cdr_search.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/xml_cdr/xml_cdr_search.php b/app/xml_cdr/xml_cdr_search.php index b01b99ae8c..7a85e3900b 100644 --- a/app/xml_cdr/xml_cdr_search.php +++ b/app/xml_cdr/xml_cdr_search.php @@ -164,6 +164,12 @@ echo " "; echo " "; echo " "; echo " "; +if (permission_exists('xml_cdr_all')) { + echo " "; + echo " "; + echo " "; + echo " "; +} echo "
".$text['label-tools']."
".$row['ring_group_name']." ".$row['ring_group_extension']." ".$row['ring_group_context']." ".$row['ring_group_strategy']." ".$row['ring_group_timeout_data']." ".$row['ring_group_enabled']." ".$text['link-call-forward']."".$row['ring_group_name']." ".$row['ring_group_description']." 
".$text['label-duration']."
".$text['button-show_all']."
"; echo " "; From 8a293a1c217f19ba736888f377e5217f6a8466cb Mon Sep 17 00:00:00 2001 From: blackc2004 Date: Tue, 5 Jan 2016 10:13:54 -0800 Subject: [PATCH 08/10] Update xml_cdr.php --- app/xml_cdr/xml_cdr.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index 572c9a7625..25fcb0e2e7 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -113,7 +113,7 @@ else { echo " \n"; echo " \n"; if (permission_exists('xml_cdr_all')) { - if ($_GET['showall'] != 'true') { + if ($_REQUEST['showall'] != 'true') { echo " \n"; } } @@ -325,7 +325,7 @@ else { $col_count++; } echo " \n"; - if ($_GET['showall'] && permission_exists('xml_cdr_all')) { + if ($_REQUEST['showall'] && permission_exists('xml_cdr_all')) { echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, null, null, $param); $col_count++; } @@ -441,7 +441,7 @@ else { } if (if_group("admin") || if_group("superadmin") || if_group("cdr")) { - $tr_link = "href='xml_cdr_details.php?uuid=".$row['uuid'].(($_GET['showall']) ? "&showall=true" : null)."'"; + $tr_link = "href='xml_cdr_details.php?uuid=".$row['uuid'].(($_REQUEST['showall']) ? "&showall=true" : null)."'"; } else { $tr_link = null; @@ -490,7 +490,7 @@ else { else { echo "  "; } - if ($_GET['showall'] && permission_exists('xml_cdr_all')) { + if ($_REQUEST['showall'] && permission_exists('xml_cdr_all')) { echo " "; echo $row['domain_name'].' '; echo " \n"; From d4e3035880694f4c8d756965fd2ce9443f8d68fc Mon Sep 17 00:00:00 2001 From: blackc2004 Date: Tue, 5 Jan 2016 10:20:12 -0800 Subject: [PATCH 09/10] Update app_config.php --- app/emails/app_config.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/emails/app_config.php b/app/emails/app_config.php index 1fdc5c780a..273a67f124 100644 --- a/app/emails/app_config.php +++ b/app/emails/app_config.php @@ -14,7 +14,7 @@ $apps[$x]['description']['de-de'] = ""; $apps[$x]['description']['de-ch'] = ""; $apps[$x]['description']['de-at'] = ""; - $apps[$x]['description']['fr-fr'] = "Gérer les messages électroniques échoué."; + $apps[$x]['description']['fr-fr'] = "GÈrer les messages Èlectroniques ÈchouÈ."; $apps[$x]['description']['fr-ca'] = ""; $apps[$x]['description']['fr-ch'] = ""; $apps[$x]['description']['pt-pt'] = "Gerenciar mensagens de e-mail falhou."; @@ -38,6 +38,10 @@ $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "emails_all"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + //schema details $y = 1; //table array index @@ -86,4 +90,4 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; -?> \ No newline at end of file +?> From 0c7b49ed29d5b0a35728ac916b9ceeb1e2d95cf8 Mon Sep 17 00:00:00 2001 From: blackc2004 Date: Tue, 5 Jan 2016 10:21:55 -0800 Subject: [PATCH 10/10] Update emails.php --- app/emails/emails.php | 54 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/app/emails/emails.php b/app/emails/emails.php index 87268fb43f..0576798f06 100644 --- a/app/emails/emails.php +++ b/app/emails/emails.php @@ -63,7 +63,9 @@ else { if ($email_uuid != '') { $sql = "select email from v_emails "; $sql .= "where email_uuid = '".$email_uuid."' "; - $sql .= "and domain_uuid = '".$domain_uuid."' "; + if (!permission_exists('emails_all') || $_REQUEST['showall'] != 'true') { + $sql .= "and domain_uuid = '".$domain_uuid."' "; + } $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); @@ -89,7 +91,11 @@ else { $_SESSION["message_mood"] = 'negative'; $_SESSION["message_delay"] = '4'; //sec $_SESSION["message"] = $text['message-resend_failed'].": ".$mailer_error; - header("Location: emails.php"); + if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { + header("Location: emails.php?showall=true"); + } else { + header("Location: emails.php"); + } } } @@ -110,6 +116,11 @@ else { echo " ".$text['description-emails']; echo " \n"; echo " \n"; + if (permission_exists('emails_all')) { + if ($_REQUEST['showall'] != 'true') { + echo " \n"; + } + } echo " \n"; echo " \n"; echo " \n"; @@ -118,7 +129,11 @@ else { //prepare to page the results $sql = "select count(*) as num_rows from v_emails "; - $sql .= "where domain_uuid = '".$domain_uuid."' "; + if (permission_exists('emails_all')) { + if ($_REQUEST['showall'] != 'true') { + $sql .= "where domain_uuid = '".$domain_uuid."' "; + } + } $prep_statement = $db->prepare($sql); if ($prep_statement) { $prep_statement->execute(); @@ -128,7 +143,11 @@ else { //prepare to page the results $rows_per_page = 50; - $param = ""; + if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { + $param .= "&showall=true"; + } else { + $param = ""; + } $page = $_GET['page']; if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); @@ -136,7 +155,11 @@ else { //get the list $sql = "select * from v_emails "; - $sql .= "where domain_uuid = '".$domain_uuid."' "; + if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { + $sql .= " join v_domains on v_emails.domain_uuid = v_domains.domain_uuid "; + } else { + $sql .= "where domain_uuid = '".$domain_uuid."' "; + } if (strlen($order_by)> 0) { $sql .= "order by ".$order_by." ".$order." "; } $sql .= "limit ".$rows_per_page." offset ".$offset." "; $prep_statement = $db->prepare(check_sql($sql)); @@ -152,9 +175,12 @@ else { echo "\n"; echo "\n"; - echo th_order_by('sent_date', $text['label-sent'], $order_by, $order); - echo th_order_by('type', $text['label-type'], $order_by, $order); - echo th_order_by('status', $text['label-status'], $order_by, $order); + if ($_REQUEST['showall'] == true && permission_exists('emails_all')) { + echo th_order_by('domain_name', $text['label-domain-name'], $order_by, $order, null, null, $param); + } + echo th_order_by('sent_date', $text['label-sent'], $order_by, $order, null, null, $param); + echo th_order_by('type', $text['label-type'], $order_by, $order, null, null, $param); + echo th_order_by('status', $text['label-status'], $order_by, $order, null, null, $param); echo "\n"; echo "\n"; echo "\n"; @@ -180,6 +206,10 @@ else { $tr_link = "href='email_view.php?id=".$row['email_uuid']."'"; echo "\n"; + if ($_REQUEST['showall'] == true && permission_exists('emails_all')) { + echo " \n"; + } + echo " \n"; echo "
".$text['label-message']."".$text['label-reference']." 
".$row['domain_name'].""; $sent_date = explode('.', $row['sent_date']); echo $sent_date[0]; @@ -192,7 +222,11 @@ else { echo " ".$text['label-download']."  "; } if (permission_exists('email_resend')) { - echo " ".$text['label-resend'].""; + echo " " . $text['label-resend'].""; } echo "