Skip to content

Commit

Permalink
Merge branch 'master' into Item13525
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jul 31, 2015
2 parents 77a5011 + 5bfbfd7 commit 8a1a0a6
Show file tree
Hide file tree
Showing 31 changed files with 281 additions and 217 deletions.
41 changes: 41 additions & 0 deletions UnitTestContrib/test/unit/RequestCacheTests.pm
Expand Up @@ -5,6 +5,7 @@ package RequestCacheTests;
use FoswikiTestCase;
our @ISA = qw( FoswikiTestCase );

use utf8;
use Foswiki::Request;
use Foswiki::Request::Cache;
use File::Temp;
Expand Down Expand Up @@ -62,6 +63,46 @@ sub test_simpleparams {
$this->assert_str_equals( "puke", $req->action() );
}

# Test that utf8 parameters are cached
sub test_simpleparams_utf8 {
my $this = shift;
my %init = (
'posvětit' => 'vústěnív',
'vústění' => ['měnívat'],
multi => [qw(vú mě)],
'undef' => undef,
multi_undef => [],
);

#my $pathinfo = Foswiki::urlEncode("/vústění/posvětit");
my $pathinfo = Encode::encode_utf8("/vústění/posvětit");
my $req = new Foswiki::Request( \%init );
$req->method("BURP");
$req->path_info($pathinfo);
$req->action("puke");
my $cache = new Foswiki::Request::Cache();
my $uid = $cache->save($req);
$this->assert($uid);
$req = new Foswiki::Request('');
$cache->load( $uid, $req );
my @values = $req->multi_param('multi');
$this->assert_str_equals( 2, scalar @values, 'Wrong number of values' );
$this->assert_str_equals( '', $values[0], 'Wrong parameter value' );
$this->assert_str_equals( '', $values[1], 'Wrong parameter value' );

# Item12956: undef parameters are written out as "empty".
$this->assert_str_equals(
'',
scalar $req->param('undef'),
'Wrong parameter value'
);
@values = $req->multi_param('multi_undef');
$this->assert_str_equals( 0, scalar @values, 'Wrong parameter value' );
$this->assert_str_equals( "BURP", $req->method() );
$this->assert_str_equals( $pathinfo, $req->path_info() );
$this->assert_str_equals( "puke", $req->action() );
}

