Cleanup some variables
This commit is contained in:
parent
b1315a5abb
commit
7fcf703041
@ -40,8 +40,8 @@ class UserController extends Controller{
|
||||
}
|
||||
|
||||
public static function rename($args){
|
||||
$memberId = @$args['member_id'];
|
||||
$name = @$_POST['name'];
|
||||
$memberId = Helper::getArrayValueByKey($args, 'member_id');
|
||||
$name = Helper::getArrayValueByKey($_POST, 'name');
|
||||
$member = new Db_Member();
|
||||
$member->load($memberId);
|
||||
$memberData = $member->getData();
|
||||
|
@ -19,9 +19,8 @@ var documentsMain = {
|
||||
toolbar : '<div id="odf-toolbar" class="dijitToolbar">' +
|
||||
' <div id="document-title" class="icon-noise">' +
|
||||
'<div class="logo-wide"></div>' +
|
||||
'<div>' +
|
||||
'%title%' +
|
||||
' </div></div>' +
|
||||
'<div id="document-title-container"></div>' +
|
||||
'</div>' +
|
||||
' <span id="toolbar" class="claro">' +
|
||||
' <button id="odf-invite" class="drop">' +
|
||||
t('documents', 'Share') +
|
||||
@ -69,7 +68,8 @@ var documentsMain = {
|
||||
},
|
||||
|
||||
showEditor : function(title, canShare){
|
||||
$(document.body).prepend(documentsMain.UI.toolbar.replace(/%title%/g, title));
|
||||
$(document.body).prepend(documentsMain.UI.toolbar);
|
||||
$('#document-title-container').text(title);
|
||||
if (!canShare){
|
||||
$('#odf-invite').remove();
|
||||
} else {
|
||||
@ -132,9 +132,7 @@ var documentsMain = {
|
||||
|
||||
notify : function(message){
|
||||
OC.Notification.show(message);
|
||||
setTimeout(function() {
|
||||
OC.Notification.hide();
|
||||
}, 10000);
|
||||
setTimeout(OC.Notification.hide, 10000);
|
||||
}
|
||||
},
|
||||
|
||||
@ -420,7 +418,7 @@ var documentsMain = {
|
||||
}
|
||||
documentsMain.fileName = name;
|
||||
$('title').text(documentsMain.UI.mainTitle + '| ' + name);
|
||||
$('#document-title>div').text(name);
|
||||
$('#document-title-container').text(name);
|
||||
}
|
||||
);
|
||||
},
|
||||
|
@ -27,6 +27,13 @@ class Helper {
|
||||
return $path;
|
||||
}
|
||||
|
||||
public static function getArrayValueByKey($array, $key, $default=''){
|
||||
if (array_key_exists($key, $array)){
|
||||
return $array[$key];
|
||||
}
|
||||
return $default;
|
||||
}
|
||||
|
||||
public static function isVersionsEnabled(){
|
||||
return \OCP\App::isEnabled('files_versions');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user