Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
6d48e1faf0
|
@ -490,6 +490,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
// If the file already exists we will update and make sure that
|
// If the file already exists we will update and make sure that
|
||||||
// it's marked as 'exists'.
|
// it's marked as 'exists'.
|
||||||
$file->setFileExistsFlag(true);
|
$file->setFileExistsFlag(true);
|
||||||
|
$file->setFileHiddenFlag(false);
|
||||||
$file->setMetadata($md);
|
$file->setMetadata($md);
|
||||||
}
|
}
|
||||||
if ($md['is_record'] != 0) {
|
if ($md['is_record'] != 0) {
|
||||||
|
|
|
@ -152,7 +152,10 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
||||||
$resourceName .= $controller;
|
$resourceName .= $controller;
|
||||||
|
|
||||||
/** Check if the controller/action can be accessed by the current user */
|
/** Check if the controller/action can be accessed by the current user */
|
||||||
if (!$this->getAcl()->isAllowed($this->_roleName, $resourceName, $request->getActionName())) {
|
if (!$this->getAcl()->has($resourceName)
|
||||||
|
|| !$this->getAcl()->isAllowed($this->_roleName,
|
||||||
|
$resourceName,
|
||||||
|
$request->getActionName())) {
|
||||||
/** Redirect to access denied page */
|
/** Redirect to access denied page */
|
||||||
$this->denyAccess();
|
$this->denyAccess();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="personal-block solo">
|
<div class="personal-block solo">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a id="current-user" href="#"><span class="name"><?php echo $this->loggedInAs()?></span></a> | <a href=<?php echo $baseUrl . "/Login/logout"?>><?php echo _("Logout")?></a>
|
<a id="current-user" href=<?php echo $baseUrl . "/User/edit-user"?>><span class="name"><?php echo $this->loggedInAs()?></span></a> | <a href=<?php echo $baseUrl . "/Login/logout"?>><?php echo _("Logout")?></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1184,6 +1184,11 @@ SQL;
|
||||||
$this->_file->setDbFileExists($flag)
|
$this->_file->setDbFileExists($flag)
|
||||||
->save();
|
->save();
|
||||||
}
|
}
|
||||||
|
public function setFileHiddenFlag($flag)
|
||||||
|
{
|
||||||
|
$this->_file->setDbHidden($flag)
|
||||||
|
->save();
|
||||||
|
}
|
||||||
public function setSoundCloudUploadTime($time)
|
public function setSoundCloudUploadTime($time)
|
||||||
{
|
{
|
||||||
$this->_file->setDbSoundCloundUploadTime($time)
|
$this->_file->setDbSoundCloundUploadTime($time)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
<div class="ui-widget ui-widget-content block-shadow clearfix padded-strong edit-current-user">
|
||||||
|
<h2><? echo _("Edit User") ?></h2>
|
||||||
<?php echo $this->successMessage ?>
|
<?php echo $this->successMessage ?>
|
||||||
<?php echo $this->form?>
|
<?php echo $this->form?>
|
||||||
|
</div>
|
||||||
|
|
|
@ -97,6 +97,14 @@ select {
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edit-current-user {
|
||||||
|
width: 450px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit-current-user label {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.override_help_icon, .icecast_metadata_help_icon {
|
.override_help_icon, .icecast_metadata_help_icon {
|
||||||
cursor: help;
|
cursor: help;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -2956,19 +2964,19 @@ dd .stream-status {
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-user-global dt {
|
.edit-user-global dt {
|
||||||
width: 100px;
|
width: 150px;
|
||||||
float: left;
|
float: left;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-user-global dd {
|
.edit-user-global dd {
|
||||||
width: 240px;
|
width: 340px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-user-global input {
|
.edit-user-global input, select {
|
||||||
width: 170px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -453,52 +453,22 @@ function setCurrentUserPseudoPassword() {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if ($('#master-panel').length > 0)
|
if ($('#master-panel').length > 0)
|
||||||
init();
|
init();
|
||||||
|
setCurrentUserPseudoPassword();
|
||||||
var timer;
|
|
||||||
|
$('#current-user').live('click', function() {
|
||||||
$('.tipsy').live('mouseover', function() {
|
|
||||||
clearTimeout(timer);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.tipsy').live('blur', function() {
|
|
||||||
timer = setTimeout("$('#current-user').tipsy('hide')", 500);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#current-user').bind('mouseover', function() {
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: baseUrl+'/user/edit-user/format/json',
|
url: baseUrl+'/user/edit-user/format/json'
|
||||||
success: function(json) {
|
|
||||||
$('#current-user').tipsy({
|
|
||||||
gravity: 'n',
|
|
||||||
html: true,
|
|
||||||
fade: true,
|
|
||||||
opacity: 0.9,
|
|
||||||
trigger: 'manual',
|
|
||||||
title: function() {
|
|
||||||
return json.html;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cache: false,
|
|
||||||
complete: function() {
|
|
||||||
$('#current-user').tipsy('show');
|
|
||||||
setCurrentUserPseudoPassword();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#current-user').bind('mouseout', function() {
|
|
||||||
timer = setTimeout("$('#current-user').tipsy('hide')", 500);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#cu_save_user').live('click', function() {
|
$('#cu_save_user').live('click', function() {
|
||||||
var data = $('#current-user-form').serialize();
|
var data = $('#current-user-form').serialize();
|
||||||
$.post(baseUrl+'/user/edit-user', {format: 'json', data: data}, function(data) {
|
$.post(baseUrl+'/user/edit-user', {format: 'json', data: data}, function(data) {
|
||||||
var json = $.parseJSON(data);
|
var json = $.parseJSON(data);
|
||||||
$('.tipsy-inner').empty().append(json.html);
|
$('.edit-current-user').parent().empty().append(json.html);
|
||||||
setCurrentUserPseudoPassword();
|
setCurrentUserPseudoPassword();
|
||||||
setTimeout(removeSuccessMsg, 5000);
|
setTimeout(removeSuccessMsg, 5000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -19,6 +19,7 @@ showhelp () {
|
||||||
--pypo|-p Install only pypo and liquidsoap
|
--pypo|-p Install only pypo and liquidsoap
|
||||||
--web|-w Install only files for web-server
|
--web|-w Install only files for web-server
|
||||||
--liquidsoap-keep-alive|-l Keep Liquidsoap alive when upgrading"
|
--liquidsoap-keep-alive|-l Keep Liquidsoap alive when upgrading"
|
||||||
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
overwrite="f"
|
overwrite="f"
|
||||||
|
|
Loading…
Reference in New Issue