From: <var...@us...> - 2022-01-03 10:58:18
|
Revision: 10808 http://sourceforge.net/p/phpwiki/code/10808 Author: vargenau Date: 2022-01-03 10:58:16 +0000 (Mon, 03 Jan 2022) Log Message: ----------- UpLoad plugin: allow more filenames (e.g. with Chinese characters) Modified Paths: -------------- trunk/lib/plugin/UpLoad.php trunk/lib/stdlib.php trunk/locale/de/LC_MESSAGES/phpwiki.mo trunk/locale/es/LC_MESSAGES/phpwiki.mo trunk/locale/fr/LC_MESSAGES/phpwiki.mo trunk/locale/it/LC_MESSAGES/phpwiki.mo trunk/locale/it/pgsrc/NoteDiRilascio trunk/locale/ja/LC_MESSAGES/phpwiki.mo trunk/locale/nl/LC_MESSAGES/phpwiki.mo trunk/locale/po/de.po trunk/locale/po/es.po trunk/locale/po/fr.po trunk/locale/po/it.po trunk/locale/po/ja.po trunk/locale/po/nl.po trunk/locale/po/phpwiki.pot trunk/locale/po/sv.po trunk/locale/po/zh.po trunk/locale/sv/LC_MESSAGES/phpwiki.mo trunk/locale/zh/LC_MESSAGES/phpwiki.mo trunk/pgsrc/ReleaseNotes Modified: trunk/lib/plugin/UpLoad.php =================================================================== --- trunk/lib/plugin/UpLoad.php 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/lib/plugin/UpLoad.php 2022-01-03 10:58:16 UTC (rev 10808) @@ -177,12 +177,6 @@ $sanified_userfile_name = sanify_filename($userfile_name); - if (preg_match("/[^._a-zA-Z0-9- ]/", strip_accents($sanified_userfile_name))) { - $err_header->pushContent(HTML::p(_("Invalid filename."))); - $message->pushContent($err_header); - return HTML($message, $form); - } - if (file_exists($file_dir . $sanified_userfile_name)) { $err_header->pushContent(HTML::p(fmt("There is already a file with name “%s” uploaded.", $sanified_userfile_name))); $message->pushContent($err_header); Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/lib/stdlib.php 2022-01-03 10:58:16 UTC (rev 10808) @@ -2117,18 +2117,6 @@ } /** - * Remove accents from given text. - */ -function strip_accents($text) -{ - $res = utf8_decode($text); - $res = strtr($res, - utf8_decode('àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ'), - 'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY'); - return utf8_encode($res); -} - -/** * Sanify filename: * - remove spaces from the beginning and end * - replace multiple spaces by single space Modified: trunk/locale/de/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/es/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/it/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/it/pgsrc/NoteDiRilascio =================================================================== --- trunk/locale/it/pgsrc/NoteDiRilascio 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/it/pgsrc/NoteDiRilascio 2022-01-03 10:58:16 UTC (rev 10808) @@ -1,4 +1,4 @@ -Date: Thu, 30 Dec 2021 10:43:13 +0000 +Date: Mon, 3 Jan 2022 11:57:23 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.6.0) Content-Type: application/x-phpwiki; pagename=NoteDiRilascio; @@ -8,7 +8,7 @@ <<CreateToc with_toclink||=1 headers||=1,2,3 width=300px position=right>> -== 1.6.1 2021-12-XX Marc-Etienne Vargenau == +== 1.6.1 2022-01-XX Marc-Etienne Vargenau == This release makes ~PhpWiki compatible with PHP 8.1. ##READONLY## is renamed as ##ISREADONLY##, since ##readonly## is now a keyword in PHP 8.1. @@ -29,6 +29,7 @@ === Plugins === * Chart plugin: new argument “legend” +* UpLoad plugin: allow more filenames (e.g. with Chinese characters) * ~PreferencesInfo plugin removed * ~CategoryPage plugin removed, categories are better created with the button in the toolbar Modified: trunk/locale/ja/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/nl/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/po/de.po =================================================================== --- trunk/locale/po/de.po 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/po/de.po 2022-01-03 10:58:16 UTC (rev 10808) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 15:35+0100\n" +"POT-Creation-Date: 2022-01-03 11:54+0100\n" "PO-Revision-Date: 2000-10-31 02:23+0200\n" "Last-Translator: Reini Urban <ru...@x-...>, Carsten Klapp " "<car...@us...>, Helmer Pardun <pardunpress@t-online." @@ -3261,9 +3261,6 @@ msgid "Sorry but this file is too big." msgstr "Leider ist diese Datei zu groß." -msgid "Invalid filename." -msgstr "Ungültiger Dateiname." - #, php-format msgid "There is already a file with name “%s” uploaded." msgstr "Es existiert schon eine gleichnamige, hochgeladene Datei »%s«." @@ -5813,6 +5810,9 @@ msgid "Edit this page" msgstr "Diese Seite bearbeiten" +#~ msgid "Invalid filename." +#~ msgstr "Ungültiger Dateiname." + #~ msgid "Deleted" #~ msgstr "Gelöscht" Modified: trunk/locale/po/es.po =================================================================== --- trunk/locale/po/es.po 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/po/es.po 2022-01-03 10:58:16 UTC (rev 10808) @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 15:35+0100\n" +"POT-Creation-Date: 2022-01-03 11:54+0100\n" "PO-Revision-Date: 2000-02-01 00:50-0500\n" "Last-Translator: Pablo Roca <pr...@cl...>\n" "Language-Team: \n" @@ -3185,9 +3185,6 @@ msgid "Sorry but this file is too big." msgstr "" -msgid "Invalid filename." -msgstr "Nombre de archivo inválido." - #, php-format msgid "There is already a file with name “%s” uploaded." msgstr "" @@ -5684,6 +5681,9 @@ msgid "Edit this page" msgstr "Corrija esta página" +#~ msgid "Invalid filename." +#~ msgstr "Nombre de archivo inválido." + #~ msgid "Deleted" #~ msgstr "Borrada" Modified: trunk/locale/po/fr.po =================================================================== --- trunk/locale/po/fr.po 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/po/fr.po 2022-01-03 10:58:16 UTC (rev 10808) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 15:35+0100\n" +"POT-Creation-Date: 2022-01-03 11:54+0100\n" "PO-Revision-Date: 2004-06-22 21:10+0200\n" "Last-Translator: Pierrick Meignen <mei...@wa...>, Roland " "Trique <rol...@fr...>, Stéphane Gourichon <stephane.gourichon@lip6." @@ -3244,9 +3244,6 @@ msgid "Sorry but this file is too big." msgstr "Désolé, mais le fichier est trop gros." -msgid "Invalid filename." -msgstr "Nom de fichier incorrect." - #, php-format msgid "There is already a file with name “%s” uploaded." msgstr "Un fichier portant le nom « %s » existe déjà." @@ -5806,6 +5803,9 @@ msgid "Edit this page" msgstr "Modifier cette page" +#~ msgid "Invalid filename." +#~ msgstr "Nom de fichier incorrect." + #~ msgid "Deleted" #~ msgstr "Supprimé" Modified: trunk/locale/po/it.po =================================================================== --- trunk/locale/po/it.po 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/po/it.po 2022-01-03 10:58:16 UTC (rev 10808) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 15:35+0100\n" +"POT-Creation-Date: 2022-01-03 11:54+0100\n" "PO-Revision-Date: 2005-02-12 16:23+0100\n" "Last-Translator: Antonio Bonifati ant[(at)]monitor.deis.unical.it\n" "Language-Team: \n" @@ -3162,9 +3162,6 @@ msgid "Sorry but this file is too big." msgstr "" -msgid "Invalid filename." -msgstr "" - #, php-format msgid "There is already a file with name “%s” uploaded." msgstr "" Modified: trunk/locale/po/ja.po =================================================================== --- trunk/locale/po/ja.po 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/po/ja.po 2022-01-03 10:58:16 UTC (rev 10808) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 15:35+0100\n" +"POT-Creation-Date: 2022-01-03 11:54+0100\n" "PO-Revision-Date: 2003-06-07 09:01+0900\n" "Last-Translator: Tadashi Jokagi <web...@el...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -3148,9 +3148,6 @@ msgid "Sorry but this file is too big." msgstr "" -msgid "Invalid filename." -msgstr "" - #, php-format msgid "There is already a file with name “%s” uploaded." msgstr "" Modified: trunk/locale/po/nl.po =================================================================== --- trunk/locale/po/nl.po 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/po/nl.po 2022-01-03 10:58:16 UTC (rev 10808) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 15:35+0100\n" +"POT-Creation-Date: 2022-01-03 11:54+0100\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" @@ -3154,9 +3154,6 @@ msgid "Sorry but this file is too big." msgstr "" -msgid "Invalid filename." -msgstr "" - #, php-format msgid "There is already a file with name “%s” uploaded." msgstr "" Modified: trunk/locale/po/phpwiki.pot =================================================================== --- trunk/locale/po/phpwiki.pot 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/po/phpwiki.pot 2022-01-03 10:58:16 UTC (rev 10808) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki-1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 15:35+0100\n" +"POT-Creation-Date: 2022-01-03 11:54+0100\n" "PO-Revision-Date: 2002-12-14 17:51-0500\n" "Last-Translator: Reini Urban <ru...@us...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -3148,9 +3148,6 @@ msgid "Sorry but this file is too big." msgstr "" -msgid "Invalid filename." -msgstr "" - #, php-format msgid "There is already a file with name “%s” uploaded." msgstr "" Modified: trunk/locale/po/sv.po =================================================================== --- trunk/locale/po/sv.po 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/po/sv.po 2022-01-03 10:58:16 UTC (rev 10808) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 15:35+0100\n" +"POT-Creation-Date: 2022-01-03 11:54+0100\n" "PO-Revision-Date: 2001-01-27 01:58+0200\n" "Last-Translator: Jon Åslund <jo...@he...>\n" "Language-Team: \n" @@ -3149,9 +3149,6 @@ msgid "Sorry but this file is too big." msgstr "" -msgid "Invalid filename." -msgstr "" - #, php-format msgid "There is already a file with name “%s” uploaded." msgstr "" Modified: trunk/locale/po/zh.po =================================================================== --- trunk/locale/po/zh.po 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/locale/po/zh.po 2022-01-03 10:58:16 UTC (rev 10808) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.6.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-02 15:35+0100\n" +"POT-Creation-Date: 2022-01-03 11:54+0100\n" "PO-Revision-Date: 2004-04-21 10:08+0800\n" "Last-Translator: DruryL <dr...@us...>\n" "Language-Team: DruryL <dr...@us...>\n" @@ -3158,9 +3158,6 @@ msgid "Sorry but this file is too big." msgstr "抱歉,因為檔案太大了." -msgid "Invalid filename." -msgstr "" - #, php-format msgid "There is already a file with name “%s” uploaded." msgstr "已經有個名為 %s 的檔案存在." Modified: trunk/locale/sv/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2022-01-03 10:48:42 UTC (rev 10807) +++ trunk/pgsrc/ReleaseNotes 2022-01-03 10:58:16 UTC (rev 10808) @@ -1,4 +1,4 @@ -Date: Thu, 30 Dec 2021 10:43:13 +0000 +Date: Mon, 3 Jan 2022 11:57:23 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.6.0) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -8,7 +8,7 @@ <<CreateToc with_toclink||=1 headers||=1,2,3 width=300px position=right>> -== 1.6.1 2021-12-XX Marc-Etienne Vargenau == +== 1.6.1 2022-01-XX Marc-Etienne Vargenau == This release makes ~PhpWiki compatible with PHP 8.1. ##READONLY## is renamed as ##ISREADONLY##, since ##readonly## is now a keyword in PHP 8.1. @@ -29,6 +29,7 @@ === Plugins === * Chart plugin: new argument “legend” +* UpLoad plugin: allow more filenames (e.g. with Chinese characters) * ~PreferencesInfo plugin removed * ~CategoryPage plugin removed, categories are better created with the button in the toolbar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |