@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | \OC_App::setupBackgroundJobs($info['background-jobs']); |
164 | 164 | |
165 | 165 | //run appinfo/install.php |
166 | - self::includeAppScript($basedir . '/appinfo/install.php'); |
|
166 | + self::includeAppScript($basedir.'/appinfo/install.php'); |
|
167 | 167 | |
168 | 168 | $appData = OC_App::getAppInfo($appId); |
169 | 169 | OC_App::executeRepairSteps($appId, $appData['repair-steps']['install']); |
@@ -225,13 +225,13 @@ discard block |
||
225 | 225 | if ($app['id'] === $appId) { |
226 | 226 | // Load the certificate |
227 | 227 | $certificate = new X509(); |
228 | - $certificate->loadCA(file_get_contents(__DIR__ . '/../../resources/codesigning/root.crt')); |
|
228 | + $certificate->loadCA(file_get_contents(__DIR__.'/../../resources/codesigning/root.crt')); |
|
229 | 229 | $loadedCertificate = $certificate->loadX509($app['certificate']); |
230 | 230 | |
231 | 231 | // Verify if the certificate has been revoked |
232 | 232 | $crl = new X509(); |
233 | - $crl->loadCA(file_get_contents(__DIR__ . '/../../resources/codesigning/root.crt')); |
|
234 | - $crl->loadCRL(file_get_contents(__DIR__ . '/../../resources/codesigning/root.crl')); |
|
233 | + $crl->loadCA(file_get_contents(__DIR__.'/../../resources/codesigning/root.crt')); |
|
234 | + $crl->loadCRL(file_get_contents(__DIR__.'/../../resources/codesigning/root.crl')); |
|
235 | 235 | if ($crl->validateSignature() !== true) { |
236 | 236 | throw new \Exception('Could not validate CRL signature'); |
237 | 237 | } |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | |
285 | 285 | // Check if the signature actually matches the downloaded content |
286 | 286 | $certificate = openssl_get_publickey($app['certificate']); |
287 | - $verified = (bool)openssl_verify(file_get_contents($tempFile), base64_decode($app['releases'][0]['signature']), $certificate, OPENSSL_ALGO_SHA512); |
|
287 | + $verified = (bool) openssl_verify(file_get_contents($tempFile), base64_decode($app['releases'][0]['signature']), $certificate, OPENSSL_ALGO_SHA512); |
|
288 | 288 | openssl_free_key($certificate); |
289 | 289 | |
290 | 290 | if ($verified === true) { |
@@ -294,11 +294,11 @@ discard block |
||
294 | 294 | |
295 | 295 | if ($archive) { |
296 | 296 | if (!$archive->extract($extractDir)) { |
297 | - $errorMessage = 'Could not extract app ' . $appId; |
|
297 | + $errorMessage = 'Could not extract app '.$appId; |
|
298 | 298 | |
299 | 299 | $archiveError = $archive->getError(); |
300 | 300 | if ($archiveError instanceof \PEAR_Error) { |
301 | - $errorMessage .= ': ' . $archiveError->getMessage(); |
|
301 | + $errorMessage .= ': '.$archiveError->getMessage(); |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | throw new \Exception($errorMessage); |
@@ -318,21 +318,21 @@ discard block |
||
318 | 318 | |
319 | 319 | // Check if appinfo/info.xml has the same app ID as well |
320 | 320 | $loadEntities = libxml_disable_entity_loader(false); |
321 | - $xml = simplexml_load_file($extractDir . '/' . $folders[0] . '/appinfo/info.xml'); |
|
321 | + $xml = simplexml_load_file($extractDir.'/'.$folders[0].'/appinfo/info.xml'); |
|
322 | 322 | libxml_disable_entity_loader($loadEntities); |
323 | - if ((string)$xml->id !== $appId) { |
|
323 | + if ((string) $xml->id !== $appId) { |
|
324 | 324 | throw new \Exception( |
325 | 325 | sprintf( |
326 | 326 | 'App for id %s has a wrong app ID in info.xml: %s', |
327 | 327 | $appId, |
328 | - (string)$xml->id |
|
328 | + (string) $xml->id |
|
329 | 329 | ) |
330 | 330 | ); |
331 | 331 | } |
332 | 332 | |
333 | 333 | // Check if the version is lower than before |
334 | 334 | $currentVersion = OC_App::getAppVersion($appId); |
335 | - $newVersion = (string)$xml->version; |
|
335 | + $newVersion = (string) $xml->version; |
|
336 | 336 | if (version_compare($currentVersion, $newVersion) === 1) { |
337 | 337 | throw new \Exception( |
338 | 338 | sprintf( |
@@ -344,12 +344,12 @@ discard block |
||
344 | 344 | ); |
345 | 345 | } |
346 | 346 | |
347 | - $baseDir = OC_App::getInstallPath() . '/' . $appId; |
|
347 | + $baseDir = OC_App::getInstallPath().'/'.$appId; |
|
348 | 348 | // Remove old app with the ID if existent |
349 | 349 | OC_Helper::rmdirr($baseDir); |
350 | 350 | // Move to app folder |
351 | 351 | if (@mkdir($baseDir)) { |
352 | - $extractDir .= '/' . $folders[0]; |
|
352 | + $extractDir .= '/'.$folders[0]; |
|
353 | 353 | OC_Helper::copyr($extractDir, $baseDir); |
354 | 354 | } |
355 | 355 | OC_Helper::copyr($extractDir, $baseDir); |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | if (\OC::$server->getAppManager()->isShipped($appId)) { |
489 | 489 | return false; |
490 | 490 | } |
491 | - $appDir = OC_App::getInstallPath() . '/' . $appId; |
|
491 | + $appDir = OC_App::getInstallPath().'/'.$appId; |
|
492 | 492 | OC_Helper::rmdirr($appDir); |
493 | 493 | return true; |
494 | 494 | } else { |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | OC_DB::createDbFromStructure("$appPath/appinfo/database.xml"); |
583 | 583 | } catch (TableExistsException $e) { |
584 | 584 | throw new HintException( |
585 | - 'Failed to enable app ' . $app, |
|
585 | + 'Failed to enable app '.$app, |
|
586 | 586 | 'Please ask for help via one of our <a href="https://nextcloud.com/support/" target="_blank" rel="noreferrer noopener">support channels</a>.', |
587 | 587 | 0, $e |
588 | 588 | ); |