Merge branch 'master' of git://github.com/ZoneMinder/zoneminder
refresh with master
This commit is contained in:
commit
571daec8fc
|
@ -2450,7 +2450,7 @@ our @options = (
|
|||
},
|
||||
{
|
||||
name => 'ZM_RUN_AUDIT',
|
||||
default => 'yes',
|
||||
default => 'no',
|
||||
description => 'Run zmaudit to check data consistency',
|
||||
help => q`
|
||||
The zmaudit daemon exists to check that the saved information
|
||||
|
@ -2679,7 +2679,7 @@ our @options = (
|
|||
},
|
||||
{
|
||||
name => 'ZM_OPT_CONTROL',
|
||||
default => 'no',
|
||||
default => 'yes',
|
||||
description => 'Support controllable (e.g. PTZ) cameras',
|
||||
help => q`
|
||||
ZoneMinder includes limited support for controllable cameras. A
|
||||
|
@ -2892,7 +2892,7 @@ our @options = (
|
|||
},
|
||||
{
|
||||
name => 'ZM_WEB_LIST_THUMBS',
|
||||
default => 'no',
|
||||
default => 'yes',
|
||||
description => 'Display mini-thumbnails of event images in event lists',
|
||||
help => q`
|
||||
Ordinarily the event lists just display text details of the
|
||||
|
|
|
@ -158,29 +158,19 @@ $GLOBALS['defaultUser'] = array(
|
|||
|
||||
function loadConfig( $defineConsts=true ) {
|
||||
global $config;
|
||||
global $configCats;
|
||||
global $dbConn;
|
||||
|
||||
$config = array();
|
||||
$configCat = array();
|
||||
|
||||
$result = $dbConn->query( 'select * from Config order by Id asc' );
|
||||
$result = $dbConn->query('SELECT Name,Value FROM Config');
|
||||
if ( !$result )
|
||||
echo mysql_error();
|
||||
$monitors = array();
|
||||
while( $row = dbFetchNext( $result ) ) {
|
||||
if ( $defineConsts )
|
||||
define( $row['Name'], $row['Value'] );
|
||||
$config[$row['Name']] = $row;
|
||||
if ( !($configCat = &$configCats[$row['Category']]) ) {
|
||||
$configCats[$row['Category']] = array();
|
||||
$configCat = &$configCats[$row['Category']];
|
||||
}
|
||||
$configCat[$row['Name']] = $row;
|
||||
}
|
||||
//print_r( $config );
|
||||
//print_r( $configCats );
|
||||
}
|
||||
} # end function loadConfig
|
||||
|
||||
// For Human-readability, use ZM_SERVER_HOST or ZM_SERVER_NAME in zm.conf, and convert it here to a ZM_SERVER_ID
|
||||
if ( ! defined('ZM_SERVER_ID') ) {
|
||||
|
|
|
@ -117,21 +117,12 @@ function getImageSource( monId, time ) {
|
|||
Event = events[Frame.EventId];
|
||||
|
||||
var storage = Storage[Event.StorageId];
|
||||
var server = storage.ServerId ? Servers[storage.ServerId] : Servers[serverId];
|
||||
if ( server ) {
|
||||
return server.url() +
|
||||
//location.protocol + '//' + server.Hostname +
|
||||
//'/cgi-bin/zms?mode=jpeg&replay=single&event=' + event_id +
|
||||
//'&frame='+Frame.FrameId +
|
||||
'/index.php?view=image&eid=' + Frame.EventId + '&fid='+Frame.FrameId +
|
||||
// monitorServerId may be 0, which gives us the default Server entry
|
||||
var server = storage.ServerId ? Servers[storage.ServerId] : Servers[monitorServerId[monId]];
|
||||
return server.PathToIndex() +
|
||||
'?view=image&eid=' + Frame.EventId + '&fid='+Frame.FrameId +
|
||||
"&width=" + monitorCanvasObj[monId].width +
|
||||
"&height=" + monitorCanvasObj[monId].height;
|
||||
}
|
||||
console.log("No server found for " + ( storage.ServerId ? storage.ServerId : serverId ));
|
||||
//console.log("No storage found for " + eStorageId[i] );
|
||||
return '/zm/index.php?view=image&eid=' + Frame.EventId + '&fid='+frame_id + "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
||||
//return "/cgi-bin/zms?mode=single&replay=single&event=" + Frame.EventId + '&time='+time+ "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
||||
//return "/cgi-bin/zms?mode=jpeg&replay=single&event=" + Frame.EventId + '&frame='+frame_id + "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
||||
} // end found Frame
|
||||
return '';
|
||||
//return "no data";
|
||||
|
|
|
@ -123,12 +123,18 @@ foreach ( Storage::find() as $Storage ) {
|
|||
echo 'Storage[' . $Storage->Id() . '] = ' . json_encode($Storage). ";\n";
|
||||
}
|
||||
echo "\nvar Servers = [];\n";
|
||||
// Fall back to get Server paths, etc when no using multi-server mode
|
||||
$Server = new Server();
|
||||
echo 'Servers[0] = new Server(' . json_encode($Server). ");\n";
|
||||
foreach ( Server::find() as $Server ) {
|
||||
echo 'Servers[' . $Server->Id() . '] = new Server(' . json_encode($Server). ");\n";
|
||||
}
|
||||
|
||||
|
||||
echo '
|
||||
var monitorName = [];
|
||||
var monitorLoading = [];
|
||||
var monitorServerId = [];
|
||||
var monitorImageObject = [];
|
||||
var monitorImageURL = [];
|
||||
var monitorLoadingStageURL = [];
|
||||
|
@ -164,6 +170,7 @@ foreach ( $monitors as $m ) {
|
|||
echo " monitorWidth[" . $m->Id() . "]=" . $m->Width() . ";\n";
|
||||
echo " monitorHeight[" . $m->Id() . "]=" . $m->Height() . ";\n";
|
||||
echo " monitorIndex[" . $m->Id() . "]=" . $numMonitors . ";\n";
|
||||
echo " monitorServerId[" . $m->Id() . "]='" .($m->ServerId() ? $m->ServerId() : '0'). "';\n";
|
||||
echo " monitorName[" . $m->Id() . "]=\"" . $m->Name() . "\";\n";
|
||||
echo " monitorLoadStartTimems[" . $m->Id() . "]=0;\n";
|
||||
echo " monitorLoadEndTimems[" . $m->Id() . "]=0;\n";
|
||||
|
|
|
@ -305,6 +305,22 @@ foreach ( array_map('basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
|
|||
</form>
|
||||
<?php
|
||||
} else {
|
||||
$config = array();
|
||||
$configCat = array();
|
||||
$configCats = array();
|
||||
|
||||
$result = $dbConn->query('SELECT * FROM Config ORDER BY Id ASC');
|
||||
if ( !$result )
|
||||
echo mysql_error();
|
||||
while( $row = dbFetchNext($result) ) {
|
||||
$config[$row['Name']] = $row;
|
||||
if ( !($configCat = &$configCats[$row['Category']]) ) {
|
||||
$configCats[$row['Category']] = array();
|
||||
$configCat = &$configCats[$row['Category']];
|
||||
}
|
||||
$configCat[$row['Name']] = $row;
|
||||
}
|
||||
|
||||
if ( $tab == 'system' ) {
|
||||
$configCats[$tab]['ZM_LANG_DEFAULT']['Hint'] = join( '|', getLanguages() );
|
||||
$configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = join( '|', $skin_options );
|
||||
|
|
Loading…
Reference in New Issue