Merge branch 'storageareas' of github.com:connortechnology/zoneminder into storageareas
This commit is contained in:
commit
91f7034642
|
@ -68,6 +68,9 @@ if ( $action == 'monitor' ) {
|
||||||
|
|
||||||
$columns = getTableColumns('Monitors');
|
$columns = getTableColumns('Monitors');
|
||||||
$changes = getFormChanges($monitor, $_REQUEST['newMonitor'], $types, $columns);
|
$changes = getFormChanges($monitor, $_REQUEST['newMonitor'], $types, $columns);
|
||||||
|
ZM\Logger::Debug("Columns:". print_r($columns,true));
|
||||||
|
ZM\Logger::Debug("Changes:". print_r($changes,true));
|
||||||
|
ZM\Logger::Debug("newMonitor:". print_r($_REQUEST['newMonitor'],true));
|
||||||
|
|
||||||
if ( count($changes) ) {
|
if ( count($changes) ) {
|
||||||
if ( $mid ) {
|
if ( $mid ) {
|
||||||
|
@ -88,12 +91,12 @@ if ( $action == 'monitor' ) {
|
||||||
$NewStorage = new ZM\Storage($_REQUEST['newMonitor']['StorageId']);
|
$NewStorage = new ZM\Storage($_REQUEST['newMonitor']['StorageId']);
|
||||||
if ( !file_exists($NewStorage->Path().'/'.$mid) ) {
|
if ( !file_exists($NewStorage->Path().'/'.$mid) ) {
|
||||||
if ( !mkdir($NewStorage->Path().'/'.$mid, 0755) ) {
|
if ( !mkdir($NewStorage->Path().'/'.$mid, 0755) ) {
|
||||||
Error('Unable to mkdir ' . $NewStorage->Path().'/'.$mid);
|
ZM\Error('Unable to mkdir ' . $NewStorage->Path().'/'.$mid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$saferNewName = basename($_REQUEST['newMonitor']['Name']);
|
$saferNewName = basename($_REQUEST['newMonitor']['Name']);
|
||||||
if ( !symlink($NewStorage->Path().'/'.$mid, $NewStorage->Path().'/'.$saferNewName) ) {
|
if ( !symlink($NewStorage->Path().'/'.$mid, $NewStorage->Path().'/'.$saferNewName) ) {
|
||||||
Warning('Unable to symlink ' . $NewStorage->Path().'/'.$mid . ' to ' . $NewStorage->Path().'/'.$saferNewName);
|
ZM\Warning('Unable to symlink ' . $NewStorage->Path().'/'.$mid . ' to ' . $NewStorage->Path().'/'.$saferNewName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( isset($changes['Width']) || isset($changes['Height']) ) {
|
if ( isset($changes['Width']) || isset($changes['Height']) ) {
|
||||||
|
|
Loading…
Reference in New Issue