diff options
author | Joas Schilling <coding@schilljs.com> | 2017-10-31 14:04:14 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-10-31 14:06:21 +0100 |
commit | ba6e5bcc051e825c9048a5bd1f2680d1c04661de (patch) | |
tree | cf050f922a1836bae483f94bc6df11303c6b8f15 /lib/private | |
parent | c5f76785ba143a569726fb4f6e9a9c7bafd50f1c (diff) | |
download | nextcloud-server-ba6e5bcc051e825c9048a5bd1f2680d1c04661de.tar.gz nextcloud-server-ba6e5bcc051e825c9048a5bd1f2680d1c04661de.zip |
Add the return which is being used
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Repair/RepairMimeTypes.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index e77c7a26812..8caadfa3a64 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -92,6 +92,7 @@ class RepairMimeTypes implements IRepairStep { $this->folderMimeTypeId = (int)$result->fetchOne(); } + $count = 0; foreach ($updatedMimetypes as $extension => $mimetype) { $result = \OC_DB::executeAudited(self::existsStmt(), array($mimetype)); $exists = $result->fetchOne(); @@ -106,8 +107,10 @@ class RepairMimeTypes implements IRepairStep { $mimetypeId = $result->fetchOne(); // change mimetype for files with x extension - \OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.' . $extension)); + $count += \OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.' . $extension)); } + + return $count; } private function introduceImageTypes() { @@ -116,7 +119,7 @@ class RepairMimeTypes implements IRepairStep { 'webp' => 'image/webp', ); - $this->updateMimetypes($updatedMimetypes); + return $this->updateMimetypes($updatedMimetypes); } private function introduceWindowsProgramTypes() { @@ -126,7 +129,7 @@ class RepairMimeTypes implements IRepairStep { 'cmd' => 'application/cmd', ); - $this->updateMimetypes($updatedMimetypes); + return $this->updateMimetypes($updatedMimetypes); } private function introduceLocationTypes() { @@ -137,7 +140,7 @@ class RepairMimeTypes implements IRepairStep { 'tcx' => 'application/vnd.garmin.tcx+xml', ]; - $this->updateMimetypes($updatedMimetypes); + return $this->updateMimetypes($updatedMimetypes); } private function introduceInternetShortcutTypes() { @@ -146,7 +149,7 @@ class RepairMimeTypes implements IRepairStep { 'webloc' => 'application/internet-shortcut' ]; - $this->updateMimetypes($updatedMimetypes); + return $this->updateMimetypes($updatedMimetypes); } private function introduceStreamingTypes() { @@ -156,7 +159,7 @@ class RepairMimeTypes implements IRepairStep { 'pls' => 'audio/x-scpls' ]; - $this->updateMimetypes($updatedMimetypes); + return $this->updateMimetypes($updatedMimetypes); } /** |