Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
James 2013-01-08 12:31:22 -05:00
commit 45e3fccae2
10 changed files with 2707 additions and 2470 deletions

View File

@ -34,13 +34,7 @@ $front->registerPlugin(new RabbitMqPlugin());
//localization configuration
$codeset = 'UTF-8';
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$id = $auth->getIdentity()->id;
$lang = Application_Model_Preference::GetCurrentUserLocale($id).'.'.$codeset;
} else {
$lang = Application_Model_Preference::GetLocale().'.'.$codeset;
}
$lang = Application_Model_Preference::GetLocale().'.'.$codeset;
putenv("LC_ALL=$lang");
putenv("LANG=$lang");

View File

@ -44,7 +44,7 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
Application_Model_Preference::SetDefaultFade($values["stationDefaultFade"]);
Application_Model_Preference::SetAllow3rdPartyApi($values["thirdPartyApi"]);
Application_Model_Preference::SetLocale($values["locale"]);
Application_Model_Preference::SetDefaultLocale($values["locale"]);
Application_Model_Preference::SetTimezone($values["timezone"]);
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);

View File

@ -55,7 +55,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
$locale = new Zend_Form_Element_Select("locale");
$locale->setLabel(_("Default Interface Language"));
$locale->setMultiOptions(Application_Model_Locale::getLocales());
$locale->setValue(Application_Model_Preference::GetLocale());
$locale->setValue(Application_Model_Preference::GetDefaultLocale());
$locale->setDecorators(array('ViewHelper'));
$this->addElement($locale);

View File

@ -446,17 +446,17 @@ class Application_Model_Preference
}
// This is the language setting on preferences page
public static function SetLocale($locale)
public static function SetDefaultLocale($locale)
{
self::setValue("locale", $locale);
}
public static function GetLocale()
public static function GetDefaultLocale()
{
return self::getValue("locale");
}
public static function GetCurrentUserLocale($id)
public static function GetUserLocale($id)
{
return self::getValue("user_".$id."_locale", true);
}
@ -466,14 +466,20 @@ class Application_Model_Preference
// When a new user is created they will get the default locale
// setting which the admin sets on preferences page
if (is_null($locale)) {
$locale = self::GetLocale();
$locale = self::GetDefaultLocale();
}
self::setValue("user_".$userId."_locale", $locale, true, $userId);
}
public static function GetUserLocale($userId)
public static function GetLocale()
{
return self::getValue("user_".$userId."_locale");
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$id = $auth->getIdentity()->id;
return self::GetUserLocale($id);
} else {
return self::GetDefaultLocale();
}
}
public static function SetStationLogo($imagePath)

File diff suppressed because it is too large Load Diff

View File

