diff options
author | kondou <kondou@ts.unde.re> | 2013-04-17 17:32:03 +0400 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-07-21 15:55:25 +0400 |
commit | 05084e03a08206b736abd04522e10c97cd3f2fc3 (patch) | |
tree | 1352f5011a523db520ee0e899db8426ecc3fc68f | |
parent | 94fcbc736e3500e0107d8e4f1ce5a2133fcdd8d8 (diff) |
Use !== and === in settings.
-rwxr-xr-x | settings/admin.php | 2 | ||||
-rw-r--r-- | settings/ajax/apps/ocs.php | 6 | ||||
-rw-r--r-- | settings/ajax/changedisplayname.php | 2 | ||||
-rw-r--r-- | settings/ajax/createuser.php | 2 | ||||
-rw-r--r-- | settings/ajax/getlog.php | 2 | ||||
-rw-r--r-- | settings/ajax/setlanguage.php | 2 | ||||
-rw-r--r-- | settings/ajax/setquota.php | 6 | ||||
-rw-r--r-- | settings/ajax/togglegroups.php | 4 | ||||
-rw-r--r-- | settings/apps.php | 4 | ||||
-rw-r--r-- | settings/help.php | 2 | ||||
-rw-r--r-- | settings/js/admin.js | 4 | ||||
-rw-r--r-- | settings/js/apps.js | 12 | ||||
-rw-r--r-- | settings/js/log.js | 2 | ||||
-rw-r--r-- | settings/js/users.js | 38 | ||||
-rw-r--r-- | settings/personal.php | 2 | ||||
-rw-r--r-- | settings/templates/admin.php | 24 | ||||
-rw-r--r-- | settings/templates/users.php | 8 | ||||
-rw-r--r-- | settings/users.php | 2 |
18 files changed, 62 insertions, 62 deletions
diff --git a/settings/admin.php b/settings/admin.php index db041ef889c..f945e56b8c2 100755 --- a/settings/admin.php +++ b/settings/admin.php @@ -32,7 +32,7 @@ $tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundj $tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes')); // Check if connected using HTTPS -if (OC_Request::serverProtocol() == 'https') { +if (OC_Request::serverProtocol() === 'https') { $connectedHTTPS = true; } else { $connectedHTTPS = false; diff --git a/settings/ajax/apps/ocs.php b/settings/ajax/apps/ocs.php index 9c5adfcfef9..b68083fca6b 100644 --- a/settings/ajax/apps/ocs.php +++ b/settings/ajax/apps/ocs.php @@ -33,18 +33,18 @@ if(is_array($categoryNames)) { // show only external apps that aren't enabled yet $local=false; foreach($enabledApps as $a) { - if($a == $app['name']) { + if($a === $app['name']) { $local=true; } } if(!$local) { - if($app['preview']=='') { + if($app['preview'] === '') { $pre=OC_Helper::imagePath('settings', 'trans.png'); } else { $pre=$app['preview']; } - if($app['label']=='recommended') { + if($app['label'] === 'recommended') { $label='3rd Party'; } else { $label='Recommended'; diff --git a/settings/ajax/changedisplayname.php b/settings/ajax/changedisplayname.php index faf962fbdd7..4bb41fa3d3b 100644 --- a/settings/ajax/changedisplayname.php +++ b/settings/ajax/changedisplayname.php @@ -17,7 +17,7 @@ if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) { $userstatus = 'subadmin'; } -if ($username == OC_User::getUser() && OC_User::canUserChangeDisplayName($username)) { +if ($username === OC_User::getUser() && OC_User::canUserChangeDisplayName($username)) { $userstatus = 'changeOwnDisplayName'; } diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php index 56653bed6bd..205958f88d3 100644 --- a/settings/ajax/createuser.php +++ b/settings/ajax/createuser.php @@ -16,7 +16,7 @@ if(OC_User::isAdminUser(OC_User::getUser())) { $groups[] = $group; } } - if(count($groups) == 0) { + if(count($groups) === 0) { $groups = OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()); } }else{ diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php index da69a2863b7..e7151419286 100644 --- a/settings/ajax/getlog.php +++ b/settings/ajax/getlog.php @@ -16,6 +16,6 @@ $data = array(); OC_JSON::success( array( "data" => $entries, - "remain"=>(count(OC_Log_Owncloud::getEntries(1, $offset + $count)) != 0) ? true : false + "remain"=>(count(OC_Log_Owncloud::getEntries(1, $offset + $count)) !== 0) ? true : false ) ); diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index aebb1b31b6f..94773f3dc70 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -10,7 +10,7 @@ OCP\JSON::callCheck(); if( isset( $_POST['lang'] ) ) { $languageCodes=OC_L10N::findAvailableLanguages(); $lang=$_POST['lang']; - if(array_search($lang, $languageCodes) or $lang=='en') { + if(array_search($lang, $languageCodes) or $lang === 'en') { OC_Preferences::setValue( OC_User::getUser(), 'core', 'lang', $lang ); OC_JSON::success(array("data" => array( "message" => $l->t("Language changed") ))); }else{ diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php index 8dcb7ddd424..2e6de2b759c 100644 --- a/settings/ajax/setquota.php +++ b/settings/ajax/setquota.php @@ -10,7 +10,7 @@ OCP\JSON::callCheck(); $username = isset($_POST["username"])?$_POST["username"]:''; -if(($username == '' && !OC_User::isAdminUser(OC_User::getUser())) +if(($username === '' && !OC_User::isAdminUser(OC_User::getUser())) || (!OC_User::isAdminUser(OC_User::getUser()) && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username))) { $l = OC_L10N::get('core'); @@ -20,7 +20,7 @@ if(($username == '' && !OC_User::isAdminUser(OC_User::getUser())) //make sure the quota is in the expected format $quota=$_POST["quota"]; -if($quota!='none' and $quota!='default') { +if($quota !== 'none' and $quota !== 'default') { $quota= OC_Helper::computerFileSize($quota); $quota=OC_Helper::humanFileSize($quota); } @@ -29,7 +29,7 @@ if($quota!='none' and $quota!='default') { if($username) { OC_Preferences::setValue($username, 'files', 'quota', $quota); }else{//set the default quota when no username is specified - if($quota=='default') {//'default' as default quota makes no sense + if($quota === 'default') {//'default' as default quota makes no sense $quota='none'; } OC_Appconfig::setValue('files', 'default_quota', $quota); diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php index f6fd9aba6d9..6963f9eb43c 100644 --- a/settings/ajax/togglegroups.php +++ b/settings/ajax/togglegroups.php @@ -7,7 +7,7 @@ $success = true; $username = $_POST["username"]; $group = $_POST["group"]; -if($username == OC_User::getUser() && $group == "admin" && OC_User::isAdminUser($username)) { +if($username === OC_User::getUser() && $group === "admin" && OC_User::isAdminUser($username)) { $l = OC_L10N::get('core'); OC_JSON::error(array( 'data' => array( 'message' => $l->t('Admins can\'t remove themself from the admin group')))); exit(); @@ -36,7 +36,7 @@ if( OC_Group::inGroup( $username, $group )) { $error = $l->t("Unable to remove user from group %s", $group); $success = OC_Group::removeFromGroup( $username, $group ); $usersInGroup=OC_Group::usersInGroup($group); - if(count($usersInGroup)==0) { + if(count($usersInGroup) === 0) { OC_Group::deleteGroup($group); } } diff --git a/settings/apps.php b/settings/apps.php index 44cfff7e3f1..20b12887554 100644 --- a/settings/apps.php +++ b/settings/apps.php @@ -30,13 +30,13 @@ OC_App::setActiveNavigationEntry( "core_apps" ); function app_sort( $a, $b ) { - if ($a['active'] != $b['active']) { + if ($a['active'] !== $b['active']) { return $b['active'] - $a['active']; } - if ($a['internal'] != $b['internal']) { + if ($a['internal'] !== $b['internal']) { return $b['internal'] - $a['internal']; } diff --git a/settings/help.php b/settings/help.php index a5ac11ec9a3..713b23f7857 100644 --- a/settings/help.php +++ b/settings/help.php @@ -13,7 +13,7 @@ OC_Util::addStyle( "settings", "settings" ); OC_App::setActiveNavigationEntry( "help" ); -if(isset($_GET['mode']) and $_GET['mode']=='admin') { +if(isset($_GET['mode']) and $_GET['mode'] === 'admin') { $url=OC_Helper::linkToAbsolute( 'core', 'doc/admin' ); $style1=''; $style2=' pressed'; diff --git a/settings/js/admin.js b/settings/js/admin.js index ab218377fb3..f2d6f37a51a 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -8,7 +8,7 @@ $(document).ready(function(){ $('#backgroundjobs input').change(function(){ if($(this).attr('checked')){ var mode = $(this).val(); - if (mode == 'ajax' || mode == 'webcron' || mode == 'cron') { + if (mode === 'ajax' || mode === 'webcron' || mode === 'cron') { OC.AppConfig.setValue('core', 'backgroundjobs_mode', mode); } } @@ -19,7 +19,7 @@ $(document).ready(function(){ }); $('#shareAPI input').change(function() { - if ($(this).attr('type') == 'checkbox') { + if ($(this).attr('type') === 'checkbox') { if (this.checked) { var value = 'yes'; } else { diff --git a/settings/js/apps.js b/settings/js/apps.js index 1ee3372f893..0540d9b1c58 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -29,7 +29,7 @@ OC.Settings.Apps = OC.Settings.Apps || { page.find('span.author').text(app.author); page.find('span.licence').text(app.licence); - if (app.update != false) { + if (app.update !== false) { page.find('input.update').show(); page.find('input.update').data('appid', app.id); page.find('input.update').attr('value',t('settings', 'Update to {appversion}', {appversion:app.update})); @@ -41,7 +41,7 @@ OC.Settings.Apps = OC.Settings.Apps || { page.find('input.enable').val((app.active) ? t('settings', 'Disable') : t('settings', 'Enable')); page.find('input.enable').data('appid', app.id); page.find('input.enable').data('active', app.active); - if (app.internal == false) { + if (app.internal === false) { page.find('span.score').show(); page.find('p.appslink').show(); page.find('a').attr('href', 'http://apps.owncloud.com/content/show.php?content=' + app.id); @@ -60,7 +60,7 @@ OC.Settings.Apps = OC.Settings.Apps || { element.val(t('settings','Please wait....')); if(active) { $.post(OC.filePath('settings','ajax','disableapp.php'),{appid:appid},function(result) { - if(!result || result.status!='success') { + if(!result || result.status !== 'success') { OC.dialogs.alert('Error while disabling app', t('core', 'Error')); } else { @@ -72,7 +72,7 @@ OC.Settings.Apps = OC.Settings.Apps || { $('#leftcontent li[data-id="'+appid+'"]').removeClass('active'); } else { $.post(OC.filePath('settings','ajax','enableapp.php'),{appid:appid},function(result) { - if(!result || result.status!='success') { + if(!result || result.status !== 'success') { OC.dialogs.alert('Error while enabling app', t('core', 'Error')); } else { @@ -94,7 +94,7 @@ OC.Settings.Apps = OC.Settings.Apps || { console.log('updateApp:', appid, element); element.val(t('settings','Updating....')); $.post(OC.filePath('settings','ajax','updateapp.php'),{appid:appid},function(result) { - if(!result || result.status!='success') { + if(!result || result.status !== 'success') { OC.dialogs.alert(t('settings','Error while updating app'),t('settings','Error')); } else { @@ -171,7 +171,7 @@ $(document).ready(function(){ $(this).find('span.hidden').remove(); }); $('#leftcontent li').keydown(function(event) { - if (event.which == 13 || event.which == 32) { + if (event.which === 13 || event.which === 32) { $(event.target).click(); } return false; diff --git a/settings/js/log.js b/settings/js/log.js index 84f6d1aa5f3..1ef9b419cdb 100644 --- a/settings/js/log.js +++ b/settings/js/log.js @@ -19,7 +19,7 @@ OC.Log={ getMore:function(count){ count = count || 10; $.get(OC.filePath('settings','ajax','getlog.php'),{offset:OC.Log.loaded,count:count},function(result){ - if(result.status=='success'){ + if(result.status === 'success'){ OC.Log.addEntries(result.data); if(!result.remain){ $('#moreLog').hide(); diff --git a/settings/js/users.js b/settings/js/users.js index 5d890db65b8..6a8afc4ca36 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -67,7 +67,7 @@ var UserList = { async: false, data: { username: UserList.deleteUid }, success: function (result) { - if (result.status == 'success') { + if (result.status === 'success') { // Remove undo option, & remove user from table OC.Notification.hide(); $('tr').filterAttr('data-uid', UserList.deleteUid).remove(); @@ -97,7 +97,7 @@ var UserList = { } $.each(this.availableGroups, function (i, group) { groupsSelect.append($('<option value="' + escapeHTML(group) + '">' + escapeHTML(group) + '</option>')); - if (typeof subadminSelect !== 'undefined' && group != 'admin') { + if (typeof subadminSelect !== 'undefined' && group !== 'admin') { subadminSelect.append($('<option value="' + escapeHTML(group) + '">' + escapeHTML(group) + '</option>')); } }); @@ -107,7 +107,7 @@ var UserList = { tr.find('td.subadmins').append(subadminSelect); UserList.applyMultiplySelect(subadminSelect); } - if (tr.find('td.remove img').length == 0 && OC.currentUser != username) { + if (tr.find('td.remove img').length === 0 && OC.currentUser !== username) { var rm_img = $('<img class="svg action">').attr({ src: OC.imagePath('core', 'actions/delete') }); @@ -115,11 +115,11 @@ var UserList = { .attr({ href: '#', 'original-title': t('settings', 'Delete')}) .append(rm_img); tr.find('td.remove').append(rm_link); - } else if (OC.currentUser == username) { + } else if (OC.currentUser === username) { tr.find('td.remove a').remove(); } var quotaSelect = tr.find('select.quota-user'); - if (quota == 'default') { + if (quota === 'default') { quotaSelect.find('option').attr('selected', null); quotaSelect.find('option').first().attr('selected', 'selected'); quotaSelect.data('previous', 'default'); @@ -148,7 +148,7 @@ var UserList = { var tz = [], x = 0, y = -1, n = 0, i, j; while (i = (j = t.charAt(x++)).charCodeAt(0)) { - var m = (i == 46 || (i >=48 && i <= 57)); + var m = (i === 46 || (i >=48 && i <= 57)); if (m !== n) { tz[++y] = ""; n = m; @@ -164,7 +164,7 @@ var UserList = { for (x = 0; aa[x] && bb[x]; x++) { if (aa[x] !== bb[x]) { var c = Number(aa[x]), d = Number(bb[x]); - if (c == aa[x] && d == bb[x]) { + if (c === aa[x] && d === bb[x]) { return c - d; } else return (aa[x] > bb[x]) ? 1 : -1; } @@ -207,7 +207,7 @@ var UserList = { return true; } var tr = UserList.add(user.name, user.displayname, user.groups, user.subadmin, user.quota, false); - if (index == 9) { + if (index === 9) { $(tr).bind('inview', function (event, isInView, visiblePartX, visiblePartY) { $(this).unbind(event); UserList.update(); @@ -225,16 +225,16 @@ var UserList = { applyMultiplySelect: function (element) { var checked = []; var user = element.attr('data-username'); - if ($(element).attr('class') == 'groupsselect') { + if ($(element).attr('class') === 'groupsselect') { if (element.data('userGroups')) { checked = String(element.data('userGroups')).split(', '); } if (user) { var checkHandeler = function (group) { - if (user == OC.currentUser && group == 'admin') { + if (user === OC.currentUser && group === 'admin') { return false; } - if (!isadmin && checked.length == 1 && checked[0] == group) { + if (!isadmin && checked.length === 1 && checked[0] === group) { return false; } $.post( @@ -280,12 +280,12 @@ var UserList = { minWidth: 100 }); } - if ($(element).attr('class') == 'subadminsselect') { + if ($(element).attr('class') === 'subadminsselect') { if (element.data('subadmin')) { checked = String(element.data('subadmin')).split(', '); } var checkHandeler = function (group) { - if (group == 'admin') { + if (group === 'admin') { return false; } $.post( @@ -301,7 +301,7 @@ var UserList = { var addSubAdmin = function (group) { $('select[multiple]').each(function (index, element) { - if ($(element).find('option[value="' + group + '"]').length == 0) { + if ($(element).find('option[value="' + group + '"]').length === 0) { $(element).append('<option value="' + escapeHTML(group) + '">' + escapeHTML(group) + '</option>'); } }) @@ -349,7 +349,7 @@ $(document).ready(function () { img.parent().children('span').replaceWith(input); input.focus(); input.keypress(function (event) { - if (event.keyCode == 13) { + if (event.keyCode === 13) { if ($(this).val().length > 0) { var recoveryPasswordVal = $('input:password[id="recoveryPassword"]').val(); $.post( @@ -390,7 +390,7 @@ $(document).ready(function () { img.parent().children('span').replaceWith(input); input.focus(); input.keypress(function (event) { - if (event.keyCode == 13) { + if (event.keyCode === 13) { if ($(this).val().length > 0) { $.post( OC.filePath('settings', 'ajax', 'changedisplayname.php'), @@ -423,13 +423,13 @@ $(document).ready(function () { event.preventDefault(); var username = $('#newusername').val(); var password = $('#newuserpassword').val(); - if ($.trim(username) == '') { + if ($.trim(username) === '') { OC.dialogs.alert( t('settings', 'A valid username must be provided'), t('settings', 'Error creating user')); return false; } - if ($.trim(password) == '') { + if ($.trim(password) === '') { OC.dialogs.alert( t('settings', 'A valid password must be provided'), t('settings', 'Error creating user')); @@ -445,7 +445,7 @@ $(document).ready(function () { groups: groups }, function (result) { - if (result.status != 'success') { + if (result.status !== 'success') { OC.dialogs.alert(result.data.message, t('settings', 'Error creating user')); } else { diff --git a/settings/personal.php b/settings/personal.php index 2c0b4b9e33f..1e2e1cf6723 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -34,7 +34,7 @@ $languages=array(); $commonlanguages = array(); foreach($languageCodes as $lang) { $l=OC_L10N::get('settings', $lang); - if(substr($l->t('__language_name__'), 0, 1)!='_') {//first check if the language name is in the translation file + if(substr($l->t('__language_name__'), 0, 1) !== '_') {//first check if the language name is in the translation file $ln=array('code'=>$lang, 'name'=> (string)$l->t('__language_name__')); }elseif(isset($languageNames[$lang])) { $ln=array('code'=>$lang, 'name'=>$languageNames[$lang]); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 4af53a649b8..d638a26c3fa 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -96,7 +96,7 @@ if (!$_['internetconnectionworking']) { <tr> <td> <input type="radio" name="mode" value="ajax" - id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] == "ajax") { + id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") { print_unescaped('checked="checked"'); } ?>> <label for="backgroundjobs_ajax">AJAX</label><br/> @@ -106,7 +106,7 @@ if (!$_['internetconnectionworking']) { <tr> <td> <input type="radio" name="mode" value="webcron" - id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] == "webcron") { + id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] === "webcron") { print_unescaped('checked="checked"'); } ?>> <label for="backgroundjobs_webcron">Webcron</label><br/> @@ -116,7 +116,7 @@ if (!$_['internetconnectionworking']) { <tr> <td> <input type="radio" name="mode" value="cron" - id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] == "cron") { + id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] === "cron") { print_unescaped('checked="checked"'); } ?>> <label for="backgroundjobs_cron">Cron</label><br/> @@ -132,34 +132,34 @@ if (!$_['internetconnectionworking']) { <tr> <td id="enable"> <input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled" - value="1" <?php if ($_['shareAPIEnabled'] == 'yes') print_unescaped('checked="checked"'); ?> /> + value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> /> <label for="shareAPIEnabled"><?php p($l->t('Enable Share API'));?></label><br/> <em><?php p($l->t('Allow apps to use the Share API')); ?></em> </td> </tr> <tr> - <td <?php if ($_['shareAPIEnabled'] == 'no') print_unescaped('style="display:none"');?>> + <td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('style="display:none"');?>> <input type="checkbox" name="shareapi_allow_links" id="allowLinks" - value="1" <?php if ($_['allowLinks'] == 'yes') print_unescaped('checked="checked"'); ?> /> + value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> /> <label for="allowLinks"><?php p($l->t('Allow links'));?></label><br/> <em><?php p($l->t('Allow users to share items to the public with links')); ?></em> </td> </tr> <tr> - <td <?php if ($_['shareAPIEnabled'] == 'no') print_unescaped('style="display:none"');?>> + <td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('style="display:none"');?>> <input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" - value="1" <?php if ($_['allowResharing'] == 'yes') print_unescaped('checked="checked"'); ?> /> + value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> /> <label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/> <em><?php p($l->t('Allow users to share items shared with them again')); ?></em> </td> </tr> <tr> - <td <?php if ($_['shareAPIEnabled'] == 'no') print_unescaped('style="display:none"');?>> + <td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('style="display:none"');?>> <input type="radio" name="shareapi_share_policy" id="sharePolicyGlobal" - value="global" <?php if ($_['sharePolicy'] == 'global') print_unescaped('checked="checked"'); ?> /> + value="global" <?php if ($_['sharePolicy'] === 'global') print_unescaped('checked="checked"'); ?> /> <label for="sharePolicyGlobal"><?php p($l->t('Allow users to share with anyone')); ?></label><br/> <input type="radio" name="shareapi_share_policy" id="sharePolicyGroupsOnly" - value="groups_only" <?php if ($_['sharePolicy'] == 'groups_only') print_unescaped('checked="checked"'); ?> /> + value="groups_only" <?php if ($_['sharePolicy'] === 'groups_only') print_unescaped('checked="checked"'); ?> /> <label for="sharePolicyGroupsOnly"><?php p($l->t('Allow users to only share with users in their groups'));?></label><br/> </td> </tr> @@ -198,7 +198,7 @@ if (!$_['internetconnectionworking']) { <?php p($l->t('Log level'));?> <select name='loglevel' id='loglevel'> <option value='<?php p($_['loglevel'])?>'><?php p($levels[$_['loglevel']])?></option> <?php for ($i = 0; $i < 5; $i++): - if ($i != $_['loglevel']):?> + if ($i !== $_['loglevel']):?> <option value='<?php p($i)?>'><?php p($levels[$i])?></option> <?php endif; endfor;?> diff --git a/settings/templates/users.php b/settings/templates/users.php index 9fcc11ab89a..4ddef3ff1b5 100644 --- a/settings/templates/users.php +++ b/settings/templates/users.php @@ -43,12 +43,12 @@ $_['subadmingroups'] = array_flip($items); <?php if((bool) $_['isadmin']): ?> <select class='quota'> <option - <?php if($_['default_quota']=='none') print_unescaped('selected="selected"');?> + <?php if($_['default_quota'] === 'none') print_unescaped('selected="selected"');?> value='none'> <?php p($l->t('Unlimited'));?> </option> <?php foreach($_['quota_preset'] as $preset):?> - <?php if($preset!='default'):?> + <?php if($preset !== 'default'):?> <option <?php if($_['default_quota']==$preset) print_unescaped('selected="selected"');?> value='<?php p($preset);?>'> @@ -132,12 +132,12 @@ $_['subadmingroups'] = array_flip($items); <td class="quota"> <select class='quota-user'> <option - <?php if($user['quota']=='default') print_unescaped('selected="selected"');?> + <?php if($user['quota'] === 'default') print_unescaped('selected="selected"');?> value='default'> <?php p($l->t('Default'));?> </option> <option - <?php if($user['quota']=='none') print_unescaped('selected="selected"');?> + <?php if($user['quota'] === 'none') print_unescaped('selected="selected"');?> value='none'> <?php p($l->t('Unlimited'));?> </option> diff --git a/settings/users.php b/settings/users.php index e5c8a7aaa8d..ba79ae93b28 100644 --- a/settings/users.php +++ b/settings/users.php @@ -52,7 +52,7 @@ foreach($accessibleusers as $uid => $displayName) { && array_search($quota, array('none', 'default'))===false; $name = $displayName; - if ( $displayName != $uid ) { + if ( $displayName !== $uid ) { $name = $name . ' ('.$uid.')'; } |