Lines Matching +full:continue +full:- +full:on +full:- +full:error
49 $this->overwrite = $overwrite;
59 foreach ($this->temporary as $dir) {
62 $this->cleanUp();
79 if ($skipInstalled && $extension->isInstalled()) return;
80 $this->installExtension($extension);
93 $url = $extension->getDownloadURL();
95 throw new Exception('error_nourl', [$extension->getId()]);
97 $this->installFromUrl($url, $extension->getBase());
109 $this->sourceUrl = $url;
110 $archive = $this->downloadArchive($url);
111 $this->installFromArchive(
125 $this->sourceUrl = '';
126 if ($_FILES[$field]['error']) {
127 throw new Exception('msg_upload_failed', [$_FILES[$field]['error']]);
130 $tmpbase = $this->fileToBase($_FILES[$field]['name']) ?: 'upload';
131 $tmp = $this->mkTmpDir();
135 $this->installFromArchive("$tmp/$tmpbase.archive");
150 $target = $this->mkTmpDir() . '/' . ($base ?? $this->fileToBase($archive));
151 $this->extractArchive($archive, $target);
152 $extensions = $this->findExtensions($target, $base);
155 if ($extension->isInstalled()) {
156 if (!$this->overwrite) {
157 $this->processed[$extension->getId()] = self::STATUS_SKIPPED;
158 continue;
169 foreach ($extension->getDependencyList() as $id) {
170 if (isset($this->processed[$id])) continue;
171 if ($id == $extension->getId()) continue; // avoid circular dependencies
172 $this->installFromId($id, true);
177 $this->dircopy(
178 $extension->getCurrentDir(),
179 $extension->getInstallDir()
181 $this->isDirty = true;
182 $extension->getManager()->storeUpdate($this->sourceUrl);
183 $this->removeDeletedFiles($extension);
184 $this->processed[$extension->getId()] = $status;
187 $this->cleanUp();
198 if (!$extension->isInstalled()) {
199 throw new Exception('error_notinstalled', [$extension->getId()]);
202 if ($extension->isProtected()) {
203 throw new Exception('error_uninstall_protected', [$extension->getId()]);
208 $dependants = $extension->getDependants();
210 …throw new Exception('error_uninstall_dependants', [$extension->getId(), implode(', ', $dependants)…
213 if (!io_rmdir($extension->getInstallDir(), true)) {
214 throw new Exception('msg_delete_failed', [$extension->getId()]);
218 $this->processed[$extension->getId()] = self::STATUS_REMOVED;
228 if ($extension->isTemplate()) throw new Exception('notimplemented');
229 … if (!$extension->isInstalled()) throw new Exception('error_notinstalled', [$extension->getId()]);
230 … if ($extension->isEnabled()) throw new Exception('error_alreadyenabled', [$extension->getId()]);
234 if (!$plugin_controller->enable($extension->getBase())) {
247 if ($extension->isTemplate()) throw new Exception('notimplemented');
248 … if (!$extension->isInstalled()) throw new Exception('error_notinstalled', [$extension->getId()]);
249 … if (!$extension->isEnabled()) throw new Exception('error_alreadydisabled', [$extension->getId()]);
250 …if ($extension->isProtected()) throw new Exception('error_disable_protected', [$extension->getId()…
252 $dependants = $extension->getDependants();
254 …throw new Exception('error_disable_dependants', [$extension->getId(), implode(', ', $dependants)]);
259 if (!$plugin_controller->disable($extension->getBase())) {
286 $http->max_bodysize = 0;
287 $http->keep_alive = false; // we do single ops here, no need for keep-alive
288 $http->agent = 'DokuWiki HTTP Client (Extension Manager)';
290 …// large downloads may take a while on slow connections, so we try to extend the timeout to 4 minu…
293 $http->timeout = 60 * 4 - 5; // nearly 4 minutes
295 $http->timeout = 25; // max. 25 sec (a bit less than default execution time)
298 $data = $http->get($url);
299 … if ($data === false) throw new Exception('error_download', [$url, $http->error, $http->status]);
305 (string)($http->resp_headers['content-disposition'] ?? ''),
313 $file = $this->fileToBase($file);
316 $tmp = $this->mkTmpDir();
332 $extensiondir = $extension->getInstallDir();
340 if (!$line) continue;
343 if (!file_exists($file)) continue;
371 return $this->processed;
385 $min = $extension->getMinimumPHPVersion();
387 throw new Exception('error_minphp', [$extension->getId(), $min, PHP_VERSION]);
390 $max = $extension->getMaximumPHPVersion();
392 throw new Exception('error_maxphp', [$extension->getId(), $max, PHP_VERSION]);
403 $target = $extension->getInstallDir();
406 if ($extension->isBundled()) {
419 if ($extension->isTemplate()) throw new Exception('notplperms');
453 $this->temporary[] = $dir;
473 $file->getFilename() === 'plugin.info.txt' ||
474 $file->getFilename() === 'template.info.txt'
476 $extensions[] = Extension::createFromDirectory($file->getPath());
493 * Auto-guesses the archive type
509 $archiver->open($archive);
510 $archiver->extract($target);
512 throw new Exception('error_archive_extract', [$archive, $e->getMessage()], $e);
517 * Copy with recursive sub-directory support
534 if ($f == '..' || $f == '.') continue;
535 $this->dircopy("$src/$f", "$dst/$f");
558 if ($this->isDirty) {
560 $this->isDirty = false;