@ -122,7 +122,7 @@ $(document).ready(function() {
case 'P':
$(this).attr('id', 'user-type-P');
$(this).attr('user-rights',
$.i18n._('Progam Managers can do the following:')+'<br><br>'+
$.i18n._('Program Managers can do the following:')+'<br><br>'+
$.i18n._('View schedule')+'<br>'+
$.i18n._('View and manage show content')+'<br>'+
$.i18n._('Schedule shows')+'<br>'+

View File

@ -1,2 +1,2 @@
[main]
liquidsoap_tar_url = http://dl.dropbox.com/u/256410/airtime/savonet.tar.gz
liquidsoap_tar_url = https://dl.dropbox.com/u/256410/airtime/liquidsoap-jan-02-2013.tar.gz

View File

@ -99,7 +99,7 @@ def create_fresh_os(vm_name, debian=False):
do_local('VBoxManage startvm %s'%vm_name)
print "Please wait while attempting to acquire IP address"
time.sleep(15)
time.sleep(30)
try_again = True
while try_again:
@ -115,7 +115,7 @@ def create_fresh_os(vm_name, debian=False):
env.host_string = ip_addr
if debian:
append('/etc/apt/sources.list', "deb http://www.debian-multimedia.org squeeze main non-free", use_sudo=True)
append('/etc/apt/sources.list', "deb http://backports.debian.org/debian-backports squeeze-backports main", use_sudo=True)
def ubuntu_lucid_32(fresh_os=True):
if (fresh_os):
@ -157,6 +157,14 @@ def ubuntu_precise_32(fresh_os=True):
if (fresh_os):
create_fresh_os('Ubuntu_12.04_32')
def ubuntu_quantal_32(fresh_os=True):
if (fresh_os):
create_fresh_os('Ubuntu_12.10_32')
def ubuntu_quantal_64(fresh_os=True):
if (fresh_os):
create_fresh_os('Ubuntu_12.10_64')
def debian_squeeze_32(fresh_os=True):
if (fresh_os):
create_fresh_os('Debian_Squeeze_32', debian=True)
@ -165,6 +173,14 @@ def debian_squeeze_64(fresh_os=True):
if (fresh_os):
create_fresh_os('Debian_Squeeze_64', debian=True)
def debian_wheezy_32(fresh_os=True):
if (fresh_os):
create_fresh_os('Debian_Wheezy_32')
def debian_wheezy_64(fresh_os=True):
if (fresh_os):
create_fresh_os('Debian_Wheezy_64')
def compile_liquidsoap(filename="liquidsoap"):
@ -179,11 +195,11 @@ def compile_liquidsoap(filename="liquidsoap"):
do_sudo('''apt-get install -y --force-yes ocaml-findlib libao-ocaml-dev libportaudio-ocaml-dev \
libmad-ocaml-dev libtaglib-ocaml-dev libalsa-ocaml-dev libtaglib-ocaml-dev libvorbis-ocaml-dev \
libspeex-dev libspeexdsp-dev speex libladspa-ocaml-dev festival festival-dev \
libsamplerate-dev libxmlplaylist-ocaml-dev libxmlrpc-light-ocaml-dev libflac-dev \
libsamplerate-dev libxmlplaylist-ocaml-dev libflac-dev \
libxml-dom-perl libxml-dom-xpath-perl patch autoconf libmp3lame-dev \
libcamomile-ocaml-dev libcamlimages-ocaml-dev libtool libpulse-dev libjack-dev
libcamomile-ocaml-dev libcamlimages-ocaml-dev libtool libpulse-dev libjack-dev \
camlidl libfaad-dev libpcre-ocaml-dev''')
#libxmlrpc-light-ocaml-dev
root = '/home/martin/src'
do_run('mkdir -p %s' % root)
@ -202,13 +218,14 @@ camlidl libfaad-dev libpcre-ocaml-dev''')
#do_run('cd %s/liquidsoap-1.0.1-full && make' % root)
#get('%s/liquidsoap-1.0.1-full/liquidsoap-1.0.1/src/liquidsoap' % root, filename)
do_run('cd %s/savonet && cp PACKAGES.minimal PACKAGES' % root)
sed('%s/savonet/PACKAGES' % root, '#ocaml-portaudio', 'ocaml-portaudio')
sed('%s/savonet/PACKAGES' % root, '#ocaml-alsa', 'ocaml-alsa')
sed('%s/savonet/PACKAGES' % root, '#ocaml-pulseaudio', 'ocaml-pulseaudio')
sed('%s/savonet/PACKAGES' % root, '#ocaml-faad', 'ocaml-faad')
do_run('cd %s/savonet && make clean' % root)
do_run('cd %s/savonet && ./bootstrap' % root)
do_run('cd %s/savonet && ./configure' % root)
do_run('cd %s/savonet && make' % root)
get('%s/savonet/liquidsoap/src/liquidsoap' % root, filename)
do_run('cd %s/liquidsoap && cp PACKAGES.minimal PACKAGES' % root)
sed('%s/liquidsoap/PACKAGES' % root, '#ocaml-portaudio', 'ocaml-portaudio')
sed('%s/liquidsoap/PACKAGES' % root, '#ocaml-alsa', 'ocaml-alsa')
sed('%s/liquidsoap/PACKAGES' % root, '#ocaml-pulseaudio', 'ocaml-pulseaudio')
sed('%s/liquidsoap/PACKAGES' % root, '#ocaml-faad', 'ocaml-faad')
do_run('cd %s/liquidsoap && ./bootstrap' % root)
do_run('cd %s/liquidsoap && ./configure' % root)
do_run('cd %s/liquidsoap && make clean' % root)
do_run('cd %s/liquidsoap && make' % root)
do_sudo('chmod 755 %s/liquidsoap/liquidsoap/src/liquidsoap' % root)
get('%s/liquidsoap/liquidsoap/src/liquidsoap' % root, filename)

View File

@ -2,8 +2,9 @@
exec 2>&1
ubuntu_versions=("ubuntu_lucid_32" "ubuntu_lucid_64" "ubuntu_maverick_32" "ubuntu_maverick_64" "ubuntu_natty_32" "ubuntu_natty_64" "ubuntu_oneiric_32" "ubuntu_oneiric_64" "debian_squeeze_32" "debian_squeeze_64" "ubuntu_precise_32" "ubuntu_precise_64")
ubuntu_versions=("ubuntu_lucid_32" "ubuntu_lucid_64" "ubuntu_natty_32" "ubuntu_natty_64" "ubuntu_oneiric_32" "ubuntu_oneiric_64" "debian_squeeze_32" "debian_squeeze_64" "ubuntu_precise_32" "ubuntu_precise_64" "ubuntu_quantal_32" "ubuntu_quantal_64" "debian_wheezy_32" "debian_wheezy_64")
#ubuntu_versions=("ubuntu_quantal_64")
num1=${#ubuntu_versions[@]}
mkdir -p ./upgrade_logs2