mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-07 07:27:41 -05:00
Merge branch 'master' into storageareas
This commit is contained in:
@@ -258,7 +258,7 @@ sub run {
|
||||
|
||||
my $fd = 0;
|
||||
|
||||
# THis also closes dbh and CLIENT and SERVER
|
||||
# This also closes dbh and CLIENT and SERVER
|
||||
while( $fd < POSIX::sysconf(&POSIX::_SC_OPEN_MAX) ) {
|
||||
POSIX::close($fd++);
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ bool VideoStore::setup_resampler() {
|
||||
audio_in_ctx->channel_layout = av_get_channel_layout("mono");
|
||||
|
||||
/* put sample parameters */
|
||||
audio_out_ctx->bit_rate = audio_in_ctx->bit_rate;
|
||||
audio_out_ctx->bit_rate = audio_in_ctx->bit_rate <= 96000 ? audio_in_ctx->bit_rate : 96000;
|
||||
audio_out_ctx->sample_rate = audio_in_ctx->sample_rate;
|
||||
audio_out_ctx->channels = audio_in_ctx->channels;
|
||||
audio_out_ctx->channel_layout = audio_in_ctx->channel_layout;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
//
|
||||
// ZoneMinder web language file, $Date$, $Revision$
|
||||
// ZoneMinder web language file
|
||||
// Copyright (C) 2001-2008 Philip Coombes
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
@@ -18,58 +18,55 @@
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
|
||||
function translate( $name )
|
||||
{
|
||||
global $SLANG;
|
||||
if ( array_key_exists( $name, $SLANG ) )
|
||||
return $SLANG[$name];
|
||||
else
|
||||
return $name;
|
||||
function translate( $name ) {
|
||||
global $SLANG;
|
||||
if ( array_key_exists($name, $SLANG) )
|
||||
return $SLANG[$name];
|
||||
else
|
||||
return $name;
|
||||
}
|
||||
|
||||
function loadLanguage( $prefix="" )
|
||||
{
|
||||
global $user;
|
||||
function loadLanguage( $prefix='' ) {
|
||||
global $user;
|
||||
|
||||
if ( $prefix )
|
||||
$prefix = $prefix.'/';
|
||||
if ( $prefix )
|
||||
$prefix = $prefix.'/';
|
||||
|
||||
$fallbackLangFile = $prefix.'lang/en_gb.php';
|
||||
$systemLangFile = $prefix.'lang/'.ZM_LANG_DEFAULT.'.php';
|
||||
if ( isset($user['Language']) )
|
||||
$userLangFile = $prefix.'lang/'.$user['Language'].'.php';
|
||||
$fallbackLangFile = $prefix.'lang/en_gb.php';
|
||||
$systemLangFile = $prefix.'lang/'.ZM_LANG_DEFAULT.'.php';
|
||||
if ( isset($user['Language']) )
|
||||
$userLangFile = $prefix.'lang/'.$user['Language'].'.php';
|
||||
|
||||
if ( isset($userLangFile) && file_exists( $userLangFile ) )
|
||||
return( $userLangFile );
|
||||
elseif ( file_exists( $systemLangFile ) )
|
||||
return( $systemLangFile );
|
||||
elseif ( file_exists( $fallbackLangFile ) )
|
||||
return( $fallbackLangFile );
|
||||
else
|
||||
return( false );
|
||||
if ( isset($userLangFile) && file_exists($userLangFile) )
|
||||
return $userLangFile;
|
||||
elseif ( file_exists($systemLangFile) )
|
||||
return $systemLangFile;
|
||||
elseif ( file_exists($fallbackLangFile) )
|
||||
return $fallbackLangFile;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $langFile = loadLanguage() ) {
|
||||
require_once( $langFile );
|
||||
require_once( 'lang/default.php' );
|
||||
foreach ($DLANG as $key => $value) {
|
||||
if ( ! array_key_exists( $key, $SLANG ) )
|
||||
$SLANG[$key] = $DLANG[$key];
|
||||
}
|
||||
require_once($langFile);
|
||||
require_once('lang/default.php');
|
||||
foreach ($DLANG as $key => $value) {
|
||||
if ( ! array_key_exists($key, $SLANG) )
|
||||
$SLANG[$key] = $DLANG[$key];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Date and time formats fallback, if not set up by the language file already
|
||||
//
|
||||
defined("DATE_FMT_CONSOLE_LONG") or define("DATE_FMT_CONSOLE_LONG", "D jS M, g:ia"); // This is the main console date/time, date() or strftime() format
|
||||
defined("DATE_FMT_CONSOLE_SHORT") or define( "DATE_FMT_CONSOLE_SHORT", "%H:%M" ); // This is the xHTML console date/time, date() or strftime() format
|
||||
defined('DATE_FMT_CONSOLE_LONG') or define('DATE_FMT_CONSOLE_LONG', 'D jS M, g:ia'); // This is the main console date/time, date() or strftime() format
|
||||
defined('DATE_FMT_CONSOLE_SHORT') or define('DATE_FMT_CONSOLE_SHORT', '%H:%M'); // This is the xHTML console date/time, date() or strftime() format
|
||||
|
||||
defined("STRF_FMT_DATETIME") or define( "STRF_FMT_DATETIME", "%c" ); // Strftime locale aware format for dates with times
|
||||
defined("STRF_FMT_DATE") or define( "STRF_FMT_DATE", "%x" ); // Strftime locale aware format for dates without times
|
||||
defined("STRF_FMT_TIME") or define( "STRF_FMT_TIME", "%X" ); // Strftime locale aware format for times without dates
|
||||
defined('STRF_FMT_DATETIME') or define('STRF_FMT_DATETIME', '%c'); // Strftime locale aware format for dates with times
|
||||
defined('STRF_FMT_DATE') or define('STRF_FMT_DATE', '%x'); // Strftime locale aware format for dates without times
|
||||
defined('STRF_FMT_TIME') or define('STRF_FMT_TIME', '%X'); // Strftime locale aware format for times without dates
|
||||
|
||||
defined("STRF_FMT_DATETIME_SHORT") or define( "STRF_FMT_DATETIME_SHORT", "%y/%m/%d %H:%M:%S" ); // Strftime shorter format for dates with time, not locale aware
|
||||
defined("STRF_FMT_DATETIME_SHORTER") or define( "STRF_FMT_DATETIME_SHORTER", "%m/%d %H:%M:%S" );// Strftime shorter format for dates with time, not locale aware, used where space is tight
|
||||
defined('STRF_FMT_DATETIME_SHORT') or define('STRF_FMT_DATETIME_SHORT', '%y/%m/%d %H:%M:%S'); // Strftime shorter format for dates with time, not locale aware
|
||||
defined('STRF_FMT_DATETIME_SHORTER') or define('STRF_FMT_DATETIME_SHORTER','%m/%d %H:%M:%S');// Strftime shorter format for dates with time, not locale aware, used where space is tight
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user