Skip to content

Commit

Permalink
Item14152: Merge commit '04265160dc8c843b76bb14c2491b9fdd4b80cb62' in…
Browse files Browse the repository at this point in the history
…to Item14152

* commit '04265160dc8c843b76bb14c2491b9fdd4b80cb62': (21 commits)
  Item14195 Prevent loop in UI/View under some conditions
  Item13884 Translated using Weblate (Chinese (Taiwan))
  Item13884 Translated using Weblate (Ukrainian)
  Item13884 Translations updated using Weblate (Chinese (Taiwan))
  Item13884 Translations updated using Weblate (Ukrainian)
  Item13883 Enhance documentation of Escapes.
  Item14033 Bump API version to account for Foswiki::Request subtypes
  Item14177 performance improvements to tmpl loader
  Item14176 exclude POSTDATA from QUERYSTRING
  Item14176 exclude POSTDATA from QUERYSTRING
  Item14176 don't add POSTDATA to TOC links
  Item14175 remove browser detection in Logger
  Item13206 removing margin from ui-buttons
  Item13206 fix jquery icon parameter
  Item14174 remove Makefile again
  Item14174 missing files in MANIFEST
  Item14092 merge from master
  Item14092 restructure attach template properties
  Item14092 add "propertieshook" placeholder docu
  EditRowPlugin: Fix system topic install permissions.
  ...
  • Loading branch information
vrurg committed Sep 22, 2016
2 parents 82bcacf + 0426516 commit 92039a8
Show file tree
Hide file tree
Showing 17 changed files with 96 additions and 212 deletions.
8 changes: 4 additions & 4 deletions ConfigurePlugin/data/System/ConfigurePlugin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1460393558" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1474573775" format="1.1" version="1"}%
%META:TOPICPARENT{name="Plugins"}%
---+!! Configure Plugin
%FORMFIELD{"Description"}%
Expand Down Expand Up @@ -52,9 +52,9 @@ The plugin uses the =JsonRpcContrib=, which must be installed.
%META:FIELD{name="Author" title="Author" value="CrawfordCurrie"}%
%META:FIELD{name="Copyright" title="Copyright" value="2013-2016, CrawfordCurrie http://c-dot.co.uk, All Rights Reserved"}%
%META:FIELD{name="Description" title="Description" value="%25$SHORTDESCRIPTION%25"}%
%META:FIELD{name="Home" title="Home" value="http://foswiki.org/Extensions/%25$ROOTMODULE%25"}%
%META:FIELD{name="License" title="License" value="GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]])"}%
%META:FIELD{name="Home" title="Home" value="https://foswiki.org/Extensions/%25$ROOTMODULE%25"}%
%META:FIELD{name="License" title="License" value="GPL ([[https://www.gnu.org/copyleft/gpl.html][GNU General Public License]])"}%
%META:FIELD{name="Release" title="Release" value="%25$RELEASE%25"}%
%META:FIELD{name="Repository" title="Repository" value="https://github.com/foswiki/distro"}%
%META:FIELD{name="Support" title="Support" value="http://foswiki.org/Support/%25$ROOTMODULE%25"}%
%META:FIELD{name="Support" title="Support" value="https://foswiki.org/Support/%25$ROOTMODULE%25"}%
%META:FIELD{name="Version" title="Version" value="%25$VERSION%25"}%
65 changes: 1 addition & 64 deletions ConfigurePlugin/lib/Foswiki/Plugins/ConfigurePlugin/build.pl
@@ -1,23 +1,4 @@
#!/usr/bin/perl -w
#
# Example build class. Copy this file to the equivalent place in your
# plugin or contrib and edit.
#
# Read the comments at the top of lib/Foswiki/Contrib/Build.pm for
# details of how the build process works, and what files you
# have to provide and where.
#
# Requires the environment variable FOSWIKI_LIBS (a colon-separated path
# list) to be set to point at the build system and any required dependencies.
# Usage: ./build.pl [-n] [-v] [target]
# where [target] is the optional build target (build, test,
# install, release, uninstall), test is the default.
# Two command-line options are supported:
# -n Don't actually do anything, just print commands
# -v Be verbose
#

# Standard preamble
#!/usr/bin/env perl
use strict;
use warnings;

Expand All @@ -30,47 +11,3 @@

# Build the target on the command line, or the default target
$build->build( $build->{target} );

