From a3e6fe5522e5c8049b50e77bbd48f1ccb56e1d59 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 3 Aug 2020 11:47:31 -0500 Subject: [PATCH 1/6] make the eslint nanny happy --- web/skins/classic/includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 33527b1b5..4723f3054 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -140,17 +140,17 @@ if ( $css != 'base' ) var mootoolsLoaded = (typeof MooTools != 'undefined'); if (bootstrapLoaded && mootoolsLoaded) { Element.implement({ - hide: function () { + hide: function() { return this; }, - show: function (v) { + show: function(v) { return this; }, - slide: function (v) { + slide: function(v) { return this; } }); - } + } jQuery("#flip").click(function() { jQuery("#panel").slideToggle("slow"); var flip = jQuery("#flip"); From ab9a135759a898ec90e2d42bffae774f26926078 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 3 Aug 2020 12:10:34 -0500 Subject: [PATCH 2/6] fix inability to stop zm from the web console --- web/skins/classic/views/state.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/skins/classic/views/state.php b/web/skins/classic/views/state.php index 692a2290f..56227c37e 100644 --- a/web/skins/classic/views/state.php +++ b/web/skins/classic/views/state.php @@ -17,6 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // +global $running; if ( !canEdit('System') ) { $view = 'error'; From 9d88f8ee7305dc1dbb0573151994c220207f6eab Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 3 Aug 2020 15:22:46 -0500 Subject: [PATCH 3/6] implement zm about menu --- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in | 14 ++++++++++++++ web/skins/classic/includes/functions.php | 14 ++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index f660e5bcf..1aba8dbac 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -1578,6 +1578,20 @@ our @options = ( type => $types{string}, category => 'web', }, + { + name => 'ZM_HOME_ABOUT', + default => 'yes', + description => 'Whether enable the ZoneMinder About menu.', + help => q` + When enabled, the ZoneMinder logo in the top left corner of the + navigation bar becomes a menu with links to: the ZoneMinder + website, ZoneMinder Documentation, and the ZoneMinder forum. + End users wishing to rebrand their system may want to disable this + as the menu items are currently hard coded. + `, + type => $types{boolean}, + category => 'web', + }, { name => 'ZM_WEB_CONSOLE_BANNER', default => '', diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 4723f3054..9c25a7703 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -605,11 +605,21 @@ function getZMVersionHTML() { return $result; } -// Returns the html representing the ZoneMinder logo +// Returns the html representing the ZoneMinder logo and about menu function getNavBrandHTML() { $result = ''; - + + $zm_home_about = true; + if ( $zm_home_about ) { + $result .= 'ZoneMinder'.PHP_EOL; + $result .= ''.PHP_EOL; + } else { $result .= '' .ZM_HOME_CONTENT. ''.PHP_EOL; + } return $result; } From 8d9410d510b453daee6dde8c86bef84e209287ad Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 3 Aug 2020 15:38:02 -0500 Subject: [PATCH 4/6] spelling --- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 1aba8dbac..8310d8e1d 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -1581,7 +1581,7 @@ our @options = ( { name => 'ZM_HOME_ABOUT', default => 'yes', - description => 'Whether enable the ZoneMinder About menu.', + description => 'Whether to enable the ZoneMinder About menu.', help => q` When enabled, the ZoneMinder logo in the top left corner of the navigation bar becomes a menu with links to: the ZoneMinder From a575b162782a0fd679eaee7d53dea9a53edfc372 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 3 Aug 2020 15:45:27 -0500 Subject: [PATCH 5/6] set a target to about menu items --- web/skins/classic/includes/functions.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 9c25a7703..d8806d009 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -609,13 +609,12 @@ function getZMVersionHTML() { function getNavBrandHTML() { $result = ''; - $zm_home_about = true; - if ( $zm_home_about ) { + if ( ZM_HOME_ABOUT ) { $result .= 'ZoneMinder'.PHP_EOL; $result .= ''.PHP_EOL; } else { $result .= '' .ZM_HOME_CONTENT. ''.PHP_EOL; From 9e03827fea4e960a9c477600c89160dde54aaf7e Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Tue, 4 Aug 2020 09:38:52 -0500 Subject: [PATCH 6/6] rpm specfile - use new cmake macros for f33 compat --- distros/redhat/zoneminder.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index e94c552db..f268da12c 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -212,10 +212,10 @@ mv -f CakePHP-Enum-Behavior-%{ceb_version} ./web/api/app/Plugin/CakePHP-Enum-Beh -DZM_TARGET_DISTRO="%{zmtargetdistro}" \ . -%make_build +%cmake3_build %install -%make_install +%cmake3_install desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \