Merge branch 'master' of https://github.com/manupap1/ZoneMinder into debian_package_split
This commit is contained in:
commit
d61becb0d7
|
@ -443,10 +443,10 @@ if test "$prefix" != "NONE"; then
|
||||||
PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"`
|
PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"`
|
||||||
PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"`
|
PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"`
|
||||||
EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path"
|
EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path"
|
||||||
PERL_MM_PARMS="PREFIX=$prefix"
|
PERL_MM_PARMS="\"PREFIX=$prefix INSTALLDIRS=vendor\""
|
||||||
else
|
else
|
||||||
EXTRA_PERL_LIB="# Include from system perl paths only"
|
EXTRA_PERL_LIB="# Include from system perl paths only"
|
||||||
PERL_MM_PARMS=
|
PERL_MM_PARMS="\"INSTALLDIRS=vendor\""
|
||||||
fi
|
fi
|
||||||
AC_SUBST(PERL_MM_PARMS)
|
AC_SUBST(PERL_MM_PARMS)
|
||||||
AC_SUBST(EXTRA_PERL_LIB)
|
AC_SUBST(EXTRA_PERL_LIB)
|
||||||
|
|
|
@ -12,7 +12,7 @@ User=www-data
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=/usr/bin/zmpkg.pl start
|
ExecStart=/usr/bin/zmpkg.pl start
|
||||||
ExecReload=/usr/bin/zmpkg.pl restart
|
ExecReload=/usr/bin/zmpkg.pl restart
|
||||||
ExecStop=/bin/bash -c '[[ "$(/usr/bin/pgrep zmdc.pl)" > 0 ]] && /usr/bin/zmpkg.pl stop'
|
ExecStop=/usr/bin/zmpkg.pl stop
|
||||||
PIDFile=/var/run/zm/zm.pid
|
PIDFile=/var/run/zm/zm.pid
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
Index: ZoneMinder/configure.ac
|
|
||||||
===================================================================
|
|
||||||
--- ZoneMinder.orig/configure.ac 2014-12-13 15:10:27.705191682 +0100
|
|
||||||
+++ ZoneMinder/configure.ac 2014-12-13 16:50:07.101049743 +0100
|
|
||||||
@@ -443,10 +443,10 @@
|
|
||||||
PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"`
|
|
||||||
PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"`
|
|
||||||
EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path"
|
|
||||||
- PERL_MM_PARMS="PREFIX=$prefix"
|
|
||||||
+ PERL_MM_PARMS="\"PREFIX=$prefix INSTALLDIRS=vendor\""
|
|
||||||
else
|
|
||||||
EXTRA_PERL_LIB="# Include from system perl paths only"
|
|
||||||
- PERL_MM_PARMS=
|
|
||||||
+ PERL_MM_PARMS="\"INSTALLDIRS=vendor\""
|
|
||||||
fi
|
|
||||||
AC_SUBST(PERL_MM_PARMS)
|
|
||||||
AC_SUBST(EXTRA_PERL_LIB)
|
|
|
@ -1 +0,0 @@
|
||||||
01_vendor-perl.diff
|
|
|
@ -92,6 +92,22 @@ our %types =
|
||||||
|
|
||||||
our @options =
|
our @options =
|
||||||
(
|
(
|
||||||
|
{
|
||||||
|
name => "ZM_SKIN_DEFAULT",
|
||||||
|
default => "classic",
|
||||||
|
description => "Default skin used by web interface",
|
||||||
|
help => "ZoneMinder allows the use of many different web interfaces. This option allows you to set the default skin used by the website. Users can change their skin later, this merely sets the default.",
|
||||||
|
type => $types{string},
|
||||||
|
category => "system",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name => "ZM_CSS_DEFAULT",
|
||||||
|
default => "classic",
|
||||||
|
description => "Default set of css files used by web interface",
|
||||||
|
help => "ZoneMinder allows the use of many different web interfaces, and some skins allow the use of different set of CSS files to control the appearance. This option allows you to set the default set of css files used by the website. Users can change their css later, this merely sets the default.",
|
||||||
|
type => $types{string},
|
||||||
|
category => "system",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name => "ZM_LANG_DEFAULT",
|
name => "ZM_LANG_DEFAULT",
|
||||||
default => "en_gb",
|
default => "en_gb",
|
||||||
|
|
|
@ -275,7 +275,7 @@ sub getFilters
|
||||||
{
|
{
|
||||||
Debug( "Found filter '$db_filter->{Name}'\n" );
|
Debug( "Found filter '$db_filter->{Name}'\n" );
|
||||||
my $filter_expr = jsonDecode( $db_filter->{Query} );
|
my $filter_expr = jsonDecode( $db_filter->{Query} );
|
||||||
my $sql = "select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime)";
|
my $sql = "select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId";
|
||||||
$db_filter->{Sql} = '';
|
$db_filter->{Sql} = '';
|
||||||
|
|
||||||
if ( @{$filter_expr->{terms}} )
|
if ( @{$filter_expr->{terms}} )
|
||||||
|
@ -414,7 +414,17 @@ sub getFilters
|
||||||
}
|
}
|
||||||
if ( $db_filter->{Sql} )
|
if ( $db_filter->{Sql} )
|
||||||
{
|
{
|
||||||
$sql .= " and ( ".$db_filter->{Sql}." )";
|
if ( $db_filter->{AutoMessage} )
|
||||||
|
{
|
||||||
|
# Include all events, including events that are still ongoing
|
||||||
|
# and have no EndTime yet
|
||||||
|
$sql .= " and ( ".$db_filter->{Sql}." )";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# Only include closed events (events with valid EndTime)
|
||||||
|
$sql .= " where not isnull(E.EndTime) and ( ".$db_filter->{Sql}." )";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
my @auto_terms;
|
my @auto_terms;
|
||||||
if ( $db_filter->{AutoArchive} )
|
if ( $db_filter->{AutoArchive} )
|
||||||
|
|
|
@ -25,7 +25,12 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
//#include <memory.h>
|
//#include <memory.h>
|
||||||
|
#if defined(BSD)
|
||||||
|
#include <stdlib.h>
|
||||||
|
#else
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
//#include <unistd.h>
|
//#include <unistd.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
|
@ -19,7 +19,11 @@
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#if defined(BSD)
|
||||||
|
#include <limits.h>
|
||||||
|
#else
|
||||||
#include <values.h>
|
#include <values.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "zm.h"
|
#include "zm.h"
|
||||||
#include "zm_db.h"
|
#include "zm_db.h"
|
||||||
|
|
|
@ -60,6 +60,8 @@ if ( isset($_GET['skin']) )
|
||||||
$skin = $_GET['skin'];
|
$skin = $_GET['skin'];
|
||||||
elseif ( isset($_COOKIE['zmSkin']) )
|
elseif ( isset($_COOKIE['zmSkin']) )
|
||||||
$skin = $_COOKIE['zmSkin'];
|
$skin = $_COOKIE['zmSkin'];
|
||||||
|
elseif ( ZM_SKIN_DEFAULT )
|
||||||
|
$skin = ZM_SKIN_DEFAULT;
|
||||||
else
|
else
|
||||||
$skin = "classic";
|
$skin = "classic";
|
||||||
|
|
||||||
|
@ -67,6 +69,8 @@ if ( isset($_GET['css']) )
|
||||||
$css = $_GET['css'];
|
$css = $_GET['css'];
|
||||||
elseif ( isset($_COOKIE['zmCSS']) )
|
elseif ( isset($_COOKIE['zmCSS']) )
|
||||||
$css = $_COOKIE['zmCSS'];
|
$css = $_COOKIE['zmCSS'];
|
||||||
|
elseif (ZM_CSS_DEFAULT)
|
||||||
|
$css = ZM_CSS_DEFAULT;
|
||||||
else
|
else
|
||||||
$css = "classic";
|
$css = "classic";
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,7 @@ foreach ( $tabs as $name=>$value )
|
||||||
</ul>
|
</ul>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<?php
|
<?php
|
||||||
|
$skin_options = array_map( 'basename', glob('skins/*',GLOB_ONLYDIR) );
|
||||||
if($tab == 'skins') {
|
if($tab == 'skins') {
|
||||||
$current_skin = $_COOKIE['zmSkin'];
|
$current_skin = $_COOKIE['zmSkin'];
|
||||||
$reload = false;
|
$reload = false;
|
||||||
|
@ -95,6 +96,7 @@ if($tab == 'skins') {
|
||||||
//header("Location: index.php?view=options&tab=skins&reset_parent=1");
|
//header("Location: index.php?view=options&tab=skins&reset_parent=1");
|
||||||
$reload = true;
|
$reload = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $reload )
|
if ( $reload )
|
||||||
echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>";
|
echo "<script type=\"text/javascript\">window.opener.location.reload();window.location.href=\"{$_SERVER['PHP_SELF']}?view={$view}&tab={$tab}\"</script>";
|
||||||
|
|
||||||
|
@ -110,8 +112,7 @@ if($tab == 'skins') {
|
||||||
<td><?php echo $SLANG['SkinDescription']; ?></td>
|
<td><?php echo $SLANG['SkinDescription']; ?></td>
|
||||||
<td><select name="skin-choice">
|
<td><select name="skin-choice">
|
||||||
<?php
|
<?php
|
||||||
foreach(glob('skins/*',GLOB_ONLYDIR) as $dir) {
|
foreach($skin_options as $dir) {
|
||||||
$dir = basename($dir);
|
|
||||||
echo '<option value="'.$dir.'" '.($current_skin==$dir ? 'SELECTED="SELECTED"' : '').'>'.$dir.'</option>';
|
echo '<option value="'.$dir.'" '.($current_skin==$dir ? 'SELECTED="SELECTED"' : '').'>'.$dir.'</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -123,8 +124,7 @@ if($tab == 'skins') {
|
||||||
<td><?php echo $SLANG['CSSDescription']; ?></td>
|
<td><?php echo $SLANG['CSSDescription']; ?></td>
|
||||||
<td><select name="css-choice">
|
<td><select name="css-choice">
|
||||||
<?php
|
<?php
|
||||||
foreach(glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDIR) as $dir) {
|
foreach( array_map( 'basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDIR) ) as $dir) {
|
||||||
$dir = basename($dir);
|
|
||||||
echo '<option value="'.$dir.'" '.($current_css==$dir ? 'SELECTED="SELECTED"' : '').'>'.$dir.'</option>';
|
echo '<option value="'.$dir.'" '.($current_css==$dir ? 'SELECTED="SELECTED"' : '').'>'.$dir.'</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -208,12 +208,12 @@ elseif ( $tab == "users" )
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
} else {
|
||||||
else
|
if ( $tab == "system" ) {
|
||||||
{
|
|
||||||
if ( $tab == "system" )
|
|
||||||
{
|
|
||||||
$configCats[$tab]['ZM_LANG_DEFAULT']['Hint'] = join( '|', getLanguages() );
|
$configCats[$tab]['ZM_LANG_DEFAULT']['Hint'] = join( '|', getLanguages() );
|
||||||
|
$configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = join( '|', $skin_options );
|
||||||
|
$configCats[$tab]['ZM_CSS_DEFAULT']['Hint'] = join( '|', array_map ( 'basename', glob('skins/'.ZM_SKIN_DEFAULT.'/css/*',GLOB_ONLYDIR) ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form name="optionsForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
<form name="optionsForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
||||||
|
|
Loading…
Reference in New Issue