=begin TML
You can do a lot more with the build system if you want; for example, to add
a new target, you could do this:
<verbatim>
{
package MyModuleBuild;
our @ISA = qw( Foswiki::Contrib::Build );
sub new {
my $class = shift;
return bless( $class->SUPER::new( "MyModule" ), $class );
}
sub target_mytarget {
my $this = shift;
# Do other build stuff here
}
}
# Create the build object
my $build = new MyModuleBuild();
</verbatim>
You can also specify a different default target server for uploads.
This can be any web on any accessible Foswiki installation.
These defaults will be used when expanding tokens in .txt
files, but be warned, they can be overridden at upload time!
<verbatim>
# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';
# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';
# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';
# Script extension
$build->{UPLOADTARGETSUFFIX} = '';
</verbatim>
=cut

Expand Up @@ -481,6 +481,7 @@ table.tml {
background:#aaa;
border-color:#aaa;
border-radius:0;
margin:0;
}
.ui-tabs-vertical > .ui-tabs-nav > li.ui-tabs-active > a {
color:#fff;
Expand Down
Expand Up @@ -581,9 +581,7 @@ function _id_ify(id) {
call_wizard($node, fb, $node);
}
}).button({
icons: {
primary: icon
}
icon: icon
});
$node.find(".button_box").append($button);
}
Expand Down Expand Up @@ -664,9 +662,7 @@ function _id_ify(id) {
handler.restoreCurrentValue();
check_current_value($node, true);
}).button({
icons: {
primary: "ui-icon-cancel"
}
icon: "ui-icon-cancel"
}).hide();
$button.appendTo($buttons);

Expand All @@ -676,9 +672,7 @@ function _id_ify(id) {
handler.restoreDefaultValue();
check_current_value($node, true);
}).button({
icons: {
primary: "ui-icon-arrowrefresh-1-w"
}
icon: "ui-icon-arrowrefresh-1-w"
}).hide();
$button.appendTo($buttons);

Expand Down Expand Up @@ -1076,9 +1070,7 @@ if (0) {
});

