diff --git a/distros/redhat/readme/README b/distros/redhat/readme/README index 065628321..0b3e4bb9c 100644 --- a/distros/redhat/readme/README +++ b/distros/redhat/readme/README @@ -7,7 +7,7 @@ What's New 2. The contents of the ZoneMinder Apache config file have changed. In addition, this ZoneMinder package now requires you to manually symlink the ZoneMinder Apache config file. See new install step 6 and upgrade step 3 - below for details. + in the appropriate README for details. 3. This package has been split into sub-packages to allow compatibility with other web servers. Here is a breakdown of the available packages: @@ -19,9 +19,8 @@ What's New zoneminder-nginx - Files needed for compatibility with the Nginx web server You can switch between different subpackages with dnf/yum. Be advised that, - if you modified any of the default config files supplied by the package, - rpm may not update the config file to the proper version. This is by design. - To avoid this issue, use drop-in files instead. + switching between httpd <-> nginx requires manaully changing ownership of + all event folders and the php session folder after the change. 4. If you have installed ZoneMinder from the FedBerry repositories, this build of ZoneMinder has support for Raspberry Pi hardware acceleration when using diff --git a/distros/redhat/readme/README.httpd b/distros/redhat/readme/README.httpd index 5301850df..cb5805b18 100644 --- a/distros/redhat/readme/README.httpd +++ b/distros/redhat/readme/README.httpd @@ -146,8 +146,13 @@ Upgrades See step 6 of the installation section if you have not already done this during a previous upgrade. +<<<<<<< HEAD + If this step is not performed correctly, the web console will appear + mostly empty and/or significantly corrupted post-upgrade. +======= IMPORTANT: Failure to complete this step properly will result in a mostly empty or significantly corrupted web console post-upgrade. +>>>>>>> 5b211d250910918782d20bf32b0e33a38a0df4dd 4. Upgrade the database before starting ZoneMinder. diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index 95476037b..59fd3dc81 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -253,7 +253,6 @@ echo -e "\nThe README file is located here: %{_pkgdocdir}-common/README\n" # For the case of changing from nginx <-> httpd, files in these folders must change ownership if they exist %{_bindir}/chown -R %{zmuid_final}:%{zmgid_final} %{_sharedstatedir}/php/session/* >/dev/null 2>&1 || : %{_bindir}/chown -R %{zmuid_final}:%{zmgid_final} %{_localstatedir}/log/zoneminder/* >/dev/null 2>&1 || : -%{_bindir}/chown -R %{zmuid_final}:%{zmgid_final} %{_sharedstatedir}/zoneminder/events/* >/dev/null 2>&1 || : ln -sf %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.httpd %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules # backwards compatibility @@ -272,7 +271,6 @@ ln -sf %{_sysconfdir}/zm/www/zoneminder.httpd.conf %{_sysconfdir}/zm/www/zonemin # For the case of changing from httpd <-> nginx, files in these folders must change ownership if they exist %{_bindir}/chown -R nginx:nginx %{_sharedstatedir}/php/session/* >/dev/null 2>&1 || : %{_bindir}/chown -R nginx:nginx %{_localstatedir}/log/zoneminder/* >/dev/null 2>&1 || : -%{_bindir}/chown -R nginx:nginx %{_sharedstatedir}/zoneminder/events/* >/dev/null 2>&1 || : ln -sf %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.nginx %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules # backwards compatibility diff --git a/scripts/zmupdate.pl.in b/scripts/zmupdate.pl.in index b66397740..bb9dddac4 100644 --- a/scripts/zmupdate.pl.in +++ b/scripts/zmupdate.pl.in @@ -353,8 +353,8 @@ if ( $version ) { $version = $detaint_version; if ( ZM_VERSION eq $version ) { - print( "\nDatabase already at version $version, update aborted.\n\n" ); - exit( 0 ); + print("\nDatabase already at version $version, update skipped.\n\n"); + exit(0); } print( "\nInitiating database upgrade to version ".ZM_VERSION." from version $version\n" ); diff --git a/web/api/app/Controller/HostController.php b/web/api/app/Controller/HostController.php index 017bce798..d4e19fd77 100644 --- a/web/api/app/Controller/HostController.php +++ b/web/api/app/Controller/HostController.php @@ -65,18 +65,17 @@ class HostController extends AppController { $isZmAuth = $this->Config->find('first',array('conditions' => array('Config.' . $this->Config->primaryKey => 'ZM_OPT_USE_AUTH')))['Config']['Value']; if ( $isZmAuth ) { + // In future, we may want to completely move to AUTH_HASH_LOGINS and return &auth= for all cases require_once "../../../includes/auth.php"; # in the event we directly call getCredentials.json $this->Session->read('user'); # this is needed for command line/curl to recognize a session $zmAuthRelay = $this->Config->find('first',array('conditions' => array('Config.' . $this->Config->primaryKey => 'ZM_AUTH_RELAY')))['Config']['Value']; if ( $zmAuthRelay == 'hashed' ) { $zmAuthHashIps = $this->Config->find('first',array('conditions' => array('Config.' . $this->Config->primaryKey => 'ZM_AUTH_HASH_IPS')))['Config']['Value']; $credentials = 'auth='.generateAuthHash($zmAuthHashIps); - } else if ( $zmAuthRelay == 'plain' ) { + } else { // user will need to append the store password here $credentials = 'user='.$this->Session->read('user.Username').'&pass='; $appendPassword = 1; - } else if ( $zmAuthRelay == 'none' ) { - $credentials = 'user='.$this->Session->read('user.Username'); } } return array($credentials, $appendPassword); diff --git a/web/includes/Server.php b/web/includes/Server.php index 06219a1f5..3918e9389 100644 --- a/web/includes/Server.php +++ b/web/includes/Server.php @@ -84,8 +84,8 @@ class Server { } } - public function UrlToZMS( ) { - return $this->Url().$this->PathToZMS(); + public function UrlToZMS( $port = null ) { + return $this->Url($port).$this->PathToZMS(); } public function Url( $port = null ) { @@ -113,11 +113,11 @@ class Server { return $_SERVER['PHP_SELF']; } - public function UrlToIndex( ) { - return $this->Url().$this->PathToIndex(); + public function UrlToIndex( $port=null ) { + return $this->Url($port).$this->PathToIndex(); } - public function UrlToApi( ) { - return $this->Url().$this->PathToApi(); + public function UrlToApi( $port=null ) { + return $this->Url($port).$this->PathToApi(); } public function PathToApi( $new = null ) { if ( $new != null ) diff --git a/web/skins/classic/views/watch.php b/web/skins/classic/views/watch.php index a7f7fbc1c..850f0c63d 100644 --- a/web/skins/classic/views/watch.php +++ b/web/skins/classic/views/watch.php @@ -75,7 +75,7 @@ if ( canView('Control') && $monitor->Type() == 'Local' ) { ?>
:
-
+
$scale) ); ?>