Skip to content
Permalink
Browse files

Item8477: unintentionally left tracing enabled after debug; also chec…

…k in corrected MANIFEST

git-svn-id: http://svn.foswiki.org/trunk@6895 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
CrawfordCurrie CrawfordCurrie
CrawfordCurrie authored and CrawfordCurrie committed Mar 25, 2010
1 parent 7f4a91d commit 529d8745fafb7415fd7276d092aec148087f7842
@@ -805,6 +805,7 @@ pub/System/JavascriptFiles/foswiki_edit.js 0644
pub/System/JavascriptFiles/foswiki_renamebase.js 0644
pub/System/JavascriptFiles/foswikilib.js 0644
pub/System/JavascriptFiles/strikeone.js 0644
pub/System/JavascriptFiles/strikeone_src.js 0644
pub/System/PlainSkin/fullscreen.gif 0644
pub/System/PlainSkin/screenshot.gif 0644
pub/System/PreviewBackground/blankltgraybg.gif 0644
@@ -242,6 +242,7 @@ sub populateMetaFromQueryData {
}
my %vset = ();
foreach my $val (@values) {
$val ||= '';
$val =~ s/^\s*//o;
$val =~ s/\s*$//o;

@@ -1429,6 +1429,7 @@ sub saveTopic {
ASSERT($Foswiki::Plugins::SESSION) if DEBUG;
my $topicObject =
Foswiki::Meta->new( $Foswiki::Plugins::SESSION, $web, $topic, $text );

$topicObject->copyFrom($smeta) if $smeta;
return $topicObject->save(%$options);
}
@@ -2380,22 +2381,14 @@ For example, if you were to write
then %<nop>WURBLE would be expanded *before* %<NOP>MYTAG is evaluated. To avoid
this Foswiki uses escapes in the format string. For example:
=%<nop>MYTAG{format="$percntWURBLE$percnt"}%=
=%<nop>MYTAG{format="$percentWURBLE$percent"}%=
This lets you enter arbitrary strings into parameters without worrying that
Foswiki will expand them before your plugin gets a chance to deal with them
properly. Once you have processed your tag, you will want to expand these
tokens to their proper value. That's what this function does.
| *Escape:* | *Expands To:* |
| =$n= or =$n()= | New line. Use =$n()= if followed by alphanumeric character, e.g. write =Foo$n()Bar= instead of =Foo$nBar= |
| =$nop= or =$nop()= | Is a "no operation". |
| =$quot= | Double quote (="=) |
| =$percnt= | Percent sign (=%=) |
| =$dollar= | Dollar sign (=$=) |
Note thath $quot, $percnt and $dollar all work *even if they are followed by
alphanumeric characters*. You have been warned!
The set of tokens that is expanded is described in System.FormatTokens.
=cut

@@ -89,7 +89,7 @@ sub extract {
}

# Foswiki's %MAKETEXT{...}% inside a search format would look like this:
# %SEARCH{... format=" ... $percntMAKETEXT{\"...\" args=\"\"}$percnt ..." ...}%
# %SEARCH{... format=" ... $percntMAKETEXT{\"...\" args=\"\"}$percent ..." ...}%
#
# XXX: the regex down there matches a sequence formed be an escaped double
# quote (\"), followed by characters that are not doublequotes OR
@@ -104,7 +104,7 @@ sub extract {
pos($_) = 0;
my @_lines = split( /\n/, $_ );
foreach (@_lines) {
while (m/\$percntMAKETEXT\{\s*(string=)?(\\"(\\\\\\"|[^"])*\\")/gm) {
while (m/\$perce?ntMAKETEXT\{\s*(string=)?(\\"(\\\\\\"|[^"])*\\")/gm) {

# remove the enclosing [\"]'s:
my $str = substr( $2, 2, -2 );
@@ -202,15 +202,15 @@ sub _getLogForLevel {
my $level = shift;
my $log;
if ( $level eq 'debug' ) {
$log = $Foswiki::cfg{DebugFileName};
$log = $Foswiki::cfg{DebugFileName} || 'debug%DATE%.txt';
}
elsif ( $level eq 'info' ) {
$log = $Foswiki::cfg{LogFileName};
$log = $Foswiki::cfg{LogFileName} || 'log%DATE%.txt';
}
else {
ASSERT( $level =~ /^(warning|error|critical|alert|emergency)$/ )
if DEBUG;
$log = $Foswiki::cfg{WarningFileName};
$log = $Foswiki::cfg{WarningFileName} || 'warn%DATE%.txt';
}

# SMELL: Expand should not be needed, except if bin/configure tries
@@ -272,6 +272,7 @@ sub _rotate {
my $line;
while ($line = <$lf>) {
my @event = split( /\s*\|\s*/, $line );
last unless $event[1];
my $eventTime = Foswiki::Time::parseTime( $event[1] );

if (!$eventTime) {
@@ -1,11 +1,16 @@
# See bottom of file for copyright and license details
package Foswiki::Query::BinaryOP;

use strict;

use Foswiki::Query::OP;
our @ISA = ( 'Foswiki::Query::OP' );

use Foswiki::Query::SQLResult ();

sub new {
my $class = shift;
my $this = { @_, arity => 2 };
return bless( $this, $class );
return $class->SUPER::new(arity => 2, @_);
}

# Determine if a string represents a valid number
@@ -56,4 +61,34 @@ sub evalTest {
}
}

sub xpath {
my $this = shift;
my $node = shift;
my $a = $node->{params}[0];
my $b = $node->{params}[1];
return '('.$a->xpath().' '.($this->{xpath_op} || $this->{name})
.' '.$b->xpath(@_).')';
}

1;
__END__
Module of Foswiki - The Free and Open Source Wiki, http://foswiki.org/, http://Foswiki.org/
Copyright (C) 2009 Foswiki Contributors. All Rights Reserved.
Foswiki Contributors are listed in the AUTHORS file in the root
of this distribution. NOTE: Please extend that file, not this notice.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. For
more details read LICENSE in the root of this distribution.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
As per the GPL, removal of this notice is prohibited.
Author: Crawford Currie http://c-dot.co.uk
@@ -127,22 +127,46 @@ sub evaluate {
return $result;
}

sub xpath {
my $this = shift;
my $result;
if ( !ref( $this->{op} ) ) {
if ( $this->{op} == $Foswiki::Infix::Node::STRING) {
$result = "'" . $this->{params}[0] . "'";
} elsif ( $this->{op} == $Foswiki::Infix::Node::NAME) {
my $name = $this->{params}[0];
foreach my $n (keys %aliases) {
if ($name eq $n || $name eq $aliases{$n} ) {
return $n;
}
}
# Not a recognised keyword, must be a field name
return 'fields[@name="'.$name.'"]';
} else {
$result = $this->{params}[0];
}
} else {
$result = $this->{op}->xpath( $this, @_ );
}
return $result;
}

1;
__DATA__
Module of Foswiki - The Free and Open Source Wiki, http://foswiki.org/, http://Foswiki.org/
# Copyright (C) 2008-2009 Foswiki Contributors. All Rights Reserved.
# Foswiki Contributors are listed in the AUTHORS file in the root
# of this distribution. NOTE: Please extend that file, not this notice.
#
# Additional copyrights apply to some or all of the code in this
# file as follows:
#
# Copyright (C) 2005-2007 TWiki Contributors. All Rights Reserved.
# TWiki Contributors are listed in the AUTHORS file in the root
# of this distribution. NOTE: Please extend that file, not this notice.
#
Copyright (C) 2008-2009 Foswiki Contributors. All Rights Reserved.
Foswiki Contributors are listed in the AUTHORS file in the root
of this distribution. NOTE: Please extend that file, not this notice.
Additional copyrights apply to some or all of the code in this
file as follows:
Copyright (C) 2005-2007 TWiki Contributors. All Rights Reserved.
TWiki Contributors are listed in the AUTHORS file in the root
of this distribution. NOTE: Please extend that file, not this notice.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
@@ -15,7 +15,9 @@ our @ISA = ('Foswiki::Query::UnaryOP');

sub new {
my $class = shift;
return $class->SUPER::new( name => 'd2n', prec => 600 );
return $class->SUPER::new(
name => 'd2n',
prec => 600 );
}

sub evaluate {
@@ -9,13 +9,15 @@
package Foswiki::Query::OP_dot;

use strict;
use Assert;

use Foswiki::Query::BinaryOP ();
our @ISA = ('Foswiki::Query::BinaryOP');
use Foswiki::Query::Node;

sub new {
my $class = shift;
return $class->SUPER::new( name => '.', prec => 800 );
return $class->SUPER::new( name => '.', ascname => 'dot', prec => 800 );
}

sub evaluate {
@@ -33,6 +35,14 @@ sub evaluate {
return $res;
}

sub xpath {
my $this = shift;
my $node = shift;
my $a = $node->{params}[0];
my $b = $node->{params}[1];
return $a->xpath().'['.$b->xpath(@_).']';
}

1;

__DATA__
@@ -15,7 +15,8 @@ our @ISA = ('Foswiki::Query::BinaryOP');

sub new {
my $class = shift;
return $class->SUPER::new( name => '=', prec => 500 );
return $class->SUPER::new(
name => '=', ascname => 'eq', prec => 500 );
}

sub evaluate {
@@ -34,17 +35,17 @@ __DATA__
Module of Foswiki - The Free and Open Source Wiki, http://foswiki.org/, http://Foswiki.org/
# Copyright (C) 2008 Foswiki Contributors. All Rights Reserved.
# Foswiki Contributors are listed in the AUTHORS file in the root
# of this distribution. NOTE: Please extend that file, not this notice.
#
# Additional copyrights apply to some or all of the code in this
# file as follows:
#
# Copyright (C) 2005-2007 TWiki Contributors. All Rights Reserved.
# TWiki Contributors are listed in the AUTHORS file in the root
# of this distribution. NOTE: Please extend that file, not this notice.
#
Copyright (C) 2008 Foswiki Contributors. All Rights Reserved.
Foswiki Contributors are listed in the AUTHORS file in the root
of this distribution. NOTE: Please extend that file, not this notice.
Additional copyrights apply to some or all of the code in this
file as follows:
Copyright (C) 2005-2007 TWiki Contributors. All Rights Reserved.
TWiki Contributors are listed in the AUTHORS file in the root
of this distribution. NOTE: Please extend that file, not this notice.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
@@ -15,7 +15,8 @@ our @ISA = ('Foswiki::Query::BinaryOP');

sub new {
my $class = shift;
return $class->SUPER::new( name => '>', prec => 400 );
return $class->SUPER::new(
name => '>', ascname => 'gt', prec => 400 );
}

sub evaluate {
@@ -15,7 +15,8 @@ our @ISA = ('Foswiki::Query::BinaryOP');

sub new {
my $class = shift;
return $class->SUPER::new( name => '>=', prec => 400 );
return $class->SUPER::new(
name => '>=', ascname => 'ge', prec => 400 );
}

sub evaluate {
@@ -29,6 +29,13 @@ sub evaluate {
return $this->evalUnary( $node, sub { lc(shift) }, @_ );
}

sub xpath {
my $this = shift;
my $node = shift;
my $a = $node->{params}[0];
return 'lower('.$a->xpath().')';
}

1;

__DATA__
@@ -15,7 +15,10 @@ our @ISA = ('Foswiki::Query::BinaryOP');

sub new {
my $class = shift;
return $class->SUPER::new( name => '~', prec => 500 );
return $class->SUPER::new(
name => '~',
ascname => 'like',
prec => 500 );
}

sub evaluate {
@@ -37,6 +40,14 @@ sub evaluate {
);
}

sub xpath {
my $this = shift;
my $node = shift;
my $a = $node->{params}[0];
my $b = $node->{params}[1];
return 'like('.$a->xpath().','.$b->xpath(@_).')';
}

1;

__DATA__
@@ -15,7 +15,8 @@ our @ISA = ('Foswiki::Query::BinaryOP');

sub new {
my $class = shift;
return $class->SUPER::new( name => '<', prec => 400 );
return $class->SUPER::new(
name => '<', ascname => 'lt', prec => 400 );
}

sub evaluate {
@@ -15,7 +15,7 @@ our @ISA = ('Foswiki::Query::BinaryOP');

sub new {
my $class = shift;
return $class->SUPER::new( name => '<=', prec => 400 );
return $class->SUPER::new( name => '<=', ascname => 'le', prec => 400 );
}

sub evaluate {
@@ -15,7 +15,7 @@ our @ISA = ('Foswiki::Query::BinaryOP');

sub new {
my $class = shift;
return $class->SUPER::new( name => '!=', prec => 500 );
return $class->SUPER::new( name => '!=', ascname => 'ne', prec => 500 );
}

sub evaluate {

0 comments on commit 529d874

Please sign in to comment.
You can’t perform that action at this time.