diff options
37 files changed, 419 insertions, 70 deletions
diff --git a/bin/dwpage.php b/bin/dwpage.php index a343cb0ed..1825f4ef9 100755 --- a/bin/dwpage.php +++ b/bin/dwpage.php @@ -217,6 +217,10 @@ class PageCLI extends CLI $localfile = getcwd() . '/' . PhpString::basename($wiki_fn); } + if (is_dir($localfile)) { + $this->fatal("Working file $localfile cannot be a directory"); + } + if (!file_exists(dirname($localfile))) { $this->fatal("Directory " . dirname($localfile) . " does not exist"); } diff --git a/composer.lock b/composer.lock index 5b89e0ef6..c320a024a 100644 --- a/composer.lock +++ b/composer.lock @@ -328,12 +328,12 @@ "source": { "type": "git", "url": "https://github.com/alphp/strftime.git", - "reference": "88e98f00b5d9247e8168c1eb528ab138fbf743d2" + "reference": "dcd30543db16c9b4ba095f6bf32ac16f15eb9448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alphp/strftime/zipball/88e98f00b5d9247e8168c1eb528ab138fbf743d2", - "reference": "88e98f00b5d9247e8168c1eb528ab138fbf743d2", + "url": "https://api.github.com/repos/alphp/strftime/zipball/dcd30543db16c9b4ba095f6bf32ac16f15eb9448", + "reference": "dcd30543db16c9b4ba095f6bf32ac16f15eb9448", "shasum": "" }, "require": { @@ -369,7 +369,7 @@ "issues": "https://github.com/alphp/strftime/issues", "source": "https://github.com/alphp/strftime" }, - "time": "2024-01-26T18:19:38+00:00" + "time": "2025-05-20T20:04:36+00:00" }, { "name": "phpseclib/phpseclib", @@ -13,7 +13,7 @@ use dokuwiki\ChangeLog\PageChangeLog; use dokuwiki\Extension\Event; // update message version - always use a string to avoid localized floats! -$updateVersion = "56"; +$updateVersion = "57"; // xdebug_start_profiling(); diff --git a/inc/Debug/DebugHelper.php b/inc/Debug/DebugHelper.php index 4fc8bf9da..4809e9524 100644 --- a/inc/Debug/DebugHelper.php +++ b/inc/Debug/DebugHelper.php @@ -53,7 +53,7 @@ class DebugHelper self::triggerDeprecationEvent( $backtrace, $alternative, - self::formatCall($self), + $thing ?: self::formatCall($self), self::formatCall($call), $self['file'] ?? $call['file'] ?? '', $self['line'] ?? $call['line'] ?? 0 diff --git a/inc/Menu/Item/AbstractItem.php b/inc/Menu/Item/AbstractItem.php index 509ce9747..467cc7b7d 100644 --- a/inc/Menu/Item/AbstractItem.php +++ b/inc/Menu/Item/AbstractItem.php @@ -46,7 +46,7 @@ abstract class AbstractItem protected $label = ''; /** @var string the tooltip title, defaults to $label */ protected $title = ''; - /** @var int the context this titme is shown in */ + /** @var int the context this item is shown in */ protected $context = self::CTX_ALL; /** diff --git a/inc/infoutils.php b/inc/infoutils.php index 6319b94d9..a25839282 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -184,7 +184,7 @@ function getRuntimeVersions() if (getenv('KUBERNETES_SERVICE_HOST')) { $data['container'] = 'Kubernetes'; - } elseif (file_exists('/.dockerenv')) { + } elseif (@file_exists('/.dockerenv')) { $data['container'] = 'Docker'; } @@ -199,14 +199,16 @@ function getRuntimeVersions() */ function getOsRelease() { + $reader = fn($file) => @parse_ini_string(preg_replace('/#.*$/m', '', file_get_contents($file))); + $osRelease = []; - if (file_exists('/etc/os-release')) { + if (@file_exists('/etc/os-release')) { // pretty much any common Linux distribution has this - $osRelease = parse_ini_file('/etc/os-release'); - } elseif (file_exists('/etc/synoinfo.conf') && file_exists('/etc/VERSION')) { + $osRelease = $reader('/etc/os-release'); + } elseif (@file_exists('/etc/synoinfo.conf') && @file_exists('/etc/VERSION')) { // Synology DSM has its own way - $synoInfo = parse_ini_file('/usr/lib/synoinfo.conf'); - $synoVersion = parse_ini_file('/etc/VERSION'); + $synoInfo = $reader('/etc/synoinfo.conf'); + $synoVersion = $reader('/etc/VERSION'); $osRelease['NAME'] = 'Synology DSM'; $osRelease['ID'] = 'synology'; $osRelease['ID_LIKE'] = 'linux'; @@ -218,6 +220,7 @@ function getOsRelease() return $osRelease; } + /** * Run a few sanity checks * diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 8ed9dd13d..5bd58b32a 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author SoiBKK <info@soibangkok.online> * @author nakky <nakky@naver.com> * @author merefox retronica <merefox@naver.com> * @author take <take@ruu.kr> @@ -229,6 +230,7 @@ $lang['created'] = '만듦'; $lang['restored'] = '이전 판으로 되돌림 (%s)'; $lang['external_edit'] = '바깥 편집'; $lang['summary'] = '편집 요약'; +$lang['unknowndate'] = '알 수 없는 날짜'; $lang['noflash'] = '이 내용을 표시하기 위해서 <a href="http://get.adobe.com/flashplayer">Adobe Flash 플러그인</a>이 필요합니다.'; $lang['download'] = '조각 다운로드'; $lang['tools'] = '도구'; diff --git a/inc/media.php b/inc/media.php index a49c5c699..ced745097 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1184,7 +1184,7 @@ function media_preview_buttons($image, $auth, $rev = '') function media_image_preview_size($image, $rev, $meta = false, $size = 500) { if ( - !preg_match("/\.(jpe?g|gif|png)$/", $image) + !preg_match("/\.(jpe?g|gif|png|webp)$/", $image) || !file_exists($filename = mediaFN($image, $rev)) ) return []; diff --git a/lib/exe/openapi.php b/lib/exe/openapi.php index e20b69e97..cbceecd7e 100644 --- a/lib/exe/openapi.php +++ b/lib/exe/openapi.php @@ -40,7 +40,7 @@ if ($INPUT->has('spec')) { </p> <p> - <a href="<?php echo DOKU_BASE ?>/lib/exe/openapi.php?spec=1" download="dokuwiki.json">Download + <a href="<?php echo DOKU_BASE ?>lib/exe/openapi.php?spec=1" download="dokuwiki.json">Download the API Spec</a> </p> diff --git a/lib/plugins/authldap/lang/cs/settings.php b/lib/plugins/authldap/lang/cs/settings.php index 1bdaf29ba..19d41507f 100644 --- a/lib/plugins/authldap/lang/cs/settings.php +++ b/lib/plugins/authldap/lang/cs/settings.php @@ -3,7 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Petr Kajzar <petr.kajzar@lf1.cuni.cz> + * @author Petr Kajzar <petr.kajzar@centrum.cz> * @author mkucera66 <mkucera66@seznam.cz> * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> * @author Martin Růžička <martinr@post.cz> @@ -26,6 +26,7 @@ $lang['groupscope'] = 'Omezení rozsahu vyhledávání skupiny'; $lang['userkey'] = 'Atribut označující uživatelské jméno; musí být konzistetní s uživatelským filtrem.'; $lang['groupkey'] = 'Atribut členství uživatele ve skupinách (namísto standardních AD skupin), tj. skupina z oddělení nebo telefonní číslo'; $lang['modPass'] = 'Může být LDAP heslo změněno přes dokuwiki?'; +$lang['modPassPlain'] = 'Odesílat aktualizace hesel na server LDAP v prostém textu (namísto jejich zabezpečení nakonfigurovaným algoritmem před přenosem)?'; $lang['debug'] = 'Zobrazit dodatečné debugovací informace'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; diff --git a/lib/plugins/authldap/lang/pt-br/settings.php b/lib/plugins/authldap/lang/pt-br/settings.php index 8b5cb378b..8d43a5f46 100644 --- a/lib/plugins/authldap/lang/pt-br/settings.php +++ b/lib/plugins/authldap/lang/pt-br/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Daniel Dias Rodrigues <danieldiasr@gmail.com> * @author Schopf <pschopf@gmail.com> * @author Victor Westmann <victor.westmann@gmail.com> * @author Frederico Guimarães <frederico@teia.bio.br> @@ -26,6 +27,7 @@ $lang['groupscope'] = 'Limitar escopo da busca para busca de grupo'; $lang['userkey'] = 'Atributo que indica o nome do usuário; deve ser consistente com userfilter.'; $lang['groupkey'] = 'Membro de grupo vem de qualquer atributo do usuário (ao invés de grupos padrões AD) e.g. departamento de grupo ou número de telefone'; $lang['modPass'] = 'A senha LDAP pode ser alterada pelo dokuwiki ?'; +$lang['modPassPlain'] = 'Enviar atualizações de senha em texto puro para o servidor LDAP (em vez de usar o algoritmo configurado para fazer o salt e o hash antes da transmissão)?'; $lang['debug'] = 'Mostrar informações adicionais de depuração em erros'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; diff --git a/lib/plugins/authldap/lang/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php index 44d46c8a4..500d71f38 100644 --- a/lib/plugins/authldap/lang/zh/settings.php +++ b/lib/plugins/authldap/lang/zh/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Luna Shirase <fwits@foxmail.com> * @author Phy <dokuwiki@phy25.com> * @author FENG.JIE <ahx@qq.com> * @author lainme <lainme993@gmail.com> @@ -28,6 +29,7 @@ $lang['groupscope'] = '限制组搜索的范围'; $lang['userkey'] = '表示用户名的属性;必须和用户过滤器保持一致。'; $lang['groupkey'] = '根据任何用户属性得来的组成员(而不是标准的 AD 组),例如根据部门或者电话号码得到的组。'; $lang['modPass'] = ' LDAP 密码可以通过 DokuWiki 修改吗?'; +$lang['modPassPlain'] = '确定要通过明文将密码更新发送至LDAP服务器(而不是按照配置在发送前进行加盐和哈希加密)?'; $lang['debug'] = '有错误时显示额外的调试信息'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; diff --git a/lib/plugins/config/lang/cs/lang.php b/lib/plugins/config/lang/cs/lang.php index 8e1241ed7..f23e7c4a3 100644 --- a/lib/plugins/config/lang/cs/lang.php +++ b/lib/plugins/config/lang/cs/lang.php @@ -3,8 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Martin Růžička <martinr@post.cz> * @author Petr Kajzar <petr.kajzar@centrum.cz> + * @author Martin Růžička <martinr@post.cz> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Robert Surý <rsurycz@seznam.cz> * @author Martin Hořínek <hev@hev.cz> @@ -141,6 +141,7 @@ $lang['mailreturnpath'] = 'E-mailová adresa příjemce pro oznámení o $lang['mailprefix'] = 'Předpona předmětu e-mailu, která se bude používat pro automatické e-maily'; $lang['htmlmail'] = 'Posílat e-maily v HTML (hezčí ale větší). Při vypnutí budou posílány jen textové e-maily.'; $lang['dontlog'] = 'Zakázat protokolování pro tyto typy záznamů.'; +$lang['logretain'] = 'Kolik dní uchovávat protokoly.'; $lang['sitemap'] = 'Generovat Google sitemap (interval ve dnech)'; $lang['rss_type'] = 'Typ XML kanálu'; $lang['rss_linkto'] = 'XML kanál odkazuje na'; @@ -175,13 +176,14 @@ $lang['search_fragment_o_exact'] = 'přesný'; $lang['search_fragment_o_starts_with'] = 'začíná s'; $lang['search_fragment_o_ends_with'] = 'končí s'; $lang['search_fragment_o_contains'] = 'obsahuje'; -$lang['trustedproxy'] = 'Důvěřovat proxy serverům odpovídajícím tomuto regulárním výrazu ohledně skutečné IP adresy klienta, kterou hlásí. Výchozí hodnota odpovídá místním sítím. Ponechejte prázdné, pokud nechcete důvěřovat žádné proxy.'; $lang['_feature_flags'] = 'Feature flags'; $lang['defer_js'] = 'Odložit spuštění javascriptu až po zpracování HTML kódu stránky. Zlepšuje vnímanou rychlost načtení stránky, ale může narušit funkci některých zásuvných modulů.'; $lang['hidewarnings'] = 'Nezobrazovat žádná varování PHP. To může usnadnit přechod na PHP8+. Varování budou stále zaznamenána v protokolu chyb a měla by být hlášena.'; $lang['dnslookups'] = 'DokuWiki zjišťuje DNS jména pro vzdálené IP adresy uživatelů, kteří editují stránky. Pokud máte pomalý, nebo nefunkční DNS server, nebo nepotřebujete tuto funkci, tak tuto volbu zrušte.'; $lang['jquerycdn'] = 'Mají být skripty jQuery a jQuery UI načítány z CDN? Vzniknou tím další HTTP dotazy, ale soubory se mohou načíst rychleji a uživatelé je už mohou mít ve vyrovnávací paměti.'; +$lang['trustedproxies'] = 'Čárkou oddělený seznam důvěryhodných proxy serverů, ze kterých se načítá hlavička X-Forwarded-For. Každá položka v poli může být buď adresa IPv4 nebo IPv6, nebo rozsah IPv4 nebo IPv6 CIDR (např. 10.0.0.0/8). Pokud nechcete důvěřovat žádnému proxy serveru, ponechte prázdné pole.'; +$lang['realip'] = 'Důvěřovat záhlaví X-Real-IP. Tuto funkci povolte pouze v případě, že váš server tuto hlavičku zapisuje, jinak může dojít k jejímu podvržení.'; $lang['jquerycdn_o_0'] = 'Bez CDN, pouze lokální doručení'; $lang['jquerycdn_o_jquery'] = 'CDN na code.jquery.com'; $lang['jquerycdn_o_cdnjs'] = 'CDN na cdnjs.com'; diff --git a/lib/plugins/config/lang/pt-br/lang.php b/lib/plugins/config/lang/pt-br/lang.php index 5463a047b..4289a370a 100644 --- a/lib/plugins/config/lang/pt-br/lang.php +++ b/lib/plugins/config/lang/pt-br/lang.php @@ -3,8 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Eduardo Mozart de Oliveira <eduardomozart182@gmail.com> * @author Daniel Dias Rodrigues <danieldiasr@gmail.com> + * @author Eduardo Mozart de Oliveira <eduardomozart182@gmail.com> * @author Paul Nizan <paul_nizan@hormail.com> * @author ANDRE BASSANI DE FREITAS <dedebf@gmail.com> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> @@ -178,6 +178,8 @@ $lang['defer_js'] = 'Adie o javascript para ser executado após a a $lang['hidewarnings'] = 'Não exiba nenhum aviso emitido pelo PHP. Isso pode facilitar a transição para PHP8+. Os avisos ainda serão registrados no log de erros e devem ser relatados.'; $lang['dnslookups'] = 'O DokuWiki procurará pelo nome de host dos endereços IP remotos dos usuários que estão editando as páginas. Caso você tenha um DNS lento, ele não esteja funcionando ou, ainda, você não queira esse recurso, desabilite essa opção.'; $lang['jquerycdn'] = 'Os scripts jQuery e jQuery UI devem ser carregados a partir de uma CND? Isso adiciona requisições HTTP adicionais, mas os arquivos podem carregar mais rapidamente e os usuários podem já tê-los no cache.'; +$lang['trustedproxies'] = 'Lista separada por vírgulas de servidores proxy confiáveis dos quais ler o cabeçalho X-Forwarded-For. Cada item na lista pode ser um endereço IPv4 ou IPv6, ou um intervalo CIDR IPv4 ou IPv6 (p. e., 10.0.0.0/8). Deixe em branco para não confiar em nenhum proxy.'; +$lang['realip'] = 'Confiar no cabeçalho X-Real-IP. Habilite esta opção somente se o seu servidor gravar este cabeçalho, caso contrário, ele poderá ser falsificado.'; $lang['jquerycdn_o_0'] = 'Sem CDN, somente entrega local'; $lang['jquerycdn_o_jquery'] = 'CDN em code.jquery.com'; $lang['jquerycdn_o_cdnjs'] = 'CDN em cdnjs.com'; diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php index fe27e7a4b..22ca87f89 100644 --- a/lib/plugins/config/lang/zh/lang.php +++ b/lib/plugins/config/lang/zh/lang.php @@ -182,7 +182,6 @@ $lang['search_fragment_o_exact'] = '精确'; $lang['search_fragment_o_starts_with'] = '开头为'; $lang['search_fragment_o_ends_with'] = '结尾为'; $lang['search_fragment_o_contains'] = '包含'; -$lang['trustedproxy'] = '信任转发代理与其正则表达式有关系,显示的是真实的客户端IP。默认匹配本地网络。留空则不选择任何代理。'; $lang['_feature_flags'] = '功能标志'; $lang['defer_js'] = '推迟在页面HTML解析后执行的JavaScript。提高了页面的感知速度,但可能会破坏少量插件。'; $lang['hidewarnings'] = '不显示 PHP 发出的任何警告。这可以简化到 PHP8+ 的转换。警告仍将记录在错误日志中,并应报告。'; diff --git a/lib/plugins/extension/Extension.php b/lib/plugins/extension/Extension.php index 763b348c2..6de7a92f6 100644 --- a/lib/plugins/extension/Extension.php +++ b/lib/plugins/extension/Extension.php @@ -507,7 +507,9 @@ class Extension { $last = $this->getManager()->getDownloadURL(); if (!$last) return false; - return $last !== $this->getDownloadURL(); + $url = $this->getDownloadURL(); + if (!$url) return false; + return $last !== $url; } /** diff --git a/lib/plugins/extension/ExtensionApiResponse.php b/lib/plugins/extension/ExtensionApiResponse.php new file mode 100644 index 000000000..c684e770f --- /dev/null +++ b/lib/plugins/extension/ExtensionApiResponse.php @@ -0,0 +1,96 @@ +<?php + +namespace dokuwiki\plugin\extension; + +use dokuwiki\Remote\Response\ApiResponse; + +class ExtensionApiResponse extends ApiResponse +{ + protected Extension $extension; + + /** @var string The type of this extension ("plugin" or "template") */ + public $type; + + /** @var string The id of this extension (templates are prefixed with "template") */ + public $id; + + /** @var string The base name of this extension */ + public $base; + + /** @var string The display name of this extension */ + public $name; + + /** @var string The installed version/date of this extension */ + public $version; + + /** @var string The author of this extension */ + public $author; + + /** @var string The description of this extension */ + public $description; + + /** @var bool Whether this extension is installed */ + public $isInstalled; + + /** @var bool Whether this extension is enabled */ + public $isEnabled; + + /** @var bool Whether an update is available */ + public $updateAvailable; + + /** @var bool Whether this extension is bundled with DokuWiki */ + public $isBundled; + + /** @var bool Whether this extension is under git control */ + public $isGitControlled; + + /** @var string[] Notices for this extension */ + public $notices; + + /** @var string Documentation URL for this extension */ + public $url; + + /** @var string[] The component types this plugin provides */ + public $componentTypes; + + /** @var string The last available remote update date */ + public $lastUpdate; + + /** @var string The download URL for this extension */ + public string $downloadURL; + + /** + * Constructor + * + * @param Extension $extension The extension to create the response for + */ + public function __construct(Extension $extension) + { + $this->extension = $extension; + $this->type = $extension->getType(); + $this->id = $extension->getId(); + $this->base = $extension->getBase(); + $this->name = $extension->getDisplayName(); + $this->version = $extension->getInstalledVersion(); + $this->author = $extension->getAuthor(); + $this->description = $extension->getDescription(); + $this->isInstalled = $extension->isInstalled(); + $this->isEnabled = $extension->isEnabled(); + $this->updateAvailable = $extension->isUpdateAvailable(); + $this->isBundled = $extension->isBundled(); + $this->isGitControlled = $extension->isGitControlled(); + $this->componentTypes = $extension->getComponentTypes(); + $this->lastUpdate = $extension->getLastUpdate(); + $this->url = $extension->getURL(); + $this->downloadURL = $extension->getDownloadURL(); + + // Add notices + $this->notices = array_merge(...array_values(Notice::list($extension))); + } + + /** @inheritdoc */ + public function __toString() + { + return $this->extension->getId(); + } +} diff --git a/lib/plugins/extension/GuiExtension.php b/lib/plugins/extension/GuiExtension.php index 4b8163c60..666cd37ed 100644 --- a/lib/plugins/extension/GuiExtension.php +++ b/lib/plugins/extension/GuiExtension.php @@ -46,8 +46,8 @@ class GuiExtension extends Gui $html .= '<div class="actions">'; // show the available update if there is one if ($this->extension->isUpdateAvailable()) { - $html .= ' <div class="version">' . $this->getLang('available_version') . ' ' . - hsc($this->extension->getLastUpdate()) . '</div>'; + $html .= ' <div class="available">' . $this->getLang('available_version') . ' ' . + '<span class="version">' . hsc($this->extension->getLastUpdate()) . '</span></div>'; } $html .= $this->actions(); diff --git a/lib/plugins/extension/Installer.php b/lib/plugins/extension/Installer.php index e08f1da52..5bb429b01 100644 --- a/lib/plugins/extension/Installer.php +++ b/lib/plugins/extension/Installer.php @@ -406,6 +406,11 @@ class Installer { $target = $extension->getInstallDir(); + // bundled plugins do not need to be writable + if ($extension->isBundled()) { + return; + } + // updates if (file_exists($target)) { if (!is_writable($target)) throw new Exception('noperms'); diff --git a/lib/plugins/extension/lang/cs/lang.php b/lib/plugins/extension/lang/cs/lang.php index 3a1dc48ac..8cf586d5a 100644 --- a/lib/plugins/extension/lang/cs/lang.php +++ b/lib/plugins/extension/lang/cs/lang.php @@ -3,9 +3,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Petr Kajzar <petr.kajzar@centrum.cz> * @author Tomáš Heger <heger.tomas@gmail.com> * @author Martin Růžička <martinr@post.cz> - * @author Petr Kajzar <petr.kajzar@lf1.cuni.cz> * @author Viktor Zavadil <vzavadil@newps.cz> * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> * @author Turkislav <turkislav@blabla.com> @@ -16,9 +16,6 @@ $lang['tab_templates'] = 'Instalované šablony'; $lang['tab_search'] = 'Vyhledat a instalovat'; $lang['tab_install'] = 'Ruční instalace'; $lang['notimplemented'] = 'Tato vychytávka není dosud implementována'; -$lang['notinstalled'] = 'Toto rozšíření není instalováno'; -$lang['alreadyenabled'] = 'Toto rozšíření je již povoleno'; -$lang['alreadydisabled'] = 'Toto rozšíření je již vypnuto'; $lang['pluginlistsaveerror'] = 'Došlo k chybě při ukládání seznamu zásuvných modulů'; $lang['unknownauthor'] = 'Neznámý autor'; $lang['unknownversion'] = 'Neznámá verze'; @@ -34,6 +31,8 @@ $lang['js']['display_viewoptions'] = 'Zobrazit možnosti:'; $lang['js']['display_enabled'] = 'povolené'; $lang['js']['display_disabled'] = 'zakázané'; $lang['js']['display_updatable'] = 'aktualizovatelné'; +$lang['js']['close'] = 'Kliknutím zavřete'; +$lang['js']['filter'] = 'Zobrazit pouze aktualizovatelná rozšíření'; $lang['search_for'] = 'Hledat rozšíření:'; $lang['search'] = 'Hledat'; $lang['extensionby'] = '<strong>%s</strong> od %s'; @@ -72,23 +71,40 @@ $lang['msg_enabled'] = 'Zásuvný modul %s povolen'; $lang['msg_disabled'] = 'Zásuvný modul %s zakázán'; $lang['msg_delete_success'] = 'Rozšíření %s odinstalováno'; $lang['msg_delete_failed'] = 'Odinstalování rozšíření %s selhalo'; -$lang['msg_template_install_success'] = 'Šablona %s úspěšně nainstalována'; -$lang['msg_template_update_success'] = 'Šablona %s úspěšně aktualizována'; -$lang['msg_plugin_install_success'] = 'Zásuvný modul %s úspěšně nainstalován.'; -$lang['msg_plugin_update_success'] = 'Zásuvný modul %s úspěšně aktualizován.'; +$lang['msg_install_success'] = 'Rozšíření %s bylo úspěšně nainstalováno'; +$lang['msg_update_success'] = 'Rozšíření %s bylo úspěšně aktualizováno'; $lang['msg_upload_failed'] = 'Nahrávání souboru selhalo'; $lang['msg_nooverwrite'] = 'Rozšíření %s již existuje, proto nebylo přepsáno; pro přepsání zatrhněte příslušnou možnost'; $lang['missing_dependency'] = 'Chybějící nebo zakázaná závislost: %s'; +$lang['found_conflict'] = 'Toto rozšíření je označeno jako konfliktní s následujícími nainstalovanými rozšířeními: %s'; $lang['security_issue'] = 'Bezpečnostní problém: %s'; $lang['security_warning'] = 'Bezpečnostní varování: %s'; +$lang['update_message'] = 'Aktualizační zpráva: %s'; $lang['wrong_folder'] = 'Zásuvný modul nesprávně nainstalován: Přejmenujte adresář modulu "%s" na "%s".'; -$lang['url_change'] = "URL se změnila: URL pro stahování se změnila od poslední aktualizace. Před další aktualizací tohoto rozšíření ověřte správnost nové URL.\nNová: %s\nStará: %s"; +$lang['url_change'] = 'URL se změnila: URL pro stahování se změnila od poslední aktualizace. Před další aktualizací tohoto rozšíření ověřte správnost nové URL. +Nová: %s +Stará: %s'; $lang['error_badurl'] = 'Adresy URL by měly začínat s http nebo https'; $lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář pro přijetí stahování'; $lang['error_download'] = 'Nelze stáhnout soubor: %s'; $lang['error_decompress'] = 'Selhalo rozbalení staženého souboru. Toto je nejspíš důsledek poškození souboru při přenosu, zkuste soubor stáhnout znovu; případně nemusel být rozpoznán formát sbaleného souboru a bude třeba přistoupit k ruční instalaci. '; $lang['error_findfolder'] = 'Nelze rozpoznat adresář pro rozšíření, je třeba stáhnout a instalovat ručně'; $lang['error_copy'] = 'Došlo k chybě kopírování souborů při pokusu nainstalovat soubory do adresáře <em>%s</em>: může být plný disk nebo špatně nastavena přístupová práva. Tato chyba mohla zapříčinit pouze částečnou instalaci zásuvného modulu a uvést wiki do nestabilního stavu.'; +$lang['error_copy_read'] = 'Nepodařilo se načíst adresář %s'; +$lang['error_copy_mkdir'] = 'Nepodařilo se vytvořit adresář %s'; +$lang['error_copy_copy'] = 'Nepodařilo se zkopírovat %s do %s'; +$lang['error_archive_read'] = 'Nepodařilo se otevřít archiv %s pro čtení'; +$lang['error_archive_extract'] = 'Nepodařilo se rozbalit archiv %s: %s'; +$lang['error_uninstall_protected'] = 'Rozšíření %s je chráněno a nelze jej odinstalovat'; +$lang['error_uninstall_dependants'] = 'Rozšíření %s je stále vyžadováno %s, a proto jej nelze odinstalovat'; +$lang['error_disable_protected'] = 'Rozšíření %s je chráněno a nelze jej zakázat'; +$lang['error_disable_dependants'] = 'Rozšíření %s je stále vyžadováno %s, a proto jej nelze zakázat'; +$lang['error_nourl'] = 'Pro rozšíření %s nebyla nalezena žádná adresa URL pro stahování'; +$lang['error_notinstalled'] = 'Rozšíření %s není nainstalováno'; +$lang['error_alreadyenabled'] = 'Rozšíření %s již bylo povoleno'; +$lang['error_alreadydisabled'] = 'Rozšíření %s již bylo zakázáno'; +$lang['error_minphp'] = 'Rozšíření %s vyžaduje alespoň PHP %s, ale tato wiki používá PHP %s.'; +$lang['error_maxphp'] = 'Rozšíření %s podporuje pouze PHP do %s, ale tato wiki používá PHP %s.'; $lang['noperms'] = 'Nelze zapisovat do adresáře pro rozšíření'; $lang['notplperms'] = 'Nelze zapisovat do odkládacího adresáře'; $lang['nopluginperms'] = 'Nelze zapisovat do adresáře se zásuvnými moduly'; @@ -96,5 +112,10 @@ $lang['git'] = 'Toto rozšíření bylo nainstalováno přes g $lang['auth'] = 'Tento ověřovací zásuvný modul není povolen v nastavení, zvažte jeho deaktivaci.'; $lang['install_url'] = 'Nainstalovat z URL:'; $lang['install_upload'] = 'Nahrát rozšíření:'; +$lang['repo_badresponse'] = 'Úložiště zásuvných modulů vrátilo neplatnou odpověď.'; $lang['repo_error'] = 'Nelze kontaktovat repozitář se zásuvnými moduly. Ujistěte se, že váš server může kontaktovat www.dokuwiki.org a zkontrolujte nastavení proxy.'; $lang['nossl'] = 'Použité PHP pravděpodobně nepodporuje SSL. Stažení mnoha DokuWiki rozšíření nebude fungovat.'; +$lang['popularity_high'] = 'Toto je jedno z nejoblíbenějších rozšíření'; +$lang['popularity_medium'] = 'Toto rozšíření je poměrně oblíbené'; +$lang['popularity_low'] = 'Toto rozšíření vzbudilo určitý zájem'; +$lang['details'] = 'Podrobnosti'; diff --git a/lib/plugins/extension/lang/de-informal/lang.php b/lib/plugins/extension/lang/de-informal/lang.php index ccec5ecc7..b2a37596c 100644 --- a/lib/plugins/extension/lang/de-informal/lang.php +++ b/lib/plugins/extension/lang/de-informal/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author andreash <aeheil@gmail.com> * @author MaWi <drmaxxis@gmail.com> * @author Felix <j.felix@mueller-donath.de> */ @@ -80,6 +81,12 @@ $lang['error_download'] = 'Download der Datei: %s nicht möglich.'; $lang['error_decompress'] = 'Die heruntergeladene Datei konnte nicht entpackt werden. Dies kann die Folge eines fehlerhaften Downloads sein. In diesem Fall solltest du versuchen den Vorgang zu wiederholen. Es kann auch die Folge eines unbekannten Kompressionsformates sein, in diesem Fall musst du die Datei selber herunterladen und manuell installieren.'; $lang['error_findfolder'] = 'Das Erweiterungs-Verzeichnis konnte nicht identifiziert werden, lade die Datei herunter und installiere sie manuell.'; $lang['error_copy'] = 'Beim Versuch Dateien in den Ordner <em>%s</em>: zu installieren trat ein Kopierfehler auf. Die Dateizugriffsberechtigungen könnten falsch sein. Dies kann an einem unvollständig installierten Plugin liegen und beeinträchtigt somit die Stabilität deiner Wiki-Installation.'; +$lang['error_nourl'] = 'Es konnte keine Download-URL für die Erweiterung %s gefunden werden.'; +$lang['error_notinstalled'] = 'Die Erweiterung %s ist nicht installiert.'; +$lang['error_alreadyenabled'] = 'Die Erweiterung %s wurde bereits aktiviert.'; +$lang['error_alreadydisabled'] = 'Die Erweiterung %s wurde bereits deaktiviert.'; +$lang['error_minphp'] = 'Die Erweiterung %s benötigt mindestens PHP Verison %s, dieses Wiki verwendet aber PHP %s.'; +$lang['error_maxphp'] = 'Die Erweiterung %s unterstützt PHP nur bis Version %s, dieses Wiki verwendet aber PHP %s.'; $lang['noperms'] = 'Das Erweiterungs-Verzeichnis ist schreibgeschützt'; $lang['notplperms'] = 'Das Template-Verzeichnis ist schreibgeschützt'; $lang['nopluginperms'] = 'Das Plugin-Verzeichnis ist schreibgeschützt'; @@ -87,5 +94,10 @@ $lang['git'] = 'Diese Erweiterung wurde über git installiert $lang['auth'] = 'Dieses Auth-Plugin ist in der Konfiguration nicht aktiviert, Du solltest es deaktivieren.'; $lang['install_url'] = 'Von URL installieren:'; $lang['install_upload'] = 'Erweiterung hochladen:'; +$lang['repo_badresponse'] = 'Das Plugin-Repository liefert eine ungültige Antwort.'; $lang['repo_error'] = 'Es konnte keine Verbindung zum Plugin-Verzeichnis hergestellt werden. Stelle sicher, dass der Server Verbindung mit www.dokuwiki.org aufnehmen darf und überprüfe deine Proxy-Einstellungen.'; $lang['nossl'] = 'Deine PHP-Installation scheint SSL nicht zu unterstützen. Das Herunterladen vieler DokuWiki-Erweiterungen wird scheitern.'; +$lang['popularity_high'] = 'Dies ist die beliebteste Erweiterung'; +$lang['popularity_medium'] = 'Diese Erweiterung ist beliebt'; +$lang['popularity_low'] = 'Diese Erweiterung stößt auf Interesse'; +$lang['details'] = 'Details'; diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php index 09bf1a6db..481a1eb34 100644 --- a/lib/plugins/extension/lang/fr/lang.php +++ b/lib/plugins/extension/lang/fr/lang.php @@ -66,7 +66,7 @@ $lang['status_disabled'] = 'désactivé'; $lang['status_unmodifiable'] = 'non modifiable'; $lang['status_plugin'] = 'greffon'; $lang['status_template'] = 'thème'; -$lang['status_bundled'] = 'fourni'; +$lang['status_bundled'] = 'intégré'; $lang['msg_enabled'] = 'Greffon %s activé'; $lang['msg_disabled'] = 'Greffon %s désactivé'; $lang['msg_delete_success'] = 'Extension %s désinstallée.'; diff --git a/lib/plugins/extension/lang/ko/lang.php b/lib/plugins/extension/lang/ko/lang.php index 7f45686dc..c40f838d1 100644 --- a/lib/plugins/extension/lang/ko/lang.php +++ b/lib/plugins/extension/lang/ko/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author SoiBKK <info@soibangkok.online> * @author Young gon Cha <garmede@gmail.com> * @author Myeongjin <aranet100@gmail.com> * @author hyeonsoft <hyeonsoft@live.co.kr> @@ -13,9 +14,6 @@ $lang['tab_templates'] = '설치된 템플릿'; $lang['tab_search'] = '검색하고 설치'; $lang['tab_install'] = '수동 설치'; $lang['notimplemented'] = '이 기능은 아직 구현되지 않았습니다'; -$lang['notinstalled'] = '이 확장 기능은 설치되어 있지 않습니다'; -$lang['alreadyenabled'] = '이 확장 기능이 이미 활성화되어 있습니다'; -$lang['alreadydisabled'] = '이 확장 기능이 이미 비활성화되어 있습니다'; $lang['pluginlistsaveerror'] = '플러그인 목록을 저장하는 중 오류가 있었습니다'; $lang['unknownauthor'] = '알 수 없는 저자'; $lang['unknownversion'] = '알 수 없는 버전'; @@ -31,6 +29,8 @@ $lang['js']['display_viewoptions'] = '보기 옵션:'; $lang['js']['display_enabled'] = '활성화됨'; $lang['js']['display_disabled'] = '비활성화됨'; $lang['js']['display_updatable'] = '업데이트할 수 있음'; +$lang['js']['close'] = '클릭하여 닫기'; +$lang['js']['filter'] = '업데이트가 가능한 확장 기능만 보여주기'; $lang['search_for'] = '확장 기능 검색:'; $lang['search'] = '검색'; $lang['extensionby'] = '<strong>%s</strong> (저자 %s)'; @@ -69,16 +69,14 @@ $lang['msg_enabled'] = '%s 플러그인이 활성화되었습니다'; $lang['msg_disabled'] = '%s 플러그인이 비활성화되었습니다'; $lang['msg_delete_success'] = '%s 확장 기능이 제거되었습니다'; $lang['msg_delete_failed'] = '%s 확장 기능 제거에 실패했습니다'; -$lang['msg_template_install_success'] = '%s 템플릿을 성공적으로 설치했습니다'; -$lang['msg_template_update_success'] = '%s 템플릿을 성공적으로 업데이트했습니다'; -$lang['msg_plugin_install_success'] = '%s 플러그인을 성공적으로 설치했습니다'; -$lang['msg_plugin_update_success'] = '%s 플러그인을 성공적으로 업데이트했습니다'; $lang['msg_upload_failed'] = '파일 올리기에 실패했습니다'; $lang['missing_dependency'] = '의존성을 잃었거나 비활성화되어 있습니다: %s'; $lang['security_issue'] = '보안 문제: %s'; $lang['security_warning'] = '보안 경고: %s'; $lang['wrong_folder'] = '플러그인이 올바르지 않게 설치됨: 플러그인 디렉터리를 "%s"에서 "%s"로 이름을 바꾸세요.'; -$lang['url_change'] = "URL이 바뀜: 다운로드 URL이 최신 다운로드 이래로 바뀌었습니다. 확장 기능을 업데이트하기 전에 새 URL이 올바른지 확인하세요.\n새 URL: %s\n오래된 URL: %s"; +$lang['url_change'] = 'URL이 바뀜: 다운로드 URL이 최신 다운로드 이래로 바뀌었습니다. 확장 기능을 업데이트하기 전에 새 URL이 올바른지 확인하세요. +새 URL: %s +오래된 URL: %s'; $lang['error_badurl'] = 'URL은 http나 https로 시작해야 합니다'; $lang['error_dircreate'] = '다운로드를 받을 임시 폴더를 만들 수 없습니다'; $lang['error_download'] = '파일을 다운로드할 수 없습니다: %s'; @@ -94,3 +92,6 @@ $lang['install_url'] = 'URL에서 설치:'; $lang['install_upload'] = '확장 기능 올리기:'; $lang['repo_error'] = '플러그인 저장소에 연결할 수 없습니다. 서버가 www.dokuwiki.org에 연결할 수 있는지 확인하고 프록시 설정을 확인하세요.'; $lang['nossl'] = 'PHP가 SSL 지원을 하지 않는 것으로 보입니다. 많은 도쿠위키 확장 기능의 다운로드가 작동하지 않을 것입니다.'; +$lang['popularity_high'] = '가장 유명한 확장 기능 중 하나'; +$lang['popularity_medium'] = '꽤 유명한 확장 기능'; +$lang['details'] = '세부 정보'; diff --git a/lib/plugins/extension/lang/pt-br/lang.php b/lib/plugins/extension/lang/pt-br/lang.php index 797a0f2b8..a80eb78ff 100644 --- a/lib/plugins/extension/lang/pt-br/lang.php +++ b/lib/plugins/extension/lang/pt-br/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Daniel Dias Rodrigues <danieldiasr@gmail.com> * @author Jeann <wjeann@gmail.com> * @author Eduardo Mozart de Oliveira <eduardomozart182@gmail.com> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> @@ -32,6 +33,8 @@ $lang['js']['display_viewoptions'] = 'Opções de visualização:'; $lang['js']['display_enabled'] = 'habilitado'; $lang['js']['display_disabled'] = 'desabilitado'; $lang['js']['display_updatable'] = 'atualizável'; +$lang['js']['close'] = 'Click para fechar'; +$lang['js']['filter'] = 'Mostrar apenas extensões atualizáveis'; $lang['search_for'] = 'Procurar extensão:'; $lang['search'] = 'Procurar'; $lang['extensionby'] = '<strong>%s</strong> de %s'; @@ -70,9 +73,12 @@ $lang['msg_enabled'] = 'Extensão %s habilitada'; $lang['msg_disabled'] = 'Extensão %s desabilitada'; $lang['msg_delete_success'] = 'Extensão %s desinstalada'; $lang['msg_delete_failed'] = 'Falha na desinstalação da extensão %s'; +$lang['msg_install_success'] = 'A extensão %s foi instalada com sucesso'; +$lang['msg_update_success'] = 'A extensão %s foi atualizada com sucesso'; $lang['msg_upload_failed'] = 'Subida do arquivo falhou'; $lang['msg_nooverwrite'] = 'A extensão %s já existe e, portanto, não está sendo substituída; para substituir, marque a opção de substituição'; $lang['missing_dependency'] = 'Dependência faltante ou desabilitada: %s'; +$lang['found_conflict'] = 'Esta extensão está marcada como conflitante com as seguintes extensões instaladas: %s'; $lang['security_issue'] = 'Problema com segurança: %s'; $lang['security_warning'] = 'Aviso sobre segurança: %s'; $lang['update_message'] = 'Mensagem de atualização: %s'; @@ -86,6 +92,17 @@ $lang['error_download'] = 'Impossável baixar o arquivo: %s'; $lang['error_decompress'] = 'Impossável descompimir o arquivo baixado. Isso pode ser resultado de um download ruim que neste caso pode ser tentado novamente; ou o formato da compressão pode ser desconhecido, neste caso baixe e instale manualmente.'; $lang['error_findfolder'] = 'Impossíl identificar a extensão do diretório, você deve baixar e instalar manualmente.'; $lang['error_copy'] = 'Houve um erro de cópia de arquivo durante a tentativa de instalar os arquivos para o diretório <em>%s</em> : o disco pode estar cheio ou as permissões de acesso ao arquivo podem estar incorreta. Isso pode ter resultado em um plugin parcialmente instalado e deixar a sua instalação wiki instável'; +$lang['error_copy_read'] = 'Não foi possível ler o diretório %s'; +$lang['error_copy_mkdir'] = 'Não foi possível criar o diretório %s'; +$lang['error_copy_copy'] = 'Não foi possível copiar %s para %s'; +$lang['error_archive_read'] = 'Não foi possível abrir o arquivo %s para leitura'; +$lang['error_archive_extract'] = 'Não foi possível extrair o arquivo %s: %s'; +$lang['error_uninstall_protected'] = 'A extensão %s está protegida e não pode ser desinstalada'; +$lang['error_uninstall_dependants'] = 'A extensão %s ainda é necessária para %s e, portanto, não pode ser desinstalada'; +$lang['error_disable_protected'] = 'A extensão %s está protegida e não pode ser desabilitada'; +$lang['error_disable_dependants'] = 'A extensão %s ainda é necessária por %s e, portanto, não pode ser desabilitada'; +$lang['error_nourl'] = 'Não foi possível encontrar nenhuma URL de download para a extensão %s'; +$lang['error_notinstalled'] = 'A extensão %s não está instalada'; $lang['error_alreadyenabled'] = 'A extensão %s já foi habilitada'; $lang['error_alreadydisabled'] = 'A extensão %s já foi desabilitada'; $lang['error_minphp'] = 'A extensão %s requer pelo menos PHP %s, mas este wiki está executando PHP %s'; diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php index 6fa37b2b2..eba2af38e 100644 --- a/lib/plugins/extension/lang/zh/lang.php +++ b/lib/plugins/extension/lang/zh/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Luna Shirase <fwits@foxmail.com> * @author Mr_Fang <klxf@vip.qq.com> * @author chuachua <oceanynh@gmail.com> * @author Xin <chenxin1034@gmail.com> @@ -21,9 +22,6 @@ $lang['tab_templates'] = '现有模板'; $lang['tab_search'] = '搜索安装'; $lang['tab_install'] = '手动安装'; $lang['notimplemented'] = '未实现的特性'; -$lang['notinstalled'] = '该扩展未安装'; -$lang['alreadyenabled'] = '该扩展已激活'; -$lang['alreadydisabled'] = '该扩展已关闭'; $lang['pluginlistsaveerror'] = '保存插件列表时出现错误'; $lang['unknownauthor'] = '未知作者'; $lang['unknownversion'] = '未知版本'; @@ -39,6 +37,8 @@ $lang['js']['display_viewoptions'] = '查看选项:'; $lang['js']['display_enabled'] = '启用'; $lang['js']['display_disabled'] = '禁用'; $lang['js']['display_updatable'] = '可更新'; +$lang['js']['close'] = '点击关闭'; +$lang['js']['filter'] = '仅显示可更新的插件'; $lang['search_for'] = '搜索扩展'; $lang['search'] = '搜索'; $lang['extensionby'] = '<strong>%s</strong> by %s'; @@ -77,10 +77,6 @@ $lang['msg_enabled'] = '插件 %s 已启用'; $lang['msg_disabled'] = '插件 %s 已禁用'; $lang['msg_delete_success'] = '%s 扩展没有安装'; $lang['msg_delete_failed'] = '卸载扩展 %s 失败'; -$lang['msg_template_install_success'] = '模板 %s 安装成功'; -$lang['msg_template_update_success'] = '模板 %s 更新成功'; -$lang['msg_plugin_install_success'] = '插件 %s 安装成功'; -$lang['msg_plugin_update_success'] = '插件 %s 更新成功'; $lang['msg_upload_failed'] = '上传文件失败'; $lang['msg_nooverwrite'] = '扩展名 %s 已存在,因此不会被覆盖;要覆盖,请选中覆盖选项。'; $lang['missing_dependency'] = '缺少或者被禁用的依赖: %s'; @@ -88,7 +84,9 @@ $lang['security_issue'] = '安全问题: %s'; $lang['security_warning'] = '安全警告: %s'; $lang['update_message'] = '更新提醒: %s'; $lang['wrong_folder'] = '扩展安装错误:请将扩展目录 "%s" 重命名为 "%s"。'; -$lang['url_change'] = "URL 已改变:自上次下载以来的下载 URL 已经改变。请在更新扩展前检查新 URL 是否有效。\n新的:%s\n旧的:%s"; +$lang['url_change'] = 'URL 已改变:自上次下载以来的下载 URL 已经改变。请在更新扩展前检查新 URL 是否有效。 +新的:%s +旧的:%s'; $lang['error_badurl'] = 'URL 应当以 http 或者 https 作为开头'; $lang['error_dircreate'] = '无法创建用于保存下载的临时文件夹'; $lang['error_download'] = '无法下载文件:%s'; diff --git a/lib/plugins/extension/remote.php b/lib/plugins/extension/remote.php new file mode 100644 index 000000000..4eb84a829 --- /dev/null +++ b/lib/plugins/extension/remote.php @@ -0,0 +1,149 @@ +<?php + +use dokuwiki\Extension\RemotePlugin; +use dokuwiki\plugin\extension\Extension; +use dokuwiki\plugin\extension\ExtensionApiResponse; +use dokuwiki\plugin\extension\Installer; +use dokuwiki\plugin\extension\Local; +use dokuwiki\plugin\extension\Repository; +use dokuwiki\Remote\AccessDeniedException; + +/** + * DokuWiki Plugin extension (Remote Component) + * + * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html + * @author Andreas Gohr <andi@splitbrain.org> + */ +class remote_plugin_extension extends RemotePlugin +{ + /** + * List installed extensions + * + * This lists all installed extensions. The list is not sorted in any way. + * + * @return ExtensionApiResponse[] The list of installed extensions and their details + */ + public function list() + { + if (!auth_isadmin()) { + throw new AccessDeniedException('Only admins are allowed to access extensions', 114); + } + + $extensions = (new Local())->getExtensions(); + Repository::getInstance()->initExtensions(array_keys($extensions)); + + return array_values( + array_map( + static fn($extension) => new ExtensionApiResponse($extension), + $extensions + ) + ); + } + + /** + * Search for extensions in the repository + * + * @param string $query The keyword(s) to search for + * @param int $max Maximum number of results (default 10) + * @return ExtensionApiResponse[] List of matching extensions + */ + public function search($query, $max = 10) + { + if (!auth_isadmin()) { + throw new AccessDeniedException('Only admins are allowed to access extensions', 114); + } + + $repo = Repository::getInstance(); + $result = $repo->searchExtensions($query); + + if ($max > 0) { + $result = array_slice($result, 0, $max); + } + + return array_values( + array_map( + static fn($extension) => new ExtensionApiResponse($extension), + $result + ) + ); + } + + /** + * Enable a specific extension + * + * @param string $extension Extension ID to enable + * @return bool Success status + */ + public function enable($extension) + { + if (!auth_isadmin()) { + throw new AccessDeniedException('Only admins are allowed to manage extensions', 114); + } + + $ext = Extension::createFromId($extension); + $ext->enable(); + return true; + } + + /** + * Disable a specific extension + * + * @param string $extension Extension ID to disable + * @return bool Success status + */ + public function disable($extension) + { + if (!auth_isadmin()) { + throw new AccessDeniedException('Only admins are allowed to manage extensions', 114); + } + + $ext = Extension::createFromId($extension); + $ext->disable(); + return true; + } + + /** + * Install a specific extension + * + * This will also install dependencies, so more than the given extension may be installed. + * + * @param string $extension Extension ID or download URL + * @return string[] List of installed extensions + */ + public function install($extension) + { + if (!auth_isadmin()) { + throw new AccessDeniedException('Only admins are allowed to manage extensions', 114); + } + + $installer = new Installer(true); + $installer->installFromId($extension); + + return array_keys( + array_filter( + $installer->getProcessed(), + static fn($status) => ( + $status == Installer::STATUS_INSTALLED || $status == Installer::STATUS_UPDATED + ) + ) + ); + } + + /** + * Uninstall a specific extension + * + * @param string $extension Extension ID to uninstall + * @return bool Success status + */ + public function uninstall($extension) + { + if (!auth_isadmin()) { + throw new AccessDeniedException('Only admins are allowed to manage extensions', 114); + } + + $ext = Extension::createFromId($extension); + $installer = new Installer(); + $installer->uninstall($ext); + return true; + } +} diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 5337aea30..3993c656a 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -66,10 +66,11 @@ section.extension { display: grid; - grid-template-columns: @thumbwidth auto 15em; + grid-template-columns: @thumbwidth auto 22%; grid-template-rows: repeat(4, auto); margin-bottom: 1em; border-bottom: 1px solid @ini_border; + word-break: break-word; > .screenshot { grid-column: 1; @@ -132,6 +133,7 @@ } .version { + white-space: nowrap; } } @@ -154,9 +156,14 @@ align-items: end; gap: 0.5em; - .version { + .available { line-height: 1.2; margin-bottom: 1em; + text-align: right; + + .version { + white-space: nowrap; + } } } diff --git a/lib/plugins/logviewer/lang/de-informal/intro.txt b/lib/plugins/logviewer/lang/de-informal/intro.txt new file mode 100644 index 000000000..147b84731 --- /dev/null +++ b/lib/plugins/logviewer/lang/de-informal/intro.txt @@ -0,0 +1,5 @@ +====== Protokolle anzeigen ====== + +Diese Oberfläche ermöglicht es dir, die verschiedenen Protokolle einzusehen, die von DokuWiki erstellt werden. Normalerweise sollte hier nicht viel zu sehen sein (das hängt von deinen [[doku>config:dontlog|Protokoll-Einstellungen]] ab). Wenn jedoch etwas schiefläuft, stehen die Chancen gut, dass du hier nützliche Informationen zum Problem findest. + +Bitte beachte, dass **Protokolldateien sensible Informationen** wie Passwörter, Pfade oder andere vertrauliche Daten enthalten können. Achte darauf, die Protokolle entsprechend zu schwärzen, bevor du sie im Forum oder in Fehlerberichten veröffentlichst!
\ No newline at end of file diff --git a/lib/plugins/logviewer/lang/de-informal/lang.php b/lib/plugins/logviewer/lang/de-informal/lang.php new file mode 100644 index 000000000..2bf0774b5 --- /dev/null +++ b/lib/plugins/logviewer/lang/de-informal/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (https://www.gnu.org/licenses/gpl.html) + * + * @author andreash <aeheil@gmail.com> + */ +$lang['menu'] = 'Protokolleinträge anzeigen'; +$lang['date'] = 'Datum'; +$lang['js']['filter'] = 'Protokolleinträge filtern'; diff --git a/lib/plugins/logviewer/lang/de-informal/nolog.txt b/lib/plugins/logviewer/lang/de-informal/nolog.txt new file mode 100644 index 000000000..8692823bd --- /dev/null +++ b/lib/plugins/logviewer/lang/de-informal/nolog.txt @@ -0,0 +1 @@ +Es liegen keine Protokolleinträge für den ausgewählten Tag und das ausgewählte Modul vor.
\ No newline at end of file diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index dedd28193..1406a3907 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -110,9 +110,9 @@ class helper_plugin_popularity extends Dokuwiki_Plugin * @return array * @see searchCountCallback */ - protected function initEmptySearchList() + public function initEmptySearchList() { - return $list = array_fill_keys([ + return array_fill_keys([ 'file_count', 'file_size', 'file_max', @@ -279,7 +279,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin /** * Callback to search and count the content of directories in DokuWiki * - * @param array &$data Reference to the result data structure + * @param array &$data Reference to the result data structure, init with initEmptySearchList() * @param string $base Base usually $conf['datadir'] * @param string $file current file or directory relative to $base * @param string $type Type either 'd' for directory or 'f' for file diff --git a/lib/tpl/dokuwiki/lang/de-informal/lang.php b/lib/tpl/dokuwiki/lang/de-informal/lang.php index 7ac48b2f0..a43fdd65e 100644 --- a/lib/tpl/dokuwiki/lang/de-informal/lang.php +++ b/lib/tpl/dokuwiki/lang/de-informal/lang.php @@ -3,9 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author andreash <aeheil@gmail.com> * @author MaWi <drmaxxis@gmail.com> * @author F. Mueller-Donath <j.felix@mueller-donath.de> */ +$lang['home'] = 'Startseite'; $lang['__background_site__'] = 'Farbe für den Seitenhintergrund (hinter dem Inhaltsbereich)'; $lang['__link__'] = 'Allgemeine Linkfarbe'; $lang['__existing__'] = 'Farbe für Links zu existierenden Seiten'; diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 18e58e0f3..cd40aede8 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -337,12 +337,12 @@ "source": { "type": "git", "url": "https://github.com/alphp/strftime.git", - "reference": "88e98f00b5d9247e8168c1eb528ab138fbf743d2" + "reference": "dcd30543db16c9b4ba095f6bf32ac16f15eb9448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alphp/strftime/zipball/88e98f00b5d9247e8168c1eb528ab138fbf743d2", - "reference": "88e98f00b5d9247e8168c1eb528ab138fbf743d2", + "url": "https://api.github.com/repos/alphp/strftime/zipball/dcd30543db16c9b4ba095f6bf32ac16f15eb9448", + "reference": "dcd30543db16c9b4ba095f6bf32ac16f15eb9448", "shasum": "" }, "require": { @@ -354,7 +354,7 @@ "suggest": { "ext-intl": "For proper locale aware output" }, - "time": "2024-01-26T18:19:38+00:00", + "time": "2025-05-20T20:04:36+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index cd710941f..7a6b0599c 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'dokuwiki/dokuwiki', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '59a6ba95c8c7b11b3a1e341c41942ec083784be0', + 'reference' => '396ae2b1e4ac18cd8a3de8ba055f983a807687dc', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -22,7 +22,7 @@ 'dokuwiki/dokuwiki' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '59a6ba95c8c7b11b3a1e341c41942ec083784be0', + 'reference' => '396ae2b1e4ac18cd8a3de8ba055f983a807687dc', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -79,7 +79,7 @@ 'php81_bc/strftime' => array( 'pretty_version' => 'dev-fallback-intl', 'version' => 'dev-fallback-intl', - 'reference' => '88e98f00b5d9247e8168c1eb528ab138fbf743d2', + 'reference' => 'dcd30543db16c9b4ba095f6bf32ac16f15eb9448', 'type' => 'library', 'install_path' => __DIR__ . '/../php81_bc/strftime', 'aliases' => array(), diff --git a/vendor/php81_bc/strftime/.gitignore b/vendor/php81_bc/strftime/.gitignore index a5b812048..659557e1b 100644 --- a/vendor/php81_bc/strftime/.gitignore +++ b/vendor/php81_bc/strftime/.gitignore @@ -23,6 +23,7 @@ Thumbs.db ####################### /.vscode /composer.lock +.phpunit.result.cache # vim *~ *.swp diff --git a/vendor/php81_bc/strftime/src/IntlLocaleFormatter.php b/vendor/php81_bc/strftime/src/IntlLocaleFormatter.php index 5bb62e425..783a0c103 100644 --- a/vendor/php81_bc/strftime/src/IntlLocaleFormatter.php +++ b/vendor/php81_bc/strftime/src/IntlLocaleFormatter.php @@ -14,9 +14,9 @@ class IntlLocaleFormatter extends AbstractLocaleFormatter /** @var string[] strftime to ICU placeholders */ protected $formats = [ - '%a' => 'EEE', // An abbreviated textual representation of the day Sun through Sat + '%a' => 'ccc', // An abbreviated textual representation of the day Sun through Sat '%A' => 'EEEE', // A full textual representation of the day Sunday through Saturday - '%b' => 'MMM', // Abbreviated month name, based on the locale Jan through Dec + '%b' => 'LLL', // Abbreviated month name, based on the locale Jan through Dec '%B' => 'MMMM', // Full month name, based on the locale January through December '%h' => 'MMM', // Abbreviated month name, based on the locale (an alias of %b) Jan through Dec ]; diff --git a/vendor/php81_bc/strftime/src/php-8.1-strftime.php b/vendor/php81_bc/strftime/src/php-8.1-strftime.php index f8a8c79cd..75a6bb351 100644 --- a/vendor/php81_bc/strftime/src/php-8.1-strftime.php +++ b/vendor/php81_bc/strftime/src/php-8.1-strftime.php @@ -2,10 +2,13 @@ namespace PHP81_BC; use DateTime; - use DateTimeInterface; use DateTimeZone; + use DateTimeInterface; use Exception; use InvalidArgumentException; + use Locale; + use PHP81_BC\strftime\DateLocaleFormatter; + use PHP81_BC\strftime\IntlLocaleFormatter; /** * Locale-formatted strftime using IntlDateFormatter (PHP 8.1 compatible) @@ -22,7 +25,9 @@ * * @param string $format Date format * @param integer|string|DateTime $timestamp Timestamp + * @param string|null $locale locale * @return string + * @throws InvalidArgumentException * @author BohwaZ <https://bohwaz.net/> */ function strftime (string $format, $timestamp = null, ?string $locale = null) : string { @@ -34,15 +39,15 @@ } catch (Exception $e) { throw new InvalidArgumentException('$timestamp argument is neither a valid UNIX timestamp, a valid date-time string or a DateTime object.', 0, $e); } - } - $timestamp->setTimezone(new DateTimeZone(date_default_timezone_get())); + $timestamp->setTimezone(new DateTimeZone(date_default_timezone_get())); + } if (class_exists('\\IntlDateFormatter') && !isset($_SERVER['STRFTIME_NO_INTL'])) { - $locale = \Locale::canonicalize($locale ?? setlocale(LC_TIME, '0')); - $locale_formatter = new \PHP81_BC\strftime\IntlLocaleFormatter($locale); + $locale = Locale::canonicalize($locale ?? (Locale::getDefault() ?? setlocale(LC_TIME, '0'))); + $locale_formatter = new IntlLocaleFormatter($locale); } else { - $locale_formatter = new \PHP81_BC\strftime\DateLocaleFormatter($locale); + $locale_formatter = new DateLocaleFormatter($locale); } // Same order as https://www.php.net/manual/en/function.strftime.php @@ -151,7 +156,7 @@ case '#': case '-': // remove leading zeros but keep last char if also zero - return preg_replace('/^0+(?=.)/', '', $result); + return preg_replace('/^[0\s]+(?=.)/', '', $result); } return $result; |