$('#searchButton').button({
icons: {
primary: "ui-icon-search"
},
icon: "ui-icon-search",
text: false
}).click(function() {
search($("#searchInput").val());
Expand Down Expand Up @@ -1181,9 +1173,7 @@ if (0) {
});
$('.help_button').each(function() {
$(this).button({
icons: {
primary: $(this).attr("name")
},
icon: $(this).attr("name"),
text: false
});
});
Expand Down
5 changes: 4 additions & 1 deletion EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/MANIFEST
@@ -1,5 +1,5 @@
!noci
data/System/EditRowPlugin.txt 0755
data/System/EditRowPlugin.txt 0644
data/System/EditRowPluginExamples.txt 0644
lib/Foswiki/Configure/Checkers/Plugins/EditRowPlugin/Enabled.pm 0644
lib/Foswiki/Configure/Checkers/Plugins/EditRowPlugin/Macro.pm 0644
Expand All @@ -25,11 +25,14 @@ lib/Foswiki/Plugins/EditRowPlugin/TableParser.pm 0644
lib/Foswiki/Plugins/EditRowPlugin/TableRow.pm 0644
lib/Foswiki/Plugins/EditRowPlugin/View.pm 0644
pub/System/EditRowPlugin/TableSort.js 0644
pub/System/EditRowPlugin/TableSort.js.gz 0644
pub/System/EditRowPlugin/TableSort.uncompressed.js 0644
pub/System/EditRowPlugin/clock.gif 0644
pub/System/EditRowPlugin/erp.css 0644
pub/System/EditRowPlugin/erp.css.gz 0644
pub/System/EditRowPlugin/erp.uncompressed.css 0644
pub/System/EditRowPlugin/erp.js 0644
pub/System/EditRowPlugin/erp.js.gz 0644
pub/System/EditRowPlugin/erp.uncompressed.js 0644
pub/System/EditRowPlugin/example3.png 0644
pub/System/EditRowPlugin/example4.png 0644
Expand Down
Expand Up @@ -1828,8 +1828,6 @@ a.ui-state-highlight.ui-state-hover,
----------------------------------*/
.ui-button {
padding: 0.2307em 0.6153em; /* 3px 8px */
margin-right:0.7em;
margin-bottom:0.7em;
}
.ui-button-icon-space {
margin-right:1px;
Expand Down
Expand Up @@ -942,8 +942,6 @@ a.ui-state-highlight.ui-state-hover,
----------------------------------*/
.ui-button {
padding: 0.2307em 0.6153em; /* 3px 8px */
margin-right:0.7em;
margin-bottom:0.7em;
}
.ui-button-icon-space {
margin-right:1px;
Expand Down
20 changes: 14 additions & 6 deletions PatternSkin/templates/attach.pattern.tmpl
Expand Up @@ -60,13 +60,21 @@ class="foswikiHelp"
<input class="foswikiInputField" type="text" name="filecomment" value="%FILECOMMENT%" size="70" />
</div>%TMPL:END%

%TMPL:DEF{"properties"}%<div class="foswikiFormStep">
---+++ %MAKETEXT{"Properties"}%
%TMPL:DEF{"properties"}%<div class="foswikiFormStep">%TMPL:P{"properties::content"}%</div>%TMPL:P{"changepropertiesaction"}%%TMPL:END%

<input type="checkbox" class="foswikiCheckbox" id="createlink" name="createlink" %ATTACHLINKBOX% /><label for="createlink">%MAKETEXT{"Create a link to the attached file"}%</label> <span class="foswikiGrayText">%MAKETEXT{"Images will be displayed, for other attachments a link will be created."}%</span>
%TMPL:DEF{"properties::content"}%
%TMPL:P{"properties::title"}%
%TMPL:P{"properties::createlink"}%
%TMPL:P{"properties::hidefile"}%
%TMPL:END%

<input type="checkbox" class="foswikiCheckbox" id="hidefile" name="hidefile" %HIDEFILE% /><label for="hidefile">%MAKETEXT{"Do not show attachment in table"}%</label> <span class="foswikiGrayText">%MAKETEXT{"Attachments will not be shown in topic view page."}%</span>
</div>%TMPL:P{"changepropertiesaction"}%%TMPL:END%
%TMPL:DEF{"properties::title"}%---+++ %MAKETEXT{"Properties"}%%TMPL:END%

%TMPL:DEF{"properties::createlink"}%
<input type="checkbox" class="foswikiCheckbox" id="createlink" name="createlink" %ATTACHLINKBOX% /><label for="createlink">%MAKETEXT{"Create a link to the attached file"}%</label> <span class="foswikiGrayText">%MAKETEXT{"Images will be displayed, for other attachments a link will be created."}%</span>%TMPL:END%

%TMPL:DEF{"properties::hidefile"}%
<input type="checkbox" class="foswikiCheckbox" id="hidefile" name="hidefile" %HIDEFILE% /><label for="hidefile">%MAKETEXT{"Do not show attachment in table"}%</label> <span class="foswikiGrayText">%MAKETEXT{"Attachments will not be shown in topic view page."}%</span>%TMPL:END%


%TMPL:DEF{"attachformend"}%%TMPL:END%
Expand All @@ -80,4 +88,4 @@ class="foswikiHelp"
%TMPL:P{"formend"}%
%TMPL:P{"movedelete"}%
%TMPL:P{"versions"}%
%TMPL:P{"existingattachments"}%%TMPL:END%
%TMPL:P{"existingattachments"}%%TMPL:END%
45 changes: 30 additions & 15 deletions core/data/System/EditingShorthand.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1457496285" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1474573775" format="1.1" version="1"}%
---+ Editing Shorthand
%STARTINCLUDE%
%TABLE{}%
Expand Down Expand Up @@ -562,7 +562,6 @@ Some characters are reserved for use by TML
* Display them in your output by using the HTML entities.
* Use HTML entities to display characters that are not supported by your site character set (e.g. special mathematical symbols). There's a complete list of named entities in [[http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references][Wikipedia]]
* Use numerical entities to display any unicode character (e.g. Chinese script).
* To prevent Foswiki from treating ! as an escape, escape it with =&lt;nop&gt;=, or use the =&amp;#33;= entity
</td>
<td>
<verbatim>
Expand All @@ -583,23 +582,39 @@ A <nop>!= B &#33;= C
</tr>
<tr valign="top">
<td>
*Escaping Macros* %BR%
Prevent a Macro from being expanded by prepending it with an exclamation point.

%T% To expand the macro, but escape any wikiword it expands into, use the &lt;nop&gt; tag.
</td><td>
*Escapes* %BR%
Escapes are used to prevent a "default action" from occuring. They are used in many places when composing topics and writing Foswiki macros.
$ ==!==: The exclamation point will block expansion of macros, prevents automatic linking of WikiWords, email addresses, URLs, and ![[explicit links]].
* To expand a macro, but escape any wikiword it expands into, use the &lt;nop&gt; tag.
* To prevent Foswiki from treating ! as an escape, escape it with =&lt;nop&gt;=, or use the =&amp;#33;= entity
$ ==\==: The backslash is used to prevent normal interpretation of a character, allowing inclusion of quotes inside a quoted string. It can also be used to \
continue a line (escapes the "newline"). When used as a "continue" it must be the very last character prior to the newline.
$ ==&lt;nop&gt;==: The =nop= (no operation) is used to prevent linking of !WikiWords, email addresses, URLs, but _not_ Macros or ![[explicit links]]
</td>
<td>
<verbatim class="tml">
!%TOPIC%
!WikiWord %BR%
!%TOPIC% %BR%
<nop>%TOPIC% %BR%
<nop>%WIKIWEBMASTER% %BR%
<nop>!%TOPIC% %BR%
!here &#33;here <nop>!here %BR%
%TOP\
IC%

<nop>%TOPIC%
</verbatim>
</td><td>

!%TOPIC%

<nop>%TOPIC%
</td>
</tr>
<td>
%BR%
!WikiWord %BR%
!%TOPIC% %BR%
<nop>%TOPIC% %BR%
<nop>%WIKIWEBMASTER% %BR%
<nop>!%TOPIC% %BR%
!here &#33;here <nop>!here %BR%
%TOP\
IC%
</td>
<tr valign="top">
<td>
*Controlling how content is rendered:* %BR%
Expand Down
21 changes: 0 additions & 21 deletions core/lib/Foswiki/Logger.pm
Expand Up @@ -115,7 +115,6 @@ This routine assigns values to some common fields that are useful in logs.
In the older Logging API, these were only provided by the Foswiki::writeEvent()
method for "info" level events.
| =$fhash->{agent}= | The user agent |
| =$fhash->{timestamp}= | The time of the event |
| =$fhash->{user}= | The logged in user, if any |
| =$fhash->{webTopic}= | The current topic |
Expand All @@ -132,26 +131,6 @@ sub setCommonFields {
$login = $users->getLoginName($user) if ($users);
$_[0]->{user} = $login if $login;

unless ( defined $_[0]->{agent} ) {
my $agent = '';
my $cgiQuery = $Foswiki::app->request;
if ($cgiQuery) {
my $agentStr = $cgiQuery->user_agent();
if ($agentStr) {
if ( $agentStr =~
m/(MSIE 6|MSIE 7|MSIE 8|MSI 9|Firefox|Opera|Konqueror|Chrome|Safari)/
)
{
$_[0]->{agent} = $1;
}
else {
$agentStr =~ m/([\w]+)/;
$_[0]->{agent} = $1;
}
}
}
}

unless ( defined $_[0]->{remoteAddr} ) {
$_[0]->{remoteAddr} = $Foswiki::app->request->remoteAddress || ''
if ( defined $Foswiki::app->request );
Expand Down
1 change: 1 addition & 0 deletions core/lib/Foswiki/Macros/TOC.pm
Expand Up @@ -127,6 +127,7 @@ sub TOC {
next if ( $name eq 'topic' );
next if ( $name eq 'text' );
next if ( $name eq 'refresh' );
next if ( $name eq 'POSTDATA' );
push( @qparams, $name => scalar( $query->param($name) ) );
}

Expand Down
6 changes: 5 additions & 1 deletion core/lib/Foswiki/Plugins.pm
Expand Up @@ -38,7 +38,11 @@ if you have a recent enough version.
=cut

use version 0.77; our $VERSION = version->parse("2.4");
use version 0.77; our $VERSION = version->parse("2.5");

# 2.5 - Foswiki::Request subtypes of Rest, JSON, Attachment, ...
# 2.4 - Template names suport unicode characters
# 2.3 - Added registrationValidationHandler

my %onlyOnceHandlers = (
registrationHandler => 1,
Expand Down
1 change: 1 addition & 0 deletions core/lib/Foswiki/Request.pm
Expand Up @@ -359,6 +359,7 @@ sub query_string {
my $this = shift;
my @params;
foreach my $name ( $this->param ) {
next if $name eq 'POSTDATA';
my $key = Foswiki::urlEncode($name);
push @params,
map { $key . "=" . Foswiki::urlEncode( defined $_ ? $_ : '' ) }
Expand Down

0 comments on commit 92039a8

Please sign in to comment.