# Test that file uploads are cached
# Item12367: make sure that a filename containing RFC 3986 reserved characters
# works ('%' must be reserved by all implementations of percent encoding,
Expand Down
14 changes: 6 additions & 8 deletions core/data/Main/AdminGroup.txt
@@ -1,18 +1,16 @@
%META:TOPICINFO{author="ProjectContributor" date="1421366007" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1438294756" format="1.1" version="1"}%
%META:TOPICPARENT{name="WikiGroups"}%

%INCLUDE{"%USERSWEB%.AdminUser" section="sudo_login"}%

%IF{"(NOT defined GROUP) OR $GROUP = ''" then="" else="<!--"}%
%IF{"(NOT defined GROUP) OR $GROUP = ''" then='
<sticky><div class="foswikiNotification"></sticky>
*How to add the first administrator* %BR%
If you haven't previously set up an administrator, follow these steps:
* *Note:* This help text will disappear once you have added a user to this group, so read it all before adding your first user.
%INCLUDE{"%SYSTEMWEB%.InstallationGuide" section="addadmin"}%
<sticky></div></sticky>
%IF{"(NOT defined GROUP) OR $GROUP = ''" then="" else="-->"}%
If you haven\'t previously set up an administrator, follow these steps: (*Note:* This help text will disappear once you have added a user to this group.)
$percntINCLUDE{"%SYSTEMWEB%.InstallationGuide" section="addadmin"}$percnt
<sticky></div></sticky>'}%

Information on Administrators, and on how to use the AdminGroup is found in the [[%SYSTEMWEB%.InstallationGuide#DefineAdminUser][Installation Guide]]
More information on Administrators, and on how to use the AdminGroup is found in the [[%SYSTEMWEB%.InstallationGuide#DefineAdminUser][Installation Guide]]

You can edit this topic to add a description to the AdminGroup

Expand Down
18 changes: 10 additions & 8 deletions core/data/System/InstallationGuide.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1435689678" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1438294756" format="1.1" version="1"}%
%META:TOPICPARENT{name="AdminDocumentationCategory"}%
<noautolink>
---+!! Installation Guide
Expand Down Expand Up @@ -167,7 +167,7 @@ Outgoing e-mail is required for Foswiki to send registration confirmations, noti
<div class='foswikiHelp'>If auto-configure fails to complete, you can use the "Advanced settings" tab to manually configure the e-mail server. You will also need to configure the basic information tab.
Although outgoing email is necessary for user registration, it is not _required_ for Foswiki to run otherwise, so if you are setting up a test installation or don't plan on enabling user registration, you can skip this step.</div>

#StepSeven
#FirstUser
---+++ Step 7: Check Authentication and Register Yourself

Authentication of users means their activity can be tracked, and access to your site can be controlled. *This is particularly important for sites that are publicly accessible on the web.* Foswiki is pre-configured with a flexible and user-friendly authentication set-up that fits most common use-cases. To learn more about this set-up and available alternatives, see [[#AuthenticationOfUsers][User Authentication Options]]. You can also revisit this later and switch to an alternative authentication set-up.
Expand All @@ -180,17 +180,19 @@ If there are problems, see [[#TestingAuthentication][authentication trouble-shoo

#ProtectConfigure
---+++ Step 8: Establish an Administrator user

The last step in your configuration is to create and user with administration rights.

<div class='foswikiHelp'>%T% The steps outlined below are recommended for initial configuration. *You should complete this before closing the browser after the bootstrap process.* Once you close the browser you will lose your temporary admin status. Later on, you can review the further notes below regarding [[#AboutAdminUsers][about administrators]] and [[#WaysToProtectConfigure][options to protect configure]] and consider one of the more restrictive options.</div>

Once the Foswiki bootstrap process is completed and you've logged out, configure will be restricted to Foswiki's "AdminGroup". Add the user you just registered to the administrators group:
1 Go to %IF{"$skin = 'plain'" then="<nop>Main.<nop>AdminGroup in your installation" else="$percntUSERSWEB$percnt.AdminGroup"}%.
1 Scroll down to the "Administration" section and click on "Add Members"
1 Enter your %IF{"$skin = 'plain'" then="$quot<nop>WikiName$quot" else="$percntSYSTEMWEB$percnt.WikiName"}% as defined when you registered yourself in Step 7.
Once the Foswiki bootstrap process is completed and you've logged out, configure will be restricted to Foswiki's "AdminGroup". Therefor you must add the user you just registered to the administrators group.
%STARTSECTION{"addadmin"}%
If you have not yet registered your first user, return to [[%TOPIC%#FirstUser]] and follow the steps to register a user. Once that is completed, return to %IF{"'%BASETOPIC%'='InstallationGuide'" then="
1 Go to %IF{"$skin = 'plain'" then="<nop>Main.<nop>AdminGroup in your installation" else="[[%USERSWEB%.AdminGroup]] (Theses instructions will be there as well)"}%." else="[[%USERSWEB%.AdminGroup]]"}%
1 Scroll down to the "Administration" section and click on "Add Members" link.
* If you do not see the Admistration section, then you don't have authorization to change this group. See %IF{"$skin = 'plain'" then="[[#InternalAdmin]]" else="[[%TOPIC%#InternalAdmin]]"}% for instructions on establishing an _internal admin_ user.
1 Enter your %IF{"$skin = 'plain'" then="$quot<nop>WikiName$quot" else="[[%SYSTEMWEB%.WikiName][WikiName]]"}% as defined when you registered yourself%IF{"'%BASETOPIC%'='%TOPIC%'" then=" in Step 7"}%.
1 Click the Add Member button
1 Return to the <nop>AdminGroup by clicking the group name on the confirmation page and look under "Members" to confirm you have been added.
%ENDSECTION{"addadmin"}%

<div class="foswikiHelp">Foswiki provides multiple ways to protect configure. See [[#AboutAdminUsers]] for more details on how to protect your configuration.</div>

Expand Down
20 changes: 19 additions & 1 deletion core/data/System/PageCaching.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1437799448" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1438296596" format="1.1" version="1"}%
%META:TOPICPARENT{name="AdminDocumentationCategory"}%
---+!! Page Caching
How to get the best from HTML Caching.
Expand Down Expand Up @@ -224,6 +224,24 @@ indexed by =working/sqllite.db=, and topics are cached in the =working/cache=
directory. There is one configuration parameter that can be changed:
* ={Cache}{DBI}{SQLite}{Filename} = '$Foswiki::cfg{WorkingDir}/sqlite.db';=

The SQLite database will grow over time and should be cleaned on occasion to
reclaim space and defragment the data. Clearing the cache with the
=?refresh=all= url option does not reclaim space.

Reclaim space by using the sqlite3 =vacuum= command. Be sure to run it as the
web-server user:

<verbatim>
cd /path/to/foswiki/working
sudo -u www-data sqlite3 sqlite.db "VACUUM;"
</verbatim>

*%X% Caution:* This can run a long time and can be disruptive to the wiki.

You can also manually clear the cache by:
* Removing the =working/sqlite.db= file
* and removing all files in =working/cache= directory

---++++ !MySQL

Before Foswiki is able to use !MySQL for caching, several conditions must be met:
Expand Down
4 changes: 2 additions & 2 deletions core/data/System/ReleaseHistory.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1437968037" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1438303277" format="1.1" version="1"}%
%META:TOPICPARENT{name="AdminDocumentationCategory"}%
---
History of Foswiki
Expand All @@ -9,7 +9,7 @@ History of Foswiki
%TOC%
---++ Foswiki Release 2.0.1 - 27 Jul 2015

Foswiki 2.0.1 was built on 27 Jul 2015. It is a release that contains 20 fixes and 3 enhancements.
Foswiki 2.0.1 was built on 30 Jul 2015. It is a release that contains 27 fixes and 3 enhancements.

---++ Foswiki Release 2.0 - 04 Jul 2015

Expand Down
33 changes: 20 additions & 13 deletions core/data/System/ReleaseNotes02x00.txt
@@ -1,6 +1,6 @@
%META:TOPICINFO{author="ProjectContributor" date="1438198562" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1438303277" format="1.1" version="1"}%
%META:TOPICPARENT{name="ReleaseHistory"}%
---+!! Foswiki Release 2.0.1 RC1
---+!! Foswiki Release 2.0.1 RC2

%TWISTY{showlink="Table of Contents..." hidelink="hide TOC"}%
%TOC%
Expand Down Expand Up @@ -45,7 +45,7 @@ Foswiki is released under the GNU General Public License.
* Foswiki 1.1.9 was built 18 Nov 2013. It is a release that contains 44 fixes and 4 enhancements..
%ENDTWISTY{}%
* Foswiki 2.0.0 was built on 04 Jul 2015. It is a release that contains 312 fixes and 157 enhancements, and closes 48 Feature Requests.
* Foswiki 2.0.1 RC1 was built on 27 Jul 2015. It is a release that contains 20 fixes and 3 enhancements.
* Foswiki 2.0.1 RC2 was built on 30 Jul 2015. It is a release that contains 27 fixes and 3 enhancements.

---++ Pre-installed Extensions

Expand Down Expand Up @@ -941,27 +941,34 @@ Foswiki thanks the Translators for their efforts. If you are interesting in hel
| [[%BUGS%/Item13510][Item13510]] | Configure is incorrectly applying =$FALSE= and =$TRUE= defaults from Config.spec files. |
| [[%BUGS%/Item13512][Item13512]] | PreferencesPlugin errors when processing SitePreferences. Issue in Foswiki::Render. |
| [[%BUGS%/Item13513][Item13513]] | Configure extension installer overlays extension settings with defaults when upgrading an extension. |
| [[%BUGS%/Item13516][Item13516]] | =bulk_copy.pl= fails to copy some webs, crashes copyng attachment revisions. Unusable. |
| [[%BUGS%/Item13516][Item13516]] | =bulk_copy.pl= has fails to copy some webs, crashes copyng attachment revisions. Unusable. |
| [[%BUGS%/Item13518][Item13518]] | Extra scrollbar in NatEditPlugin + PatternSkin. |
| [[%BUGS%/Item13520][Item13520]] | FORMFIELD macro fails to return text in a format that can be rendered. Workaround available. |
| [[%BUGS%/Item13521][Item13521]] | Wrong encoding in compressed responses. |
| [[%BUGS%/Item13524][Item13524]] | UpdatesPlugin reports zero extension(s) need updating. |
| [[%BUGS%/Item13524][Item13524]] | Updates plugin reports zero extension(s) need updating. |
| [[%BUGS%/Item13538][Item13538]] | Setting DISABLEDPLUGINS causes very noisy error log. |
| [[%BUGS%/Item13539][Item13539]] | Review CSS deprecations documented as part of stalled BaseSkin effort. |
| [[%BUGS%/Item13541][Item13541]] | =eachAttachment= returns directory names with PlainFileStore, breaks bulk_copy.pl. |
| [[%BUGS%/Item13547][Item13547]] | =bulk_copy.pl= attempts to copy history of attachments without history. |
| [[%BUGS%/Item13548][Item13548]] | Finalize some settings that can disable topic view. |
| [[%BUGS%/Item13539][Item13539]] | Review css deprecations documented as part of defunct BaseSkin effort. |
| [[%BUGS%/Item13541][Item13541]] | =eachAttachment= returns directory names with PlainFileStore, breaks =bulk_copy.pl=. |
| [[%BUGS%/Item13542][Item13542]] | Revert the RcsStore hack that extends eachAttachment API to return directory names. |
| [[%BUGS%/Item13547][Item13547]] | Copy failed from system to Sandbox. |
| [[%BUGS%/Item13549][Item13549]] | Filter backslash from Topic and Attachment names. |
| [[%BUGS%/Item13551][Item13551]] | Configure "Review installed extensions" doesn't flag all available updates. |
| [[%BUGS%/Item13554][Item13554]] | AutoViewTemplatePlugin: warn if non-ASCII template name derived from Form. |
| [[%BUGS%/Item13555][Item13555]] | UpdatesPlugin doesn't correctly find all available extensions. |
| [[%BUGS%/Item13558][Item13558]] | Syntax error in style_src.css file. |
| [[%BUGS%/Item13555][Item13555]] | UpdatesPlugin comparing RELEASE, should use VERSION. |
| [[%BUGS%/Item13558][Item13558]] | Error is style_src.css file. |
| [[%BUGS%/Item13563][Item13563]] | Crashes in Search, Foswiki.pm and Render.pm for cUID mapped from uft8 WikiName. |
| [[%BUGS%/Item13565][Item13565]] | Wide char in print error registering user with utf8 topic name and "mailprogram" email. |
| [[%BUGS%/Item13567][Item13567]] | TML in dirty areas not rendered correctly. |
| [[%BUGS%/Item13568][Item13568]] | =tools/bulk_copy.pl= removes topic data prior to saving new revision; breaks attachments and history. |
| [[%BUGS%/Item13569][Item13569]] | JQueryLoader runtime error. |
| [[%BUGS%/Item13575][Item13575]] | WysiwygPlugin converts entities to utf-8, then cannot save topic on iso-8859-1 store. |
| [[%BUGS%/Item13580][Item13580]] | Missing image in natedit help text. |
| [[%BUGS%/Item13584][Item13584]] | Natedit's Insert attachment - Ajax broken. |

---+++ Enhancements

| [[%BUGS%/Item13502][Item13502]] | CommentPlugin could expand variables on returned results when in AJAX mode. |
| [[%BUGS%/Item13526][Item13526]] | TipsContrib needs optimizations. |
| [[%BUGS%/Item13545][Item13545]] | bulk_copy.pl should omit System web by default. |
| [[%BUGS%/Item13545][Item13545]] | =bulk_copy.pl= should omit System web by default. |

</noautolink>

Expand Down
4 changes: 2 additions & 2 deletions core/lib/Foswiki.pm
Expand Up @@ -205,8 +205,8 @@ BEGIN {

# DO NOT CHANGE THE FORMAT OF $VERSION.
# Use $RELEASE for a descriptive version.
use version 0.77; $VERSION = version->declare('v2.0.0_001');
$RELEASE = 'Foswiki-2.0.1-RC1';
use version 0.77; $VERSION = version->declare('v2.0.0_002');
$RELEASE = 'Foswiki-2.0.1-RC2';

# Default handlers for different %TAGS%
# Where an entry is set as 'undef', the tag will be demand-loaded
Expand Down
14 changes: 7 additions & 7 deletions core/locale/Foswiki.pot
Expand Up @@ -1489,7 +1489,7 @@ msgstr ""
msgid "EXPAND failed - no such topic '%PARAM1%'"
msgstr ""

#: NatEditPlugin/templates/settings.natedit.tmpl:26
#: NatEditPlugin/templates/settings.natedit.tmpl:27
#: core/templates/settings.tmpl:26
msgid "Each preference has the syntax"
msgstr ""
Expand Down Expand Up @@ -1795,7 +1795,7 @@ msgstr ""
msgid "Get help on attaching files"
msgstr ""

#: NatEditPlugin/templates/settings.natedit.tmpl:32
#: NatEditPlugin/templates/settings.natedit.tmpl:33
#: core/templates/settings.tmpl:25
msgid "Get help on setting topic preferences"
msgstr ""
Expand Down Expand Up @@ -1898,8 +1898,8 @@ msgstr ""

#: NatEditPlugin/templates/edit.natedit.tmpl:86
#: NatEditPlugin/templates/edithelp.natedit.tmpl:2
#: NatEditPlugin/templates/settings.natedit.tmpl:21
#: NatEditPlugin/templates/settings.natedit.tmpl:24
#: NatEditPlugin/templates/settings.natedit.tmpl:22
#: NatEditPlugin/templates/settings.natedit.tmpl:25
#: PatternSkin/data/System/PatternSkinElements.txt:631
#: PatternSkin/data/System/PatternSkinElements.txt:645
#: PatternSkin/data/System/PatternSkinElements.txt:659
Expand Down Expand Up @@ -3049,7 +3049,7 @@ msgstr ""
msgid "Plugins"
msgstr ""

#: NatEditPlugin/templates/settings.natedit.tmpl:15
#: NatEditPlugin/templates/settings.natedit.tmpl:16
#: PatternSkin/data/Main/WebLeftBarExample.txt:14
#: PatternSkin/data/Sandbox/WebLeftBarExample.txt:13
#: PatternSkin/data/System/PatternSkinNavigation.txt:67
Expand Down Expand Up @@ -3120,7 +3120,7 @@ msgid ""
"more, study the TwentyMinuteTutorial, which is accessible from the same link."
msgstr ""

#: TipsContrib/data/System/TipsOfTheDayInclude.txt:21
#: TipsContrib/data/System/TipsOfTheDayInclude.txt:58
msgid "Read on"
msgstr ""

Expand Down Expand Up @@ -5217,7 +5217,7 @@ msgstr ""
msgid "[[%1][username]]:"
msgstr ""

#: NatEditPlugin/templates/settings.natedit.tmpl:29
#: NatEditPlugin/templates/settings.natedit.tmpl:30
#: core/templates/settings.tmpl:27
msgid ""
"[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [value]"
Expand Down
14 changes: 7 additions & 7 deletions core/locale/bg.po
Expand Up @@ -1656,7 +1656,7 @@ msgstr ""
msgid "EXPAND failed - no such topic '%PARAM1%'"
msgstr ""

#: NatEditPlugin/templates/settings.natedit.tmpl:26
#: NatEditPlugin/templates/settings.natedit.tmpl:27
#: core/templates/settings.tmpl:26
msgid "Each preference has the syntax"
msgstr "Всяка настройка има синтаксисът"
Expand Down Expand Up @@ -1988,7 +1988,7 @@ msgstr ""
msgid "Get help on attaching files"
msgstr "има повече информация за прикачване на файлове."

#: NatEditPlugin/templates/settings.natedit.tmpl:32
#: NatEditPlugin/templates/settings.natedit.tmpl:33
#: core/templates/settings.tmpl:25
msgid "Get help on setting topic preferences"
msgstr ""
Expand Down Expand Up @@ -2097,8 +2097,8 @@ msgstr "Здравей %1!"

#: NatEditPlugin/templates/edit.natedit.tmpl:86
#: NatEditPlugin/templates/edithelp.natedit.tmpl:2
#: NatEditPlugin/templates/settings.natedit.tmpl:21
#: NatEditPlugin/templates/settings.natedit.tmpl:24
#: NatEditPlugin/templates/settings.natedit.tmpl:22
#: NatEditPlugin/templates/settings.natedit.tmpl:25
#: PatternSkin/data/System/PatternSkinElements.txt:631
#: PatternSkin/data/System/PatternSkinElements.txt:645
#: PatternSkin/data/System/PatternSkinElements.txt:659
Expand Down Expand Up @@ -3343,7 +3343,7 @@ msgstr ""
msgid "Plugins"
msgstr ""

#: NatEditPlugin/templates/settings.natedit.tmpl:15
#: NatEditPlugin/templates/settings.natedit.tmpl:16
#: PatternSkin/data/Main/WebLeftBarExample.txt:14
#: PatternSkin/data/Sandbox/WebLeftBarExample.txt:13
#: PatternSkin/data/System/PatternSkinNavigation.txt:67
Expand Down Expand Up @@ -3419,7 +3419,7 @@ msgid ""
"more, study the TwentyMinuteTutorial, which is accessible from the same link."
msgstr ""

#: TipsContrib/data/System/TipsOfTheDayInclude.txt:21
#: TipsContrib/data/System/TipsOfTheDayInclude.txt:58
msgid "Read on"
msgstr "Целият текст"

Expand Down Expand Up @@ -5630,7 +5630,7 @@ msgstr "[[%1][Дебъгване текста на страницатаt]]."
msgid "[[%1][username]]:"
msgstr ""

#: NatEditPlugin/templates/settings.natedit.tmpl:29
#: NatEditPlugin/templates/settings.natedit.tmpl:30
#: core/templates/settings.tmpl:27
msgid ""
"[multiple of 3 spaces] * [space] Set [space] VARIABLENAME [space] = [value]"
Expand Down

0 comments on commit 8a1a0a6

Please sign in to comment.