From 9847912257de1910f99879caac8ea925fb85caed Mon Sep 17 00:00:00 2001
From: Joas Schilling
Date: Wed, 26 Feb 2014 13:10:46 +0100
Subject: [PATCH] Remove unused variables, add doc blocks and break lines
Fix #7166
---
core/js/js.js | 4 ++--
settings/admin/controller.php | 18 ++++++++++++++----
settings/js/admin.js | 2 +-
settings/templates/admin.php | 29 ++++++++++++++++++++---------
4 files changed, 37 insertions(+), 16 deletions(-)
diff --git a/core/js/js.js b/core/js/js.js
index ac79f13a6d..88b70723dd 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -468,8 +468,8 @@ OC.addStyle.loaded=[];
OC.addScript.loaded=[];
OC.msg={
- startSaving:function(selector, message){
- OC.msg.startAction(selector, t('settings', 'Saving...'));
+ startSaving:function(selector){
+ OC.msg.startAction(selector, t('core', 'Saving...'));
},
finishedSaving:function(selector, data){
OC.msg.finishedAction(selector, data);
diff --git a/settings/admin/controller.php b/settings/admin/controller.php
index 9bbcd35658..a075d77436 100644
--- a/settings/admin/controller.php
+++ b/settings/admin/controller.php
@@ -20,7 +20,10 @@
namespace OC\Settings\Admin;
class Controller {
- public static function setMailSettings($args) {
+ /**
+ * Set mail settings
+ */
+ public static function setMailSettings() {
\OC_Util::checkAdminUser();
\OCP\JSON::callCheck();
@@ -70,14 +73,21 @@ class Controller {
\OC_JSON::success(array("data" => array( "message" => $l->t("Saved") )));
}
+ /**
+ * Get the field name to use it in error messages
+ *
+ * @param $setting string
+ * @param $l \OC_L10N
+ * @return string
+ */
public static function getFieldname($setting, $l) {
switch ($setting) {
case 'mail_smtpmode':
- return $l->t( 'SMTP mode' );
+ return $l->t( 'Send mode' );
case 'mail_smtpsecure':
- return $l->t( 'Secure SMTP' );
+ return $l->t( 'Encryption' );
case 'mail_smtpauthtype':
- return $l->t( 'Authentification method for SMTP' );
+ return $l->t( 'Authentification method' );
}
}
}
diff --git a/settings/js/admin.js b/settings/js/admin.js
index e2bc125b8f..5ea6a5af2d 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -44,7 +44,7 @@ $(document).ready(function(){
});
$('#mail_smtpmode').change(function() {
- if ($(this).val() != 'smtp') {
+ if ($(this).val() !== 'smtp') {
$('#setting_smtpauth').addClass('hidden');
$('#setting_smtphost').addClass('hidden');
$('#mail_smtpsecure_label').addClass('hidden');
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 377c05eb4b..139a9dd076 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -288,8 +288,12 @@ if (!$_['internetconnectionworking']) {
-
-
>
- ' />
+ ' />
:
- ' />
+ ' />
>
- ' />
- ' />
+ ' />
+ ' />