diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-10-23 23:27:15 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-10-24 12:27:53 +0200 |
commit | d060180140923ac054b252f0cbd821063a53f5b7 (patch) | |
tree | 59d53bb16be35960f493709d8409a75bc79be47e /apps/user_ldap/settings.php | |
parent | 9739a25547e5f8f7500b0a962780cb9267b47cd1 (diff) | |
download | nextcloud-server-d060180140923ac054b252f0cbd821063a53f5b7.tar.gz nextcloud-server-d060180140923ac054b252f0cbd821063a53f5b7.zip |
Use function outside of loop
Otherwise the function is executed n times which is a lot of overhead
Diffstat (limited to 'apps/user_ldap/settings.php')
-rw-r--r-- | apps/user_ldap/settings.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php index 1e588b1cd85..ca61a53b196 100644 --- a/apps/user_ldap/settings.php +++ b/apps/user_ldap/settings.php @@ -54,8 +54,8 @@ $wizTabs[] = array('tpl' => 'part.wizard-server', 'cap' => $l->t('Server')) $wizTabs[] = array('tpl' => 'part.wizard-userfilter', 'cap' => $l->t('User Filter')); $wizTabs[] = array('tpl' => 'part.wizard-loginfilter', 'cap' => $l->t('Login Filter')); $wizTabs[] = array('tpl' => 'part.wizard-groupfilter', 'cap' => $l->t('Group Filter')); - -for($i = 0; $i < count($wizTabs); $i++) { +$wizTabsCount = count($wizTabs); +for($i = 0; $i < $wizTabsCount; $i++) { $tab = new OCP\Template('user_ldap', $wizTabs[$i]['tpl']); if($i === 0) { $tab->assign('serverConfigurationPrefixes', $prefixes); |