mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Dashboard: Fix php warnings (#7493)
* Dashboard: Fix php warnings * Update dashboard_edit.php * Update dashboard.php * Update parent.php * Update footer.php * Update active_calls.php * Update active_calls.php
This commit is contained in:
@@ -241,9 +241,9 @@ echo " <input id='token' type='hidden' name='" . $token['name'] . "' value='" .
|
||||
subscriber::save_token($token, ['active.calls']);
|
||||
|
||||
//break the caching
|
||||
$version = md5(file_get_contents(__DIR__, '/resources/javascript/websocket_client.js'));
|
||||
$version = md5(file_get_contents(__DIR__ . '/resources/javascript/websocket_client.js'));
|
||||
echo "<script src='resources/javascript/websocket_client.js?v=$version'></script>\n";
|
||||
$version = md5(file_get_contents(__DIR__, '/resources/javascript/arrow.js'));
|
||||
$version = md5(file_get_contents(__DIR__ . '/resources/javascript/arrows.js'));
|
||||
echo "<script src='resources/javascript/arrows.js?v=$version'></script>\n";
|
||||
?>
|
||||
<script>
|
||||
|
||||
@@ -96,7 +96,7 @@ if ($dashboard_details_state != 'disabled') {
|
||||
echo "</div>\n";
|
||||
|
||||
//include arrows when not changed
|
||||
$version = md5(file_get_contents($project_root, '/app/active_calls/resources/javascript/arrow.js'));
|
||||
$version = md5(file_get_contents($project_root . '/app/active_calls/resources/javascript/arrows.js'));
|
||||
echo "<script src='/app/active_calls/resources/javascript/arrows.js?v=$version'></script>\n";
|
||||
|
||||
?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2021-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2021-2025
|
||||
the Initial Developer. All Rights Reserved.
|
||||
*/
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
$list_row_url = '';
|
||||
if (permission_exists('dashboard_edit')) {
|
||||
$list_row_url = "dashboard_edit.php?id=".urlencode($row['dashboard_uuid']);
|
||||
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
if (!empty($row['domain_uuid']) && $row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
|
||||
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,9 +55,12 @@
|
||||
$dashboard_content = '';
|
||||
$dashboard_content_text_align = '';
|
||||
$dashboard_content_details = '';
|
||||
$dashboard_chart_type = '';
|
||||
$dashboard_label_enabled = 'true';
|
||||
$dashboard_label_text_color = '';
|
||||
$dashboard_label_text_color_hover = '';
|
||||
$dashboard_label_background_color = '';
|
||||
$dashboard_label_background_color_hover = '';
|
||||
$dashboard_number_text_color = '';
|
||||
$dashboard_number_background_color = '';
|
||||
$dashboard_groups = [];
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
require_once "resources/header.php";
|
||||
|
||||
//include websockets
|
||||
$version = md5(file_get_contents(__DIR__, '/resources/javascript/ws_client.js'));
|
||||
$version = md5(file_get_contents(__DIR__ . '/resources/javascript/ws_client.js'));
|
||||
echo "<script src='/core/dashboard/resources/javascript/ws_client.js?v=$version'></script>\n";
|
||||
|
||||
//include sortablejs
|
||||
@@ -204,7 +204,7 @@
|
||||
echo " <div class='heading'><b>".$text['title-dashboard']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo " <form id='dashboard' method='post' _onsubmit='setFormSubmitting()'>\n";
|
||||
if ($_SESSION['theme']['menu_style']['text'] != 'side') {
|
||||
if ($settings->get('theme', 'menu_style') != 'side') {
|
||||
echo " ".$text['label-welcome']." <a href='".PROJECT_PATH."/core/users/user_edit.php?id=user'>".$_SESSION["username"]."</a> ";
|
||||
}
|
||||
if (permission_exists('dashboard_edit')) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
$text = $language->get($_SESSION['domain']['language']['code'], dirname($dashboard_url));
|
||||
|
||||
//get the dashboard label
|
||||
$dashboard_label = $text['title-'.$dashboard_key];
|
||||
$dashboard_label = $text['title-'.$dashboard_key] ?? '';
|
||||
if (empty($dashboard_label)) {
|
||||
$dashboard_label = $dashboard_name;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2025
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -214,7 +214,7 @@
|
||||
unset($menu);
|
||||
}
|
||||
//build menu by style
|
||||
switch ($_SESSION['theme']['menu_style']['text']) {
|
||||
switch ($settings->get('theme', 'menu_style')) {
|
||||
case 'side':
|
||||
$view->assign('menu_side_state', (isset($_SESSION['theme']['menu_side_state']['text']) && $_SESSION['theme']['menu_side_state']['text'] != '' ? $_SESSION['theme']['menu_side_state']['text'] : 'expanded'));
|
||||
if ($_SESSION['theme']['menu_side_state']['text'] != 'hidden') {
|
||||
|
||||
Reference in New Issue
Block a user