From f5cab9d96aec1464978b556f2ca02e79b2c4d8d8 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 6 Feb 2015 12:40:58 +0100 Subject: service/files::delete: Fix incorrect error when wrong owner Also improve the variable name for easier understanding. Signed-off-by: Florian Pritz --- application/service/files.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/service/files.php b/application/service/files.php index 59a096d1b..802ba70af 100644 --- a/application/service/files.php +++ b/application/service/files.php @@ -153,7 +153,7 @@ class files { foreach ($ids as $id) { $total_count++; - $next = false; + $nextID = false; foreach (array($CI->mfile, $CI->mmultipaste) as $model) { if ($model->id_exists($id)) { @@ -162,6 +162,7 @@ class files { "id" => $id, "reason" => "wrong owner", ); + $nextID = true; continue; } if ($model->delete_id($id)) { @@ -169,7 +170,7 @@ class files { "id" => $id, ); $deleted_count++; - $next = true; + $nextID = true; } else { $errors[$id] = array( "id" => $id, @@ -179,7 +180,7 @@ class files { } } - if ($next) { + if ($nextID) { continue; } -- cgit v1.2.3-24-g4f1b