various bug fixes

This commit is contained in:
JT Smith 2004-07-11 15:53:29 +00:00
parent 83b93e22e8
commit fb5bbc4bb8
4 changed files with 22 additions and 9 deletions

View file

@ -73,12 +73,16 @@
- bugfix [ 934410 ] non-compliant HTML (solution). Thanks to Nicklous - bugfix [ 934410 ] non-compliant HTML (solution). Thanks to Nicklous
Roberts. Roberts.
- bugfix [ 963316 ] Field without title in Content Settings - bugfix [ 963316 ] Field without title in Content Settings
- Fixed a bug that affected Postgres when creating pages.
- RFE [ 978033 ] WebGUI::Form::fieldType - "float" type is missing
- Converted the page tree system from the ajacency list model to the nested - Converted the page tree system from the ajacency list model to the nested
set model. Thanks to Martin Kamerbeek / Procolix and Dan Collis Puro for set model. Thanks to Martin Kamerbeek / Procolix and Dan Collis Puro for
providing the DBIx::Tree::NestedSet module. providing the DBIx::Tree::NestedSet module.
- Dropped page tree caching and stepped onto Navigation caching. This helps - Dropped page tree caching and stepped onto Navigation caching. This helps
scalability a lot. Thanks to Martin Kamerbeek / Procolix scalability a lot. Thanks to Martin Kamerbeek / Procolix
6.0.3 6.0.3
- Fixed a recursive style change bug. - Fixed a recursive style change bug.
- Bugfix [ 953593 ] perl -MWebGUI -e "" fails - Bugfix [ 953593 ] perl -MWebGUI -e "" fails

View file

@ -544,10 +544,8 @@ sub fieldType {
my (%hash, $output, $type); my (%hash, $output, $type);
tie %hash, 'Tie::IxHash'; tie %hash, 'Tie::IxHash';
# NOTE: What you are about to see is bad code. Do not attempt this # NOTE: What you are about to see is bad code. Do not attempt this
# without adult supervision. =) It was done this way because a huge # without adult supervision. =)
# if/elsif construct executes much more quickly than a bunch of my @types = qw(dateTime time float zipcode text textarea HTMLArea url date email phone integer yesNo selectList radioList checkList);
# unnecessary database hits.
my @types = qw(dateTime time zipcode text textarea HTMLArea url date email phone integer yesNo selectList radioList checkList);
$_[0]->{types} = \@types unless ($_[0]->{types}); $_[0]->{types} = \@types unless ($_[0]->{types});
foreach $type (@{$_[0]->{types}}) { foreach $type (@{$_[0]->{types}}) {
if ($type eq "text") { if ($type eq "text") {
@ -564,6 +562,8 @@ sub fieldType {
$hash{url} = WebGUI::International::get(478); $hash{url} = WebGUI::International::get(478);
} elsif ($type eq "date") { } elsif ($type eq "date") {
$hash{date} = WebGUI::International::get(479); $hash{date} = WebGUI::International::get(479);
} elsif ($type eq "float") {
$hash{float} = WebGUI::International::get("float");
} elsif ($type eq "email") { } elsif ($type eq "email") {
$hash{email} = WebGUI::International::get(480); $hash{email} = WebGUI::International::get(480);
} elsif ($type eq "phone") { } elsif ($type eq "phone") {

View file

@ -964,10 +964,13 @@ The page id of the page you're creating a URL for.
=cut =cut
sub makeUnique { sub makeUnique {
my ($url, $test, $pageId); my $url = $_[0] || "_1";
$url = $_[0] || "_1"; my $pageId = $_[1] || "new";
$pageId = $_[1] || "new"; my $where = "where urlizedTitle=".quote($url);
while (($test) = WebGUI::SQL->quickArray("select urlizedTitle from page where urlizedTitle='$url' and pageId<>'$pageId'")) { unless ($pageId eq "new") {
$where .= " and pageId<>".$pageId;
}
while (my ($test) = WebGUI::SQL->quickArray("select urlizedTitle from page ".$where)) {
if ($url =~ /(.*)(\d+$)/) { if ($url =~ /(.*)(\d+$)/) {
$url = $1.($2+1); $url = $1.($2+1);
} elsif ($test ne "") { } elsif ($test ne "") {

View file

@ -7134,6 +7134,12 @@ Following a guide like the above will help you get good ranking on search engine
message => q|Ends With|, message => q|Ends With|,
lastUpdated => 1089039511, lastUpdated => 1089039511,
context => q|A phrase or word ends with this.| context => q|A phrase or word ends with this.|
},
'float' => {
message => q|Decimal|,
lastUpdated => 1089039511,
context => q|A label that tells the user that this field uses a floating point number, aka a Decimal number, aka a Real number.|
} }
}; };