Merge branch 'master' of github.com:ZoneMinder/ZoneMinder
commit
db58352bff
|
@ -81,7 +81,7 @@ if ( isset($_REQUEST['object']) and ( $_REQUEST['object'] == 'filter' ) ) {
|
|||
} else {
|
||||
dbQuery('INSERT INTO Filters SET'.$sql);
|
||||
$_REQUEST['Id'] = dbInsertId();
|
||||
$filter = new Filter($_REQUEST['Id']);
|
||||
$filter = new ZM\Filter($_REQUEST['Id']);
|
||||
}
|
||||
if ( !empty($_REQUEST['filter']['Background']) )
|
||||
$filter->control('start');
|
||||
|
|
|
@ -356,7 +356,7 @@ function getWebSiteUrl( $id, $src, $width, $height, $title='' ) {
|
|||
if (array_key_exists('X-Frame-Options', $header)) {
|
||||
$header = $header['X-Frame-Options'];
|
||||
if ( stripos($header, 'sameorigin') === 0 )
|
||||
Warning("Web site $src has X-Frame-Options set to sameorigin. An X-Frame-Options browser plugin is required to display this site.");
|
||||
ZM\Warning("Web site $src has X-Frame-Options set to sameorigin. An X-Frame-Options browser plugin is required to display this site.");
|
||||
}
|
||||
}
|
||||
return '<object id="'.$id.'" data="'.$src.'" alt="'.$title.'" width="'.$width.'" height="'.$height.'"></object>';
|
||||
|
@ -807,7 +807,7 @@ function canStreamNative() {
|
|||
|
||||
function canStreamApplet() {
|
||||
if ( (ZM_OPT_CAMBOZOLA && !file_exists( ZM_PATH_WEB.'/'.ZM_PATH_CAMBOZOLA )) ) {
|
||||
Warning ( 'ZM_OPT_CAMBOZOLA is enabled, but the system cannot find '.ZM_PATH_WEB.'/'.ZM_PATH_CAMBOZOLA );
|
||||
ZM\Warning('ZM_OPT_CAMBOZOLA is enabled, but the system cannot find '.ZM_PATH_WEB.'/'.ZM_PATH_CAMBOZOLA);
|
||||
}
|
||||
|
||||
return( (ZM_OPT_CAMBOZOLA && file_exists( ZM_PATH_WEB.'/'.ZM_PATH_CAMBOZOLA )) );
|
||||
|
@ -1307,7 +1307,7 @@ function parseFilter(&$filter, $saveToSession=false, $querySep='&') {
|
|||
$filter['sql'] .= " IS NOT $value";
|
||||
break;
|
||||
default:
|
||||
Warning("Invalid operator in filter: " . $terms[$i]['op'] );
|
||||
ZM\Warning("Invalid operator in filter: " . $terms[$i]['op'] );
|
||||
}
|
||||
|
||||
$filter['query'] .= $querySep.urlencode("filter[Query][terms][$i][op]").'='.urlencode($terms[$i]['op']);
|
||||
|
|
|
@ -18,7 +18,12 @@
|
|||
}
|
||||
?>";
|
||||
|
||||
if ( querySuffix == '?view=login' ) {
|
||||
// If we didn't redirect elsewhere, then don't show login page, go to console
|
||||
querySuffix = '?view=console';
|
||||
}
|
||||
var newUrl = querySuffix;
|
||||
|
||||
console.log("Redirecting to" + newUrl + ' ' + thisUrl);
|
||||
window.location.replace(newUrl);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ xhtmlHeaders(__FILE__, translate('Login') );
|
|||
<form class="center-block" name="loginForm" id="loginForm" method="post" action="?">
|
||||
<input type="hidden" name="action" value="login"/>
|
||||
<input type="hidden" name="view" value="login"/>
|
||||
<input type="hidden" name="postLoginQuery" value="<?php echo htmlspecialchars($_SERVER['QUERY_STRING']) ?>">
|
||||
<input type="hidden" name="postLoginQuery" value="<?php echo isset($_SERVER['QUERY_STRING']) ? htmlspecialchars($_SERVER['QUERY_STRING']) : ''?>">
|
||||
|
||||
<div id="loginError" class="hidden alarm" role="alert">
|
||||
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
|
||||
if ( !canView( 'Monitors' ) ) {
|
||||
if ( !canView('Monitors') ) {
|
||||
$view = 'error';
|
||||
return;
|
||||
}
|
||||
|
||||
$mid = validInt($_REQUEST['mid']);
|
||||
$monitor = new Monitor( $mid );
|
||||
$monitor = new ZM\Monitor($mid);
|
||||
# Width() and Height() are already rotated
|
||||
$minX = 0;
|
||||
$maxX = $monitor->Width()-1;
|
||||
|
@ -32,18 +32,18 @@ $minY = 0;
|
|||
$maxY = $monitor->Height()-1;
|
||||
|
||||
$zones = array();
|
||||
foreach( dbFetchAll( 'SELECT * FROM Zones WHERE MonitorId=? ORDER BY Area DESC', NULL, array($mid) ) as $row ) {
|
||||
$row['Points'] = coordsToPoints( $row['Coords'] );
|
||||
foreach( dbFetchAll('SELECT * FROM Zones WHERE MonitorId=? ORDER BY Area DESC', NULL, array($mid)) as $row ) {
|
||||
$row['Points'] = coordsToPoints($row['Coords']);
|
||||
|
||||
limitPoints( $row['Points'], $minX, $minY, $maxX, $maxY );
|
||||
$row['Coords'] = pointsToCoords( $row['Points'] );
|
||||
$row['AreaCoords'] = preg_replace( '/\s+/', ',', $row['Coords'] );
|
||||
limitPoints($row['Points'], $minX, $minY, $maxX, $maxY);
|
||||
$row['Coords'] = pointsToCoords($row['Points']);
|
||||
$row['AreaCoords'] = preg_replace('/\s+/', ',', $row['Coords']);
|
||||
$zones[] = $row;
|
||||
}
|
||||
|
||||
$connkey = generateConnKey();
|
||||
|
||||
xhtmlHeaders(__FILE__, translate('Zones') );
|
||||
xhtmlHeaders(__FILE__, translate('Zones'));
|
||||
?>
|
||||
<body>
|
||||
<div id="page">
|
||||
|
|
Loading…
Reference in New Issue