Add the return which is being used

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-10-31 14:04:14 +01:00
parent c5f76785ba
commit ba6e5bcc05
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 9 additions and 6 deletions

View File

@ -92,6 +92,7 @@ class RepairMimeTypes implements IRepairStep {
$this->folderMimeTypeId = (int)$result->fetchOne(); $this->folderMimeTypeId = (int)$result->fetchOne();
} }
$count = 0;
foreach ($updatedMimetypes as $extension => $mimetype) { foreach ($updatedMimetypes as $extension => $mimetype) {
$result = \OC_DB::executeAudited(self::existsStmt(), array($mimetype)); $result = \OC_DB::executeAudited(self::existsStmt(), array($mimetype));
$exists = $result->fetchOne(); $exists = $result->fetchOne();
@ -106,8 +107,10 @@ class RepairMimeTypes implements IRepairStep {
$mimetypeId = $result->fetchOne(); $mimetypeId = $result->fetchOne();
// change mimetype for files with x extension // 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() { private function introduceImageTypes() {
@ -116,7 +119,7 @@ class RepairMimeTypes implements IRepairStep {
'webp' => 'image/webp', 'webp' => 'image/webp',
); );
$this->updateMimetypes($updatedMimetypes); return $this->updateMimetypes($updatedMimetypes);
} }
private function introduceWindowsProgramTypes() { private function introduceWindowsProgramTypes() {
@ -126,7 +129,7 @@ class RepairMimeTypes implements IRepairStep {
'cmd' => 'application/cmd', 'cmd' => 'application/cmd',
); );
$this->updateMimetypes($updatedMimetypes); return $this->updateMimetypes($updatedMimetypes);
} }
private function introduceLocationTypes() { private function introduceLocationTypes() {
@ -137,7 +140,7 @@ class RepairMimeTypes implements IRepairStep {
'tcx' => 'application/vnd.garmin.tcx+xml', 'tcx' => 'application/vnd.garmin.tcx+xml',
]; ];
$this->updateMimetypes($updatedMimetypes); return $this->updateMimetypes($updatedMimetypes);
} }
private function introduceInternetShortcutTypes() { private function introduceInternetShortcutTypes() {
@ -146,7 +149,7 @@ class RepairMimeTypes implements IRepairStep {
'webloc' => 'application/internet-shortcut' 'webloc' => 'application/internet-shortcut'
]; ];
$this->updateMimetypes($updatedMimetypes); return $this->updateMimetypes($updatedMimetypes);
} }
private function introduceStreamingTypes() { private function introduceStreamingTypes() {
@ -156,7 +159,7 @@ class RepairMimeTypes implements IRepairStep {
'pls' => 'audio/x-scpls' 'pls' => 'audio/x-scpls'
]; ];
$this->updateMimetypes($updatedMimetypes); return $this->updateMimetypes($updatedMimetypes);
} }
/** /**