summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-06 12:40:58 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-02-06 12:40:58 +0100
commitf5cab9d96aec1464978b556f2ca02e79b2c4d8d8 (patch)
tree5226ee6006aa3a9c08fb3a2c175705708a089bab /application
parent67ed287e97daa9965521c9d133714bde72145711 (diff)
service/files::delete: Fix incorrect error when wrong owner
Also improve the variable name for easier understanding. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/service/files.php7
1 files 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;
}