Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions apps/files_external/lib/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -716,10 +716,11 @@ private static function generateDependencyMessage($dependencies) {
}
}

if (count($dependencyGroup) > 0) {
$dependencyGroupCount = count($dependencyGroup);
if ($dependencyGroupCount > 0) {
$backends = '';
for ($i = 0; $i < count($dependencyGroup); $i++) {
if ($i > 0 && $i === count($dependencyGroup) - 1) {
for ($i = 0; $i < $dependencyGroupCount; $i++) {
if ($i > 0 && $i === $dependencyGroupCount - 1) {
$backends .= $l->t(' and ');
} elseif ($i > 0) {
$backends .= ', ';
Expand Down
3 changes: 2 additions & 1 deletion apps/user_ldap/lib/wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,8 @@ private function detectGroupMemberAssoc() {
$this->ldap->getDN($cr, $er);
$attrs = $this->ldap->getAttributes($cr, $er);
$result = array();
for($i = 0; $i < count($possibleAttrs); $i++) {
$possibleAttrsCount = count($possibleAttrs);
for($i = 0; $i < $possibleAttrsCount; $i++) {
if(isset($attrs[$possibleAttrs[$i]])) {
$result[$possibleAttrs[$i]] = $attrs[$possibleAttrs[$i]]['count'];
}
Expand Down
4 changes: 2 additions & 2 deletions apps/user_ldap/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
$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);
Expand Down
5 changes: 3 additions & 2 deletions lib/private/appframework/middleware/middlewaredispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ public function getMiddlewares(){
*/
public function beforeController(Controller $controller, $methodName){
// we need to count so that we know which middlewares we have to ask in
// case theres an exception
for($i=0; $i<count($this->middlewares); $i++){
// case there is an exception
$middlewareCount = count($this->middlewares);
for($i = 0; $i < $middlewareCount; $i++){
$this->middlewareCounter++;
$middleware = $this->middlewares[$i];
$middleware->beforeController($controller, $methodName);
Expand Down
4 changes: 3 additions & 1 deletion lib/private/arrayparser.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ function splitArray($body) {
if (substr($body, -1, 1) !== ',') {
$body .= ',';
}
for ($i = 0; $i < strlen($body); $i++) {

$bodyLength = strlen($body);
for ($i = 0; $i < $bodyLength; $i++) {
$char = substr($body, $i, 1);
if ($char === '\\') {
if ($escaped) {
Expand Down
3 changes: 2 additions & 1 deletion lib/private/db/statementwrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ private function tryFixSubstringLastArgumentDataForMSSQL($input) {
$cArg = 0;

$inSubstring = false;
$queryLength = strlen($query);

// Create new query
for ($i = 0; $i < strlen ($query); $i++) {
for ($i = 0; $i < $queryLength; $i++) {
if ($inSubstring == false) {
// Defines when we should start inserting values
if (substr ($query, $i, 9) == 'SUBSTRING') {
Expand Down
5 changes: 3 additions & 2 deletions lib/private/ocsclient.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ public static function getApplications($categories, $page, $filter) {
$data = simplexml_load_string($xml);
libxml_disable_entity_loader($loadEntities);

$tmp=$data->data->content;
for($i = 0; $i < count($tmp); $i++) {
$tmp = $data->data->content;
$tmpCount = count($tmp);
for($i = 0; $i < $tmpCount; $i++) {
$app=array();
$app['id']=(string)$tmp[$i]->id;
$app['name']=(string)$tmp[$i]->name;
Expand Down
3 changes: 2 additions & 1 deletion lib/private/vobject.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public static function escapeSemicolons($value) {
*/
public static function unescapeSemicolons($value) {
$array = explode(';', $value);
for($i=0;$i<count($array);$i++) {
$arrayCount = count($array);
for($i = 0; $i < $arrayCount; $i++) {
if(substr($array[$i], -2, 2)=="\\\\") {
if(isset($array[$i+1])) {
$array[$i] = substr($array[$i], 0, count($array[$i])-2).';'.$array[$i+1];
Expand Down