summaryrefslogtreecommitdiffstats
path: root/settings/ajax
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-04-17 15:32:03 +0200
committerkondou <kondou@ts.unde.re>2013-07-21 13:55:25 +0200
commit05084e03a08206b736abd04522e10c97cd3f2fc3 (patch)
tree1352f5011a523db520ee0e899db8426ecc3fc68f /settings/ajax
parent94fcbc736e3500e0107d8e4f1ce5a2133fcdd8d8 (diff)
downloadnextcloud-server-05084e03a08206b736abd04522e10c97cd3f2fc3.tar.gz
nextcloud-server-05084e03a08206b736abd04522e10c97cd3f2fc3.zip
Use !== and === in settings.
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/apps/ocs.php6
-rw-r--r--settings/ajax/changedisplayname.php2
-rw-r--r--settings/ajax/createuser.php2
-rw-r--r--settings/ajax/getlog.php2
-rw-r--r--settings/ajax/setlanguage.php2
-rw-r--r--settings/ajax/setquota.php6
-rw-r--r--settings/ajax/togglegroups.php4
7 files changed, 12 insertions, 12 deletions
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);
}
}