From 9a2dd06e1d6667864cc2fcccf434414d972a2a73 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 22 Feb 2019 11:22:01 -0500 Subject: [PATCH] Fix use of empty which isn't supported in old php. Remove the code entirely as I think it was just cutnpasted from somewhere else. We don't care if it is a new server or not in the validate code. Fixes #2540 --- web/skins/classic/views/js/server.js | 10 +++++----- web/skins/classic/views/server.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/skins/classic/views/js/server.js b/web/skins/classic/views/js/server.js index 746ea41bb..c2e62aebc 100644 --- a/web/skins/classic/views/js/server.js +++ b/web/skins/classic/views/js/server.js @@ -1,11 +1,11 @@ -function validateForm( form, newServer ) { +function validateForm(form) { var errors = new Array(); if ( !form.elements['newServer[Name]'].value ) { - errors[errors.length] = "You must supply a name"; + errors[errors.length] = 'You must supply a name'; } if ( errors.length ) { - alert( errors.join( "\n" ) ); - return( false ); + alert(errors.join("\n")); + return false; } - return( true ); + return true; } diff --git a/web/skins/classic/views/server.php b/web/skins/classic/views/server.php index 42dd5fc6f..c07fd48d7 100644 --- a/web/skins/classic/views/server.php +++ b/web/skins/classic/views/server.php @@ -39,7 +39,7 @@ xhtmlHeaders(__FILE__, translate('Server').' - '.$Server->Name());

Name() ?>

-
+